From c68a0f58757819145ef7ba49e4e0ace3d4a36b80 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Mon, 5 Nov 2012 16:52:57 +0100 Subject: [PATCH] Fixed portOutputRegister() and portInputRegister() macros. http://arduino.cc/forum/index.php/topic,130714.0.html --- hardware/arduino/sam/cores/arduino/Arduino.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hardware/arduino/sam/cores/arduino/Arduino.h b/hardware/arduino/sam/cores/arduino/Arduino.h index a53d1c942..c433ead6a 100644 --- a/hardware/arduino/sam/cores/arduino/Arduino.h +++ b/hardware/arduino/sam/cores/arduino/Arduino.h @@ -58,8 +58,8 @@ extern void loop( void ) ; #define digitalPinToBitMask(P) ( g_APinDescription[P].ulPin ) #define digitalPinToTimer(P) ( ) //#define analogInPinToBit(P) ( ) -#define portOutputRegister(port) ( port->PIO_ODSR ) -#define portInputRegister(port) ( port->PIO_PDSR ) +#define portOutputRegister(port) ( &(port->PIO_ODSR) ) +#define portInputRegister(port) ( &(port->PIO_PDSR) ) //#define portModeRegister(P) ( ) //#define NOT_A_PIN 0 // defined in pio.h/EPioType