pub struct Efuse;
Implementations§
source§impl Efuse
impl Efuse
pub fn read_base_mac_address() -> [u8; 6]
sourcepub fn get_core_count() -> u32
pub fn get_core_count() -> u32
Returns the number of CPUs available on the chip.
While ESP32 chips usually come with two mostly equivalent CPUs (protocol CPU and application CPU), the application CPU is unavailable on some.
sourcepub fn get_max_cpu_frequency() -> Rate<u32, 1, 1>
pub fn get_max_cpu_frequency() -> Rate<u32, 1, 1>
Returns the maximum rated clock of the CPU in MHz.
Note that the actual clock may be lower, depending on the current power configuration of the chip, clock source, and other settings.
sourcepub fn is_bluetooth_enabled() -> bool
pub fn is_bluetooth_enabled() -> bool
Returns the CHIP_VER_DIS_BT eFuse value.
sourcepub fn get_chip_type() -> ChipType
pub fn get_chip_type() -> ChipType
Returns the CHIP_VER_PKG eFuse value.
sourcepub fn get_flash_encryption() -> bool
pub fn get_flash_encryption() -> bool
Get status of SPI boot encryption.
source§impl Efuse
impl Efuse
sourcepub fn read_field_le<T>(field: EfuseField) -> Twhere
T: 'static,
pub fn read_field_le<T>(field: EfuseField) -> Twhere
T: 'static,
Read field value in a little-endian order
sourcepub fn read_field_be<T>(field: EfuseField) -> Twhere
T: 'static,
pub fn read_field_be<T>(field: EfuseField) -> Twhere
T: 'static,
Read field value in a big-endian order
source§impl Efuse
impl Efuse
sourcepub fn set_mac_address(mac: [u8; 6]) -> Result<(), SetMacError>
pub fn set_mac_address(mac: [u8; 6]) -> Result<(), SetMacError>
Set the base mac address
The new value will be returned by read_mac_address
instead of the one
hard-coded in eFuse. This does not persist across device resets.
Can only be called once. Returns Err(
[SetMacError::AlreadySet
])
otherwise.
sourcepub fn get_mac_address() -> [u8; 6]
pub fn get_mac_address() -> [u8; 6]
Get base mac address
By default this reads the base mac address from eFuse, but it can be
overriden by set_mac_address
.