update variant bsp for pca10056

This commit is contained in:
hathach committed 2018-11-05 16:45:38 +07:00
1 parent 023ba48c2a
commit 8d2fed6ce5
5 files changed
+54 -58

No files matched your search

@@ -39,7 +39,6 @@ const int chipSelectPin = 7;
void setup() {
Serial.begin(9600);
while ( !Serial ) delay(10); // for nrf52840 with native usb
// start the SPI library:
SPI.begin();
+7 -15
View File
@@ -40,24 +40,16 @@ extern "C"
#define NUM_ANALOG_OUTPUTS (0u)
// LEDs
#define PIN_LED1 (17)
#define PIN_LED2 (19)
#define PIN_LED1 (17)
#define PIN_LED2 (19)
#define LED_BUILTIN PIN_LED1
#define LED_CONN PIN_LED2
#define LED_BUILTIN PIN_LED1
#define LED_CONN PIN_LED2
#define LED_RED PIN_LED1
#define LED_BLUE PIN_LED2
#define LED_RED PIN_LED1
#define LED_BLUE PIN_LED2
#define LED_STATE_ON 1 // State when LED is litted
// Buttons
/*
#define PIN_BUTTON1 (2)
#define PIN_BUTTON2 (3)
#define PIN_BUTTON3 (4)
#define PIN_BUTTON4 (5)
*/
#define LED_STATE_ON 1 // State when LED is litted
/*
* Analog pins
+11 -5
View File
@@ -27,12 +27,18 @@
const uint32_t g_ADigitalPinMap[] =
{
0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 ,
8 , 9 , 10 , 11 , 12 , 13 , 14 , 15,
16 , 17 , 18 , 19 , 20 , 21 , 22 , 23,
24 , 25 , 26 , 27 , 28 , 29 , 30 , 31
};
// P0
0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 ,
8 , 9 , 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23,
24, 25, 26, 27, 28, 29, 30, 31,
// P1
32, 33, 34, 35, 36, 37, 38, 39,
40, 41, 42, 43, 44, 45, 46, 47,
48, 49, 50, 51, 52, 53, 54, 55,
56, 57, 58, 59, 60, 61, 62, 63
};
void initVariant()
{
// LED1 & LED2
+11 -4
View File
@@ -28,10 +28,17 @@
const uint32_t g_ADigitalPinMap[] =
{
0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 ,
8 , 9 , 10 , 11 , 12 , 13 , 14 , 15,
16 , 17 , 18 , 19 , 20 , 21 , 22 , 23,
24 , 25 , 26 , 27 , 28 , 29 , 30 , 31
// P0
0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 ,
8 , 9 , 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23,
24, 25, 26, 27, 28, 29, 30, 31,
// P1
32, 33, 34, 35, 36, 37, 38, 39,
40, 41, 42, 43, 44, 45, 46, 47,
48, 49, 50, 51, 52, 53, 54, 55,
56, 57, 58, 59, 60, 61, 62, 63
};
+25 -33
View File
@@ -34,42 +34,34 @@ extern "C"
#endif // __cplusplus
// Number of pins defined in PinDescription array
#define PINS_COUNT (32u)
#define NUM_DIGITAL_PINS (32u)
#define PINS_COUNT (64)
#define NUM_DIGITAL_PINS (64)
#define NUM_ANALOG_INPUTS (8u)
#define NUM_ANALOG_OUTPUTS (0u)
// LEDs
#define PIN_LED1 (13)
#define PIN_LED2 (14)
#define PIN_LED1 (13)
#define PIN_LED2 (14)
#define LED_BUILTIN PIN_LED1
#define LED_CONN PIN_LED2
#define LED_BUILTIN PIN_LED1
#define LED_CONN PIN_LED2
#define LED_RED PIN_LED1
#define LED_BLUE PIN_LED2
#define LED_RED PIN_LED1
#define LED_BLUE PIN_LED2
#define LED_STATE_ON 0 // State when LED is litted
// Buttons
/*
#define PIN_BUTTON1 (2)
#define PIN_BUTTON2 (3)
#define PIN_BUTTON3 (4)
#define PIN_BUTTON4 (5)
*/
#define LED_STATE_ON 0 // State when LED is litted
/*
* Analog pins
*/
#define PIN_A0 (2)
#define PIN_A1 (3)
#define PIN_A2 (4)
#define PIN_A3 (5)
#define PIN_A4 (28)
#define PIN_A5 (29)
#define PIN_A6 (30)
#define PIN_A7 (31)
#define PIN_A0 (3)
#define PIN_A1 (4)
#define PIN_A2 (28)
#define PIN_A3 (29)
#define PIN_A4 (30)
#define PIN_A5 (31)
#define PIN_A6 (26)
#define PIN_A7 (27)
static const uint8_t A0 = PIN_A0 ;
static const uint8_t A1 = PIN_A1 ;
@@ -82,8 +74,8 @@ static const uint8_t A7 = PIN_A7 ;
#define ADC_RESOLUTION 14
// Other pins
#define PIN_AREF (24)
#define PIN_DFU (20)
#define PIN_AREF (2)
#define PIN_DFU (11)
#define PIN_NFC1 (9)
#define PIN_NFC2 (10)
@@ -100,11 +92,11 @@ static const uint8_t AREF = PIN_AREF;
*/
#define SPI_INTERFACES_COUNT 1
#define PIN_SPI_MISO (14)
#define PIN_SPI_MOSI (13)
#define PIN_SPI_SCK (12)
#define PIN_SPI_MISO (47)
#define PIN_SPI_MOSI (46)
#define PIN_SPI_SCK (45)
static const uint8_t SS = 18 ;
static const uint8_t SS = 44 ;
static const uint8_t MOSI = PIN_SPI_MOSI ;
static const uint8_t MISO = PIN_SPI_MISO ;
static const uint8_t SCK = PIN_SPI_SCK ;
@@ -114,8 +106,8 @@ static const uint8_t SCK = PIN_SPI_SCK ;
*/
#define WIRE_INTERFACES_COUNT 1
#define PIN_WIRE_SDA (25u)
#define PIN_WIRE_SCL (26u)
#define PIN_WIRE_SDA (43)
#define PIN_WIRE_SCL (42)
/*
* QSPI interface for external flash