Skip to content

Commit

Permalink
Fix turn function
Browse files Browse the repository at this point in the history
  • Loading branch information
mur4ik18 committed Jul 28, 2023
1 parent 54294b6 commit 65426c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Mega2560.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
void turn(uint8_t port, bool onoff) {
volatile uint8_t *out = getPort(digital_to_port(port));
volatile uint8_t bit = getBit(port);
if (onoff) {
if (onoff == ON) {
*out |= bit;
} else {
*out &= ~bit;
Expand Down

0 comments on commit 65426c8

Please sign in to comment.