idfxx 1.0.0
Modern C++23 components for ESP-IDF
Loading...
Searching...
No Matches
system.hpp File Reference

System information and control. More...

#include <idfxx/error>
#include <cstddef>
#include <esp_system.h>
#include <string>
#include "sdkconfig.h"

Go to the source code of this file.

Namespaces

namespace  idfxx
 

Enumerations

enum class  idfxx::reset_reason : int {
  idfxx::reset_reason::unknown = 0 ,
  idfxx::reset_reason::power_on = 1 ,
  idfxx::reset_reason::external = 2 ,
  idfxx::reset_reason::software = 3 ,
  idfxx::reset_reason::panic = 4 ,
  idfxx::reset_reason::interrupt_watchdog = 5 ,
  idfxx::reset_reason::task_watchdog = 6 ,
  idfxx::reset_reason::watchdog = 7 ,
  idfxx::reset_reason::deep_sleep = 8 ,
  idfxx::reset_reason::brownout = 9 ,
  idfxx::reset_reason::sdio = 10 ,
  idfxx::reset_reason::usb = 11 ,
  idfxx::reset_reason::jtag = 12 ,
  idfxx::reset_reason::efuse = 13 ,
  idfxx::reset_reason::power_glitch = 14 ,
  idfxx::reset_reason::cpu_lockup = 15
}
 Reason for the most recent chip reset. More...
 

Functions

std::string idfxx::to_string (reset_reason r)
 Returns a string representation of a reset reason.
 
reset_reason idfxx::last_reset_reason () noexcept
 Returns the reason for the most recent chip reset.
 
void idfxx::restart ()
 Restart the chip immediately.
 
void idfxx::register_shutdown_handler (void(*handler)())
 Registers a function to be called during chip shutdown/restart.
 
void idfxx::unregister_shutdown_handler (void(*handler)())
 Unregisters a previously registered shutdown handler.
 
result< voididfxx::try_register_shutdown_handler (void(*handler)())
 Registers a function to be called during chip shutdown/restart.
 
result< voididfxx::try_unregister_shutdown_handler (void(*handler)())
 Unregisters a previously registered shutdown handler.
 
std::size_t idfxx::free_heap_size () noexcept
 Returns the current free heap size in bytes.
 
std::size_t idfxx::free_internal_heap_size () noexcept
 Returns the current free internal heap size in bytes.
 
std::size_t idfxx::minimum_free_heap_size () noexcept
 Returns the minimum free heap size recorded since boot.
 

Detailed Description

System information and control.

Definition in file system.hpp.