File tree Expand file tree Collapse file tree 3 files changed +19
-26
lines changed
build/devices/esp32/xsProj Expand file tree Collapse file tree 3 files changed +19
-26
lines changed Original file line number Diff line number Diff line change @@ -140,24 +140,13 @@ void loop(void)
140140 to enable serial port for diagnostic information and debugging
141141*/
142142
143- #if 0
144- #define DEBUGIT (x ) printf x
145- #else
146- #define DEBUGIT (x )
147- #endif
148143void modLog_transmit (const char * msg )
149144{
150- #if 0
151- printf ("%s\n" , msg );
152- #else
153145 uint8_t c ;
154146
155- DEBUGIT (("modLog_transmit %s\n" , msg ));
156147 if (gThe ) {
157148 while (0 != (c = c_read8 (msg ++ )))
158149 fx_putc (gThe , c );
159- fx_putc (gThe , 13 );
160- fx_putc (gThe , 10 );
161150 fx_putc (gThe , 0 );
162151 }
163152 else {
@@ -166,13 +155,10 @@ DEBUGIT(("modLog_transmit %s\n", msg));
166155 ESP_putc (13 );
167156 ESP_putc (10 );
168157 }
169- #endif
170158}
171159
172160void ESP_putc (int c ) {
173161 char cx = c ;
174-
175- DEBUGIT (("about to uart_write_bytes: %c\n" , cx ));
176162 uart_write_bytes (USE_UART , & cx , 1 );
177163}
178164
@@ -181,9 +167,7 @@ int ESP_getc(void) {
181167 uint8_t myChar = ' ' ;
182168 if (!ESP_isReadable ())
183169 return -1 ;
184- DEBUGIT (("about to uart_read_bytes:\n" ));
185170 err = uart_read_bytes (USE_UART , & myChar , 1 , 1 );
186- DEBUGIT ((" ret: %d, char: %c\n" , err , myChar ));
187171 if (err == 1 )
188172 return myChar ;
189173 return -1 ;
Original file line number Diff line number Diff line change @@ -157,10 +157,11 @@ CONFIG_NEWLIB_STDIN_LINE_ENDING_CRLF=
157157CONFIG_NEWLIB_STDIN_LINE_ENDING_LF=
158158CONFIG_NEWLIB_STDIN_LINE_ENDING_CR=y
159159CONFIG_NEWLIB_NANO_FORMAT=
160- CONFIG_CONSOLE_UART_DEFAULT=
160+ CONFIG_CONSOLE_UART_DEFAULT=y
161161CONFIG_CONSOLE_UART_CUSTOM=
162- CONFIG_CONSOLE_UART_NONE=y
162+ CONFIG_CONSOLE_UART_NONE=
163163CONFIG_CONSOLE_UART_NUM=0
164+ CONFIG_CONSOLE_UART_BAUDRATE=115200
164165CONFIG_ULP_COPROC_ENABLED=
165166CONFIG_ULP_COPROC_RESERVE_MEM=0
166167CONFIG_ESP32_PANIC_PRINT_HALT=
@@ -308,13 +309,13 @@ CONFIG_HEAP_TRACING=
308309#
309310# Log output
310311#
311- CONFIG_LOG_DEFAULT_LEVEL_NONE=y
312+ CONFIG_LOG_DEFAULT_LEVEL_NONE=
312313CONFIG_LOG_DEFAULT_LEVEL_ERROR=
313- CONFIG_LOG_DEFAULT_LEVEL_WARN=
314+ CONFIG_LOG_DEFAULT_LEVEL_WARN=y
314315CONFIG_LOG_DEFAULT_LEVEL_INFO=
315316CONFIG_LOG_DEFAULT_LEVEL_DEBUG=
316317CONFIG_LOG_DEFAULT_LEVEL_VERBOSE=
317- CONFIG_LOG_DEFAULT_LEVEL=0
318+ CONFIG_LOG_DEFAULT_LEVEL=2
318319CONFIG_LOG_COLORS=
319320
320321#
Original file line number Diff line number Diff line change @@ -102,11 +102,19 @@ extern void espFreeUint32(void *t);
102102extern void modLog_transmit (const char * msg );
103103extern void ESP_putc (int c );
104104
105- #define modLog (msg ) \
106- do { \
107- static const char scratch[] ICACHE_XS6STRING_ATTR = msg ; \
108- modLog_transmit(scratch); \
109- } while (0)
105+ #if !ESP32
106+ #define modLog (msg ) \
107+ do { \
108+ static const char scratch[] ICACHE_XS6STRING_ATTR = msg ; \
109+ modLog_transmit(scratch); \
110+ } while (0)
111+ #else
112+ #define modLog (msg ) \
113+ do { \
114+ static const char scratch[] = msg ; \
115+ modLog_transmit(scratch); \
116+ } while (0)
117+ #endif
110118#define modLogVar (msg ) modLog_transmit(msg)
111119#define modLogInt (msg ) \
112120 do { \
You can’t perform that action at this time.
0 commit comments