pub struct Efuse;
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 get_flash_encryption() -> bool
pub fn get_flash_encryption() -> bool
Get status of SPI boot encryption.
Sourcepub fn get_rwdt_multiplier() -> u8
pub fn get_rwdt_multiplier() -> u8
Get the multiplier for the timeout value of the RWDT STAGE 0 register.
Sourcepub fn get_block_version() -> (u8, u8)
pub fn get_block_version() -> (u8, u8)
Get efuse block version
see https://github.com/espressif/esp-idf/blob/dc016f5987/components/hal/efuse_hal.c#L27-L30
Sourcepub fn get_rtc_calib_version() -> u8
pub fn get_rtc_calib_version() -> u8
Get version of RTC calibration block
Sourcepub fn get_rtc_calib_init_code(_unit: u8, atten: Attenuation) -> Option<u16>
pub fn get_rtc_calib_init_code(_unit: u8, atten: Attenuation) -> Option<u16>
Get ADC initial code for specified attenuation from efuse
Sourcepub fn get_rtc_calib_cal_mv(_unit: u8, atten: Attenuation) -> u16
pub fn get_rtc_calib_cal_mv(_unit: u8, atten: Attenuation) -> u16
Get ADC reference point voltage for specified attenuation in millivolts
Sourcepub fn get_rtc_calib_cal_code(_unit: u8, atten: Attenuation) -> Option<u16>
pub fn get_rtc_calib_cal_code(_unit: u8, atten: Attenuation) -> Option<u16>
Get ADC reference point digital code for specified attenuation
Sourcepub fn major_chip_version() -> u8
pub fn major_chip_version() -> u8
Returns the major hardware revision
Sourcepub fn minor_chip_version() -> u8
pub fn minor_chip_version() -> u8
Returns the minor hardware revision
Sourcepub fn chip_revision() -> u16
pub fn chip_revision() -> u16
Returns the hardware revision
The chip version is calculated using the following formula: MAJOR * 100 + MINOR. (if the result is 1, then version is v0.1)
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
.