From 2816501b1c91489b9eb31b54b4a506273a02cf5d Mon Sep 17 00:00:00 2001 From: jedi Date: Sat, 10 Jul 2021 15:40:46 +0200 Subject: [PATCH] stash --- firmware/system.c | 15 +++++++++++++++ firmware/web.cpp | 12 +++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/firmware/system.c b/firmware/system.c index f9dcadd..8cef29c 100644 --- a/firmware/system.c +++ b/firmware/system.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include @@ -48,6 +49,20 @@ void system_init_config() { } } +int fputc(int ch, FILE *f) +{ + uart_putc(0, '0'); + uart_putc(0, ch); + return ch; +} + +int puts (const char *str) +{ + char c; + while((c=*str++))fputc(c,0); + return str; +} + #define MAX_IMAGE_SIZE 0x100000 struct { diff --git a/firmware/web.cpp b/firmware/web.cpp index 6176a43..9528377 100644 --- a/firmware/web.cpp +++ b/firmware/web.cpp @@ -303,4 +303,14 @@ extern "C" void httpd_task(void *pvParameters) { httpd_init(); vTaskDelete(nullptr); -} \ No newline at end of file +} + +#include +#include + +void test(){ + + printf("foo\n"); + printf("Warning: WiFi config, sysparam not initialized\n"); + printf("SDK version: %s\n", sdk_system_get_sdk_version()); +}; \ No newline at end of file