Skip to content

Commit 73649c2

Browse files
committed
Fixed digitalPinToPort and digitalPinToBitMask macros. (thanks to alvesjc)
1 parent dc97316 commit 73649c2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hardware/arduino/sam/cores/arduino/Arduino.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ extern void loop( void ) ;
5454
// Get the bit location within the hardware port of the given virtual pin.
5555
// This comes from the pins_*.c file for the active board configuration.
5656
//
57-
#define digitalPinToPort(P) ( g_APinDescription[P]->pPort )
58-
#define digitalPinToBitMask(P) ( g_APinDescription[P]->ulPin )
57+
#define digitalPinToPort(P) ( g_APinDescription[P].pPort )
58+
#define digitalPinToBitMask(P) ( g_APinDescription[P].ulPin )
5959
#define digitalPinToTimer(P) ( )
6060
//#define analogInPinToBit(P) ( )
6161
#define portOutputRegister(port) ( port->PIO_ODSR )

0 commit comments

Comments
 (0)