helloyifa 31f179cb76 init
2025-05-15 14:19:56 +08:00

40 lines
920 B
C
Executable File

#ifndef _OTA_CLIENT_H_
#define _OTA_CLIENT_H_
typedef enum
{
/**
* 锁面视频芯片 网络控制面板
*/
BOARD_LOCK_NETWORK_CONTROL= 0,
/**
* 锁面主控芯片
*/
BOARD_LOCK_CONTROL = 1,
/**
* 锁体主控芯片
*/
BOARD_LOCK_BODY = 2 ,
} ota_target_t;
typedef struct {
uint8_t * ota_data;
uint32_t ota_data_len;
} ota_file_t;
int ota_file_download_from_http(char* ota_file_url,ota_file_t *ota_file);
void ota_client_read_version();
void ota_client_start(ota_target_t target, char*data ,int data_len);
void ota_client_stop();
void ota_client_set_callback();
void ilock_example_httpc_get(char *url);
void ota_example_httpc_post(char *url,uint8_t *mjpeg_data,int data_len);
void test_upload_photo();
void webclient_post_photo(char *url, uint8_t *mjpeg_data, int data_len);
#endif /* _OTA_CLIENT_H_ */