Skip to content

Commit d5121dc

Browse files
Removed unnecessary ifdefs from Pimoroni boards (earlephilhower#802)
* Removed unnecessary ifdefs from Pim boards * Re-ordered some pins
1 parent 3c45001 commit d5121dc

10 files changed

+9
-514
lines changed

src/boards/include/boards/pimoroni_badger2040.h

Lines changed: 2 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -16,114 +16,39 @@
1616
#define PIMORONI_BADGER2040
1717

1818
// --- BOARD SPECIFIC ---
19-
20-
#ifndef BADGER2040_UART
2119
#define BADGER2040_UART 0
22-
#endif
23-
24-
#ifndef BADGER2040_TX_PIN
2520
#define BADGER2040_TX_PIN 0
26-
#endif
27-
28-
#ifndef BADGER2040_RX_PIN
2921
#define BADGER2040_RX_PIN 1
30-
#endif
3122

32-
#ifndef BADGER2040_I2C
3323
#define BADGER2040_I2C 0
34-
#endif
35-
36-
#ifndef BADGER2040_INT_PIN
3724
#define BADGER2040_INT_PIN 3
38-
#endif
39-
40-
#ifndef BADGER2040_SDA_PIN
4125
#define BADGER2040_SDA_PIN 4
42-
#endif
43-
44-
#ifndef BADGER2040_SCL_PIN
4526
#define BADGER2040_SCL_PIN 5
46-
#endif
4727

48-
#ifndef BADGER2040_3V3_EN_PIN
4928
#define BADGER2040_3V3_EN_PIN 10
50-
#endif
5129

52-
#ifndef BADGER2040_SW_DOWN_PIN
5330
#define BADGER2040_SW_DOWN_PIN 11
54-
#endif
55-
56-
#ifndef BADGER2040_SW_A_PIN
5731
#define BADGER2040_SW_A_PIN 12
58-
#endif
59-
60-
#ifndef BADGER2040_SW_B_PIN
6132
#define BADGER2040_SW_B_PIN 13
62-
#endif
63-
64-
#ifndef BADGER2040_SW_C_PIN
6533
#define BADGER2040_SW_C_PIN 14
66-
#endif
67-
68-
#ifndef BADGER2040_SW_UP_PIN
6934
#define BADGER2040_SW_UP_PIN 15
70-
#endif
7135

72-
#ifndef BADGER2040_INKY_SPI
7336
#define BADGER2040_INKY_SPI 0
74-
#endif
75-
76-
#ifndef BADGER2040_INKY_MISO_PIN
7737
#define BADGER2040_INKY_MISO_PIN 16
78-
#endif
79-
80-
#ifndef BADGER2040_INKY_CSN_PIN
8138
#define BADGER2040_INKY_CSN_PIN 17
82-
#endif
83-
84-
#ifndef BADGER2040_INKY_SCK_PIN
8539
#define BADGER2040_INKY_SCK_PIN 18
86-
#endif
87-
88-
#ifndef BADGER2040_INKY_MOSI_PIN
8940
#define BADGER2040_INKY_MOSI_PIN 19
90-
#endif
91-
92-
#ifndef BADGER2040_INKY_DC_PIN
9341
#define BADGER2040_INKY_DC_PIN 20
94-
#endif
95-
96-
#ifndef BADGER2040_INKY_RESET_PIN
9742
#define BADGER2040_INKY_RESET_PIN 21
98-
#endif
43+
#define BADGER2040_INKY_BUSY_PIN 26
9944

100-
#ifndef BADGER2040_USER_SW_PIN
10145
#define BADGER2040_USER_SW_PIN 23
102-
#endif
103-
104-
#ifndef BADGER2040_VBUS_DETECT_PIN
105-
#define BADGER2040_VBUS_DETECT_PIN 24
106-
#endif
107-
108-
#ifndef BADGER2040_USER_LED_PIN
10946
#define BADGER2040_USER_LED_PIN 25
110-
#endif
111-
112-
#ifndef BADGER2040_INKY_BUSY_PIN
113-
#define BADGER2040_INKY_BUSY_PIN 26
114-
#endif
11547

116-
#ifndef BADGER2040_VREF_POWER_PIN
48+
#define BADGER2040_VBUS_DETECT_PIN 24
11749
#define BADGER2040_VREF_POWER_PIN 27
118-
#endif
119-
120-
#ifndef BADGER2040_1V2_REF_PIN
12150
#define BADGER2040_1V2_REF_PIN 28
122-
#endif
123-
124-
#ifndef BADGER2040_BAT_SENSE_PIN
12551
#define BADGER2040_BAT_SENSE_PIN 29
126-
#endif
12752

12853
// --- UART ---
12954
#ifndef PICO_DEFAULT_UART

src/boards/include/boards/pimoroni_interstate75.h

Lines changed: 0 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -16,117 +16,42 @@
1616
#define PIMORONI_INTERSTATE75
1717

1818
// --- BOARD SPECIFIC ---
19-
#ifndef INTERSTATE75_R0_PIN
2019
#define INTERSTATE75_R0_PIN 0
21-
#endif
22-
23-
#ifndef INTERSTATE75_G0_PIN
2420
#define INTERSTATE75_G0_PIN 1
25-
#endif
26-
27-
#ifndef INTERSTATE75_B0_PIN
2821
#define INTERSTATE75_B0_PIN 2
29-
#endif
30-
31-
#ifndef INTERSTATE75_R1_PIN
3222
#define INTERSTATE75_R1_PIN 3
33-
#endif
34-
35-
#ifndef INTERSTATE75_G1_PIN
3623
#define INTERSTATE75_G1_PIN 4
37-
#endif
38-
39-
#ifndef INTERSTATE75_B1_PIN
4024
#define INTERSTATE75_B1_PIN 5
41-
#endif
4225

43-
#ifndef INTERSTATE75_ROW_A_PIN
4426
#define INTERSTATE75_ROW_A_PIN 6
45-
#endif
46-
47-
#ifndef INTERSTATE75_ROW_B_PIN
4827
#define INTERSTATE75_ROW_B_PIN 7
49-
#endif
50-
51-
#ifndef INTERSTATE75_ROW_C_PIN
5228
#define INTERSTATE75_ROW_C_PIN 8
53-
#endif
54-
55-
#ifndef INTERSTATE75_ROW_D_PIN
5629
#define INTERSTATE75_ROW_D_PIN 9
57-
#endif
58-
59-
#ifndef INTERSTATE75_ROW_E_PIN
6030
#define INTERSTATE75_ROW_E_PIN 10
61-
#endif
6231

63-
#ifndef INTERSTATE75_CLK_PIN
6432
#define INTERSTATE75_CLK_PIN 11
65-
#endif
66-
67-
#ifndef INTERSTATE75_LAT_PIN
6833
#define INTERSTATE75_LAT_PIN 12
69-
#endif
70-
71-
#ifndef INTERSTATE75_OE_PIN
7234
#define INTERSTATE75_OE_PIN 13
73-
#endif
7435

75-
#ifndef INTERSTATE75_SW_A_PIN
7636
#define INTERSTATE75_SW_A_PIN 14
77-
#endif
7837

79-
#ifndef INTERSTATE75_LED_R_PIN
8038
#define INTERSTATE75_LED_R_PIN 16
81-
#endif
82-
83-
#ifndef INTERSTATE75_LED_G_PIN
8439
#define INTERSTATE75_LED_G_PIN 17
85-
#endif
86-
87-
#ifndef INTERSTATE75_LED_B_PIN
8840
#define INTERSTATE75_LED_B_PIN 18
89-
#endif
9041

91-
#ifndef INTERSTATE75_I2C
9242
#define INTERSTATE75_I2C 0
93-
#endif
94-
95-
#ifndef INTERSTATE75_INT_PIN
9643
#define INTERSTATE75_INT_PIN 19
97-
#endif
98-
99-
#ifndef INTERSTATE75_SDA_PIN
10044
#define INTERSTATE75_SDA_PIN 20
101-
#endif
102-
103-
#ifndef INTERSTATE75_SCL_PIN
10445
#define INTERSTATE75_SCL_PIN 21
105-
#endif
10646

107-
#ifndef INTERSTATE75_USER_SW_PIN
10847
#define INTERSTATE75_USER_SW_PIN 23
109-
#endif
11048

111-
#ifndef INTERSTATE75_A0_PIN
11249
#define INTERSTATE75_A0_PIN 26
113-
#endif
114-
115-
#ifndef INTERSTATE75_A1_PIN
11650
#define INTERSTATE75_A1_PIN 27
117-
#endif
118-
119-
#ifndef INTERSTATE75_A2_PIN
12051
#define INTERSTATE75_A2_PIN 28
121-
#endif
122-
123-
#ifndef INTERSTATE75_NUM_ADC_PINS
12452
#define INTERSTATE75_NUM_ADC_PINS 3
125-
#endif
12653

127-
#ifndef INTERSTATE75_CURRENT_SENSE_PIN
12854
#define INTERSTATE75_CURRENT_SENSE_PIN 29
129-
#endif
13055

13156
// --- UART ---
13257
// no PICO_DEFAULT_UART

src/boards/include/boards/pimoroni_keybow2040.h

Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -16,89 +16,30 @@
1616
#define PIMORONI_KEYBOW2040
1717

1818
// --- BOARD SPECIFIC ---
19-
#ifndef KEYBOW2040_I2C_SDA_PIN
2019
#define KEYBOW2040_I2C_SDA_PIN 4
21-
#endif
22-
23-
#ifndef KEYBOW2040_I2C_SCL_PIN
2420
#define KEYBOW2040_I2C_SCL_PIN 5
25-
#endif
26-
27-
#ifndef KEYBOW2040_I2C_INT_PIN
2821
#define KEYBOW2040_I2C_INT_PIN 3
29-
#endif
3022

31-
#ifndef KEYBOW2040_USER_SW_PIN
3223
#define KEYBOW2040_USER_SW_PIN 23
33-
#endif
3424

35-
#ifndef KEYBOW2040_SW0_PIN
3625
#define KEYBOW2040_SW0_PIN 21
37-
#endif
38-
39-
#ifndef KEYBOW2040_SW1_PIN
4026
#define KEYBOW2040_SW1_PIN 20
41-
#endif
42-
43-
#ifndef KEYBOW2040_SW2_PIN
4427
#define KEYBOW2040_SW2_PIN 19
45-
#endif
46-
47-
#ifndef KEYBOW2040_SW3_PIN
4828
#define KEYBOW2040_SW3_PIN 18
49-
#endif
50-
51-
#ifndef KEYBOW2040_SW4_PIN
5229
#define KEYBOW2040_SW4_PIN 17
53-
#endif
54-
55-
#ifndef KEYBOW2040_SW5_PIN
5630
#define KEYBOW2040_SW5_PIN 16
57-
#endif
58-
59-
#ifndef KEYBOW2040_SW6_PIN
6031
#define KEYBOW2040_SW6_PIN 15
61-
#endif
62-
63-
#ifndef KEYBOW2040_SW7_PIN
6432
#define KEYBOW2040_SW7_PIN 14
65-
#endif
66-
67-
#ifndef KEYBOW2040_SW8_PIN
6833
#define KEYBOW2040_SW8_PIN 13
69-
#endif
70-
71-
#ifndef KEYBOW2040_SW9_PIN
7234
#define KEYBOW2040_SW9_PIN 12
73-
#endif
74-
75-
#ifndef KEYBOW2040_SW10_PIN
7635
#define KEYBOW2040_SW10_PIN 11
77-
#endif
78-
79-
#ifndef KEYBOW2040_SW11_PIN
8036
#define KEYBOW2040_SW11_PIN 10
81-
#endif
82-
83-
#ifndef KEYBOW2040_SW12_PIN
8437
#define KEYBOW2040_SW12_PIN 9
85-
#endif
86-
87-
#ifndef KEYBOW2040_SW13_PIN
8838
#define KEYBOW2040_SW13_PIN 8
89-
#endif
90-
91-
#ifndef KEYBOW2040_SW14_PIN
9239
#define KEYBOW2040_SW14_PIN 7
93-
#endif
94-
95-
#ifndef KEYBOW2040_SW15_PIN
9640
#define KEYBOW2040_SW15_PIN 6
97-
#endif
9841

99-
#ifndef KEYBOW2040_NUM_SWITCHES_PINS
10042
#define KEYBOW2040_NUM_SWITCHES_PINS 16
101-
#endif
10243

10344
// --- UART ---
10445
#ifndef PICO_DEFAULT_UART

src/boards/include/boards/pimoroni_picolipo_16mb.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,9 @@
1616
#define PIMORONI_PICOLIPO_16MB
1717

1818
// --- BOARD SPECIFIC ---
19-
#ifndef PICOLIPO_USER_SW_PIN
2019
#define PICOLIPO_USER_SW_PIN 23
21-
#endif
22-
23-
#ifndef PICOLIPO_VBUS_DETECT_PIN
2420
#define PICOLIPO_VBUS_DETECT_PIN 24
25-
#endif
26-
27-
#ifndef PICOLIPO_BAT_SENSE_PIN
2821
#define PICOLIPO_BAT_SENSE_PIN 29
29-
#endif
3022

3123
// --- UART ---
3224
#ifndef PICO_DEFAULT_UART

src/boards/include/boards/pimoroni_picolipo_4mb.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,9 @@
1616
#define PIMORONI_PICOLIPO_4MB
1717

1818
// --- BOARD SPECIFIC ---
19-
#ifndef PICOLIPO_USER_SW_PIN
2019
#define PICOLIPO_USER_SW_PIN 23
21-
#endif
22-
23-
#ifndef PICOLIPO_VBUS_DETECT_PIN
2420
#define PICOLIPO_VBUS_DETECT_PIN 24
25-
#endif
26-
27-
#ifndef PICOLIPO_BAT_SENSE_PIN
2821
#define PICOLIPO_BAT_SENSE_PIN 29
29-
#endif
3022

3123
// --- UART ---
3224
#ifndef PICO_DEFAULT_UART

0 commit comments

Comments
 (0)