Skip to content

Commit

Permalink
fix:保存关闭前插口状态
Browse files Browse the repository at this point in the history
  • Loading branch information
a2633063 committed Mar 26, 2019
1 parent 2867722 commit f9ce1c7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions TC1/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down
Binary file modified build/TC1@MK3031@moc/binary/TC1@[email protected]
Binary file not shown.
Binary file modified build/TC1@MK3031@moc/binary/TC1@[email protected]
Binary file not shown.

0 comments on commit f9ce1c7

Please sign in to comment.