OtpRead

Struct OtpRead 

Source
pub struct OtpRead(/* private fields */);
Expand description

OTP memory read register.

Contains the power-up defaults stored in OTP memory.

Implementations§

Source§

impl OtpRead

Source

pub fn otp_fclktrim(&self) -> u8

FCLKTRIM value (0-31).

Factory-programmed clock frequency trim. Do not alter - differs between individual ICs.

Source

pub fn otp_ottrim(&self) -> bool

OTTRIM value.

  • 0: OT=143°C
  • 1: OT=150°C
Source

pub fn otp_internal_rsense(&self) -> bool

Internal Rsense default.

  • true: Internal sense resistors
  • false: External sense resistors
Source

pub fn otp_tbl(&self) -> bool

TBL default.

  • false: TBL=0b10
  • true: TBL=0b01
Source

pub fn otp_pwm_grad(&self) -> u8

PWM_GRAD default (0-15).

Source

pub fn otp_pwm_autograd(&self) -> bool

PWM_AUTOGRAD default.

Source

pub fn otp_tpwmthrs(&self) -> u8

TPWM_THRS default (0-7).

Source

pub fn otp_pwm_ofs(&self) -> bool

PWM_OFS default.

  • false: PWM_OFS=36
  • true: PWM_OFS=0
Source

pub fn otp_pwm_reg(&self) -> bool

PWM_REG default.

  • false: PWM_REG=0b1000
  • true: PWM_REG=0b0010
Source

pub fn otp_pwm_freq(&self) -> bool

PWM_FREQ default.

  • false: PWM_FREQ=0b01
  • true: PWM_FREQ=0b10
Source

pub fn otp_iholddelay(&self) -> u8

IHOLDDELAY default (0-3).

Source

pub fn otp_ihold(&self) -> u8

IHOLD default (0-3).

Source

pub fn otp_en_spreadcycle(&self) -> bool

SpreadCycle enabled by default.

  • true: SpreadCycle mode
  • false: StealthChop mode
Source

pub fn raw(&self) -> u32

Get the raw register value.

Source

pub fn from_raw(value: u32) -> Self

Create from raw value.

Trait Implementations§

Source§

impl Clone for OtpRead

Source§

fn clone(&self) -> OtpRead

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for OtpRead

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for OtpRead

Source§

fn default() -> OtpRead

Returns the “default value” for a type. Read more
Source§

impl Format for OtpRead

Source§

fn format(&self, f: Formatter<'_>)

Writes the defmt representation of self to fmt.
Source§

impl From<OtpRead> for u32

Source§

fn from(reg: OtpRead) -> u32

Converts to this type from the input type.
Source§

impl From<u32> for OtpRead

Source§

fn from(value: u32) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for OtpRead

Source§

fn eq(&self, other: &OtpRead) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Register for OtpRead

Source§

const ADDRESS: Address = Address::OtpRead

The register address.
Source§

fn address() -> Address

Get the register address.
Source§

impl Copy for OtpRead

Source§

impl Eq for OtpRead

Source§

impl ReadableRegister for OtpRead

Source§

impl StructuralPartialEq for OtpRead

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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.