You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
#pragma once
#include <stdbool.h>
#include <stdint.h>
typedef enum { ShutDown = 1, //关机
StartingUp, //开机
} power_state_t;
typedef enum { NoHeat = 1, //没加热
Heating, //加热中
HeatComplete, //加热完成
} heating_plate_state_t;
typedef enum { NoReaction = 1, //没反应
Reacting, //反应中
ReactionComplete, //反应完成
} reaction_state_t;
typedef enum { NotConnected = 1, //未连接
Connecting, //连接中
ConnectionComplete, //连接完成
} wifi_state_t;
typedef struct { power_state_t state; bool change_flag; } power_state_light_structer_t;
typedef struct { heating_plate_state_t state; bool change_flag; } heating_plate_state_light_structer_t;
typedef struct { reaction_state_t state; bool change_flag; } reaction_state_light_structer_t;
typedef struct { wifi_state_t state; bool change_flag; } wifi_state_light_structer_t;
// Debug light
void T_debug_light_init(void); void T_light_toggle_level(uint8_t io_num);
// Power light
void T_power_light_init(power_state_light_structer_t *power_state_light_structer);
// Heating state light
void T_heating_plate_state_light_init(heating_plate_state_light_structer_t *heating_plate_state_light_structer); void T_heating_plate_light_change_state(heating_plate_state_t change_state); void T_heating_plate_light_set_rgb_by_state(heating_plate_state_t state);
// Reaction state light
void T_reaction_state_light_init(reaction_state_light_structer_t *reaction_state_light_structer); void T_reaction_light_change_state(reaction_state_t change_state); void T_reaction_light_set_rgb_by_state(reaction_state_t state);
// WIFI state light
void T_wifi_state_light_init(wifi_state_light_structer_t *wifi_state_light_structer); void T_wifi_light_change_state(wifi_state_t change_state); void T_wifi_light_set_rgb_by_state(wifi_state_t state);
// Schedule
void T_debug_light_schedule(void); void T_light_schedule(void);
|