Skip to content

Commit e2b6f1f

Browse files
authored
Update variant.h
1 parent dbd9247 commit e2b6f1f

File tree

1 file changed

+35
-37
lines changed

1 file changed

+35
-37
lines changed

variants/omnimo_nrf52840/variant.h

Lines changed: 35 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,14 @@ extern "C"
4747
#define PIN_LED2 (4)
4848
#define PIN_NEOPIXEL (8)
4949
#define NEOPIXEL_NUM 1
50-
// Redefine
51-
#define LED1 PIN_LED1
52-
#define LED2 PIN_LED2
50+
51+
static const uint8_t LED1 = PIN_LED1 ;
52+
static const uint8_t LED2 = PIN_LED2 ;
5353

5454
#define LED_BUILTIN PIN_LED1
5555
#define LED_CONN PIN_LED2
5656

57-
#define LED_GREEN PIN_LED1
58-
#define LED_RED PIN_LED1 // for compatibility with Feather nRF52840 Express
57+
#define LED_RED PIN_LED1
5958
#define LED_BLUE PIN_LED2
6059

6160
#define LED_STATE_ON 1 // State when LED is litted
@@ -65,9 +64,9 @@ extern "C"
6564
#define PIN_BTN1 (7)
6665
#define PIN_BUTTON2 (37)
6766
#define PIN_BTN2 (37)
68-
// Redefine
69-
#define BTN1 PIN_BTN1
70-
#define BTN2 PIN_BTN2
67+
68+
static const uint8_t BTN1 = PIN_BTN1 ;
69+
static const uint8_t BTN2 = PIN_BTN2 ;
7170

7271
// Analog Pins //////////////
7372
#define PIN_A0 (14)
@@ -95,9 +94,9 @@ static const uint8_t A7 = PIN_A7 ;
9594
// NFC Pins /////////////////
9695
#define PIN_NFC1 (33)
9796
#define PIN_NFC2 (34)
98-
// Redefine
99-
#define NFC1 PIN_NFC1
100-
#define NFC2 PIN_NFC2
97+
98+
static const uint8_t NFC1 = PIN_NFC1 ;
99+
static const uint8_t NFC2 = PIN_NFC2 ;
101100

102101
// Feather UART Pins ////////
103102
#define PIN_SERIAL1_RX (1)
@@ -146,20 +145,19 @@ static const uint8_t SCK = PIN_SPI_SCK ;
146145
#define PIN_mikroBUS_MISO (0)
147146
#define PIN_mikroBUS_MOSI (2)
148147

149-
// Redefine
150-
#define mikroBUS_PWM PIN_mikroBUS_PWM
151-
#define mikroBUS_INT PIN_mikroBUS_INT
152-
#define mikroBUS_RX PIN_mikroBUS_RX
153-
#define mikroBUS_TX PIN_mikroBUS_TX
154-
#define mikroBUS_SCL PIN_mikroBUS_SCL
155-
#define mikroBUS_SDA PIN_mikroBUS_SDA
156-
157-
#define mikroBUS_AN PIN_mikroBUS_AN
158-
#define mikroBUS_RST PIN_mikroBUS_RST
159-
#define mikroBUS_CS PIN_mikroBUS_CS
160-
#define mikroBUS_SCK PIN_mikroBUS_SCK
161-
#define mikroBUS_MISO PIN_mikroBUS_MISO
162-
#define mikroBUS_MOSI PIN_mikroBUS_MOSI
148+
static const uint8_t mikroBUS_PWM = PIN_mikroBUS_PWM ;
149+
static const uint8_t mikroBUS_INT = PIN_mikroBUS_INT ;
150+
static const uint8_t mikroBUS_RX = PIN_mikroBUS_RX ;
151+
static const uint8_t mikroBUS_TX = PIN_mikroBUS_TX ;
152+
static const uint8_t mikroBUS_SCL = PIN_mikroBUS_SCL ;
153+
static const uint8_t mikroBUS_SDA = PIN_mikroBUS_SDA ;
154+
155+
static const uint8_t mikroBUS_AN = PIN_mikroBUS_AN ;
156+
static const uint8_t mikroBUS_RST = PIN_mikroBUS_RST ;
157+
static const uint8_t mikroBUS_CS = PIN_mikroBUS_CS ;
158+
static const uint8_t mikroBUS_SCK = PIN_mikroBUS_SCK ;
159+
static const uint8_t mikroBUS_MISO = PIN_mikroBUS_MISO ;
160+
static const uint8_t mikroBUS_MOSI = PIN_mikroBUS_MOSI ;
163161

164162
// PMOD Pins ////////////////
165163
#define PIN_PMOD1 (17)
@@ -170,22 +168,22 @@ static const uint8_t SCK = PIN_SPI_SCK ;
170168
#define PIN_PMOD6 (40)
171169
#define PIN_PMOD7 (41)
172170
#define PIN_PMOD8 (42)
173-
// Redefine
174-
#define PMOD1 PIN_PMOD1
175-
#define PMOD2 PIN_PMOD2
176-
#define PMOD3 PIN_PMOD3
177-
#define PMOD4 PIN_PMOD4
178-
#define PMOD5 PIN_PMOD5
179-
#define PMOD6 PIN_PMOD6
180-
#define PMOD7 PIN_PMOD7
181-
#define PMOD8 PIN_PMOD8
171+
172+
static const uint8_t PMOD1 = PIN_PMOD1 ;
173+
static const uint8_t PMOD2 = PIN_PMOD2 ;
174+
static const uint8_t PMOD3 = PIN_PMOD3 ;
175+
static const uint8_t PMOD4 = PIN_PMOD4 ;
176+
static const uint8_t PMOD5 = PIN_PMOD5 ;
177+
static const uint8_t PMOD6 = PIN_PMOD6 ;
178+
static const uint8_t PMOD7 = PIN_PMOD7 ;
179+
static const uint8_t PMOD8 = PIN_PMOD8 ;
182180

183181
// Qwiic Pins ///////////////
184182
#define PIN_QWIIC_SCL (35)
185183
#define PIN_QWIIC_SDA (36)
186-
// Redefine
187-
#define QWIIC_SCL PIN_QWIIC_SCL
188-
#define QWIIC_SDA PIN_QWIIC_SDA
184+
185+
static const uint8_t QWIIC_SCL = PIN_QWIIC_SCL ;
186+
static const uint8_t QWIIC_SDA = PIN_QWIIC_SDA ;
189187

190188
// QSPI Pins ////////////////
191189
#define PIN_QSPI_SCK 27

0 commit comments

Comments
 (0)