StatusReg

Struct StatusReg 

Source
pub struct StatusReg(pub u8);

Tuple Fields§

§0: u8

Implementations§

Source§

impl StatusReg

Source

pub fn oc_detected(&self) -> bool

Latching overcurrent detection flag. If the load impedance is below the load-impedance threshold, the device shuts down and periodically attempts to restart until the impedance is above the threshold

Source

pub fn over_temp(&self) -> bool

Latching overtemperature detection flag. If the device becomes too hot, it shuts down. This bit clears upon read.

Source

pub fn feedback_controller_timed_out(&self) -> bool

Contains status for the feedback controller. This indicates when the ERM back-EMF has been zero for more than ~10 ms in ERM mode, and indicates when the LRA frequency tracking has lost frequency lock in LRA mode. This bit is for debug purposes only, and may sometimes be set under normal operation when extensive braking periods are used. This bit will clear upon read.

Source

pub fn diagnostic_result(&self) -> bool

This flag stores the result of the auto-calibration routine and the diagnostic routine. The flag contains the result for whichever routine was executed last. The flag clears upon read. Test result is not valid until the GO bit self- clears at the end of the routine. Auto-calibration mode: 0: Auto-calibration passed (optimum result converged) 1: Auto-calibration failed (result did not converge) Diagnostic mode: 0: Actuator is functioning normally 1: Actuator is not present or is shorted, timing out, or giving out–of-range back-EMF.

Source

pub fn device_id(&self) -> u8

Device identifier. The DEVICE_ID bit indicates the part number to the user. The user software can ascertain the device capabilities by reading this register. 4: DRV2604 (contains RAM, does not contain licensed ROM library) 3: DRV2605 (contains licensed ROM library, does not contain RAM) 6: DRV2604L (low-voltage version of the DRV2604 device) 7: DRV2605L (low-voltage version of the DRV2605 device)

Trait Implementations§

Source§

impl<T> BitRange<T> for StatusReg
where u8: BitRange<T>,

Source§

fn bit_range(&self, msb: usize, lsb: usize) -> T

Get a range of bits.
Source§

impl<T> BitRangeMut<T> for StatusReg
where u8: BitRangeMut<T>,

Source§

fn set_bit_range(&mut self, msb: usize, lsb: usize, value: T)

Set a range of bits.
Source§

impl Debug for StatusReg

Source§

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

Formats the value using the given formatter. Read more

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> Bit for T
where T: BitRange<u8>,

Source§

fn bit(&self, bit: usize) -> bool

Get a single bit.
Source§

impl<T> BitMut for T
where T: BitRangeMut<u8>,

Source§

fn set_bit(&mut self, bit: usize, value: bool)

Set a single bit.
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.