40 lines
920 B
C
Raw Normal View History

2025-05-14 11:26:23 +08:00
#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_ */