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>
impl<'a, const N: u8> Disabled<'a, N>
sourcepub fn set_mode(&mut self, mode: Mode)
👎Deprecated since 0.5.5: Use Lpspi::set_mode to change modes while enabled.
pub fn set_mode(&mut self, mode: Mode)
Set the SPI mode for the peripheral
sourcepub fn set_clock_hz(&mut self, source_clock_hz: u32, clock_hz: u32)
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.
sourcepub fn set_watermark(&mut self, direction: Direction, watermark: u8) -> u8
👎Deprecated since 0.5.5: Use Lpspi::set_watermark to change watermark while enabled
pub fn set_watermark(&mut self, direction: Direction, watermark: u8) -> u8
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
.
sourcepub fn set_sample_point(&mut self, sample_point: SamplePoint)
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.