ESPHome 2025.5.0
Loading...
Searching...
No Matches
debug_rp2040.cpp
Go to the documentation of this file.
1#include "debug_component.h"
2#ifdef USE_RP2040
3#include "esphome/core/log.h"
4#include <Arduino.h>
5namespace esphome {
6namespace debug {
7
8static const char *const TAG = "debug";
9
10std::string DebugComponent::get_reset_reason_() { return ""; }
11
12uint32_t DebugComponent::get_free_heap_() { return rp2040.getFreeHeap(); }
13
14void DebugComponent::get_device_info_(std::string &device_info) {
15 ESP_LOGD(TAG, "CPU Frequency: %u", rp2040.f_cpu());
16 device_info += "CPU Frequency: " + to_string(rp2040.f_cpu());
17}
18
20
21} // namespace debug
22} // namespace esphome
23#endif
void get_device_info_(std::string &device_info)
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7
std::string to_string(int value)
Definition helpers.cpp:82