diff --git a/cores/nRF5/Arduino.h b/cores/nRF5/Arduino.h index 1c9a393b..42d5b4c9 100644 --- a/cores/nRF5/Arduino.h +++ b/cores/nRF5/Arduino.h @@ -122,7 +122,7 @@ uint32_t setLoopStacksize(void); #define digitalPinToBitMask(P) ( 1 << (P) ) //#define analogInPinToBit(P) ( ) #define portOutputRegister(port) ( &(port->OUT) ) -#define portInputRegister(port) ( &(port->IN) ) +#define portInputRegister(port) ( (volatile uint32_t*) &(port->IN) ) #define portModeRegister(port) ( &(port->DIR) ) #define digitalPinHasPWM(P) ( (P) > 1 )