embassy-mcxa

Crates

git

Versions

mcx-a256

Flavors

Watchdog

Struct Watchdog 

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

Watchdog peripheral

Implementations§

Source§

impl<'d> Watchdog<'d>

Source

pub fn new( _peri: Peri<'d, WWDT0>, _irq: impl Binding<WWDT0, InterruptHandler> + 'd, config: Config, ) -> Result<Self, Error>

Create a new WWDT instance. Configure the WWDT, enables the interrupt, set the timeout and or warning value.

§Arguments
  • _peri - The WWDT0 peripheral instance
  • _irq - Interrupt binding for WWDT0
  • `config - WWDT0 config with timeout and optional warning value
Source

pub fn start(&mut self)

Start the watchdog timer with the specified timeout period.

Source

pub fn feed(&self)

Feed the watchdog to prevent timeout.

This must be called periodically before the timeout period expires to prevent the watchdog from triggering a reset or interrupt.

Auto Trait Implementations§

§

impl<'d> Freeze for Watchdog<'d>

§

impl<'d> RefUnwindSafe for Watchdog<'d>

§

impl<'d> Send for Watchdog<'d>

§

impl<'d> Sync for Watchdog<'d>

§

impl<'d> Unpin for Watchdog<'d>

§

impl<'d> !UnwindSafe for Watchdog<'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.