資源簡介
在單片機上實現http upload 小文件上傳,將上傳做出一個rtos的任務,把http header都通過函數添加便于刪減header,我用HFS實測過,不過只能傳小文件
代碼片段和文件信息
#include?
#include?“FreeRTOS.h“
#include?“task.h“
#include?“lwip/netdb.h“
#include?“http_client.h“
#include?“http_client/example_http_client.h“
#include?
#include?“../../../component/common/file_system/fatfs/r0.10c/include/ff.h“
#define?THREAD_STACK_SIZE?1024
#define?HOST_NAME? ??“192.168.5.103“//www.google.com.tw“
#define?HOST_PORT?80
#define?POST_CONTENT_TYPE “application/octet-stream“
static?char?*uploadHostName=HOST_NAME;
static?char?*filename?=“fbupd.hex“;
extern?volatile?unsigned?char??isuploadTaskrun=0;
//extern?unsigned?char??updtype;
extern?char?*http_post_header(char?*host?char?*resource?char?*type?int?data_len);
extern?char?*http_get_header(char?*host?char?*resource);
char?upload_head[]?=
“POST?/Ac
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????5533??2018-05-18?14:55??example_http_client.c
?????文件????????399??2017-03-20?23:22??example_http_client.h
?????文件???????6074??2018-05-18?14:10??http_client.c
?????文件????????638??2018-05-18?10:14??http_client.h
-----------?---------??----------?-----??----
????????????????12644????????????????????4
- 上一篇:E盾自助升級換服工具V47
- 下一篇:Qt 復制文件 實現進度條顯示
評論
共有 條評論