Skip to content

Commit c68a0f5

Browse files
committed
Fixed portOutputRegister() and portInputRegister() macros.
http://arduino.cc/forum/index.php/topic,130714.0.html
1 parent 73649c2 commit c68a0f5

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
@@ -58,8 +58,8 @@ extern void loop( void ) ;
5858
#define digitalPinToBitMask(P) ( g_APinDescription[P].ulPin )
5959
#define digitalPinToTimer(P) ( )
6060
//#define analogInPinToBit(P) ( )
61-
#define portOutputRegister(port) ( port->PIO_ODSR )
62-
#define portInputRegister(port) ( port->PIO_PDSR )
61+
#define portOutputRegister(port) ( &(port->PIO_ODSR) )
62+
#define portInputRegister(port) ( &(port->PIO_PDSR) )
6363
//#define portModeRegister(P) ( )
6464

6565
//#define NOT_A_PIN 0 // defined in pio.h/EPioType

0 commit comments

Comments
 (0)