修复不带记忆的bug
This commit is contained in:
@@ -55,10 +55,9 @@ void read_user_data(void)
|
||||
adress_ch1_index = r_data[22];
|
||||
adress_ch2_index = r_data[23];
|
||||
|
||||
flash_ch1_state=0;
|
||||
flash_ch1_state=r_data[24];
|
||||
flash_ch2_state=r_data[25];
|
||||
memset(adress_H_ch1, 0, sizeof(adress_H_ch1));
|
||||
memset(adress_L_ch1, 0, sizeof(adress_L_ch1));
|
||||
|
||||
adress_ch1_index = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -129,14 +129,14 @@ static void switch_s1_clear_action_state(void)
|
||||
static void switch_s1_output_on(void)
|
||||
{
|
||||
xc_gpio_write_pin(GPIO_5, GPIO_PIN_SET);
|
||||
flash_ch1_state = xc_gpio_read_pin(GPIO_5);
|
||||
flash_ch2_state = xc_gpio_read_pin(GPIO_5);
|
||||
flash_run();
|
||||
}
|
||||
|
||||
static void switch_s1_output_off(void)
|
||||
{
|
||||
xc_gpio_write_pin(GPIO_5, GPIO_PIN_RESET);
|
||||
flash_ch1_state = xc_gpio_read_pin(GPIO_5);
|
||||
flash_ch2_state = xc_gpio_read_pin(GPIO_5);
|
||||
flash_run();
|
||||
}
|
||||
|
||||
@@ -151,7 +151,7 @@ static void switch_s1_output_toggle(void)
|
||||
xc_gpio_write_pin(GPIO_5, GPIO_PIN_SET);
|
||||
}
|
||||
|
||||
flash_ch1_state = xc_gpio_read_pin(GPIO_5);
|
||||
flash_ch2_state = xc_gpio_read_pin(GPIO_5);
|
||||
flash_run();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user