| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- /*
- * Copyright (c) 2006-2021, RT-Thread Development Team
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Change Logs:
- * Date Author Notes
- * 2025-12-31 Administrator the first version
- */
- #ifndef APPLICATIONS_EXTERN_PARAM_H_
- #define APPLICATIONS_EXTERN_PARAM_H_
- //传感器
- typedef struct {
- char temperature[8]; //温度
- char humidity[8]; //湿度
- char ap[8]; //大气压
- char lux[8]; //照度
- } SensorData;
- typedef struct {
- uint8_t iSave; //存储标志位
- uint8_t dtype; //设备类型?7-孢子仪,3-测报灯
- /*测报灯*/
- uint8_t heat_sw; //加热开关
- uint8_t photo_ws; //拍照
- uint8_t power_status; //电源
- uint8_t sun_test; //光控测测试标志位
- uint8_t heat_status; //加热状态 0-关 1-开
- uint8_t lamp_status; //灯管1状态 0-关 1-开
- uint8_t lamp1_status; //灯管2状态 0-关 1-开
- uint8_t lamp2_status; //灯管3状态 0-关 1-开
- uint8_t up_status; //上仓门状态 0-停止 1-打开 2-关闭
- uint8_t down_status; //下仓门状态 0-停止 1-打开 2-关闭
- uint8_t clear_status; //清扫状态 0-停止 1-开始
- uint8_t shake_ws; //震动 0-关 1-开
- uint8_t heatvalue; //加热设定温度
- } FlashData;
- typedef struct ConfigModule {
- SensorData sensordata;
- } ConfigModule;
- // 单例对象声明
- extern ConfigModule config;
- // 函数声明
- void Config_Init(void);
- bool Config_Set(ConfigItem item, void* value);
- bool Config_Get(ConfigItem item, void* value);
- #endif /* APPLICATIONS_EXTERN_PARAM_H_ */
|