From ff8808306ba238343b78c33cd720704c7205ca4e Mon Sep 17 00:00:00 2001 From: hathach Date: Tue, 6 Nov 2018 16:43:21 +0700 Subject: [PATCH] fix build error with softwareserial lib --- cores/nRF5/Arduino.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 )