usart.h 420 B

12345678910111213141516171819
  1. #ifndef __USART_H
  2. #define __USART_H
  3. #include "stdio.h"
  4. #include "sys.h"
  5. #include "hal_led.h"
  6. typedef void (*uart_inter_callback_fp) (uint8_t* data, uint8_t len);
  7. #define USART_REC_LEN 200
  8. #define EN_USART1_RX 1
  9. #define RXBUFFERSIZE 1
  10. void uart_init(u32 bound);
  11. void HAL_UartIsrCallbackRegister(uart_inter_callback_fp fp);
  12. void HAL_Usart1SendData(uint8_t* data, uint8_t len);
  13. #endif