add:增加user_config版本,不同时初始化user_config

add:定时开关功能(未测试)
This commit is contained in:
Zip
2019-01-29 17:08:20 +08:00
parent 882b4bb0a8
commit 1608a20279
5 changed files with 65 additions and 8 deletions

View File

@@ -28,15 +28,17 @@ void user_relay_set( char x, char y )
else
Gpiosetfunction = MicoGpioOutputLow;
if ( x >= 0 && x < Relay_NUM )
{
(*Gpiosetfunction)( relay[x] );
os_log("set relay %d:%d",x,y);
} else if ( x == Relay_NUM )
{
OSStatus *setgpiofunction = MicoGpioOutputTrigger;
for ( int i = 0; i < Relay_NUM; i++ )
{
(*Gpiosetfunction)( relay[i] );
os_log("set relay %d:%d",i,y);
}
}
}