K1Guitar/project/inc/usart.h

21 lines
534 B
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef __USART_H__
#define __USART_H__
#include "at32f403a_407.h"
/* USART2 / UART4 环形队列接口 */
/* 发送数据 */
void USART2_SendData(uint8_t *data, uint16_t len);
void USART4_SendData(uint8_t *data, uint16_t len);
/* 接收出队:返回 1=取到数据0=队列空 */
uint8_t USART2_RxPop(uint8_t *c);
uint8_t UART4_RxPop(uint8_t *c);
/* 初始化(关联串口外设,由 wk_usart2_init / wk_uart4_init 调用) */
void uart_ring_usart2_init(void);
void uart_ring_uart4_init(void);
#endif /* __USART_H__ */