mirror of
https://github.com/oopuuu/zTC1.git
synced 2025-12-12 21:18:13 +08:00
del:delete Source code
This commit is contained in:
78
TC1/main.h
78
TC1/main.h
@@ -1,78 +0,0 @@
|
||||
#ifndef __MAIN_H_
|
||||
#define __MAIN_H_
|
||||
|
||||
#include "mico.h"
|
||||
#include "MiCOKit_EXT.h"
|
||||
|
||||
#define VERSION "v0.10.1"
|
||||
|
||||
#define TYPE 1
|
||||
#define TYPE_NAME "zTC1"
|
||||
|
||||
#define ZTC1_NAME "zTC1_%02X%02X"
|
||||
|
||||
#define USER_CONFIG_VERSION 2
|
||||
#define SETTING_MQTT_STRING_LENGTH_MAX 32 //<2F><><EFBFBD><EFBFBD> 4 <20>ֽڶ<D6BD><DAB6>롣
|
||||
|
||||
#define PLUG_NAME_LENGTH 32
|
||||
#define PLUG_NUM 6 //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
#define PLUG_TIME_TASK_NUM 5 //ÿ<><C3BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>5<EFBFBD>鶨ʱ<E9B6A8><CAB1><EFBFBD><EFBFBD>
|
||||
|
||||
#define Led MICO_GPIO_5
|
||||
#define Button MICO_GPIO_23
|
||||
#define POWER MICO_GPIO_15
|
||||
|
||||
#define Relay_ON 1
|
||||
#define Relay_OFF 0
|
||||
|
||||
#define Relay_0 MICO_GPIO_6
|
||||
#define Relay_1 MICO_GPIO_8
|
||||
#define Relay_2 MICO_GPIO_10
|
||||
#define Relay_3 MICO_GPIO_7
|
||||
#define Relay_4 MICO_GPIO_9
|
||||
#define Relay_5 MICO_GPIO_18
|
||||
#define Relay_NUM PLUG_NUM
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char hour; //Сʱ
|
||||
char minute; //<2F><><EFBFBD><EFBFBD>
|
||||
uint8_t repeat; //bit7:һ<><D2BB> bit6-0:<3A><><EFBFBD><EFBFBD>-<2D><>һ
|
||||
char action; //<2F><><EFBFBD><EFBFBD>
|
||||
char on; //<2F><><EFBFBD><EFBFBD>
|
||||
} user_plug_task_config_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char name[PLUG_NAME_LENGTH];
|
||||
char on; //<2F><>¼<EFBFBD><C2BC>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>
|
||||
user_plug_task_config_t task[PLUG_TIME_TASK_NUM];
|
||||
|
||||
} user_plug_config_t;
|
||||
|
||||
//<2F>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ṹ<EFBFBD><E1B9B9>
|
||||
typedef struct
|
||||
{
|
||||
char mqtt_ip[SETTING_MQTT_STRING_LENGTH_MAX]; //mqtt service ip
|
||||
int mqtt_port; //mqtt service port
|
||||
char mqtt_user[SETTING_MQTT_STRING_LENGTH_MAX]; //mqtt service user
|
||||
char mqtt_password[SETTING_MQTT_STRING_LENGTH_MAX]; //mqtt service user
|
||||
// char mqtt_device_id[SETTING_MQTT_STRING_LENGTH_MAX]; //mqtt service user device name
|
||||
|
||||
char version;
|
||||
user_plug_config_t plug[PLUG_NUM];
|
||||
char user[maxNameLen];
|
||||
} user_config_t;
|
||||
|
||||
extern char rtc_init;
|
||||
|
||||
|
||||
extern uint32_t total_time;
|
||||
extern char strMac[16];
|
||||
extern uint32_t power;
|
||||
extern system_config_t * sys_config;
|
||||
extern user_config_t * user_config;
|
||||
|
||||
extern mico_gpio_t Relay[Relay_NUM];
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user