generated from hulk/gd32e23x_template
for debug
This commit is contained in:
@@ -12,6 +12,21 @@
|
||||
// #define POWER_SUPPLY_12V
|
||||
#define POWER_SUPPLY_24V
|
||||
|
||||
// #define GD32E230F4
|
||||
// #define GD32E230F8
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
#ifdef GD32E230F8
|
||||
#define USART_RCU RCU_USART1
|
||||
#define USART_PHY USART1
|
||||
#define USART_PHY_IRQ USART1_IRQn
|
||||
#else
|
||||
#define USART_RCU RCU_USART0
|
||||
#define USART_PHY USART0
|
||||
#define USART_PHY_IRQ USART0_IRQn
|
||||
#endif
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
#ifdef POWER_SUPPLY_12V
|
||||
@@ -26,7 +41,6 @@
|
||||
#error "Please define either POWER_SUPPLY_12V or POWER_SUPPLY_24V"
|
||||
#endif
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
#define I2C_GPIO_RCU RCU_GPIOF
|
||||
@@ -41,13 +55,14 @@
|
||||
/******************************************************************************/
|
||||
|
||||
#define USART_GPIO_RCU RCU_GPIOA
|
||||
#define USART_RCU RCU_USART0
|
||||
// #define USART_RCU RCU_USART0
|
||||
#define USART_GPIO_PORT GPIOA
|
||||
#define USART_GPIO_AF GPIO_AF_1
|
||||
#define USART_TX_PIN GPIO_PIN_2
|
||||
#define USART_RX_PIN GPIO_PIN_3
|
||||
#define USART_PHY USART0
|
||||
// #define USART_PHY USART0
|
||||
#define USART_PHY_BAUDRATE 115200U
|
||||
// #define USART_PHY_IRQ USART0_IRQn
|
||||
#define RS485_EN_PORT GPIOA
|
||||
#define RS485_EN_PIN GPIO_PIN_4
|
||||
|
||||
|
Reference in New Issue
Block a user