From 5abdb22c548041a7274ddf48c3024b132efe50fe 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 d190606..c443a1f 100644 --- a/firmware/system.c +++ b/firmware/system.c @@ -11,6 +11,7 @@ #include #include +#include #include #include #include @@ -49,6 +50,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 ed55e2d..1b3da64 100644 --- a/firmware/web.cpp +++ b/firmware/web.cpp @@ -336,4 +336,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