69 lines
2.0 KiB
C
69 lines
2.0 KiB
C
/*
|
|
* @Description:
|
|
* @Version: 1.0
|
|
* @Autor: lzc
|
|
* @Date: 2022-09-09 08:31:26
|
|
* @LastEditors: lzc
|
|
* @LastEditTime: 2024-03-14 09:11:39
|
|
*/
|
|
#ifndef __WIFICOM_H
|
|
#define __WIFICOM_H
|
|
|
|
#include "sys.h"
|
|
#include "delay.h"
|
|
|
|
#ifndef NULL
|
|
#define NULL 0
|
|
#endif
|
|
|
|
#define WIFI_CFG_CBSIZE 256 /* Console I/O Buffer Size */
|
|
#define WIFI_CFG_MAXARGS 16 /* max number of command args */
|
|
#define WIFI_MAX_COMMAND_LEN 30 /* command length */
|
|
|
|
typedef struct WARNING_CONFIG_T
|
|
{
|
|
char sex; // 性别
|
|
char timeZone; // 时区
|
|
uint8_t age; // 年龄
|
|
uint16_t height; // 身高
|
|
uint16_t weight; // 体重
|
|
uint8_t heart_min_th; // 心率最小值阈值
|
|
uint8_t heart_max_th; // 心率最大值阈值
|
|
uint16_t heart_keep_th; // 心率告警持续时间
|
|
uint8_t breath_min_th; // 呼吸最小值阈值
|
|
uint8_t breath_max_th; // 呼吸最大值阈值
|
|
uint16_t breath_keep_th; // 呼吸告警持续时间
|
|
uint16_t Move_keep_th; // 体动告警持续时间
|
|
} warning_config_t;
|
|
|
|
extern uint8_t wifi_opm_buf[];
|
|
extern uint8_t wifi_opm_send_buf[];
|
|
extern float value_buf[];
|
|
|
|
extern uint8_t wifi_frame_flg;
|
|
extern uint32_t wifi_len;
|
|
extern uint32_t wifi_len_500;
|
|
extern uint32_t wifi_len_500_flg;
|
|
extern uint16_t wifi_signs_len;
|
|
extern uint64_t timeClockCount;
|
|
extern uint64_t timeClockCount_Send;
|
|
extern uint8_t TimeClock_Flag;
|
|
extern uint8_t get_time_buf[];
|
|
extern uint8_t get_config_buf[];
|
|
extern uint8_t get_breathe_buf[];
|
|
|
|
uint8_t Execute_user_Program(void);
|
|
typedef void (*pFunction)(void);
|
|
|
|
extern void wifi_crc_send(uint8_t *data, uint32_t length);
|
|
extern uint32_t OPENBL_CRC32_MPEG_2(uint8_t *data, uint32_t length);
|
|
extern void wifiSendMsgOneMoreTimes(uint8_t *data, uint32_t length, char Times);
|
|
void upgradeVersion(void);
|
|
void version_upload(void);
|
|
void sendFirmwareInfo(void);
|
|
void CalValue_Upload(void);
|
|
void CheckOverTimeValueClear(void);
|
|
void sendOPMCalStatus(char Times, char Status);
|
|
void sendOPMCalValue(uint32_t OFF_Value, uint32_t ON_Value);
|
|
#endif
|