打開 atcmd.h 文件,該文件提供與外部串口模塊(wifi模塊,4G模塊,NBIoT模塊等等)進行互操作的功能,接口支持異步和同步兩種工作模式,建議在實際應用中采用異步的訪問方式,接口列表如下:
* 初始化 ATCMD:
```
void atcmd_init(void);
```
* 反初始化 ATCMD:
```
void atcmd_deinit(void);
```
* ATCMD 需要上層應用在空閑時頻繁調用輪詢函數:
```
void atcmd_poll(uint16_t ms);
```
* 設置發送器:
```
void atcmd_set_sender(int (*sender)(const uint8_t *, uint16_t));
```
* 設置接收器:
```
void atcmd_set_receiver(uint16_t (*receiver)(uint8_t *pbuf, uint16_t n));
```
* 設置毫米延時器:
```
void atcmd_set_delayer(void (*delayer)(uint8_t ms));
```
* 設置看門狗喂狗函數:
```
void atcmd_set_watchdog_feeder(void (*feeder)(void));
```
* 設置空閑狀態下接收到數據的回調函數:
```
void atcmd_set_message_handler(void (*handler)(const uint8_t *msg, uint16_t len));
```
* 向外部串口模塊發送消息:
```
int atcmd_send(const atcmd_t *params, uint16_t polling_time, uint16_t timeout, uint8_t block);
```
<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