forked from xuos/xiuos
support hc32 irq and spi and spi flash
This commit is contained in:
@@ -57,38 +57,42 @@
|
||||
/* for lowputc device output */
|
||||
|
||||
/* UART RX/TX Port/Pin definition */
|
||||
#define LP_RX_PORT (GPIO_PORT_H) /* PH6: USART6_RX */
|
||||
#define LP_RX_PIN (GPIO_PIN_06)
|
||||
#define LP_RX_GPIO_FUNC (GPIO_FUNC_37_USART6_RX)
|
||||
#define DBG_RX_PORT (GPIO_PORT_H) /* PH6: USART6_RX */
|
||||
#define DBG_RX_PIN (GPIO_PIN_06)
|
||||
#define DBG_RX_GPIO_FUNC (GPIO_FUNC_37_USART6_RX)
|
||||
|
||||
#define LP_TX_PORT (GPIO_PORT_E) /* PE6: USART6_TX */
|
||||
#define LP_TX_PIN (GPIO_PIN_06)
|
||||
#define LP_TX_GPIO_FUNC (GPIO_FUNC_36_USART6_TX)
|
||||
#define DBG_TX_PORT (GPIO_PORT_E) /* PE6: USART6_TX */
|
||||
#define DBG_TX_PIN (GPIO_PIN_06)
|
||||
#define DBG_TX_GPIO_FUNC (GPIO_FUNC_36_USART6_TX)
|
||||
|
||||
/* UART unit definition */
|
||||
#define LP_UNIT (M4_USART6)
|
||||
#define LP_FUNCTION_CLK_GATE (PWC_FCG3_USART6)
|
||||
#define DBG_UNIT (M4_USART6)
|
||||
#define DBG_BAUDRATE (115200UL)
|
||||
#define DBG_FUNCTION_CLK_GATE (PWC_FCG3_USART6)
|
||||
|
||||
/* UART unit interrupt definition */
|
||||
#define LP_UNIT_ERR_INT_SRC (INT_USART6_EI)
|
||||
#define LP_UNIT_ERR_INT_IRQn (Int015_IRQn + HC32_IRQ_FIRST)
|
||||
#define DBG_UNIT_ERR_INT_SRC (INT_USART6_EI)
|
||||
#define DBG_UNIT_ERR_INT_IRQn (Int010_IRQn)
|
||||
|
||||
#define LP_UNIT_RX_INT_SRC (INT_USART6_RI)
|
||||
#define LP_UNIT_RX_INT_IRQn (Int103_IRQn + HC32_IRQ_FIRST)
|
||||
#define DBG_UNIT_RX_INT_SRC (INT_USART6_RI)
|
||||
#define DBG_UNIT_RX_INT_IRQn (Int011_IRQn)
|
||||
|
||||
#define LP_UNIT_TX_INT_SRC (INT_USART6_TI)
|
||||
#define LP_UNIT_TX_INT_IRQn (Int102_IRQn + HC32_IRQ_FIRST)
|
||||
#define DBG_RXTO_INT_SRC (INT_USART6_RTO)
|
||||
#define DBG_RXTO_INT_IRQn (Int012_IRQn)
|
||||
|
||||
#define LP_UNIT_TCI_INT_SRC (INT_USART6_TCI)
|
||||
#define LP_UNIT_TCI_INT_IRQn (Int099_IRQn + HC32_IRQ_FIRST)
|
||||
#define DBG_UNIT_TX_INT_SRC (INT_USART6_TI)
|
||||
#define DBG_UNIT_TX_INT_IRQn (Int013_IRQn)
|
||||
|
||||
#define DBG_UNIT_TCI_INT_SRC (INT_USART6_TCI)
|
||||
#define DBG_UNIT_TCI_INT_IRQn (Int014_IRQn)
|
||||
|
||||
/* printf device s*/
|
||||
#define BSP_PRINTF_DEVICE LP_UNIT
|
||||
#define BSP_PRINTF_BAUDRATE (115200)
|
||||
#define BSP_PRINTF_DEVICE DBG_UNIT
|
||||
#define BSP_PRINTF_BAUDRATE DBG_BAUDRATE
|
||||
|
||||
#define BSP_PRINTF_PORT LP_TX_PORT
|
||||
#define BSP_PRINTF_PORT DBG_TX_PORT
|
||||
|
||||
#define BSP_PRINTF_PIN LP_TX_PIN
|
||||
#define BSP_PRINTF_PORT_FUNC LP_TX_GPIO_FUNC
|
||||
#define BSP_PRINTF_PIN DBG_TX_PIN
|
||||
#define BSP_PRINTF_PORT_FUNC DBG_TX_GPIO_FUNC
|
||||
|
||||
#endif /* __BOARDS_ARM_HC32_HC32F4A0_INCLUDE_BOARD_H */
|
||||
|
||||
Reference in New Issue
Block a user