Skip to content

Commit 283bf08

Browse files
committed
Fixed unavailable GPIOs issue
- GPIO0 and GPIO1 on the DWM1001 are attached to the DW1000 not the nRF52 - Removed 2 digital pins - Shifted all the numbering
1 parent 3edc8ae commit 283bf08

File tree

2 files changed

+23
-25
lines changed

2 files changed

+23
-25
lines changed

variants/DWM1001-DEV/variant.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@
2020
#include "variant.h"
2121

2222
const uint32_t g_ADigitalPinMap[] = {
23-
// D0 - D10
24-
1,
25-
0,
23+
// D0 - D8
2624
12,
2725
27,
2826
23,

variants/DWM1001-DEV/variant.h

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -32,32 +32,32 @@ extern "C"
3232
#endif // __cplusplus
3333

3434
// Number of pins defined in PinDescription array
35-
#define PINS_COUNT (29u)
36-
#define NUM_DIGITAL_PINS (13u)
35+
#define PINS_COUNT (27u)
36+
#define NUM_DIGITAL_PINS (11u)
3737
#define NUM_ANALOG_INPUTS (2u)
3838
#define NUM_ANALOG_OUTPUTS (0u)
3939

4040
// LEDs
41-
#define PIN_LEDRT (24)
42-
#define PIN_LEDRB (25)
43-
#define PIN_LEDG (26)
44-
#define PIN_LEDB (27)
41+
#define PIN_LEDRT (22)
42+
#define PIN_LEDRB (23)
43+
#define PIN_LEDG (24)
44+
#define PIN_LEDB (25)
4545
#define LED_BUILTIN PIN_LEDRT
4646
static const uint8_t LED_RED_TOP = PIN_LEDRT ;
4747
static const uint8_t LED_RED_BOT = PIN_LEDRB ;
4848
static const uint8_t LED_GREEN = PIN_LEDG ;
4949
static const uint8_t LED_BLUE = PIN_LEDB ;
5050

5151
// Button
52-
#define PIN_BUTTON (28)
52+
#define PIN_BUTTON (26)
5353

5454
static const uint8_t BTN = PIN_BUTTON ;
5555

5656
/*
5757
* Analog pins
5858
*/
59-
#define PIN_A0 (11)
60-
#define PIN_A1 (15)
59+
#define PIN_A0 (9)
60+
#define PIN_A1 (10)
6161

6262
static const uint8_t A0 = PIN_A0 ; // AIN2
6363
static const uint8_t A1 = PIN_A1 ; // AIN1
@@ -67,27 +67,27 @@ static const uint8_t A1 = PIN_A1 ; // AIN1
6767
* Serial interfaces
6868
*/
6969
// Serial
70-
#define PIN_SERIAL_RX (15)
71-
#define PIN_SERIAL_TX (16)
70+
#define PIN_SERIAL_RX (13)
71+
#define PIN_SERIAL_TX (14)
7272

7373
/*
7474
* SPI Interfaces
7575
*/
7676
#define SPI_INTERFACES_COUNT 2
7777

78-
#define PIN_SPI_MISO (10)
79-
#define PIN_SPI_MOSI (9)
78+
#define PIN_SPI_MISO (8)
79+
#define PIN_SPI_MOSI (7)
8080
#define PIN_SPI_SCK (PIN_A0)
8181

8282
static const uint8_t SS = PIN_A1 ;
8383
static const uint8_t MOSI = PIN_SPI_MOSI ;
8484
static const uint8_t MISO = PIN_SPI_MISO ;
8585
static const uint8_t SCK = PIN_SPI_SCK ;
8686

87-
#define PIN_SPI1_SS (17)
88-
#define PIN_SPI1_MISO (18)
89-
#define PIN_SPI1_MOSI (19)
90-
#define PIN_SPI1_SCK (20)
87+
#define PIN_SPI1_SS (15)
88+
#define PIN_SPI1_MISO (16)
89+
#define PIN_SPI1_MOSI (17)
90+
#define PIN_SPI1_SCK (18)
9191

9292
static const uint8_t SS1 = PIN_SPI1_SS ;
9393
static const uint8_t MOSI1 = PIN_SPI1_MOSI ;
@@ -99,8 +99,8 @@ static const uint8_t SCK1 = PIN_SPI1_SCK ;
9999
*/
100100
#define WIRE_INTERFACES_COUNT 1
101101

102-
#define PIN_WIRE_SDA (13)
103-
#define PIN_WIRE_SCL (14)
102+
#define PIN_WIRE_SDA (11)
103+
#define PIN_WIRE_SCL (12)
104104

105105
static const uint8_t SDA = PIN_WIRE_SDA;
106106
static const uint8_t SCL = PIN_WIRE_SCL;
@@ -113,13 +113,13 @@ static const uint8_t SCL = PIN_WIRE_SCL;
113113
/*
114114
* Other DWM1001 internal IOs
115115
*/
116-
#define PIN_DW_RST (21)
117-
#define PIN_DW_IRQ (22)
116+
#define PIN_DW_RST (19)
117+
#define PIN_DW_IRQ (20)
118118

119119
static const uint8_t DW_RST = PIN_DW_RST;
120120
static const uint8_t DW_IRQ = PIN_DW_IRQ;
121121

122-
#define PIN_ACC_IRQ (23)
122+
#define PIN_ACC_IRQ (21)
123123

124124
static const uint8_t ACC_IRQ = PIN_ACC_IRQ;
125125

0 commit comments

Comments
 (0)