Skip to content

Commit

Permalink
Mute unused parameter warnings for Nano Every
Browse files Browse the repository at this point in the history
  • Loading branch information
MCUdude committed Jan 29, 2021
1 parent b170b1e commit d979a4b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions megaavr/libraries/Wire/src/Wire.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,12 @@ bool TwoWire::pins(uint8_t sda_pin, uint8_t scl_pin)
PORTMUX.TWISPIROUTEA = TWI_MUX | (PORTMUX.TWISPIROUTEA & ~(3 << 4));
return false;
}

#else
(void)sda_pin; // Mute unused parameter warning
(void)scl_pin;
return false;
#endif

}

bool TwoWire::swap(uint8_t state)
Expand All @@ -104,8 +108,10 @@ bool TwoWire::swap(uint8_t state)
PORTMUX.TWISPIROUTEA = TWI_MUX | (PORTMUX.TWISPIROUTEA & ~(3 << 4));
return true;
}
#endif
#else
(void)state; // Mute unused parameter warning
return false;
#endif
}

void TwoWire::begin(void)
Expand Down

0 comments on commit d979a4b

Please sign in to comment.