ESPHome  2024.12.2
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>
5 namespace esphome {
6 namespace debug {
7 
8 static const char *const TAG = "debug";
9 
10 std::string DebugComponent::get_reset_reason_() { return ""; }
11 
12 uint32_t DebugComponent::get_free_heap_() { return rp2040.getFreeHeap(); }
13 
14 void 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)
std::string to_string(int value)
Definition: helpers.cpp:81
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7