mirror of
https://github.com/oopuuu/zTC1.git
synced 2025-12-12 13:08:13 +08:00
add:增加user_config版本,不同时初始化user_config
add:定时开关功能(未测试)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user