2026-04-23 13:56:52 +08:00
|
|
|
#ifndef _UPDATE_PROTOCOL_H_
|
|
|
|
|
#define _UPDATE_PROTOCOL_H_
|
|
|
|
|
|
|
|
|
|
#include "stdint.h"
|
|
|
|
|
|
|
|
|
|
#define CRC16_BASE 0xA001
|
|
|
|
|
|
|
|
|
|
typedef void (*update_send_t)(uint8_t *pBuf,uint16_t len);
|
|
|
|
|
|
|
|
|
|
void update_init(update_send_t pCbs);
|
|
|
|
|
|
2026-09-01 11:14:07 +08:00
|
|
|
void update_set_devmac(uint8_t *DevMac);
|
|
|
|
|
|
2026-04-23 13:56:52 +08:00
|
|
|
int update_unpack(uint8_t* rxData, int rLen,uint8_t *cmd, uint8_t* dev_addr, void *pUser, int *pLen);
|
|
|
|
|
|
|
|
|
|
void update_send_cmd(uint8_t Cmd, uint16_t Indx, int PageNum);
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|