mirror of
https://github.com/esphome/esphome.git
synced 2026-03-04 03:38:20 -07:00
separate debug component for each platform in different file (#6715)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
23
esphome/components/debug/debug_rp2040.cpp
Normal file
23
esphome/components/debug/debug_rp2040.cpp
Normal file
@@ -0,0 +1,23 @@
|
||||
#include "debug_component.h"
|
||||
#ifdef USE_RP2040
|
||||
#include "esphome/core/log.h"
|
||||
#include <Arduino.h>
|
||||
namespace esphome {
|
||||
namespace debug {
|
||||
|
||||
static const char *const TAG = "debug";
|
||||
|
||||
std::string DebugComponent::get_reset_reason_() { return ""; }
|
||||
|
||||
uint32_t DebugComponent::get_free_heap_() { return rp2040.getFreeHeap(); }
|
||||
|
||||
void DebugComponent::get_device_info_(std::string &device_info) {
|
||||
ESP_LOGD(TAG, "CPU Frequency: %u", rp2040.f_cpu());
|
||||
device_info += "CPU Frequency: " + to_string(rp2040.f_cpu());
|
||||
}
|
||||
|
||||
void DebugComponent::update_platform_() {}
|
||||
|
||||
} // namespace debug
|
||||
} // namespace esphome
|
||||
#endif
|
||||
Reference in New Issue
Block a user