cryptnox-sdk-esp32 1.0.0
ESP32 SDK for Cryptnox Hardware Wallet
Loading...
Searching...
No Matches
ESP32Logger.h
Go to the documentation of this file.
1/*
2 * SPDX-License-Identifier: LGPL-3.0-or-later
3 * Copyright (c) 2026 Cryptnox SA
4 */
5
24
25#ifndef ESP32_LOGGER_H
26#define ESP32_LOGGER_H
27
28#include "CW_Logger.h"
29
48class ESP32Logger : public CW_Logger {
49public:
52
59 bool begin(unsigned long baudRate = 115200UL) override;
60
62
65
74 void print(const __FlashStringHelper *str) override;
75
81 void print(const char *str) override;
82
88 void print(char c) override;
89
97 void print(uint8_t value, int base = DEC) override;
98
105 void print(uint16_t value, int base = DEC) override;
106
113 void print(uint32_t value, int base = DEC) override;
114
123 void print(int value, int base = DEC) override;
124
126
129
133 void println() override;
134
140 void println(const __FlashStringHelper *str) override;
141
147 void println(const char *str) override;
148
154 void println(char c) override;
155
162 void println(uint8_t value, int base = DEC) override;
163
170 void println(uint16_t value, int base = DEC) override;
171
178 void println(uint32_t value, int base = DEC) override;
179
186 void println(int value, int base = DEC) override;
187
189
191 ~ESP32Logger() override {}
192
193private:
194 bool m_initialized = false;
195};
196
197#endif /* ESP32_LOGGER_H */
CW_Logger backed by ESP32 UART0.
Definition ESP32Logger.h:48
bool begin(unsigned long baudRate=115200UL) override
Initialise UART0 at the given baud rate.
void println() override
Print a CR+LF newline sequence.
bool m_initialized
true after a successful begin call.
void print(const __FlashStringHelper *str) override
Print a PROGMEM string.
~ESP32Logger() override
Default destructor.