diff --git a/TC1/main.c b/TC1/main.c index c1f0e8a..666c330 100644 --- a/TC1/main.c +++ b/TC1/main.c @@ -82,13 +82,13 @@ int application_start( void ) OSStatus err = kNoErr; - for ( i = 0; i < Relay_NUM; i++ ) - { - MicoGpioOutputLow( Relay[(i)] ); - MicoGpioInitialize( Relay[i], OUTPUT_PUSH_PULL ); - MicoGpioOutputLow( Relay[(i)] ); - //MicoGpioOutputHigh(Relay[i]); - } +// for ( i = 0; i < Relay_NUM; i++ ) +// { +// MicoGpioOutputLow( Relay[(i)] ); +// MicoGpioInitialize( Relay[i], OUTPUT_PUSH_PULL ); +// MicoGpioOutputLow( Relay[(i)] ); +// //MicoGpioOutputHigh(Relay[i]); +// } /* Create mico system context and read application's config data from flash */ sys_config = mico_system_context_init( sizeof(user_config_t) ); 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 ); for ( i = 0; i < Relay_NUM; i++ ) { - //todo ɾ³ý²âÊÔ´úÂë ¹Ø±ÕϵͳledµÆ - user_config->plug[i].on = 0; + MicoGpioInitialize( Relay[i], OUTPUT_PUSH_PULL ); user_relay_set( i, user_config->plug[i].on ); } MicoSysLed(0); diff --git a/build/TC1@MK3031@moc/binary/TC1@MK3031@moc.all.bin b/build/TC1@MK3031@moc/binary/TC1@MK3031@moc.all.bin index 0d06159..5492221 100644 Binary files a/build/TC1@MK3031@moc/binary/TC1@MK3031@moc.all.bin and b/build/TC1@MK3031@moc/binary/TC1@MK3031@moc.all.bin differ diff --git a/build/TC1@MK3031@moc/binary/TC1@MK3031@moc.ota.bin b/build/TC1@MK3031@moc/binary/TC1@MK3031@moc.ota.bin index 5859b72..f7db8c5 100644 Binary files a/build/TC1@MK3031@moc/binary/TC1@MK3031@moc.ota.bin and b/build/TC1@MK3031@moc/binary/TC1@MK3031@moc.ota.bin differ