一、前文
- light状态数据保存在
light_res_sw_save
变量中 - 该变量上电从FLASH中读取,从
FLASH_ADR_SW_LEVEL 0x38000
这个地址读取
proj_lib\ble\blt_config.h
/* Flash adr 0x00000 ~ 0x2ffff is firmware area*/
#define FLASH_ADR_AREA_1_START 0x30000
#define FLASH_ADR_MESH_KEY FLASH_ADR_AREA_1_START
#define FLASH_ADR_MD_CFG_S 0x31000
#define FLASH_ADR_MD_HEALTH 0x32000
#define FLASH_ADR_MD_G_ONOFF_LEVEL 0x33000
#define FLASH_ADR_MD_TIME_SCHEDULE 0x34000
#define FLASH_ADR_MD_LIGHTNESS 0x35000 // share with power level
#define FLASH_ADR_MD_LIGHT_CTL 0x36000
#define FLASH_ADR_MD_LIGHT_LC 0x37000
#define FLASH_ADR_SW_LEVEL 0x38000
vendor\common\light.h
typedef struct{
s16 last