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

Chip model, revision, and hardware feature detection. More...

Namespaces

namespace  idfxx
 

Classes

class  idfxx::chip_info
 Chip identification and hardware information. More...
 

Enumerations

enum class  idfxx::chip_model : int {
  idfxx::chip_model::esp32 = 1 ,
  idfxx::chip_model::esp32s2 = 2 ,
  idfxx::chip_model::esp32s3 = 9 ,
  idfxx::chip_model::esp32c3 = 5 ,
  idfxx::chip_model::esp32c2 = 12 ,
  idfxx::chip_model::esp32c6 = 13 ,
  idfxx::chip_model::esp32h2 = 16 ,
  idfxx::chip_model::esp32p4 = 18 ,
  idfxx::chip_model::esp32c5 = 23 ,
  idfxx::chip_model::esp32c61 = 20
}
 Identifies the ESP chip model. More...
 
enum class  idfxx::chip_feature : uint32_t {
  idfxx::chip_feature::embedded_flash = 1u << 0 ,
  idfxx::chip_feature::wifi = 1u << 1 ,
  idfxx::chip_feature::ble = 1u << 4 ,
  idfxx::chip_feature::bt_classic = 1u << 5 ,
  idfxx::chip_feature::ieee802154 = 1u << 6 ,
  idfxx::chip_feature::embedded_psram = 1u << 7
}
 Hardware feature flags for chip capabilities. More...
 

Functions

std::string idfxx::to_string (chip_model m)
 Returns a string representation of a chip model.
 

Detailed Description

Chip model, revision, and hardware feature detection.

Enumeration Type Documentation

◆ chip_feature

Hardware feature flags for chip capabilities.

Use with idfxx::flags<chip_feature> and bitwise operators.

auto info = idfxx::chip_info::get();
if (info.features().contains(idfxx::chip_feature::wifi)) {
// Chip has WiFi
}
static chip_info get() noexcept
Queries the chip and returns its information.
@ wifi
Chip has 2.4GHz WiFi.
Enumerator
embedded_flash 

Chip has embedded flash memory.

wifi 

Chip has 2.4GHz WiFi.

ble 

Chip has Bluetooth LE.

bt_classic 

Chip has Bluetooth Classic.

ieee802154 

Chip has IEEE 802.15.4 (Zigbee/Thread).

embedded_psram 

Chip has embedded PSRAM.

Definition at line 67 of file chip.hpp.

◆ chip_model

Identifies the ESP chip model.

Enumerator
esp32 

ESP32.

esp32s2 

ESP32-S2.

esp32s3 

ESP32-S3.

esp32c3 

ESP32-C3.

esp32c2 

ESP32-C2.

esp32c6 

ESP32-C6.

esp32h2 

ESP32-H2.

esp32p4 

ESP32-P4.

esp32c5 

ESP32-C5.

esp32c61 

ESP32-C61.

Definition at line 31 of file chip.hpp.

Function Documentation

◆ to_string()

std::string idfxx::to_string ( chip_model  m)

Returns a string representation of a chip model.

Parameters
mThe chip model to convert.
Returns
A descriptive string, e.g. "ESP32-S3", or "unknown(N)" for unrecognized values.