# led_flash_driver **Repository Path**: nwwhhh/led_flash_driver ## Basic Information - **Project Name**: led_flash_driver - **Description**: LED闪烁通用驱动框架 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 5 - **Forks**: 3 - **Created**: 2023-07-27 - **Last Updated**: 2025-06-22 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # led_flash_driver #### 介绍 LED闪烁通用驱动框架 #### 博客链接 [单片机中的通用LED驱动_菠萝地亚狂想曲的博客-CSDN博客](https://blog.csdn.net/qq_42039294/article/details/131952125) #### 部分API ```c #define INIT_LED_MODE_COUNT(__led, __mode_count) ``` - __led:第n颗LED - __mode_count:第n颗LED具有几种闪烁模式 ```c #define INIT_LED_MODE_TIME(__led, __mode, __ontime, __cycle, __sync) ``` - __led:第n颗LED - __mode:配置第几种闪烁模式 - __ontime:亮起时间 - __cycle:闪烁周期 - __sync:是否同步 #### 如何增加LED 遵循程序中的提示 ```c /****STEP1:初始化硬件引脚****/ /*****STEP2:初始化id, 模式个数*****/ /*****STEP3:初始化各个模式的时间参数*****/ /*****STEP4:对接如下on, off,cyclefun 函数 *****/ ```