pub enum Chip {
Esp32,
Esp32c2,
Esp32c3,
Esp32c5,
Esp32c6,
Esp32c61,
Esp32h2,
Esp32p4,
Esp32s2,
Esp32s3,
Esp32s31,
}build-script only.Variants§
Implementations§
Source§impl Chip
impl Chip
Sourcepub fn from_cargo_feature() -> Result<Self, &'static str>
pub fn from_cargo_feature() -> Result<Self, &'static str>
Tries to extract the active chip from the active cargo features.
Exactly one device feature must be enabled for this function to succeed.
Sourcepub fn contains(self, symbol: &str) -> bool
pub fn contains(self, symbol: &str) -> bool
Returns whether the chip configuration contains the given symbol.
This function is a short-hand for self.all_symbols().contains(&symbol).
§Example
assert!(Chip::Esp32s3.contains("soc_has_pcnt"));Sourcepub fn define_cfgs(self)
pub fn define_cfgs(self)
Calling this function will define all cfg symbols for the firmware crate to use.
Sourcepub fn all_symbols(&self) -> &'static [&'static str]
pub fn all_symbols(&self) -> &'static [&'static str]
Returns all symbols as a big slice.
§Example
assert!(Chip::Esp32s3.all_symbols().contains("soc_has_pcnt"));Sourcepub fn memory_layout(&self) -> &'static MemoryLayout
pub fn memory_layout(&self) -> &'static MemoryLayout
Returns memory layout information.
Sourcepub fn all_possible_symbols() -> &'static [&'static str]
pub fn all_possible_symbols() -> &'static [&'static str]
Returns the list of all symbols that any supported chip can define.
Unlike Chip::all_symbols, which returns the symbols defined for the
selected chip, this returns the union of the symbols across every chip.
Key-value configurations are returned with the syntax cfg(<symbol>, values(<values>)),
as used by cargo:rustc-check-cfg directives.