bsp_flash ok
This commit is contained in:
parent
d3d0b22b1e
commit
c7eb86a58c
|
@ -17,6 +17,7 @@
|
||||||
#include "gattprofile.h"
|
#include "gattprofile.h"
|
||||||
#include "peripheral.h"
|
#include "peripheral.h"
|
||||||
|
|
||||||
|
#include "bsp_flash.h"
|
||||||
#include "bsp_adc.h"
|
#include "bsp_adc.h"
|
||||||
|
|
||||||
#include "bsp_key.h"
|
#include "bsp_key.h"
|
||||||
|
@ -173,6 +174,9 @@ int main(void)
|
||||||
HAL_Init();
|
HAL_Init();
|
||||||
GAPRole_PeripheralInit();
|
GAPRole_PeripheralInit();
|
||||||
Peripheral_Init();
|
Peripheral_Init();
|
||||||
|
|
||||||
|
BSP_FLASH_Init();
|
||||||
|
|
||||||
Main_Circulation();
|
Main_Circulation();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
|
|
||||||
|
|
||||||
struct __attribute__((packed)) valve_data
|
|
||||||
{
|
|
||||||
// uint8_t valve_id;
|
|
||||||
// uint8_t valve_mac[6];
|
|
||||||
uint8_t header;
|
|
||||||
uint8_t cmd;
|
|
||||||
uint8_t data_len;
|
|
||||||
uint8_t valve_type; // 阀门类型
|
|
||||||
uint8_t valve_bat; // 1B 电池电压 30=3V,18=1.8V
|
|
||||||
uint8_t valve_status; // 1B 阀门工作状态 超欠压、过流
|
|
||||||
uint8_t valve_connct_status; // 1B 阀门连接状态 (电磁阀BLE控制盒) 0=未连接 1=已连接
|
|
||||||
uint8_t valve_switch_status; // 1B 阀门开关状态 0=未知 1=关闭 2=关闭过,未按按键恢复 3=关闭过,按下了恢复键 4=打开
|
|
||||||
int8_t valve_temp; // 1B 阀门温度 有符号整数 25 ℃
|
|
||||||
uint8_t valve_humidity; // 1B 阀门湿度 0~100%;
|
|
||||||
uint32_t valve_in_pressure; // 4B 阀门入口压力 Pa
|
|
||||||
uint32_t valve_out_pressure; // 4B 阀门出口压力 Pa
|
|
||||||
uint32_t valve_atm_pressure; // 4B 阀门大气压力 Pa
|
|
||||||
uint8_t tail;
|
|
||||||
};
|
|
Loading…
Reference in New Issue