Struct imxrt_hal::lpspi::Disabled

source ·
pub struct Disabled<'a, const N: u8> { /* private fields */ }
Expand description

An LPSPI peripheral which is temporarily disabled.

Implementations§

source§

impl<'a, const N: u8> Disabled<'a, N>

source

pub fn set_mode(&mut self, mode: Mode)

👎Deprecated since 0.5.5: Use Lpspi::set_mode to change modes while enabled.

Set the SPI mode for the peripheral

source

pub fn set_clock_hz(&mut self, source_clock_hz: u32, clock_hz: u32)

Set the LPSPI clock speed (Hz).

source_clock_hz is the LPSPI peripheral clock speed. To specify the peripheral clock, see the ccm::lpspi_clk documentation.

source

pub fn set_watermark(&mut self, direction: Direction, watermark: u8) -> u8

👎Deprecated since 0.5.5: Use Lpspi::set_watermark to change watermark while enabled

Set the watermark level for a given direction.

Returns the watermark level committed to the hardware. This may be different than the supplied watermark, since it’s limited by the hardware.

When direction == Direction::Rx, the receive data flag is set whenever the number of words in the receive FIFO is greater than watermark.

When direction == Direction::Tx, the transmit data flag is set whenever the the number of words in the transmit FIFO is less than, or equal, to watermark.

source

pub fn set_sample_point(&mut self, sample_point: SamplePoint)

Set the sampling point of the LPSPI peripheral.

When set to SamplePoint::DelayedEdge, the LPSPI will sample the input data on a delayed LPSPI_SCK edge, which improves the setup time when sampling data.

Trait Implementations§

source§

impl<const N: u8> Drop for Disabled<'_, N>

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl<'a, const N: u8> Freeze for Disabled<'a, N>

§

impl<'a, const N: u8> !RefUnwindSafe for Disabled<'a, N>

§

impl<'a, const N: u8> !Send for Disabled<'a, N>

§

impl<'a, const N: u8> !Sync for Disabled<'a, N>

§

impl<'a, const N: u8> Unpin for Disabled<'a, N>

§

impl<'a, const N: u8> !UnwindSafe for Disabled<'a, N>

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>,

§

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>,

§

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.