Skip to content

Commit 9a5422d

Browse files
committed
relax digitalWrite parameter check
calling digitalWrite with any value different from 0 will end in performing digitalWrite(HIGH)
1 parent 6e7409f commit 9a5422d

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

cores/arduino/wiring_digital.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,8 @@ void digitalWrite( uint32_t ulPin, uint32_t ulVal )
8686
PORT->Group[g_APinDescription[ulPin].ulPort].OUTCLR.reg = (1ul << g_APinDescription[ulPin].ulPin) ;
8787
break ;
8888

89-
case HIGH:
90-
PORT->Group[g_APinDescription[ulPin].ulPort].OUTSET.reg = (1ul << g_APinDescription[ulPin].ulPin) ;
91-
break ;
92-
9389
default:
90+
PORT->Group[g_APinDescription[ulPin].ulPort].OUTSET.reg = (1ul << g_APinDescription[ulPin].ulPin) ;
9491
break ;
9592
}
9693

0 commit comments

Comments
 (0)