pub struct Efuse;
Available on crate feature
unstable
only.Expand description
A struct representing the eFuse functionality of the chip.
Implementations§
Source§impl Efuse
impl Efuse
Sourcepub fn read_base_mac_address() -> [u8; 6]
pub fn read_base_mac_address() -> [u8; 6]
Reads chip’s MAC address from the eFuse storage.
Sourcepub fn flash_encryption() -> bool
pub fn flash_encryption() -> bool
Get status of SPI boot encryption.
Sourcepub fn rwdt_multiplier() -> u8
pub fn rwdt_multiplier() -> u8
Get the multiplier for the timeout value of the RWDT STAGE 0 register.
Source§impl Efuse
impl Efuse
Sourcepub fn read_field_le<T: AnyBitPattern>(field: EfuseField) -> T
pub fn read_field_le<T: AnyBitPattern>(field: EfuseField) -> T
Read field value in a little-endian order
Sourcepub fn read_field_be<T: AnyBitPattern>(field: EfuseField) -> T
pub fn read_field_be<T: AnyBitPattern>(field: EfuseField) -> T
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 mac_address() -> [u8; 6]
pub fn mac_address() -> [u8; 6]
Get base mac address
By default this reads the base mac address from eFuse, but it can be
overridden by set_mac_address
.