打開svc\_system.h文件,接口列表如下:
* 服務程序初始化:
```
void svc_system_init(uint16_t watchdog_timeout);
```
* 系統運行,while(1) 所在函數:
```
void svc_system_run(void);
```
* 獲取系統時鐘:
```
uint32_t svc_system_get_clock(void);
```
* 啟動一個定時器:
```
int svc_system_start_timer(void (*on_timer)(void), uint32_t ms, uint8_t repeat);
```
* 停止一個定時器:
```
void svc_system_stop_timer(int tid);
```
* 啟動一個定時器:
```
int svc_system_start_timer(void (*on_timer)(void), uint32_t ms, uint8_t repeat);
```
* 毫秒級阻塞延時:
```
void svc_system_delay(uint8_t time);
```
* 注冊一個快速輪詢的函數:
```
int svc_system_register_fast_polling(void (*on_polling)(void));
```
* 注冊一個系統狀態回饋的函數,應用任務通過該回饋函數告知系統狀態:
```
int svc_system_register_status_feedback(svc_system_status_descripter_t (*feedback)(void));
```
* 注冊一個事件監聽函數:
```
int svc_system_register_event_monitor(void (*monitor)(uint8_t event, void *args));
```
* 注銷指定快速輪詢函數:
```
void svc_system_unregister_fast_polling(int id);
```
* 注銷指定狀態回饋函數:
```
void svc_system_unregister_status_feedback(int id);
```
* 注銷事件監聽函數:
```
void svc_system_unregister_event_monitor(int id);
```
* 拋出事件:
```
void svc_system_throw_event(uint8_t event, void *args);
```
<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