xr809 support - initial version

This commit is contained in:
openshwprojects
2022-02-12 23:31:57 +01:00
parent 1e5c0bc7c7
commit ccc2f92f6e
3 changed files with 47 additions and 3 deletions

View File

@@ -2,6 +2,7 @@
#include "../new_common.h"
#include "ctype.h"
#include "lwip/sockets.h"
#if WINDOWS
//#include <windows.h>
#include <winsock2.h>
@@ -10,7 +11,6 @@
#include <stdarg.h>
#else
#include "lwip/sockets.h"
#include "str_pub.h"
#endif
#include "new_http.h"
@@ -742,7 +742,13 @@ int HTTP_ProcessPacket(http_request_t *request) {
} else {
now = rem;
}
#if PLATFORM_XR809
res = 0;
now = 0;
rem = 0;
#else
res = tuya_hal_flash_read (nowOfs, buffer,now);
#endif
for(i = 0; i < now; i++) {
sprintf(tmpA,"%02X ",buffer[i]);
poststr(request,tmpA);
@@ -1103,6 +1109,8 @@ int HTTP_ProcessPacket(http_request_t *request) {
poststr(request,tmpB);
#if WINDOWS
#elif PLATFORM_XR809
#else
otarequest(tmpA);
#endif