Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
carlosperate authored and sandeepmistry committed Jun 12, 2022
1 parent 75baa76 commit 52127a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cores/nRF5/Arduino.h
Expand Up @@ -109,9 +109,9 @@ void loop( void ) ;
#error "Unsupported GPIO_COUNT"
#endif

#define portOutputRegister(port) ( &(port->OUTSET) )
#define portOutputRegister(port) ( &(port->OUT) )
#define portInputRegister(port) ( &(port->IN) )
#define portModeRegister(port) ( &(port->DIRSET) )
#define portModeRegister(port) ( &(port->DIR) )
#define digitalPinHasPWM(P) ( true )

/*
Expand Down

0 comments on commit 52127a2

Please sign in to comment.