Struct esp32_hal::efuse::Efuse[][src]

pub struct Efuse;

Implementations

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]);

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.

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.

Returns the reference voltage for the SAR ADCs in mV on this chip.

If the value is not available in the eFuse, None is returned.

Returns the two point calibration for the ADC1.

The returned tuple is in a form of (low_value, high_value):

  • the low_value represents ADC1 reading at 150mV on this chip
  • the high_value represents ADC1 reading at 850mv on this chip

If the values are not available in the eFuse, function returns None.

Returns the two point calibration for the ADC2.

The returned tuple is in a form of (low_value, high_value):

  • the low_value represents ADC2 reading at 150mV on this chip
  • the high_value represents ADC2 reading at 850mv on this chip

If the values are not available in the eFuse, function returns None.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.