removed dangling #ifdef __cplusplus (#1941)

This commit is contained in:
Stanislav Rubint 2024-09-28 06:52:39 +02:00 committed by GitHub
parent 66335f1dc7
commit 20cf7119f4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -14,67 +14,65 @@
#ifndef _BOARDS_METROTECH_XERXES_RP2040_H
#define _BOARDS_METROTECH_XERXES_RP2040_H
#define USR_SW_PIN 18
#define USR_BTN_PIN 24
#define USR_LED_PIN 25
#define USR_SW_PIN 18
#define USR_BTN_PIN 24
#define USR_LED_PIN 25
#define UART1_TX_PIN 8
#define UART1_RX_PIN 9
#define UART1_TX_PIN 8
#define UART1_RX_PIN 9
#define UART0_TX_PIN 16
#define UART0_RX_PIN 17
#define UART0_TX_PIN 16
#define UART0_RX_PIN 17
#define SPI0_MISO_PIN 0
#define SPI0_CSN_PIN 1
#define SPI0_CLK_PIN 2
#define SPI0_MOSI_PIN 3
#define SPI0_MISO_PIN 0
#define SPI0_CSN_PIN 1
#define SPI0_CLK_PIN 2
#define SPI0_MOSI_PIN 3
#define I2C0_SDA_PIN 4
#define I2C0_SCL_PIN 5
#define I2C0_SDA_PIN 4
#define I2C0_SCL_PIN 5
#define EXT_3V3_EN_PIN 6
#define EXT_3V3_EN_PIN 6
#define RS_EN_PIN 19
#define RS_TX_PIN UART0_TX_PIN
#define RS_RX_PIN UART0_RX_PIN
#define RS_EN_PIN 19
#define RS_TX_PIN UART0_TX_PIN
#define RS_RX_PIN UART0_RX_PIN
#define ADC0_PIN 26 // ADC0 and PWM5_A share the same pin
#define ADC1_PIN 27 // ADC1 and PWM5_B share the same pin
#define ADC2_PIN 28 // ADC2 and PWM6_A share the same pin
#define ADC3_PIN 29 // ADC3 and PWM6_B share the same pin
#define ADC0_PIN 26 // ADC0 and PWM5_A share the same pin
#define ADC1_PIN 27 // ADC1 and PWM5_B share the same pin
#define ADC2_PIN 28 // ADC2 and PWM6_A share the same pin
#define ADC3_PIN 29 // ADC3 and PWM6_B share the same pin
#define TMP0_PIN 22 // TMP0 and I2C1 share the same pin
#define TMP1_PIN 23 // TMP1 and I2C1 share the same pin
#define TMP0_PIN 22 // TMP0 and I2C1 share the same pin
#define TMP1_PIN 23 // TMP1 and I2C1 share the same pin
#define I2C1_SDA_PIN 22 // I2C1 and TMP0 share the same pin
#define I2C1_SCL_PIN 23 // I2C1 and TMP1 share the same pin
#define I2C1_SDA_PIN 22 // I2C1 and TMP0 share the same pin
#define I2C1_SCL_PIN 23 // I2C1 and TMP1 share the same pin
#define PWM0_A_PIN 0 // PWM0_A and SPI0_MISO share the same pin
#define PWM0_B_PIN 1 // PWM0_B and SPI0_CSN share the same pin
#define PWM1_A_PIN 2 // PWM1_A and SPI0_CLK share the same pin
#define PWM1_B_PIN 3 // PWM1_B and SPI0_MOSI share the same pin
#define PWM2_A_PIN 4 // PWM2_A and I2C0_SDA share the same pin
#define PWM2_B_PIN 5 // PWM2_B and I2C0_SCL share the same pin
#define PWM3_A_PIN 22 // PWM3_A and TMP0 share the same pin
#define PWM3_B_PIN 23 // PWM3_B and TMP1 share the same pin
#define PWM4_A_PIN 24 // PWM4_A and USR_BTN share the same pin
#define PWM4_B_PIN 25 // PWM4_B and USR_LED share the same pin
#define PWM5_A_PIN 26 // PWM5_A and ADC0 share the same pin
#define PWM5_B_PIN 27 // PWM5_B and ADC1 share the same pin
#define PWM6_A_PIN 28 // PWM6_A and ADC2 share the same pin
#define PWM6_B_PIN 29 // PWM6_B and ADC3 share the same pin
#define PWM0_A_PIN 0 // PWM0_A and SPI0_MISO share the same pin
#define PWM0_B_PIN 1 // PWM0_B and SPI0_CSN share the same pin
#define PWM1_A_PIN 2 // PWM1_A and SPI0_CLK share the same pin
#define PWM1_B_PIN 3 // PWM1_B and SPI0_MOSI share the same pin
#define PWM2_A_PIN 4 // PWM2_A and I2C0_SDA share the same pin
#define PWM2_B_PIN 5 // PWM2_B and I2C0_SCL share the same pin
#define PWM3_A_PIN 22 // PWM3_A and TMP0 share the same pin
#define PWM3_B_PIN 23 // PWM3_B and TMP1 share the same pin
#define PWM4_A_PIN 24 // PWM4_A and USR_BTN share the same pin
#define PWM4_B_PIN 25 // PWM4_B and USR_LED share the same pin
#define PWM5_A_PIN 26 // PWM5_A and ADC0 share the same pin
#define PWM5_B_PIN 27 // PWM5_B and ADC1 share the same pin
#define PWM6_A_PIN 28 // PWM6_A and ADC2 share the same pin
#define PWM6_B_PIN 29 // PWM6_B and ADC3 share the same pin
#define CLK_GPIN1_PIN 22 // CLK_GPIN1 and TMP0 share the same pin
#define CLK_GPOUT1_PIN 23 // CLK_GPOUT1 and TMP1 share the same pin
#define CLK_GPIN1_PIN 22 // CLK_GPIN1 and TMP0 share the same pin
#define CLK_GPOUT1_PIN 23 // CLK_GPOUT1 and TMP1 share the same pin
/// @brief Mask of pins that are used by the shield and not used by the board, eq. 0x3fc0033f
#define SHIELD_MASK 1 << SPI0_MISO_PIN | 1 << SPI0_CSN_PIN | 1 << SPI0_CLK_PIN | 1 << SPI0_MOSI_PIN | \
1 << I2C0_SDA_PIN | 1 << I2C0_SCL_PIN | \
1 << UART1_TX_PIN | 1 << UART1_RX_PIN | \
1 << ADC0_PIN | 1 << ADC1_PIN | 1 << ADC2_PIN | 1 << ADC3_PIN | \
1 << TMP0_PIN | 1 << TMP1_PIN
#define SHIELD_MASK 1 << SPI0_MISO_PIN | 1 << SPI0_CSN_PIN | 1 << SPI0_CLK_PIN | 1 << SPI0_MOSI_PIN | \
1 << I2C0_SDA_PIN | 1 << I2C0_SCL_PIN | \
1 << UART1_TX_PIN | 1 << UART1_RX_PIN | \
1 << ADC0_PIN | 1 << ADC1_PIN | 1 << ADC2_PIN | 1 << ADC3_PIN | \
1 << TMP0_PIN | 1 << TMP1_PIN
// For board detection
#define XERXES_RP2040
@ -142,7 +140,6 @@
#define PICO_FLASH_SPI_CLKDIV __CLKDIV
#endif // !PICO_FLASH_SPI_CLKDIV
#ifndef PICO_XOSC_STARTUP_DELAY_MULTIPLIER
#define PICO_XOSC_STARTUP_DELAY_MULTIPLIER 16
#endif // !PICO_XOSC_STARTUP_DELAY_MULTIPLIER
@ -159,12 +156,7 @@
// All boards have B1 RP2040
#ifndef PICO_RP2040_B0_SUPPORTED
#define PICO_RP2040_B0_SUPPORTED 0
#define PICO_RP2040_B0_SUPPORTED 0
#endif // !PICO_RP2040_B0_SUPPORTED
#ifdef __cplusplus
}
#endif // __cplusplus
#endif // _BOARDS_METROTECH_XERXES_RP2040_H