w800 port p1

This commit is contained in:
openshwprojects
2022-07-11 10:49:39 +02:00
parent ce6f0aa371
commit b6e28c00f8
13 changed files with 342 additions and 3 deletions

View File

@ -18,6 +18,8 @@
// nothing
#elif PLATFORM_BL602
#elif PLATFORM_W800
#elif PLATFORM_XR809
#include <image/flash.h>
#elif defined(PLATFORM_BK7231N)
@ -603,6 +605,8 @@ int http_fn_cfg_wifi(http_request_t *request) {
#elif PLATFORM_XR809
poststr(request,"TODO XR809<br>");
#elif PLATFORM_W800
poststr(request,"TODO W800<br>");
#elif PLATFORM_BL602
poststr(request,"TODO BL602<br>");
#elif PLATFORM_BK7231T
@ -875,6 +879,8 @@ int http_fn_flash_read_tool(http_request_t *request) {
res = flash_read(FLASH_INDEX_XR809, nowOfs, buffer, now);
#elif PLATFORM_BL602
#elif PLATFORM_W800
#else
res = bekken_hal_flash_read (nowOfs, buffer,now);
#endif
@ -1628,6 +1634,8 @@ int http_fn_ota_exec(http_request_t *request) {
#elif PLATFORM_BL602
#elif PLATFORM_W800
#elif PLATFORM_XR809
XR809_RequestOTAHTTP(tmpA);
#else

View File

@ -26,6 +26,7 @@
uint32_t flash_read(uint32_t flash, uint32_t addr,void *buf, uint32_t size);
#define FLASH_INDEX_XR809 0
#elif PLATFORM_BL602
#elif PLATFORM_W800
#else
extern UINT32 flash_read(char *user_buf, UINT32 count, UINT32 address);
#endif
@ -97,6 +98,11 @@ const char *obktype = "BL602";
const char * apppage2 = "';"
" var obktype = 'BL602';"
" var device = 'http://";
#elif PLATFORM_W800
const char *obktype = "W800";
const char * apppage2 = "';"
" var obktype = 'W800';"
" var device = 'http://";
#else
const char *obktype = "beken";
const char * apppage2 = "';"
@ -795,6 +801,8 @@ static int http_rest_post_flash(http_request_t *request, int startaddr){
#elif PLATFORM_BL602
#elif PLATFORM_W800
#else
int total = 0;
int towrite;
@ -894,6 +902,8 @@ static int http_rest_get_flash(http_request_t *request, int startaddr, int len){
res = flash_read(FLASH_INDEX_XR809, startaddr, buffer, readlen);
#elif PLATFORM_BL602
res = 0;
#elif PLATFORM_W800
res = 0;
#else
res = flash_read((char *)buffer, readlen, startaddr);
#endif