mirror of
https://github.com/oopuuu/zTC1.git
synced 2025-12-12 21:18:13 +08:00
fix:保存关闭前插口状态
This commit is contained in:
17
TC1/main.c
17
TC1/main.c
@@ -82,13 +82,13 @@ int application_start( void )
|
|||||||
|
|
||||||
OSStatus err = kNoErr;
|
OSStatus err = kNoErr;
|
||||||
|
|
||||||
for ( i = 0; i < Relay_NUM; i++ )
|
// for ( i = 0; i < Relay_NUM; i++ )
|
||||||
{
|
// {
|
||||||
MicoGpioOutputLow( Relay[(i)] );
|
// MicoGpioOutputLow( Relay[(i)] );
|
||||||
MicoGpioInitialize( Relay[i], OUTPUT_PUSH_PULL );
|
// MicoGpioInitialize( Relay[i], OUTPUT_PUSH_PULL );
|
||||||
MicoGpioOutputLow( Relay[(i)] );
|
// MicoGpioOutputLow( Relay[(i)] );
|
||||||
//MicoGpioOutputHigh(Relay[i]);
|
// //MicoGpioOutputHigh(Relay[i]);
|
||||||
}
|
// }
|
||||||
/* Create mico system context and read application's config data from flash */
|
/* Create mico system context and read application's config data from flash */
|
||||||
sys_config = mico_system_context_init( sizeof(user_config_t) );
|
sys_config = mico_system_context_init( sizeof(user_config_t) );
|
||||||
user_config = ((system_context_t *) sys_config)->user_config_data;
|
user_config = ((system_context_t *) sys_config)->user_config_data;
|
||||||
@@ -107,8 +107,7 @@ int application_start( void )
|
|||||||
MicoGpioInitialize( (mico_gpio_t) MICO_GPIO_5, OUTPUT_PUSH_PULL );
|
MicoGpioInitialize( (mico_gpio_t) MICO_GPIO_5, OUTPUT_PUSH_PULL );
|
||||||
for ( i = 0; i < Relay_NUM; i++ )
|
for ( i = 0; i < Relay_NUM; i++ )
|
||||||
{
|
{
|
||||||
//todo ɾ<><C9BE><EFBFBD><EFBFBD><EFBFBD>Դ<EFBFBD><D4B4><EFBFBD> <20>ر<EFBFBD>ϵͳled<65><64>
|
MicoGpioInitialize( Relay[i], OUTPUT_PUSH_PULL );
|
||||||
user_config->plug[i].on = 0;
|
|
||||||
user_relay_set( i, user_config->plug[i].on );
|
user_relay_set( i, user_config->plug[i].on );
|
||||||
}
|
}
|
||||||
MicoSysLed(0);
|
MicoSysLed(0);
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user