Struct esp32c2_hal::efuse::Efuse
source · pub struct Efuse;
Implementations§
source§impl Efuse
impl Efuse
sourcepub fn get_mac_address() -> [u8; 6]
pub fn get_mac_address() -> [u8; 6]
Reads chip’s MAC address from the eFuse storage.
Example
let mac_address = Efuse::get_mac_address();
writeln!(
serial_tx,
"MAC: {:#X}:{:#X}:{:#X}:{:#X}:{:#X}:{:#X}",
mac_address[0],
mac_address[1],
mac_address[2],
mac_address[3],
mac_address[4],
mac_address[5]
);
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
see https://github.com/espressif/esp-idf/blob/903af13e8/components/efuse/esp32c2/esp_efuse_rtc_calib.c#L14
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
see https://github.com/espressif/esp-idf/blob/903af13e8/components/efuse/esp32c2/esp_efuse_rtc_calib.c#L27
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
see https://github.com/espressif/esp-idf/blob/903af13e8/components/efuse/esp32c2/esp_efuse_rtc_calib.c#L65
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
see https://github.com/espressif/esp-idf/blob/903af13e8/components/efuse/esp32c2/esp_efuse_rtc_calib.c#L65
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