bsp_huart.h 667 B

123456789101112131415161718192021222324252627
  1. #ifndef _BSP_HUART_H
  2. #define _BSP_HUART_H
  3. #include "driver_gpio.h"
  4. #define HSUART_BQB_BAUD 9600
  5. #define HSUART_BQB_RX_PORT_SEL GPIOA_REG
  6. #define HSUART_BQB_RX_PIN_SEL GPIO_PIN_0
  7. #define HSUART_BQB_TX_PORT_SEL GPIOA_REG
  8. #define HSUART_BQB_TX_PIN_SEL GPIO_PIN_1
  9. #define HSUART_FCC_BAUD 1500000
  10. #define HSUART_FCC_PORT_SEL GPIOB_REG
  11. #define HSUART_FCC_PIN_SEL GPIO_PIN_3
  12. void bsp_huart_init(void);
  13. void huart_exit(void);
  14. void huart_set_baudrate(uint baudrate);
  15. void huart_putchar(const char ch);
  16. void huart_tx(const void *buf, uint len);
  17. uint huart_get_rxcnt(void);
  18. char huart_getchar(void);
  19. #endif