bl602 testing

This commit is contained in:
openshwprojects
2022-04-15 22:58:11 +02:00
parent 7ffa51c003
commit 429d3f6218
18 changed files with 136 additions and 23 deletions

View File

@ -191,7 +191,9 @@ int http_fn_index(http_request_t *request) {
poststr(request,"</script>");
}
}
#ifndef OBK_DISABLE_ALL_DRIVERS
DRV_AppendInformationToHTTPIndexPage(request);
#endif
// strcat(outbuf,"<button type=\"button\">Click Me!</button>");
@ -729,6 +731,7 @@ int http_fn_uart_tool(http_request_t *request) {
if(http_getArg(request->url,"data",tmpA,sizeof(tmpA))) {
#ifndef OBK_DISABLE_ALL_DRIVERS
hprintf128(request,"<h3>Sent %s!</h3>",tmpA);
if(0){
TuyaMCU_Send((byte *)tmpA, strlen(tmpA));
@ -746,6 +749,7 @@ int http_fn_uart_tool(http_request_t *request) {
}
TuyaMCU_Send(results, resultLen);
}
#endif
} else {
strcpy(tmpA,"Hello UART world");
}
@ -1094,6 +1098,8 @@ int http_fn_ota_exec(http_request_t *request) {
hprintf128(request,"<h3>OTA requested for %s!</h3>",tmpA);
#if WINDOWS
#elif PLATFORM_BL602
#elif PLATFORM_XR809
//cmd_ota_http_exec(tmpA);
xr809_do_ota_next_frame(tmpA);

View File

@ -796,6 +796,8 @@ static int http_rest_error(http_request_t *request, int code, char *msg){
static int http_rest_post_flash(http_request_t *request, int startaddr){
#if PLATFORM_XR809
#elif PLATFORM_BL602
#else
int total = 0;
int towrite;
@ -1005,6 +1007,8 @@ static int http_rest_get_testconfig(http_request_t *request){
static int http_rest_get_flash_vars_test(http_request_t *request){
#if PLATFORM_XR809
return http_rest_error(request, 400, "flash vars unsupported");
#elif PLATFORM_BL602
return http_rest_error(request, 400, "flash vars unsupported");
#else
#ifndef DISABLE_FLASH_VARS_VARS
char *params = request->url + 17;