Gstat

Struct Gstat 

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

Global status register.

Contains status flags that indicate reset, driver errors, and undervoltage. Flags can be cleared by writing 1 to the corresponding bit.

Implementations§

Source§

impl Gstat

Source

pub fn reset(&self) -> bool

Reset flag.

Indicates that the IC has been reset since the last read. All registers have been cleared to reset values.

Source

pub fn clear_reset(&mut self) -> &mut Self

Clear the reset flag by setting it to 1.

Source

pub fn drv_err(&self) -> bool

Driver error flag.

Indicates the driver has been shut down due to overtemperature or short circuit detection. Read DRV_STATUS for details.

Source

pub fn clear_drv_err(&mut self) -> &mut Self

Clear the driver error flag by setting it to 1.

Source

pub fn uv_cp(&self) -> bool

Undervoltage on charge pump.

Indicates an undervoltage condition. The driver is disabled. This flag is not latched and clears automatically.

Source

pub fn has_errors(&self) -> bool

Check if any error flags are set.

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 Gstat

Source§

fn clone(&self) -> Gstat

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 Gstat

Source§

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

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

impl Default for Gstat

Source§

fn default() -> Gstat

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

impl Format for Gstat

Source§

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

Writes the defmt representation of self to fmt.
Source§

impl From<Gstat> for u32

Source§

fn from(reg: Gstat) -> u32

Converts to this type from the input type.
Source§

impl From<u32> for Gstat

Source§

fn from(value: u32) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for Gstat

Source§

fn eq(&self, other: &Gstat) -> 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 Gstat

Source§

const ADDRESS: Address = Address::Gstat

The register address.
Source§

fn address() -> Address

Get the register address.
Source§

impl Copy for Gstat

Source§

impl Eq for Gstat

Source§

impl ReadableRegister for Gstat

Source§

impl StructuralPartialEq for Gstat

Source§

impl WritableRegister for Gstat

Auto Trait Implementations§

§

impl Freeze for Gstat

§

impl RefUnwindSafe for Gstat

§

impl Send for Gstat

§

impl Sync for Gstat

§

impl Unpin for Gstat

§

impl UnwindSafe for Gstat

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.