金牌会员
 
- 积分
- 2075
- 金钱
- 2075
- 注册时间
- 2016-8-15
- 在线时间
- 413 小时
|

楼主 |
发表于 2019-6-13 16:58:57
|
显示全部楼层
重构后的LED配置函数
/*****************************************************************************
Function name : APP_LED_LightDarkConfig
Description: APP LED模块配置函数,通过调用该函数来操作LED实现各种功能
Input:
LedId->LED编号
OpMode->操作模式APP_LED_OFF/APP_LED_ON;
ulTimeOut->当OpMode选择APP_LED_ON时,亮灯的时间,~0表示一直亮灯;
Return: NONE
Notes:
******************************************************************************/
#define APP_LED_LightDarkConfig(LedId, OpMode, ulTimeOut) APP_LED_Config(LedId, OpMode, ulTimeOut, 0, 0)
/*****************************************************************************
Function name : APP_LED_FlickerConfig
Description: APP LED模块配置函数,通过调用该函数来操作LED实现各种功能
Input:
LedId->LED编号
usPeriod->当OpMode选择APP_LED_FLASH时,闪烁的周期;
ucTime->当OpModeÑ选择APP_LED_FLASH时,闪烁的次数,ucTime为U8类型,取值255表示一直闪烁;
Return: NONE
Notes:
******************************************************************************/
#define APP_LED_FlickerConfig(LedId, usPeriod, ucTime) APP_LED_Config(LedId, APP_LED_FLASH, 0, usPeriod, ucTime) |
|