From 7738fb55c27d49c1c1e8b317699209a9478e38ac Mon Sep 17 00:00:00 2001 From: zwsd Date: Mon, 26 Sep 2022 16:09:55 +0800 Subject: [PATCH] update --- main/app_main.cpp | 4 ++-- main/light.c | 22 +++++++++++----------- main/light.h | 8 ++++---- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/main/app_main.cpp b/main/app_main.cpp index 9654d4e..4d7ba21 100644 --- a/main/app_main.cpp +++ b/main/app_main.cpp @@ -15,7 +15,7 @@ power_state_light_structer_t power_state_light_structer = { .state = ShutDown, .change_flag = false, }; -heating_state_light_structer_t heating_state_light_structer = { +heating_plate_state_light_structer_t heating_plate_state_light_structer = { .state = NoHeat, .change_flag = false, }; @@ -39,7 +39,7 @@ T_key_structer_t T_key_structer = { static void T_all_light_init(void) { T_power_light_init(&power_state_light_structer); - T_heating_state_light_init(&heating_state_light_structer); + T_heating_plate_state_light_init(&heating_plate_state_light_structer); T_reaction_state_light_init(&reaction_state_light_structer); T_wifi_state_light_init(&wifi_state_light_structer); } diff --git a/main/light.c b/main/light.c index e98c0ef..7fc54c8 100644 --- a/main/light.c +++ b/main/light.c @@ -6,12 +6,12 @@ #define GPIO_DEBUG_LIGHT 12 #define GPIO_POWER_LIGHT 12 -#define GPIO_HEATING_STATE_LIGHT 12 +#define GPIO_HEATING_PLATE_STATE_LIGHT 12 #define GPIO_REACTION_STATE_LIGHT 12 #define GPIO_WIFI_STATE_LIGHT 12 static power_state_light_structer_t *power_state_light_structer_s; -static heating_state_light_structer_t *heating_state_light_structer_s; +static heating_plate_state_light_structer_t *heating_plate_state_light_structer_s; static reaction_state_light_structer_t *reaction_state_light_structer_s; static wifi_state_light_structer_t *wifi_state_light_structer_s; @@ -50,18 +50,18 @@ void T_power_light_init(power_state_light_structer_t *power_state_light_structer } // Heating state light -void T_heating_state_light_init(heating_state_light_structer_t *heating_state_light_structer) +void T_heating_plate_state_light_init(heating_plate_state_light_structer_t *heating_plate_state_light_structer) { - heating_state_light_structer_s = heating_state_light_structer; - gpio_config_t gpio_heating_state_light_init_structer; + heating_plate_state_light_structer_s = heating_plate_state_light_structer; + gpio_config_t gpio_heating_plate_state_light_init_structer; - gpio_heating_state_light_init_structer.intr_type = GPIO_INTR_DISABLE; - gpio_heating_state_light_init_structer.mode = GPIO_MODE_INPUT_OUTPUT; - gpio_heating_state_light_init_structer.pin_bit_mask = (1ULL << GPIO_HEATING_STATE_LIGHT); - gpio_heating_state_light_init_structer.pull_down_en = 0; - gpio_heating_state_light_init_structer.pull_up_en = 0; + gpio_heating_plate_state_light_init_structer.intr_type = GPIO_INTR_DISABLE; + gpio_heating_plate_state_light_init_structer.mode = GPIO_MODE_INPUT_OUTPUT; + gpio_heating_plate_state_light_init_structer.pin_bit_mask = (1ULL << GPIO_HEATING_PLATE_STATE_LIGHT); + gpio_heating_plate_state_light_init_structer.pull_down_en = 0; + gpio_heating_plate_state_light_init_structer.pull_up_en = 0; - gpio_config(&gpio_heating_state_light_init_structer); + gpio_config(&gpio_heating_plate_state_light_init_structer); } // Reaction state light diff --git a/main/light.h b/main/light.h index 8e66155..b78b9b9 100644 --- a/main/light.h +++ b/main/light.h @@ -23,7 +23,7 @@ typedef enum NoHeat = 1, //没加热 Heating, //加热中 HeatComplete, //加热完成 -} heating_state_t; +} heating_plate_state_t; typedef enum { @@ -47,9 +47,9 @@ typedef struct typedef struct { - heating_state_t state; + heating_plate_state_t state; bool change_flag; -} heating_state_light_structer_t; +} heating_plate_state_light_structer_t; typedef struct { @@ -71,7 +71,7 @@ void T_debug_light_toggle_level(void); void T_power_light_init(power_state_light_structer_t *power_state_light_structer); // Heating state light -void T_heating_state_light_init(heating_state_light_structer_t *heating_state_light_structer); +void T_heating_plate_state_light_init(heating_plate_state_light_structer_t *heating_plate_state_light_structer); // Reaction state light void T_reaction_state_light_init(reaction_state_light_structer_t *reaction_state_light_structer);