pub enum Chip {
Esp32,
Esp32c2,
Esp32c3,
Esp32c6,
Esp32h2,
Esp32s2,
Esp32s3,
}
Available on crate feature
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"));
Trait Implementations§
impl Copy for Chip
impl Eq for Chip
impl StructuralPartialEq for Chip
Auto Trait Implementations§
impl Freeze for Chip
impl RefUnwindSafe for Chip
impl Send for Chip
impl Sync for Chip
impl Unpin for Chip
impl UnwindSafe for Chip
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)