bsp_uart.h 647 B

1234567891011121314151617181920
  1. #ifndef __bsp_uart_h__
  2. #define __bsp_uart_h__
  3. #include <stdbool.h>
  4. #include <stdint.h>
  5. #include <string.h>
  6. #include "sdk_common.h"
  7. #include "SEGGER_RTT.h"
  8. #include "usr_config.h"
  9. void UART0_Init(uint32_t baud);
  10. void UART0_SendStr(char *p);//发送字符串
  11. void UART0_SendBuff(unsigned char *p,int L);//发送缓存
  12. void UART0_SendChar(unsigned char ch);//发送一位数锯
  13. void UART0_Discard(unsigned short n); //丢弃RX数据几位
  14. unsigned char UART0_CheckByte(unsigned short n); //看RX中数锯,地指不变,
  15. unsigned char UART0_ReadByte(void); //读RX中数锯,地指加一,和丢弃
  16. unsigned int UART0_CheckLen(void); //检查RX接收了多少数据
  17. void UART0_Test(void);
  18. #endif