Add and apply WITHIN macro
This commit is contained in:
parent
93aad54dc1
commit
25a6bfa7ed
11 changed files with 74 additions and 71 deletions
|
|
@ -42,7 +42,7 @@ void TWIBus::reset() {
|
|||
}
|
||||
|
||||
void TWIBus::address(const uint8_t adr) {
|
||||
if (adr < 8 || adr > 127) {
|
||||
if (!WITHIN(adr, 8, 127)) {
|
||||
SERIAL_ECHO_START;
|
||||
SERIAL_ECHOLNPGM("Bad I2C address (8-127)");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue