#include <stdio.h>
#include "common.h"
#include "http_file.h"
#include "parser_file.h"
#include "md5sum.h"
#include "parser_cmd.h"
#include "progress.h"
浏览源代码.
- 作者
- zhengchuangyong (zheng.nosp@m.chua.nosp@m.ngyon.nosp@m.g@em.nosp@m.bedsk.nosp@m.y.ne.nosp@m.t)
- 版本
- 1.0
- 日期
- 2021-09-26
- 版权所有
- Copyright (c) 2023 广州省天嵌嵌入式技术股份有限公司
- 修改日志:
Date | Version | Author | Description |
2021-09-26 | 1.0 | zhengchuangyong | 第一次发布,对产品一些资源更新方法的封装,如在线更新,从sd卡更新. |
int get_status |
( |
char * |
str, |
|
|
int |
len |
|
) |
| |
获取文件状态信息
- 参数
-
str | 用于存放获取的状态信息 |
len | 获取状态信息的长度 |
- 返回
- int 成功返回实际获取的信息长度,失败返回小于0的整数
int set_no_ramdisk_update |
( |
int |
enbale | ) |
|
设置产品不从磁盘更新
- 参数
-
enbale | 使能参数,设置为1时才可以进行在线升级 |
- 返回
- int 成功返回实际设置的信息长度,失败返回小于0的整数
int start_ota_update |
( |
char * |
ip_port, |
|
|
const char * |
product |
|
) |
| |
在线更新产品
- 参数
-
ip_port | 服务器的IP地址和端口号 |
product | 要更新的产品 |
- 返回
- int 更新成功返回0,失败返回-1
int start_ota_update_sd |
( |
const char * |
product | ) |
|
从sd卡中更新产品
- 参数
-
- 返回
- int 更新成功返回0,失败返回-1