Skip to content

Commit 8d2fed6

Browse files
committed
update variant bsp for pca10056
1 parent 023ba48 commit 8d2fed6

File tree

5 files changed

+54
-58
lines changed

5 files changed

+54
-58
lines changed

libraries/SPI/examples/BarometricPressureSensor/BarometricPressureSensor.ino

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ const int chipSelectPin = 7;
3939

4040
void setup() {
4141
Serial.begin(9600);
42-
while ( !Serial ) delay(10); // for nrf52840 with native usb
4342

4443
// start the SPI library:
4544
SPI.begin();

variants/feather_nrf52832/variant.h

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -40,24 +40,16 @@ extern "C"
4040
#define NUM_ANALOG_OUTPUTS (0u)
4141

4242
// LEDs
43-
#define PIN_LED1 (17)
44-
#define PIN_LED2 (19)
43+
#define PIN_LED1 (17)
44+
#define PIN_LED2 (19)
4545

46-
#define LED_BUILTIN PIN_LED1
47-
#define LED_CONN PIN_LED2
46+
#define LED_BUILTIN PIN_LED1
47+
#define LED_CONN PIN_LED2
4848

49-
#define LED_RED PIN_LED1
50-
#define LED_BLUE PIN_LED2
49+
#define LED_RED PIN_LED1
50+
#define LED_BLUE PIN_LED2
5151

52-
#define LED_STATE_ON 1 // State when LED is litted
53-
54-
// Buttons
55-
/*
56-
#define PIN_BUTTON1 (2)
57-
#define PIN_BUTTON2 (3)
58-
#define PIN_BUTTON3 (4)
59-
#define PIN_BUTTON4 (5)
60-
*/
52+
#define LED_STATE_ON 1 // State when LED is litted
6153

6254
/*
6355
* Analog pins

variants/feather_nrf52840_express/variant.cpp

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,18 @@
2727

2828
const uint32_t g_ADigitalPinMap[] =
2929
{
30-
0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 ,
31-
8 , 9 , 10 , 11 , 12 , 13 , 14 , 15,
32-
16 , 17 , 18 , 19 , 20 , 21 , 22 , 23,
33-
24 , 25 , 26 , 27 , 28 , 29 , 30 , 31
30+
// P0
31+
0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 ,
32+
8 , 9 , 10, 11, 12, 13, 14, 15,
33+
16, 17, 18, 19, 20, 21, 22, 23,
34+
24, 25, 26, 27, 28, 29, 30, 31,
35+
36+
// P1
37+
32, 33, 34, 35, 36, 37, 38, 39,
38+
40, 41, 42, 43, 44, 45, 46, 47,
39+
48, 49, 50, 51, 52, 53, 54, 55,
40+
56, 57, 58, 59, 60, 61, 62, 63
3441
};
35-
3642
void initVariant()
3743
{
3844
// LED1 & LED2

variants/pca10056/variant.cpp

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,17 @@
2828

2929
const uint32_t g_ADigitalPinMap[] =
3030
{
31-
0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 ,
32-
8 , 9 , 10 , 11 , 12 , 13 , 14 , 15,
33-
16 , 17 , 18 , 19 , 20 , 21 , 22 , 23,
34-
24 , 25 , 26 , 27 , 28 , 29 , 30 , 31
31+
// P0
32+
0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 ,
33+
8 , 9 , 10, 11, 12, 13, 14, 15,
34+
16, 17, 18, 19, 20, 21, 22, 23,
35+
24, 25, 26, 27, 28, 29, 30, 31,
36+
37+
// P1
38+
32, 33, 34, 35, 36, 37, 38, 39,
39+
40, 41, 42, 43, 44, 45, 46, 47,
40+
48, 49, 50, 51, 52, 53, 54, 55,
41+
56, 57, 58, 59, 60, 61, 62, 63
3542
};
3643

3744

variants/pca10056/variant.h

Lines changed: 25 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -34,42 +34,34 @@ extern "C"
3434
#endif // __cplusplus
3535

3636
// Number of pins defined in PinDescription array
37-
#define PINS_COUNT (32u)
38-
#define NUM_DIGITAL_PINS (32u)
37+
#define PINS_COUNT (64)
38+
#define NUM_DIGITAL_PINS (64)
3939
#define NUM_ANALOG_INPUTS (8u)
4040
#define NUM_ANALOG_OUTPUTS (0u)
4141

4242
// LEDs
43-
#define PIN_LED1 (13)
44-
#define PIN_LED2 (14)
43+
#define PIN_LED1 (13)
44+
#define PIN_LED2 (14)
4545

46-
#define LED_BUILTIN PIN_LED1
47-
#define LED_CONN PIN_LED2
46+
#define LED_BUILTIN PIN_LED1
47+
#define LED_CONN PIN_LED2
4848

49-
#define LED_RED PIN_LED1
50-
#define LED_BLUE PIN_LED2
49+
#define LED_RED PIN_LED1
50+
#define LED_BLUE PIN_LED2
5151

52-
#define LED_STATE_ON 0 // State when LED is litted
53-
54-
// Buttons
55-
/*
56-
#define PIN_BUTTON1 (2)
57-
#define PIN_BUTTON2 (3)
58-
#define PIN_BUTTON3 (4)
59-
#define PIN_BUTTON4 (5)
60-
*/
52+
#define LED_STATE_ON 0 // State when LED is litted
6153

6254
/*
6355
* Analog pins
6456
*/
65-
#define PIN_A0 (2)
66-
#define PIN_A1 (3)
67-
#define PIN_A2 (4)
68-
#define PIN_A3 (5)
69-
#define PIN_A4 (28)
70-
#define PIN_A5 (29)
71-
#define PIN_A6 (30)
72-
#define PIN_A7 (31)
57+
#define PIN_A0 (3)
58+
#define PIN_A1 (4)
59+
#define PIN_A2 (28)
60+
#define PIN_A3 (29)
61+
#define PIN_A4 (30)
62+
#define PIN_A5 (31)
63+
#define PIN_A6 (26)
64+
#define PIN_A7 (27)
7365

7466
static const uint8_t A0 = PIN_A0 ;
7567
static const uint8_t A1 = PIN_A1 ;
@@ -82,8 +74,8 @@ static const uint8_t A7 = PIN_A7 ;
8274
#define ADC_RESOLUTION 14
8375

8476
// Other pins
85-
#define PIN_AREF (24)
86-
#define PIN_DFU (20)
77+
#define PIN_AREF (2)
78+
#define PIN_DFU (11)
8779
#define PIN_NFC1 (9)
8880
#define PIN_NFC2 (10)
8981

@@ -100,11 +92,11 @@ static const uint8_t AREF = PIN_AREF;
10092
*/
10193
#define SPI_INTERFACES_COUNT 1
10294

103-
#define PIN_SPI_MISO (14)
104-
#define PIN_SPI_MOSI (13)
105-
#define PIN_SPI_SCK (12)
95+
#define PIN_SPI_MISO (47)
96+
#define PIN_SPI_MOSI (46)
97+
#define PIN_SPI_SCK (45)
10698

107-
static const uint8_t SS = 18 ;
99+
static const uint8_t SS = 44 ;
108100
static const uint8_t MOSI = PIN_SPI_MOSI ;
109101
static const uint8_t MISO = PIN_SPI_MISO ;
110102
static const uint8_t SCK = PIN_SPI_SCK ;
@@ -114,8 +106,8 @@ static const uint8_t SCK = PIN_SPI_SCK ;
114106
*/
115107
#define WIRE_INTERFACES_COUNT 1
116108

117-
#define PIN_WIRE_SDA (25u)
118-
#define PIN_WIRE_SCL (26u)
109+
#define PIN_WIRE_SDA (43)
110+
#define PIN_WIRE_SCL (42)
119111

120112
/*
121113
* QSPI interface for external flash

0 commit comments

Comments
 (0)