Removed unnecessary ifdefs from Pimoroni boards (#802)

* Removed unnecessary ifdefs from Pim boards
* Re-ordered some pins
This commit is contained in:
ZodiusInfuser 2022-05-04 21:26:55 +01:00 committed by GitHub
parent 3c450011da
commit d5121dc880
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 11 additions and 516 deletions

View File

@ -16,114 +16,39 @@
#define PIMORONI_BADGER2040 #define PIMORONI_BADGER2040
// --- BOARD SPECIFIC --- // --- BOARD SPECIFIC ---
#ifndef BADGER2040_UART
#define BADGER2040_UART 0 #define BADGER2040_UART 0
#endif
#ifndef BADGER2040_TX_PIN
#define BADGER2040_TX_PIN 0 #define BADGER2040_TX_PIN 0
#endif
#ifndef BADGER2040_RX_PIN
#define BADGER2040_RX_PIN 1 #define BADGER2040_RX_PIN 1
#endif
#ifndef BADGER2040_I2C
#define BADGER2040_I2C 0 #define BADGER2040_I2C 0
#endif
#ifndef BADGER2040_INT_PIN
#define BADGER2040_INT_PIN 3 #define BADGER2040_INT_PIN 3
#endif
#ifndef BADGER2040_SDA_PIN
#define BADGER2040_SDA_PIN 4 #define BADGER2040_SDA_PIN 4
#endif
#ifndef BADGER2040_SCL_PIN
#define BADGER2040_SCL_PIN 5 #define BADGER2040_SCL_PIN 5
#endif
#ifndef BADGER2040_3V3_EN_PIN
#define BADGER2040_3V3_EN_PIN 10 #define BADGER2040_3V3_EN_PIN 10
#endif
#ifndef BADGER2040_SW_DOWN_PIN
#define BADGER2040_SW_DOWN_PIN 11 #define BADGER2040_SW_DOWN_PIN 11
#endif
#ifndef BADGER2040_SW_A_PIN
#define BADGER2040_SW_A_PIN 12 #define BADGER2040_SW_A_PIN 12
#endif
#ifndef BADGER2040_SW_B_PIN
#define BADGER2040_SW_B_PIN 13 #define BADGER2040_SW_B_PIN 13
#endif
#ifndef BADGER2040_SW_C_PIN
#define BADGER2040_SW_C_PIN 14 #define BADGER2040_SW_C_PIN 14
#endif
#ifndef BADGER2040_SW_UP_PIN
#define BADGER2040_SW_UP_PIN 15 #define BADGER2040_SW_UP_PIN 15
#endif
#ifndef BADGER2040_INKY_SPI
#define BADGER2040_INKY_SPI 0 #define BADGER2040_INKY_SPI 0
#endif
#ifndef BADGER2040_INKY_MISO_PIN
#define BADGER2040_INKY_MISO_PIN 16 #define BADGER2040_INKY_MISO_PIN 16
#endif
#ifndef BADGER2040_INKY_CSN_PIN
#define BADGER2040_INKY_CSN_PIN 17 #define BADGER2040_INKY_CSN_PIN 17
#endif
#ifndef BADGER2040_INKY_SCK_PIN
#define BADGER2040_INKY_SCK_PIN 18 #define BADGER2040_INKY_SCK_PIN 18
#endif
#ifndef BADGER2040_INKY_MOSI_PIN
#define BADGER2040_INKY_MOSI_PIN 19 #define BADGER2040_INKY_MOSI_PIN 19
#endif
#ifndef BADGER2040_INKY_DC_PIN
#define BADGER2040_INKY_DC_PIN 20 #define BADGER2040_INKY_DC_PIN 20
#endif
#ifndef BADGER2040_INKY_RESET_PIN
#define BADGER2040_INKY_RESET_PIN 21 #define BADGER2040_INKY_RESET_PIN 21
#endif
#ifndef BADGER2040_USER_SW_PIN
#define BADGER2040_USER_SW_PIN 23
#endif
#ifndef BADGER2040_VBUS_DETECT_PIN
#define BADGER2040_VBUS_DETECT_PIN 24
#endif
#ifndef BADGER2040_USER_LED_PIN
#define BADGER2040_USER_LED_PIN 25
#endif
#ifndef BADGER2040_INKY_BUSY_PIN
#define BADGER2040_INKY_BUSY_PIN 26 #define BADGER2040_INKY_BUSY_PIN 26
#endif
#ifndef BADGER2040_VREF_POWER_PIN #define BADGER2040_USER_SW_PIN 23
#define BADGER2040_USER_LED_PIN 25
#define BADGER2040_VBUS_DETECT_PIN 24
#define BADGER2040_VREF_POWER_PIN 27 #define BADGER2040_VREF_POWER_PIN 27
#endif
#ifndef BADGER2040_1V2_REF_PIN
#define BADGER2040_1V2_REF_PIN 28 #define BADGER2040_1V2_REF_PIN 28
#endif
#ifndef BADGER2040_BAT_SENSE_PIN
#define BADGER2040_BAT_SENSE_PIN 29 #define BADGER2040_BAT_SENSE_PIN 29
#endif
// --- UART --- // --- UART ---
#ifndef PICO_DEFAULT_UART #ifndef PICO_DEFAULT_UART

View File

@ -16,117 +16,42 @@
#define PIMORONI_INTERSTATE75 #define PIMORONI_INTERSTATE75
// --- BOARD SPECIFIC --- // --- BOARD SPECIFIC ---
#ifndef INTERSTATE75_R0_PIN
#define INTERSTATE75_R0_PIN 0 #define INTERSTATE75_R0_PIN 0
#endif
#ifndef INTERSTATE75_G0_PIN
#define INTERSTATE75_G0_PIN 1 #define INTERSTATE75_G0_PIN 1
#endif
#ifndef INTERSTATE75_B0_PIN
#define INTERSTATE75_B0_PIN 2 #define INTERSTATE75_B0_PIN 2
#endif
#ifndef INTERSTATE75_R1_PIN
#define INTERSTATE75_R1_PIN 3 #define INTERSTATE75_R1_PIN 3
#endif
#ifndef INTERSTATE75_G1_PIN
#define INTERSTATE75_G1_PIN 4 #define INTERSTATE75_G1_PIN 4
#endif
#ifndef INTERSTATE75_B1_PIN
#define INTERSTATE75_B1_PIN 5 #define INTERSTATE75_B1_PIN 5
#endif
#ifndef INTERSTATE75_ROW_A_PIN
#define INTERSTATE75_ROW_A_PIN 6 #define INTERSTATE75_ROW_A_PIN 6
#endif
#ifndef INTERSTATE75_ROW_B_PIN
#define INTERSTATE75_ROW_B_PIN 7 #define INTERSTATE75_ROW_B_PIN 7
#endif
#ifndef INTERSTATE75_ROW_C_PIN
#define INTERSTATE75_ROW_C_PIN 8 #define INTERSTATE75_ROW_C_PIN 8
#endif
#ifndef INTERSTATE75_ROW_D_PIN
#define INTERSTATE75_ROW_D_PIN 9 #define INTERSTATE75_ROW_D_PIN 9
#endif
#ifndef INTERSTATE75_ROW_E_PIN
#define INTERSTATE75_ROW_E_PIN 10 #define INTERSTATE75_ROW_E_PIN 10
#endif
#ifndef INTERSTATE75_CLK_PIN
#define INTERSTATE75_CLK_PIN 11 #define INTERSTATE75_CLK_PIN 11
#endif
#ifndef INTERSTATE75_LAT_PIN
#define INTERSTATE75_LAT_PIN 12 #define INTERSTATE75_LAT_PIN 12
#endif
#ifndef INTERSTATE75_OE_PIN
#define INTERSTATE75_OE_PIN 13 #define INTERSTATE75_OE_PIN 13
#endif
#ifndef INTERSTATE75_SW_A_PIN
#define INTERSTATE75_SW_A_PIN 14 #define INTERSTATE75_SW_A_PIN 14
#endif
#ifndef INTERSTATE75_LED_R_PIN
#define INTERSTATE75_LED_R_PIN 16 #define INTERSTATE75_LED_R_PIN 16
#endif
#ifndef INTERSTATE75_LED_G_PIN
#define INTERSTATE75_LED_G_PIN 17 #define INTERSTATE75_LED_G_PIN 17
#endif
#ifndef INTERSTATE75_LED_B_PIN
#define INTERSTATE75_LED_B_PIN 18 #define INTERSTATE75_LED_B_PIN 18
#endif
#ifndef INTERSTATE75_I2C
#define INTERSTATE75_I2C 0 #define INTERSTATE75_I2C 0
#endif
#ifndef INTERSTATE75_INT_PIN
#define INTERSTATE75_INT_PIN 19 #define INTERSTATE75_INT_PIN 19
#endif
#ifndef INTERSTATE75_SDA_PIN
#define INTERSTATE75_SDA_PIN 20 #define INTERSTATE75_SDA_PIN 20
#endif
#ifndef INTERSTATE75_SCL_PIN
#define INTERSTATE75_SCL_PIN 21 #define INTERSTATE75_SCL_PIN 21
#endif
#ifndef INTERSTATE75_USER_SW_PIN
#define INTERSTATE75_USER_SW_PIN 23 #define INTERSTATE75_USER_SW_PIN 23
#endif
#ifndef INTERSTATE75_A0_PIN
#define INTERSTATE75_A0_PIN 26 #define INTERSTATE75_A0_PIN 26
#endif
#ifndef INTERSTATE75_A1_PIN
#define INTERSTATE75_A1_PIN 27 #define INTERSTATE75_A1_PIN 27
#endif
#ifndef INTERSTATE75_A2_PIN
#define INTERSTATE75_A2_PIN 28 #define INTERSTATE75_A2_PIN 28
#endif
#ifndef INTERSTATE75_NUM_ADC_PINS
#define INTERSTATE75_NUM_ADC_PINS 3 #define INTERSTATE75_NUM_ADC_PINS 3
#endif
#ifndef INTERSTATE75_CURRENT_SENSE_PIN
#define INTERSTATE75_CURRENT_SENSE_PIN 29 #define INTERSTATE75_CURRENT_SENSE_PIN 29
#endif
// --- UART --- // --- UART ---
// no PICO_DEFAULT_UART // no PICO_DEFAULT_UART

View File

@ -16,89 +16,30 @@
#define PIMORONI_KEYBOW2040 #define PIMORONI_KEYBOW2040
// --- BOARD SPECIFIC --- // --- BOARD SPECIFIC ---
#ifndef KEYBOW2040_I2C_SDA_PIN
#define KEYBOW2040_I2C_SDA_PIN 4 #define KEYBOW2040_I2C_SDA_PIN 4
#endif
#ifndef KEYBOW2040_I2C_SCL_PIN
#define KEYBOW2040_I2C_SCL_PIN 5 #define KEYBOW2040_I2C_SCL_PIN 5
#endif
#ifndef KEYBOW2040_I2C_INT_PIN
#define KEYBOW2040_I2C_INT_PIN 3 #define KEYBOW2040_I2C_INT_PIN 3
#endif
#ifndef KEYBOW2040_USER_SW_PIN
#define KEYBOW2040_USER_SW_PIN 23 #define KEYBOW2040_USER_SW_PIN 23
#endif
#ifndef KEYBOW2040_SW0_PIN
#define KEYBOW2040_SW0_PIN 21 #define KEYBOW2040_SW0_PIN 21
#endif
#ifndef KEYBOW2040_SW1_PIN
#define KEYBOW2040_SW1_PIN 20 #define KEYBOW2040_SW1_PIN 20
#endif
#ifndef KEYBOW2040_SW2_PIN
#define KEYBOW2040_SW2_PIN 19 #define KEYBOW2040_SW2_PIN 19
#endif
#ifndef KEYBOW2040_SW3_PIN
#define KEYBOW2040_SW3_PIN 18 #define KEYBOW2040_SW3_PIN 18
#endif
#ifndef KEYBOW2040_SW4_PIN
#define KEYBOW2040_SW4_PIN 17 #define KEYBOW2040_SW4_PIN 17
#endif
#ifndef KEYBOW2040_SW5_PIN
#define KEYBOW2040_SW5_PIN 16 #define KEYBOW2040_SW5_PIN 16
#endif
#ifndef KEYBOW2040_SW6_PIN
#define KEYBOW2040_SW6_PIN 15 #define KEYBOW2040_SW6_PIN 15
#endif
#ifndef KEYBOW2040_SW7_PIN
#define KEYBOW2040_SW7_PIN 14 #define KEYBOW2040_SW7_PIN 14
#endif
#ifndef KEYBOW2040_SW8_PIN
#define KEYBOW2040_SW8_PIN 13 #define KEYBOW2040_SW8_PIN 13
#endif
#ifndef KEYBOW2040_SW9_PIN
#define KEYBOW2040_SW9_PIN 12 #define KEYBOW2040_SW9_PIN 12
#endif
#ifndef KEYBOW2040_SW10_PIN
#define KEYBOW2040_SW10_PIN 11 #define KEYBOW2040_SW10_PIN 11
#endif
#ifndef KEYBOW2040_SW11_PIN
#define KEYBOW2040_SW11_PIN 10 #define KEYBOW2040_SW11_PIN 10
#endif
#ifndef KEYBOW2040_SW12_PIN
#define KEYBOW2040_SW12_PIN 9 #define KEYBOW2040_SW12_PIN 9
#endif
#ifndef KEYBOW2040_SW13_PIN
#define KEYBOW2040_SW13_PIN 8 #define KEYBOW2040_SW13_PIN 8
#endif
#ifndef KEYBOW2040_SW14_PIN
#define KEYBOW2040_SW14_PIN 7 #define KEYBOW2040_SW14_PIN 7
#endif
#ifndef KEYBOW2040_SW15_PIN
#define KEYBOW2040_SW15_PIN 6 #define KEYBOW2040_SW15_PIN 6
#endif
#ifndef KEYBOW2040_NUM_SWITCHES_PINS
#define KEYBOW2040_NUM_SWITCHES_PINS 16 #define KEYBOW2040_NUM_SWITCHES_PINS 16
#endif
// --- UART --- // --- UART ---
#ifndef PICO_DEFAULT_UART #ifndef PICO_DEFAULT_UART

View File

@ -16,17 +16,9 @@
#define PIMORONI_PICOLIPO_16MB #define PIMORONI_PICOLIPO_16MB
// --- BOARD SPECIFIC --- // --- BOARD SPECIFIC ---
#ifndef PICOLIPO_USER_SW_PIN
#define PICOLIPO_USER_SW_PIN 23 #define PICOLIPO_USER_SW_PIN 23
#endif
#ifndef PICOLIPO_VBUS_DETECT_PIN
#define PICOLIPO_VBUS_DETECT_PIN 24 #define PICOLIPO_VBUS_DETECT_PIN 24
#endif
#ifndef PICOLIPO_BAT_SENSE_PIN
#define PICOLIPO_BAT_SENSE_PIN 29 #define PICOLIPO_BAT_SENSE_PIN 29
#endif
// --- UART --- // --- UART ---
#ifndef PICO_DEFAULT_UART #ifndef PICO_DEFAULT_UART

View File

@ -16,17 +16,9 @@
#define PIMORONI_PICOLIPO_4MB #define PIMORONI_PICOLIPO_4MB
// --- BOARD SPECIFIC --- // --- BOARD SPECIFIC ---
#ifndef PICOLIPO_USER_SW_PIN
#define PICOLIPO_USER_SW_PIN 23 #define PICOLIPO_USER_SW_PIN 23
#endif
#ifndef PICOLIPO_VBUS_DETECT_PIN
#define PICOLIPO_VBUS_DETECT_PIN 24 #define PICOLIPO_VBUS_DETECT_PIN 24
#endif
#ifndef PICOLIPO_BAT_SENSE_PIN
#define PICOLIPO_BAT_SENSE_PIN 29 #define PICOLIPO_BAT_SENSE_PIN 29
#endif
// --- UART --- // --- UART ---
#ifndef PICO_DEFAULT_UART #ifndef PICO_DEFAULT_UART

View File

@ -16,97 +16,35 @@
#define PIMORONI_PICOSYSTEM #define PIMORONI_PICOSYSTEM
// --- BOARD SPECIFIC --- // --- BOARD SPECIFIC ---
#ifndef PICOSYSTEM_VBUS_DETECT_PIN
#define PICOSYSTEM_VBUS_DETECT_PIN 2 #define PICOSYSTEM_VBUS_DETECT_PIN 2
#endif
#ifndef PICOSYSTEM_LCD_SPI
#define PICOSYSTEM_LCD_SPI 0 #define PICOSYSTEM_LCD_SPI 0
#endif
#ifndef PICOSYSTEM_LCD_RESET_PIN
#define PICOSYSTEM_LCD_RESET_PIN 4 #define PICOSYSTEM_LCD_RESET_PIN 4
#endif
#ifndef PICOSYSTEM_LCD_CSN_PIN
#define PICOSYSTEM_LCD_CSN_PIN 5 #define PICOSYSTEM_LCD_CSN_PIN 5
#endif
#ifndef PICOSYSTEM_LCD_SCLK_PIN
#define PICOSYSTEM_LCD_SCLK_PIN 6 #define PICOSYSTEM_LCD_SCLK_PIN 6
#endif
#ifndef PICOSYSTEM_LCD_MOSI_PIN
#define PICOSYSTEM_LCD_MOSI_PIN 7 #define PICOSYSTEM_LCD_MOSI_PIN 7
#endif
#ifndef PICOSYSTEM_LCD_VSYNC_PIN
#define PICOSYSTEM_LCD_VSYNC_PIN 8 #define PICOSYSTEM_LCD_VSYNC_PIN 8
#endif
#ifndef PICOSYSTEM_LCD_DC_PIN
#define PICOSYSTEM_LCD_DC_PIN 9 #define PICOSYSTEM_LCD_DC_PIN 9
#endif
#ifndef PICOSYSTEM_AUDIO_PIN
#define PICOSYSTEM_AUDIO_PIN 11 #define PICOSYSTEM_AUDIO_PIN 11
#endif
#ifndef PICOSYSTEM_BACKLIGHT_PIN
#define PICOSYSTEM_BACKLIGHT_PIN 12 #define PICOSYSTEM_BACKLIGHT_PIN 12
#endif
#ifndef PICOSYSTEM_LED_G_PIN
#define PICOSYSTEM_LED_G_PIN 13 #define PICOSYSTEM_LED_G_PIN 13
#endif
#ifndef PICOSYSTEM_LED_R_PIN
#define PICOSYSTEM_LED_R_PIN 14 #define PICOSYSTEM_LED_R_PIN 14
#endif
#ifndef PICOSYSTEM_LED_B_PIN
#define PICOSYSTEM_LED_B_PIN 15 #define PICOSYSTEM_LED_B_PIN 15
#endif
#ifndef PICOSYSTEM_SW_Y_PIN
#define PICOSYSTEM_SW_Y_PIN 16 #define PICOSYSTEM_SW_Y_PIN 16
#endif
#ifndef PICOSYSTEM_SW_X_PIN
#define PICOSYSTEM_SW_X_PIN 17 #define PICOSYSTEM_SW_X_PIN 17
#endif
#ifndef PICOSYSTEM_SW_A_PIN
#define PICOSYSTEM_SW_A_PIN 18 #define PICOSYSTEM_SW_A_PIN 18
#endif
#ifndef PICOSYSTEM_SW_B_PIN
#define PICOSYSTEM_SW_B_PIN 19 #define PICOSYSTEM_SW_B_PIN 19
#endif
#ifndef PICOSYSTEM_SW_DOWN_PIN
#define PICOSYSTEM_SW_DOWN_PIN 20 #define PICOSYSTEM_SW_DOWN_PIN 20
#endif
#ifndef PICOSYSTEM_SW_RIGHT_PIN
#define PICOSYSTEM_SW_RIGHT_PIN 21 #define PICOSYSTEM_SW_RIGHT_PIN 21
#endif
#ifndef PICOSYSTEM_SW_LEFT_PIN
#define PICOSYSTEM_SW_LEFT_PIN 22 #define PICOSYSTEM_SW_LEFT_PIN 22
#endif
#ifndef PICOSYSTEM_SW_UP_PIN
#define PICOSYSTEM_SW_UP_PIN 23 #define PICOSYSTEM_SW_UP_PIN 23
#endif
#ifndef PICOSYSTEM_CHARGE_STAT_PIN
#define PICOSYSTEM_CHARGE_STAT_PIN 24 #define PICOSYSTEM_CHARGE_STAT_PIN 24
#endif
#ifndef PICOSYSTEM_BAT_SENSE_PIN
#define PICOSYSTEM_BAT_SENSE_PIN 26 #define PICOSYSTEM_BAT_SENSE_PIN 26
#endif
// --- UART --- // --- UART ---
#ifndef PICO_DEFAULT_UART #ifndef PICO_DEFAULT_UART

View File

@ -16,73 +16,29 @@
#define PIMORONI_PLASMA2040 #define PIMORONI_PLASMA2040
// --- BOARD SPECIFIC --- // --- BOARD SPECIFIC ---
#ifndef PLASMA2040_SW_A_PIN
#define PLASMA2040_SW_A_PIN 12 #define PLASMA2040_SW_A_PIN 12
#endif
#ifndef PLASMA2040_SW_B_PIN
#define PLASMA2040_SW_B_PIN 13 #define PLASMA2040_SW_B_PIN 13
#endif
#ifndef PLASMA2040_CLK_PIN
#define PLASMA2040_CLK_PIN 14 #define PLASMA2040_CLK_PIN 14
#endif
#ifndef PLASMA2040_DATA_PIN
#define PLASMA2040_DATA_PIN 15 #define PLASMA2040_DATA_PIN 15
#endif
#ifndef PLASMA2040_LED_R_PIN
#define PLASMA2040_LED_R_PIN 16 #define PLASMA2040_LED_R_PIN 16
#endif
#ifndef PLASMA2040_LED_G_PIN
#define PLASMA2040_LED_G_PIN 17 #define PLASMA2040_LED_G_PIN 17
#endif
#ifndef PLASMA2040_LED_B_PIN
#define PLASMA2040_LED_B_PIN 18 #define PLASMA2040_LED_B_PIN 18
#endif
#ifndef PLASMA2040_I2C
#define PLASMA2040_I2C 0 #define PLASMA2040_I2C 0
#endif
#ifndef PLASMA2040_INT_PIN
#define PLASMA2040_INT_PIN 19 #define PLASMA2040_INT_PIN 19
#endif
#ifndef PLASMA2040_SDA_PIN
#define PLASMA2040_SDA_PIN 20 #define PLASMA2040_SDA_PIN 20
#endif
#ifndef PLASMA2040_SCL_PIN
#define PLASMA2040_SCL_PIN 21 #define PLASMA2040_SCL_PIN 21
#endif
#ifndef PLASMA2040_USER_SW_PIN
#define PLASMA2040_USER_SW_PIN 23 #define PLASMA2040_USER_SW_PIN 23
#endif
#ifndef PLASMA2040_A0_PIN
#define PLASMA2040_A0_PIN 26 #define PLASMA2040_A0_PIN 26
#endif
#ifndef PLASMA2040_A1_PIN
#define PLASMA2040_A1_PIN 27 #define PLASMA2040_A1_PIN 27
#endif
#ifndef PLASMA2040_A2_PIN
#define PLASMA2040_A2_PIN 28 #define PLASMA2040_A2_PIN 28
#endif
#ifndef PLASMA2040_NUM_ADC_PINS
#define PLASMA2040_NUM_ADC_PINS 3 #define PLASMA2040_NUM_ADC_PINS 3
#endif
#ifndef PLASMA2040_CURRENT_SENSE_PIN
#define PLASMA2040_CURRENT_SENSE_PIN 29 #define PLASMA2040_CURRENT_SENSE_PIN 29
#endif
// --- UART --- // --- UART ---
// no PICO_DEFAULT_UART // no PICO_DEFAULT_UART

View File

@ -16,177 +16,55 @@
#define PIMORONI_SERVO2040 #define PIMORONI_SERVO2040
// --- BOARD SPECIFIC --- // --- BOARD SPECIFIC ---
#ifndef SERVO2040_SERVO_1_PIN
#define SERVO2040_SERVO_1_PIN 0 #define SERVO2040_SERVO_1_PIN 0
#endif
#ifndef SERVO2040_SERVO_2_PIN
#define SERVO2040_SERVO_2_PIN 1 #define SERVO2040_SERVO_2_PIN 1
#endif
#ifndef SERVO2040_SERVO_3_PIN
#define SERVO2040_SERVO_3_PIN 2 #define SERVO2040_SERVO_3_PIN 2
#endif
#ifndef SERVO2040_SERVO_4_PIN
#define SERVO2040_SERVO_4_PIN 3 #define SERVO2040_SERVO_4_PIN 3
#endif
#ifndef SERVO2040_SERVO_5_PIN
#define SERVO2040_SERVO_5_PIN 4 #define SERVO2040_SERVO_5_PIN 4
#endif
#ifndef SERVO2040_SERVO_6_PIN
#define SERVO2040_SERVO_6_PIN 5 #define SERVO2040_SERVO_6_PIN 5
#endif
#ifndef SERVO2040_SERVO_7_PIN
#define SERVO2040_SERVO_7_PIN 6 #define SERVO2040_SERVO_7_PIN 6
#endif
#ifndef SERVO2040_SERVO_8_PIN
#define SERVO2040_SERVO_8_PIN 7 #define SERVO2040_SERVO_8_PIN 7
#endif
#ifndef SERVO2040_SERVO_9_PIN
#define SERVO2040_SERVO_9_PIN 8 #define SERVO2040_SERVO_9_PIN 8
#endif
#ifndef SERVO2040_SERVO_10_PIN
#define SERVO2040_SERVO_10_PIN 9 #define SERVO2040_SERVO_10_PIN 9
#endif
#ifndef SERVO2040_SERVO_11_PIN
#define SERVO2040_SERVO_11_PIN 10 #define SERVO2040_SERVO_11_PIN 10
#endif
#ifndef SERVO2040_SERVO_12_PIN
#define SERVO2040_SERVO_12_PIN 11 #define SERVO2040_SERVO_12_PIN 11
#endif
#ifndef SERVO2040_SERVO_13_PIN
#define SERVO2040_SERVO_13_PIN 12 #define SERVO2040_SERVO_13_PIN 12
#endif
#ifndef SERVO2040_SERVO_14_PIN
#define SERVO2040_SERVO_14_PIN 13 #define SERVO2040_SERVO_14_PIN 13
#endif
#ifndef SERVO2040_SERVO_15_PIN
#define SERVO2040_SERVO_15_PIN 14 #define SERVO2040_SERVO_15_PIN 14
#endif
#ifndef SERVO2040_SERVO_16_PIN
#define SERVO2040_SERVO_16_PIN 15 #define SERVO2040_SERVO_16_PIN 15
#endif
#ifndef SERVO2040_SERVO_17_PIN
#define SERVO2040_SERVO_17_PIN 16 #define SERVO2040_SERVO_17_PIN 16
#endif
#ifndef SERVO2040_SERVO_18_PIN
#define SERVO2040_SERVO_18_PIN 17 #define SERVO2040_SERVO_18_PIN 17
#endif
#ifndef SERVO2040_NUM_SERVOS
#define SERVO2040_NUM_SERVOS 18 #define SERVO2040_NUM_SERVOS 18
#endif
#ifndef SERVO2040_LED_DATA_PIN
#define SERVO2040_LED_DATA_PIN 18 #define SERVO2040_LED_DATA_PIN 18
#endif
#ifndef SERVO2040_NUM_LEDS
#define SERVO2040_NUM_LEDS 6 #define SERVO2040_NUM_LEDS 6
#endif
#ifndef SERVO2040_I2C
#define SERVO2040_I2C 0 #define SERVO2040_I2C 0
#endif
#ifndef SERVO2040_INT_PIN
#define SERVO2040_INT_PIN 19 #define SERVO2040_INT_PIN 19
#endif
#ifndef SERVO2040_SDA_PIN
#define SERVO2040_SDA_PIN 20 #define SERVO2040_SDA_PIN 20
#endif
#ifndef SERVO2040_SCL_PIN
#define SERVO2040_SCL_PIN 21 #define SERVO2040_SCL_PIN 21
#endif
#ifndef SERVO2040_USER_SW_PIN
#define SERVO2040_USER_SW_PIN 23 #define SERVO2040_USER_SW_PIN 23
#endif
#ifndef SERVO2040_ADC_ADDR_0_PIN #define SERVO2040_A0_PIN 26
#define SERVO2040_ADC_ADDR_0_PIN 22 #define SERVO2040_A1_PIN 27
#endif #define SERVO2040_A2_PIN 28
#ifndef SERVO2040_ADC_ADDR_1_PIN
#define SERVO2040_ADC_ADDR_1_PIN 24
#endif
#ifndef SERVO2040_ADC_ADDR_2_PIN
#define SERVO2040_ADC_ADDR_2_PIN 25
#endif
#ifndef SERVO2040_ADC0_PIN
#define SERVO2040_ADC0_PIN 26
#endif
#ifndef SERVO2040_ADC1_PIN
#define SERVO2040_ADC1_PIN 27
#endif
#ifndef SERVO2040_ADC2_PIN
#define SERVO2040_ADC2_PIN 28
#endif
#ifndef SERVO2040_NUM_ADC_PINS
#define SERVO2040_NUM_ADC_PINS 3 #define SERVO2040_NUM_ADC_PINS 3
#endif
#ifndef SERVO2040_SHARED_ADC_PIN
#define SERVO2040_SHARED_ADC_PIN 29 #define SERVO2040_SHARED_ADC_PIN 29
#endif #define SERVO2040_ADC_ADDR_0_PIN 22
#define SERVO2040_ADC_ADDR_1_PIN 24
#define SERVO2040_ADC_ADDR_2_PIN 25
#ifndef SERVO2040_SENSOR_1_ADDR
#define SERVO2040_SENSOR_1_ADDR 0b000 #define SERVO2040_SENSOR_1_ADDR 0b000
#endif
#ifndef SERVO2040_SENSOR_2_ADDR
#define SERVO2040_SENSOR_2_ADDR 0b001 #define SERVO2040_SENSOR_2_ADDR 0b001
#endif
#ifndef SERVO2040_SENSOR_3_ADDR
#define SERVO2040_SENSOR_3_ADDR 0b010 #define SERVO2040_SENSOR_3_ADDR 0b010
#endif
#ifndef SERVO2040_SENSOR_4_ADDR
#define SERVO2040_SENSOR_4_ADDR 0b011 #define SERVO2040_SENSOR_4_ADDR 0b011
#endif
#ifndef SERVO2040_SENSOR_5_ADDR
#define SERVO2040_SENSOR_5_ADDR 0b100 #define SERVO2040_SENSOR_5_ADDR 0b100
#endif
#ifndef SERVO2040_SENSOR_6_ADDR
#define SERVO2040_SENSOR_6_ADDR 0b101 #define SERVO2040_SENSOR_6_ADDR 0b101
#endif
#ifndef SERVO2040_NUM_SENSORS
#define SERVO2040_NUM_SENSORS 6
#endif
#ifndef SERVO2040_VOLTAGE_SENSE_ADDR
#define SERVO2040_VOLTAGE_SENSE_ADDR 0b110 #define SERVO2040_VOLTAGE_SENSE_ADDR 0b110
#endif
#ifndef SERVO2040_CURRENT_SENSE_ADDR
#define SERVO2040_CURRENT_SENSE_ADDR 0b111 #define SERVO2040_CURRENT_SENSE_ADDR 0b111
#endif #define SERVO2040_NUM_SENSORS 6
// --- UART --- // --- UART ---
// no PICO_DEFAULT_UART // no PICO_DEFAULT_UART

View File

@ -17,45 +17,19 @@
#define PIMORONI_TINY2040_8MB #define PIMORONI_TINY2040_8MB
// --- BOARD SPECIFIC --- // --- BOARD SPECIFIC ---
#ifndef TINY2040_LED_R_PIN
#define TINY2040_LED_R_PIN 18 #define TINY2040_LED_R_PIN 18
#endif
#ifndef TINY2040_LED_G_PIN
#define TINY2040_LED_G_PIN 19 #define TINY2040_LED_G_PIN 19
#endif
#ifndef TINY2040_LED_B_PIN
#define TINY2040_LED_B_PIN 20 #define TINY2040_LED_B_PIN 20
#endif
#ifndef TINY2040_USER_SW_PIN
#define TINY2040_USER_SW_PIN 23 #define TINY2040_USER_SW_PIN 23
#endif
#ifndef TINY2040_A0_PIN
#define TINY2040_A0_PIN 26 #define TINY2040_A0_PIN 26
#endif
#ifndef TINY2040_A1_PIN
#define TINY2040_A1_PIN 27 #define TINY2040_A1_PIN 27
#endif
#ifndef TINY2040_A2_PIN
#define TINY2040_A2_PIN 28 #define TINY2040_A2_PIN 28
#endif
#ifndef TINY2040_A3_PIN
#define TINY2040_A3_PIN 29 #define TINY2040_A3_PIN 29
#endif
#ifndef TINY2040_NUM_IO_PINS
#define TINY2040_NUM_IO_PINS 8 #define TINY2040_NUM_IO_PINS 8
#endif
#ifndef TINY2040_NUM_ADC_PINS
#define TINY2040_NUM_ADC_PINS 4 #define TINY2040_NUM_ADC_PINS 4
#endif
// --- UART --- // --- UART ---
#ifndef PICO_DEFAULT_UART #ifndef PICO_DEFAULT_UART

View File

@ -17,45 +17,19 @@
#define PIMORONI_TINY2040_2MB #define PIMORONI_TINY2040_2MB
// --- BOARD SPECIFIC --- // --- BOARD SPECIFIC ---
#ifndef TINY2040_LED_R_PIN
#define TINY2040_LED_R_PIN 18 #define TINY2040_LED_R_PIN 18
#endif
#ifndef TINY2040_LED_G_PIN
#define TINY2040_LED_G_PIN 19 #define TINY2040_LED_G_PIN 19
#endif
#ifndef TINY2040_LED_B_PIN
#define TINY2040_LED_B_PIN 20 #define TINY2040_LED_B_PIN 20
#endif
#ifndef TINY2040_USER_SW_PIN
#define TINY2040_USER_SW_PIN 23 #define TINY2040_USER_SW_PIN 23
#endif
#ifndef TINY2040_A0_PIN
#define TINY2040_A0_PIN 26 #define TINY2040_A0_PIN 26
#endif
#ifndef TINY2040_A1_PIN
#define TINY2040_A1_PIN 27 #define TINY2040_A1_PIN 27
#endif
#ifndef TINY2040_A2_PIN
#define TINY2040_A2_PIN 28 #define TINY2040_A2_PIN 28
#endif
#ifndef TINY2040_A3_PIN
#define TINY2040_A3_PIN 29 #define TINY2040_A3_PIN 29
#endif
#ifndef TINY2040_NUM_IO_PINS
#define TINY2040_NUM_IO_PINS 8 #define TINY2040_NUM_IO_PINS 8
#endif
#ifndef TINY2040_NUM_ADC_PINS
#define TINY2040_NUM_ADC_PINS 4 #define TINY2040_NUM_ADC_PINS 4
#endif
// --- UART --- // --- UART ---
#ifndef PICO_DEFAULT_UART #ifndef PICO_DEFAULT_UART