1234567891011121314151617181920 |
- #ifndef __bsp_uart_h__
- #define __bsp_uart_h__
- #include <stdbool.h>
- #include <stdint.h>
- #include <string.h>
- #include "sdk_common.h"
- #include "SEGGER_RTT.h"
- #include "usr_config.h"
- void UART0_Init(uint32_t baud);
- void UART0_SendStr(char *p);//发送字符串
- void UART0_SendBuff(unsigned char *p,int L);//发送缓存
- void UART0_SendChar(unsigned char ch);//发送一位数锯
- void UART0_Discard(unsigned short n); //丢弃RX数据几位
- unsigned char UART0_CheckByte(unsigned short n); //看RX中数锯,地指不变,
- unsigned char UART0_ReadByte(void); //读RX中数锯,地指加一,和丢弃
- unsigned int UART0_CheckLen(void); //检查RX接收了多少数据
- void UART0_Test(void);
- #endif
|