|
自动生成的代码默认没有加三色灯的逻辑,需要在 user_main.c 中添加逻辑:
/**
* Key2 key to short press processing
* @param none
* @return none
*/
LOCAL void ICACHE_FLASH_ATTR key2ShortPress(void)
{
GIZWITS_LOG("#### key2 short press, soft ap mode \n");
rgbControl(250, 0, 0); ///< 新添加代码: Soft AP mode, RGB red
gizwitsSetMode(WIFI_SOFTAP_MODE);
}
/**
* Key2 button long press
* @param none
* @return none
*/
LOCAL void ICACHE_FLASH_ATTR key2LongPress(void)
{
GIZWITS_LOG("#### key2 long press, airlink mode\n");
rgbControl(0, 250, 0); ///< 新添加代码: AirLink mode, RGB Green
gizwitsSetMode(WIFI_AIRLINK_MODE);
}
|
|