project:cfg:BoardConfig_IPC: Added fastboot BoardConfig file and firmware post-scripts, distinguishing between the BoardConfigs for Luckfox Pico Pro and Luckfox Pico Max. project:app: Added fastboot_client and rk_smart_door for quick boot applications; updated rkipc app to adapt to the latest media library. media:samples: Added more usage examples. media:rockit: Fixed bugs; removed support for retrieving data frames from VPSS. media:isp: Updated rkaiq library and related tools to support connection to RKISP_Tuner. sysdrv:Makefile: Added support for compiling drv_ko on Luckfox Pico Ultra W using Ubuntu; added support for custom root filesystem. sysdrv:tools:board: Updated Buildroot optional mirror sources, updated some software versions, and stored device tree files and configuration files that undergo multiple modifications for U-Boot and kernel separately. sysdrv:source:mcu: Used RISC-V MCU SDK with RT-Thread system, mainly for initializing camera AE during quick boot. sysdrv:source:uboot: Added support for fastboot; added high baud rate DDR bin for serial firmware upgrades. sysdrv:source:kernel: Upgraded to version 5.10.160; increased NPU frequency for RV1106G3; added support for fastboot. Signed-off-by: luckfox-eng29 <eng29@luckfox.com>
72 lines
1.5 KiB
C
72 lines
1.5 KiB
C
/*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*
|
|
* Copyright (c) 2019 Fuzhou Rockchip Electronics Co., Ltd
|
|
*/
|
|
|
|
#ifndef _OTA_HTTP_H_
|
|
#define _OTA_HTTP_H_
|
|
|
|
#include "ota.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef struct
|
|
{
|
|
char *target;
|
|
const char *tag;
|
|
int frame_size;
|
|
char *type;
|
|
long file_size;
|
|
} ota_http_cfg_t;
|
|
|
|
struct ota_http_opts_t
|
|
{
|
|
const char *type;
|
|
int (*init)(struct ota_http_opts_t *self, ota_http_cfg_t *cfg);
|
|
int (*read)(struct ota_http_opts_t *self, char *data, size_t data_len);
|
|
void (*destroy)(struct ota_http_opts_t *self);
|
|
void *userdata;
|
|
};
|
|
|
|
typedef struct ota_http_opts_t ota_http_opts;
|
|
|
|
typedef struct
|
|
{
|
|
char url[256];
|
|
ota_http_opts http_opts;
|
|
} ota_http_parameters;
|
|
|
|
|
|
#if OTA_OPT_PROTOCOL_HTTP
|
|
|
|
int http_opts_init(struct ota_http_opts_t *self, ota_http_cfg_t *cfg);
|
|
int http_opts_read(struct ota_http_opts_t *self, char *data,
|
|
size_t data_len);
|
|
void http_opts_destroy(struct ota_http_opts_t *self);
|
|
|
|
ota_status ota_update_http_init(void *url);
|
|
ota_status ota_update_http_get(uint8_t *buf, uint32_t buf_size, uint32_t *recv_size, uint8_t *eof_flag);
|
|
ota_status ota_fw_head_http_get(uint8_t *buf, uint32_t buf_size, uint32_t *recv_size, uint8_t *eof_flag);
|
|
int ota_start_download_task(void *arg);
|
|
void ota_exit_download_task(void);
|
|
|
|
#endif
|
|
|
|
#define DEFAULT_HTTP_OPTS { \
|
|
.type = "http", \
|
|
.init = http_opts_init, \
|
|
.read = http_opts_read, \
|
|
.destroy = http_opts_destroy \
|
|
}
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* _OTA_HTTP_H_ */
|
|
|
|
|