Skip to main content

EfuseDriver

Struct EfuseDriver 

Source
pub struct EfuseDriver<'d> { /* private fields */ }
Expand description

eFuse controller driver.

Implementations§

Source§

impl<'d> EfuseDriver<'d>

Source

pub fn new(efuse: Efuse<'d>) -> Self

Create a new eFuse driver.

Source

pub fn set_clock_period(&mut self, period: u8)

Set the eFuse clock period (cycles). The SDK uses 0x29 @ 24 MHz TCXO and 0x19 @ 40 MHz; call before any read/program.

Source

pub fn status(&self) -> EfuseStatus

Read the boot-done status register.

Source

pub fn read_byte(&mut self, byte_addr: u16) -> Result<u8, EfuseError>

Read a single eFuse byte at byte_addr.

Arms read mode (0x5A5A), then loads the latched word from the data window and extracts the requested byte. No delay is required for reads (matches hal_efuse_read_byte).

Source

pub fn read_buffer( &mut self, start_byte: u16, buf: &mut [u8], ) -> Result<(), EfuseError>

Read buf.len() consecutive eFuse bytes starting at start_byte.

Source

pub fn write_byte( &mut self, byte_addr: u16, value: u8, ) -> Result<(), EfuseError>

Program a single eFuse byte (one-time, irreversible).

Sequence (per hal_efuse_write_operation): arm write mode (0xA5A5), raise AVDD, settle, write the packed byte to the window, lower AVDD, settle. eFuse bits can only be burned 0→1; this does not erase.

Not validated on silicon — treat as experimental.

Auto Trait Implementations§

§

impl<'d> Freeze for EfuseDriver<'d>

§

impl<'d> RefUnwindSafe for EfuseDriver<'d>

§

impl<'d> Send for EfuseDriver<'d>

§

impl<'d> Sync for EfuseDriver<'d>

§

impl<'d> Unpin for EfuseDriver<'d>

§

impl<'d> UnsafeUnpin for EfuseDriver<'d>

§

impl<'d> UnwindSafe for EfuseDriver<'d>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.