generated from hulk/gd32f4xx_template_cmake_vscode
39 lines
722 B
C
39 lines
722 B
C
#ifndef UART_H
|
|
#define UART_H
|
|
|
|
#include "gd32f4xx.h"
|
|
#include "board_config.h"
|
|
|
|
/*!
|
|
\brief initialize UART interface
|
|
\param[in] none
|
|
\param[out] none
|
|
\retval none
|
|
*/
|
|
void uart_init(void);
|
|
void debug_usart_init(void);
|
|
|
|
/*!
|
|
\brief pause UART RX interrupt (RBNE)
|
|
\param[in] none
|
|
\param[out] none
|
|
\retval none
|
|
*/
|
|
void uart_rx_irq_pause(void);
|
|
|
|
/*!
|
|
\brief resume UART RX interrupt (RBNE)
|
|
\param[in] none
|
|
\param[out] none
|
|
\retval none
|
|
*/
|
|
void uart_rx_irq_resume(void);
|
|
|
|
#if RS485_MODE == CFG_ENABLE
|
|
/* RS485 DE 引脚手动控制(GD32F4xx USART 无硬件 DE 驱动) */
|
|
void rs485_de_set(void);
|
|
void rs485_de_clear(void);
|
|
#endif
|
|
|
|
#endif // UART_H
|