File tree Expand file tree Collapse file tree 2 files changed +21
-21
lines changed Expand file tree Collapse file tree 2 files changed +21
-21
lines changed Original file line number Diff line number Diff line change @@ -92,4 +92,24 @@ void loop( void ) ;
9292
9393#define bit (b ) (1UL << (b))
9494
95+ #define digitalPinToPort (P ) ( &(NRF_GPIO]) )
96+ #define digitalPinToBitMask (P ) ( 1 << g_ADigitalPinMap[P] )
97+ //#define analogInPinToBit(P) ( )
98+ #define portOutputRegister (port ) ( &(port->OUTSET) )
99+ #define portInputRegister (port ) ( &(port->IN) )
100+ #define portModeRegister (port ) ( &(port->DIRSET) )
101+ #define digitalPinHasPWM (P ) ( true )
102+
103+ /*
104+ * digitalPinToTimer(..) is AVR-specific and is not defined for nRF52
105+ * architecture. If you need to check if a pin supports PWM you must
106+ * use digitalPinHasPWM(..).
107+ *
108+ * https://github.com/arduino/Arduino/issues/1833
109+ */
110+ // #define digitalPinToTimer(P)
111+
112+ // Interrupts
113+ #define digitalPinToInterrupt (P ) ( P )
114+
95115#endif // Arduino_h
Original file line number Diff line number Diff line change @@ -40,26 +40,6 @@ extern "C"
4040#define NUM_ANALOG_INPUTS (6u)
4141#define NUM_ANALOG_OUTPUTS (0u)
4242
43- #define digitalPinToPort (P ) ( &(NRF_GPIO]) )
44- #define digitalPinToBitMask (P ) ( 1 << g_ADigitalPinMap[P] )
45- //#define analogInPinToBit(P) ( )
46- #define portOutputRegister (port ) ( &(port->OUTSET) )
47- #define portInputRegister (port ) ( &(port->IN) )
48- #define portModeRegister (port ) ( &(port->DIRSET) )
49- #define digitalPinHasPWM (P ) ( true )
50-
51- /*
52- * digitalPinToTimer(..) is AVR-specific and is not defined for nRF52
53- * architecture. If you need to check if a pin supports PWM you must
54- * use digitalPinHasPWM(..).
55- *
56- * https://github.com/arduino/Arduino/issues/1833
57- */
58- // #define digitalPinToTimer(P)
59-
60- // Interrupts
61- #define digitalPinToInterrupt (P ) ( P )
62-
6343// LEDs
6444#define PIN_LED1 (6)
6545#define PIN_LED2 (7)
@@ -111,7 +91,7 @@ static const uint8_t AREF = PIN_AREF;
11191#define PIN_SPI_MOSI (11)
11292#define PIN_SPI_SCK (13)
11393
114- static const uint8_t SS = 11 ;
94+ static const uint8_t SS = 10 ;
11595static const uint8_t MOSI = PIN_SPI_MOSI ;
11696static const uint8_t MISO = PIN_SPI_MISO ;
11797static const uint8_t SCK = PIN_SPI_SCK ;
You can’t perform that action at this time.
0 commit comments