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.
84 lines
1.7 KiB
84 lines
1.7 KiB
/**
|
|
* @file light.h
|
|
* @author Finny (tianjialong0106@163.com)
|
|
* @brief Project micro shape photometer light control
|
|
* @version 0.1
|
|
* @date 2022-09-25
|
|
*
|
|
* @copyright Copyright (c) 2022
|
|
*
|
|
*/
|
|
#pragma once
|
|
|
|
#include <stdbool.h>
|
|
|
|
typedef enum
|
|
{
|
|
ShutDown = 1, //关机
|
|
StartingUp, //开机
|
|
} power_state_t;
|
|
|
|
typedef enum
|
|
{
|
|
NoHeat = 1, //没加热
|
|
Heating, //加热中
|
|
HeatComplete, //加热完成
|
|
} heating_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_state_t state;
|
|
bool change_flag;
|
|
} heating_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_debug_light_toggle_level(void);
|
|
|
|
// Power light
|
|
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);
|
|
|
|
// Reaction state light
|
|
void T_reaction_state_light_init(reaction_state_light_structer_t *reaction_state_light_structer);
|
|
|
|
// WIFI state light
|
|
void T_wifi_state_light_init(wifi_state_light_structer_t *wifi_state_light_structer);
|
|
|
|
// Schedule
|
|
void T_debug_light_schedule(void);
|
|
void T_light_schedule(void);
|