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_clock_configs(&mut self, timing: ClockConfigs)
pub fn set_clock_configs(&mut self, timing: ClockConfigs)
Set LPSPI timing configurations.
If you’re not sure how to select these timing values, prefer
set_clock_hz.
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.
Sourcepub fn set_peripheral_enable(&mut self, enable: bool)
pub fn set_peripheral_enable(&mut self, enable: bool)
Become an LPSPI peripheral.
By default, the LPSPI driver acts as a controller, driving I/O.
By enabling peripheral functions (true), you can accept
and react to another controller’s I/O. When you’re acting as a
peripheral, you don’t control the clock and chip select lines.