打開hal\_uart.h文件,接口列表如下:
* 驅動程序初始化:
```
void hal_uart_init(void);
```
* 驅動程序反初始化:
```
void hal_uart_deinit(void);
```
* 打開指定串口:
```
void hal_uart_open(uint8_t uart, uint32_t baudrate);
```
* 關閉指定串口:
```
void hal_uart_close(uint8_t uart);
```
* 串口發送輪詢(該函數需要在上層系統空閑時頻繁調用):
```
void hal_uart_tx_poll(uint8_t uart);
```
* 判斷當前串口發送是否忙碌:
```
uint8_t hal_uart_tx_is_busy(uint8_t uart);
```
* 嘗試從串口中讀取數據:
```
uint16_t hal_uart_read(uint8_t uart, uint8_t *buf, uint16_t len);
```
* 嘗試向串口中寫入數據:
```
void hal_uart_write(uint8_t uart, const uint8_t *data, uint16_t len);
```
* 強制向串口中寫入數據:
```
void hal_uart_force_write(uint8_t uart, const uint8_t *data, uint16_t len);
```
<br/>
- 框架介紹
- Main 函數
- HAL 函數接口說明
- hal_system.h
- hal_systick.h
- hal_idt.h
- hal_ioctl.h
- hal_flash.h
- hal_lpm.h
- hal_rtc.h
- hal_iwdg.h
- hal_uart.h
- hal_i2c.h
- hal_led.h
- hal_button.h
- hal_vht2x.h
- hal_lcd.h
- Services 函數接口說明
- svc_system.h
- svc_database.h
- svc_hid.h
- svc_msg.h
- svc_humiture.h
- svc_log.h
- Tasks 說明
- task_system.c
- task_example.c
- Libs 函數接口說明
- mathlib.h
- json.h
- atcmd.h
- atcmd_proxy.h
- libwifi.h
- libs1.h