Skip to content

Commit

Permalink
Fix a compiler warning
Browse files Browse the repository at this point in the history
  • Loading branch information
pgrawehr committed Nov 6, 2022
1 parent 4fbce41 commit 8eaea08
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/utility/OneWire.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ uint8_t OneWire::reset(void)
r = !DIRECT_READ(reg, mask);
interrupts();
delayMicroseconds(410);
reg = reg; // Avoid Warning on unused variable when compiling in compatibility mode
return r;
}

Expand Down Expand Up @@ -195,6 +196,7 @@ void OneWire::write_bit(uint8_t v)
interrupts();
delayMicroseconds(5);
}
reg = reg; // Avoid Warning on unused variable when compiling in compatibility mode
}

//
Expand All @@ -216,6 +218,7 @@ uint8_t OneWire::read_bit(void)
r = DIRECT_READ(reg, mask);
interrupts();
delayMicroseconds(53);
reg = reg; // Avoid Warning on unused variable when compiling in compatibility mode
return r;
}

Expand Down

0 comments on commit 8eaea08

Please sign in to comment.