Skip to content

Commit 52127a2

Browse files
carlosperatesandeepmistry
authored andcommitted
Fix Arduino.h portOutputRegister() and portModeRegister()
This functions were using the OUTSET and DIRSET registers instead of SET and DIR. The xxxSET registers only do something when a "1" is written to any of their bits, writting a "0" does nothing.
1 parent 75baa76 commit 52127a2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cores/nRF5/Arduino.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@ void loop( void ) ;
109109
#error "Unsupported GPIO_COUNT"
110110
#endif
111111

112-
#define portOutputRegister(port) ( &(port->OUTSET) )
112+
#define portOutputRegister(port) ( &(port->OUT) )
113113
#define portInputRegister(port) ( &(port->IN) )
114-
#define portModeRegister(port) ( &(port->DIRSET) )
114+
#define portModeRegister(port) ( &(port->DIR) )
115115
#define digitalPinHasPWM(P) ( true )
116116

117117
/*

0 commit comments

Comments
 (0)