Commit 012f2410 authored by Deomid Ryabkov's avatar Deomid Ryabkov Committed by rojer

Fix the ESP8266_RTOS example, add it to CI

PUBLISHED_FROM=3d58ec06fe3108a81d1c35f8261783690bb12c4d
parent ccf67dbf
...@@ -23,7 +23,7 @@ endif ...@@ -23,7 +23,7 @@ endif
# makefile at its root level - these are then overridden # makefile at its root level - these are then overridden
# for a subtree within the makefile rooted therein # for a subtree within the makefile rooted therein
# #
DEFINES += -DMG_LOCALS \ DEFINES += -DCS_PLATFORM=3 \
-DMG_NO_BSD_SOCKETS \ -DMG_NO_BSD_SOCKETS \
-DMG_DISABLE_FILESYSTEM \ -DMG_DISABLE_FILESYSTEM \
-DMG_DISABLE_STDIO \ -DMG_DISABLE_STDIO \
......
...@@ -53,7 +53,3 @@ int _gettimeofday_r(struct _reent *r, struct timeval *tp, void *tzp) { ...@@ -53,7 +53,3 @@ int _gettimeofday_r(struct _reent *r, struct timeval *tp, void *tzp) {
tp->tv_usec = time % 1000000; tp->tv_usec = time % 1000000;
return 0; return 0;
} }
long int random(void) {
return os_random();
}
...@@ -101,13 +101,6 @@ xTaskHandle s_mg_task_handle; ...@@ -101,13 +101,6 @@ xTaskHandle s_mg_task_handle;
void user_init(void) { void user_init(void) {
uart_div_modify(0, UART_CLK_FREQ / 115200); uart_div_modify(0, UART_CLK_FREQ / 115200);
// setvbuf(stdout, NULL, _IONBF, 0);
// setvbuf(stderr, NULL, _IONBF, 0);
xTaskCreate(mg_task, (const signed char *) "mongoose", MG_TASK_STACK_SIZE, xTaskCreate(mg_task, (const signed char *) "mongoose", MG_TASK_STACK_SIZE,
NULL, MG_TASK_PRIORITY, &s_mg_task_handle); NULL, MG_TASK_PRIORITY, &s_mg_task_handle);
} }
void call_user_start(void) {
user_init();
}
...@@ -5231,6 +5231,7 @@ void mg_http_handler(struct mg_connection *nc, int ev, void *ev_data) { ...@@ -5231,6 +5231,7 @@ void mg_http_handler(struct mg_connection *nc, int ev, void *ev_data) {
#endif /* MG_ENABLE_HTTP_STREAMING_MULTIPART */ #endif /* MG_ENABLE_HTTP_STREAMING_MULTIPART */
} }
} }
(void) pd;
} }
static size_t mg_get_line_len(const char *buf, size_t buf_len) { static size_t mg_get_line_len(const char *buf, size_t buf_len) {
......
...@@ -331,7 +331,6 @@ typedef struct stat cs_stat_t; ...@@ -331,7 +331,6 @@ typedef struct stat cs_stat_t;
#include <assert.h> #include <assert.h>
#include <ctype.h> #include <ctype.h>
#include <errno.h>
#include <fcntl.h> #include <fcntl.h>
#include <inttypes.h> #include <inttypes.h>
#include <string.h> #include <string.h>
...@@ -344,6 +343,10 @@ typedef struct stat cs_stat_t; ...@@ -344,6 +343,10 @@ typedef struct stat cs_stat_t;
#include <lwip/netdb.h> #include <lwip/netdb.h>
#include <lwip/dns.h> #include <lwip/dns.h>
#ifndef LWIP_PROVIDE_ERRNO
#include <errno.h>
#endif
#define LWIP_TIMEVAL_PRIVATE 0 #define LWIP_TIMEVAL_PRIVATE 0
#if LWIP_SOCKET #if LWIP_SOCKET
...@@ -368,6 +371,9 @@ typedef struct stat cs_stat_t; ...@@ -368,6 +371,9 @@ typedef struct stat cs_stat_t;
#define INT64_X_FMT PRIx64 #define INT64_X_FMT PRIx64
#define __cdecl #define __cdecl
unsigned long os_random(void);
#define random os_random
#endif /* CS_PLATFORM == CS_P_ESP_LWIP */ #endif /* CS_PLATFORM == CS_P_ESP_LWIP */
#endif /* CS_COMMON_PLATFORMS_PLATFORM_ESP_LWIP_H_ */ #endif /* CS_COMMON_PLATFORMS_PLATFORM_ESP_LWIP_H_ */
/* /*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment