Extends UART change at runtime to ESP8266 (#6019)

This commit is contained in:
Edward Firmo
2024-01-09 09:45:46 +09:00
committed by GitHub
parent e3d146ee44
commit 2bb5343d27
3 changed files with 35 additions and 4 deletions
+2 -2
View File
@@ -122,7 +122,7 @@ class UARTComponent {
// @return Baud rate in bits per second.
uint32_t get_baud_rate() const { return baud_rate_; }
#ifdef USE_ESP32
#if defined(USE_ESP8266) || defined(USE_ESP32)
/**
* Load the UART settings.
* @param dump_config If true (default), output the new settings to logs; otherwise, change settings quietly.
@@ -147,7 +147,7 @@ class UARTComponent {
* This will load the current UART interface with the latest settings (baud_rate, parity, etc).
*/
virtual void load_settings(){};
#endif // USE_ESP32
#endif // USE_ESP8266 || USE_ESP32
#ifdef USE_UART_DEBUGGER
void add_debug_callback(std::function<void(UARTDirection, uint8_t)> &&callback) {