getting rid of Serial.* (1)

This commit is contained in:
folkert van heusden 2024-05-19 20:38:04 +02:00
parent e7f0e18d32
commit e7b7a101e0
Signed by untrusted user who does not match committer: folkert
GPG key ID: 6B6455EDFEED3BD1
5 changed files with 13 additions and 13 deletions

View file

@ -66,7 +66,7 @@ void console_esp32::refresh_virtual_terminal()
void console_esp32::panel_update_thread()
{
Serial.println(F("panel task started"));
DOLOG(info, false, "panel task started");
cpu *const c = b->getCpu();
@ -175,5 +175,5 @@ void console_esp32::panel_update_thread()
}
#endif
Serial.println(F("panel task terminating"));
DOLOG(info, false, "panel task terminating");
}

View file

@ -19,9 +19,9 @@ console_shabadge::console_shabadge(std::atomic_uint32_t *const stop_event, std::
console_esp32(stop_event, io_ports, 296 / 8, 128 / 8)
{
if (epd.Init() != 0)
Serial.println("Init of DEPG0290B01 failed");
printf("Init of DEPG0290B01 failed");
else {
Serial.println("DEPG0290B01 initialized");
printf("DEPG0290B01 initialized");
paint = new Paint(image, 0, 0);

View file

@ -357,7 +357,7 @@ void console::operator()()
uint8_t value = 1;
if (xQueueSend(have_data, &value, portMAX_DELAY) == pdFALSE)
Serial.println("xQueueSend failed");
TRACE("xQueueSend failed");
#else
have_data.notify_all();
#endif

View file

@ -19,15 +19,15 @@
[[ noreturn ]] void error_exit(bool sys_err, const char *format, ...)
{
#if defined(ESP32) || defined(BUILD_FOR_RP2040)
printf("Fatal error: %s\n", format);
#else
int e = errno;
#if !defined(_WIN32) && !defined(ESP32) && !defined(BUILD_FOR_RP2040)
#if !defined(_WIN32)
(void)endwin();
#endif
#if defined(ESP32) || defined(BUILD_FOR_RP2040)
Serial.println(format);
#else
va_list ap;
va_start(ap, format);
@ -36,7 +36,7 @@
if (sys_err == true)
fprintf(stderr, "error: %s (%d)\n", strerror(e), e);
#endif
exit(1);
#endif
}

View file

@ -7,16 +7,16 @@
#include <cstdlib>
#include <cstring>
#include "log.h"
#include "memory.h"
memory::memory(const uint32_t size): size(size)
{
#if defined(ESP32)
Serial.print(F("Memory size (in bytes, decimal): "));
Serial.println(size);
DOLOG(info, false, "Memory size (in bytes, decimal): %d", size);
if (psramFound()) {
Serial.println(F("Using PSRAM"));
DOLOG(info, false, "Using PSRAM");
m = reinterpret_cast<uint8_t *>(ps_malloc(size));