Com_pc_usart.h 589 B

12345678910111213141516171819
  1. #ifndef __COM_PC_USART_H
  2. #define __COM_PC_USART_H
  3. #include <stdint.h>
  4. #include "usart.h"
  5. /* 本模块专用 USART1: PA9=TX, PA10=RX, 波特率 115200 (PC 上位机) */
  6. #define COM_PC_USART_STREAM_SIZE 4096
  7. void Com_pc_usart_init(void);
  8. uint32_t Com_pc_usart_send(const uint8_t *data, uint32_t len);
  9. uint16_t Com_pc_usart_available(void);
  10. uint32_t Com_pc_usart_read(uint8_t *buf, uint32_t len);
  11. /* 供共享 HAL_UART_RxCpltCallback (Com_cpld_usart.c 内定义) 分发的 RX 完成处理 */
  12. void Com_pc_usart_rxcplt(UART_HandleTypeDef *huart);
  13. #endif /* __COM_PC_USART_H */