打開hal\_led.h文件,接口列表如下:
* 驅動程序初始化:
```
void hal_led_init(void);
```
* 驅動程序反初始化:
```
void hal_led_deinit(void);
```
* LED 驅動程序所需要的定時輪詢(該函數需要上層進行周期性調用):
```
void hal_led_on_timer(uint16_t ms);
```
* 打開一路 LED,成功返回文件描述符:
```
int hal_led_open(GPIO_TypeDef *gpio, uint16_t pin, uint8_t on_level);
```
* 關閉指定 LED:
```
void hal_led_close(int fd);
```
* 設置 LED開:
```
void hal_led_set_on(int fd);
```
* 設置 LED關:
```
void hal_led_set_off(int fd);
```
* 翻轉 LED:
```
void hal_led_toggle(int fd);
```
* LED 慢閃:
```
void hal_led_slow_blink(int fd, uint32_t expire, uint8_t on_at_the_end);
```
* LED 快閃:
```
void hal_led_fast_blink(int fd, uint32_t expire, uint8_t on_at_the_end);
```
* 停止 LED 閃爍:
```
void hal_led_stop_blink(int fd);
```
<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