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.
46 lines
833 B
46 lines
833 B
#pragma once
|
|
#include <stdbool.h>
|
|
#include <stdint.h>
|
|
typedef enum {
|
|
klevel1 = 0,
|
|
klevel2,
|
|
} level_t;
|
|
|
|
typedef enum {
|
|
knormal,
|
|
ktimingMode,
|
|
kintermittentMode,
|
|
} mode_t;
|
|
|
|
typedef enum {
|
|
knone_active,
|
|
kchange_level_input,
|
|
kchange_countdonw_time_input,
|
|
kchange_intermittentmode_time_input,
|
|
} active_input_t;
|
|
|
|
typedef struct {
|
|
bool poweron;
|
|
mode_t mode;
|
|
level_t level;
|
|
//
|
|
active_input_t active_input;
|
|
uint32_t active_start_ticket;
|
|
|
|
int countdonwnum;
|
|
int countdonwnum_s;
|
|
|
|
int countdonw_s_setting_num;
|
|
uint32_t countdonw_start_ticket;
|
|
|
|
bool intermittentMode_idle;
|
|
|
|
} ThisDevice_t;
|
|
|
|
#define kconst_flash_auto_close_time (3000)
|
|
// #define kconst_countdown_step_s (15 * 60)
|
|
#define kconst_countdown_step_s (10)
|
|
|
|
#define kconst_active_input_light_flick_interval_ms (150)
|
|
|
|
extern ThisDevice_t thisDevice;
|