Commit a4c68659 authored by Sandeep Mistry's avatar Sandeep Mistry

Correct SS, move out some common variant values to Arduino.h

parent 71e9f7a3
...@@ -92,4 +92,24 @@ void loop( void ) ; ...@@ -92,4 +92,24 @@ void loop( void ) ;
#define bit(b) (1UL << (b)) #define bit(b) (1UL << (b))
#define digitalPinToPort(P) ( &(NRF_GPIO]) )
#define digitalPinToBitMask(P) ( 1 << g_ADigitalPinMap[P] )
//#define analogInPinToBit(P) ( )
#define portOutputRegister(port) ( &(port->OUTSET) )
#define portInputRegister(port) ( &(port->IN) )
#define portModeRegister(port) ( &(port->DIRSET) )
#define digitalPinHasPWM(P) ( true )
/*
* digitalPinToTimer(..) is AVR-specific and is not defined for nRF52
* architecture. If you need to check if a pin supports PWM you must
* use digitalPinHasPWM(..).
*
* https://github.com/arduino/Arduino/issues/1833
*/
// #define digitalPinToTimer(P)
// Interrupts
#define digitalPinToInterrupt(P) ( P )
#endif // Arduino_h #endif // Arduino_h
...@@ -40,26 +40,6 @@ extern "C" ...@@ -40,26 +40,6 @@ extern "C"
#define NUM_ANALOG_INPUTS (6u) #define NUM_ANALOG_INPUTS (6u)
#define NUM_ANALOG_OUTPUTS (0u) #define NUM_ANALOG_OUTPUTS (0u)
#define digitalPinToPort(P) ( &(NRF_GPIO]) )
#define digitalPinToBitMask(P) ( 1 << g_ADigitalPinMap[P] )
//#define analogInPinToBit(P) ( )
#define portOutputRegister(port) ( &(port->OUTSET) )
#define portInputRegister(port) ( &(port->IN) )
#define portModeRegister(port) ( &(port->DIRSET) )
#define digitalPinHasPWM(P) ( true )
/*
* digitalPinToTimer(..) is AVR-specific and is not defined for nRF52
* architecture. If you need to check if a pin supports PWM you must
* use digitalPinHasPWM(..).
*
* https://github.com/arduino/Arduino/issues/1833
*/
// #define digitalPinToTimer(P)
// Interrupts
#define digitalPinToInterrupt(P) ( P )
// LEDs // LEDs
#define PIN_LED1 (6) #define PIN_LED1 (6)
#define PIN_LED2 (7) #define PIN_LED2 (7)
...@@ -111,7 +91,7 @@ static const uint8_t AREF = PIN_AREF; ...@@ -111,7 +91,7 @@ static const uint8_t AREF = PIN_AREF;
#define PIN_SPI_MOSI (11) #define PIN_SPI_MOSI (11)
#define PIN_SPI_SCK (13) #define PIN_SPI_SCK (13)
static const uint8_t SS = 11 ; static const uint8_t SS = 10 ;
static const uint8_t MOSI = PIN_SPI_MOSI ; static const uint8_t MOSI = PIN_SPI_MOSI ;
static const uint8_t MISO = PIN_SPI_MISO ; static const uint8_t MISO = PIN_SPI_MISO ;
static const uint8_t SCK = PIN_SPI_SCK ; static const uint8_t SCK = PIN_SPI_SCK ;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment