Skip to content

Commit 0a79fb9

Browse files
committed
update feather nrf52840 pin
1 parent fb9a050 commit 0a79fb9

File tree

2 files changed

+46
-30
lines changed

2 files changed

+46
-30
lines changed

variants/feather_nrf52840_express/variant.h

Lines changed: 42 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -37,22 +37,24 @@ extern "C"
3737
#endif // __cplusplus
3838

3939
// Number of pins defined in PinDescription array
40-
#define PINS_COUNT (32u)
41-
#define NUM_DIGITAL_PINS (32u)
42-
#define NUM_ANALOG_INPUTS (8u)
43-
#define NUM_ANALOG_OUTPUTS (0u)
40+
#define PINS_COUNT (64)
41+
#define NUM_DIGITAL_PINS (64)
42+
#define NUM_ANALOG_INPUTS (6)
43+
#define NUM_ANALOG_OUTPUTS (0)
4444

4545
// LEDs
46-
#define PIN_LED1 (13)
47-
#define PIN_LED2 (14)
46+
#define PIN_LED1 (13)
47+
#define PIN_LED2 (14)
48+
#define PIN_LED3 (15)
49+
#define PIN_NEOPIXEL (16)
4850

49-
#define LED_BUILTIN PIN_LED1
50-
#define LED_CONN PIN_LED2
51+
#define LED_BUILTIN PIN_LED1
52+
#define LED_CONN PIN_LED2
5153

52-
#define LED_RED PIN_LED1
53-
#define LED_BLUE PIN_LED2
54+
#define LED_RED PIN_LED1
55+
#define LED_BLUE PIN_LED2
5456

55-
#define LED_STATE_ON 0 // State when LED is litted
57+
#define LED_STATE_ON 1 // State when LED is litted
5658

5759
// Buttons
5860
/*
@@ -65,14 +67,14 @@ extern "C"
6567
/*
6668
* Analog pins
6769
*/
68-
#define PIN_A0 (2)
69-
#define PIN_A1 (3)
70-
#define PIN_A2 (4)
71-
#define PIN_A3 (5)
72-
#define PIN_A4 (28)
73-
#define PIN_A5 (29)
74-
#define PIN_A6 (30)
75-
#define PIN_A7 (31)
70+
#define PIN_A0 (3)
71+
#define PIN_A1 (4)
72+
#define PIN_A2 (28)
73+
#define PIN_A3 (29)
74+
#define PIN_A4 (30)
75+
#define PIN_A5 (31)
76+
#define PIN_A6 (0xff)
77+
#define PIN_A7 (0xff)
7678

7779
static const uint8_t A0 = PIN_A0 ;
7880
static const uint8_t A1 = PIN_A1 ;
@@ -85,8 +87,8 @@ static const uint8_t A7 = PIN_A7 ;
8587
#define ADC_RESOLUTION 14
8688

8789
// Other pins
88-
#define PIN_AREF (24)
89-
#define PIN_DFU (20)
90+
#define PIN_AREF (2)
91+
#define PIN_DFU (11)
9092
#define PIN_NFC1 (9)
9193
#define PIN_NFC2 (10)
9294

@@ -104,9 +106,9 @@ static const uint8_t AREF = PIN_AREF;
104106
*/
105107
#define SPI_INTERFACES_COUNT 1
106108

107-
#define PIN_SPI_MISO (14)
108-
#define PIN_SPI_MOSI (13)
109-
#define PIN_SPI_SCK (12)
109+
#define PIN_SPI_MISO (41)
110+
#define PIN_SPI_MOSI (40)
111+
#define PIN_SPI_SCK (7)
110112

111113
static const uint8_t SS = 18 ;
112114
static const uint8_t MOSI = PIN_SPI_MOSI ;
@@ -118,8 +120,22 @@ static const uint8_t SCK = PIN_SPI_SCK ;
118120
*/
119121
#define WIRE_INTERFACES_COUNT 1
120122

121-
#define PIN_WIRE_SDA (25u)
122-
#define PIN_WIRE_SCL (26u)
123+
#define PIN_WIRE_SDA (26)
124+
#define PIN_WIRE_SCL (27)
125+
126+
/*
127+
* QSPI interface for external flash
128+
*/
129+
#define PIN_QSPI_SCK 19
130+
#define PIN_QSPI_CS 17
131+
#define PIN_QSPI_DATA0 20
132+
#define PIN_QSPI_DATA1 21
133+
#define PIN_QSPI_DATA2 22
134+
#define PIN_QSPI_DATA3 23
135+
136+
// On-board QSPI Flash
137+
// If EXTERNAL_FLASH_DEVICES is not defined, all supported devices will be used
138+
#define EXTERNAL_FLASH_DEVICES GD25Q16
123139

124140
#ifdef __cplusplus
125141
}

variants/pca10056/variant.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ extern "C"
3939
// Number of pins defined in PinDescription array
4040
#define PINS_COUNT (64)
4141
#define NUM_DIGITAL_PINS (64)
42-
#define NUM_ANALOG_INPUTS (8u)
43-
#define NUM_ANALOG_OUTPUTS (0u)
42+
#define NUM_ANALOG_INPUTS (6)
43+
#define NUM_ANALOG_OUTPUTS (0)
4444

4545
// LEDs
4646
#define PIN_LED1 (13)
@@ -63,8 +63,8 @@ extern "C"
6363
#define PIN_A3 (29)
6464
#define PIN_A4 (30)
6565
#define PIN_A5 (31)
66-
#define PIN_A6 (42)
67-
#define PIN_A7 (43)
66+
#define PIN_A6 (0xff)
67+
#define PIN_A7 (0xff)
6868

6969
static const uint8_t A0 = PIN_A0 ;
7070
static const uint8_t A1 = PIN_A1 ;

0 commit comments

Comments
 (0)