pub struct Spi2Resources<'a> {
pub spi2: AnySpi<'a>,
pub spi2_dma: AnySpiDmaChannel<'a>,
pub sck: AnyPin<'a>,
pub mosi: AnyPin<'a>,
pub miso: AnyPin<'a>,
pub display_cs: AnyPin<'a>,
pub display_dc: AnyPin<'a>,
pub display_rst: AnyPin<'a>,
pub display_bl: AnyPin<'a>,
pub card_cs: AnyPin<'a>,
}Expand description
SPI2 pins + units (Fire27): SCK=GPIO18, MOSI=GPIO23, MISO=GPIO19, display CS=GPIO14 / DC=GPIO27 / RST=GPIO33 / BL=GPIO32, card CS=GPIO4, PDMA SPI2 channel.
Fields§
§spi2: AnySpi<'a>§spi2_dma: AnySpiDmaChannel<'a>§sck: AnyPin<'a>§mosi: AnyPin<'a>§miso: AnyPin<'a>§display_cs: AnyPin<'a>§display_dc: AnyPin<'a>§display_rst: AnyPin<'a>§display_bl: AnyPin<'a>§card_cs: AnyPin<'a>Implementations§
Source§impl Spi2Resources<'static>
impl Spi2Resources<'static>
Sourcepub async fn into_display_only(
self,
dma_rx_buf: DmaRxBuf,
dma_tx_buf: DmaTxBuf,
) -> Result<DisplayBus, DisplayOnlyInitError>
pub async fn into_display_only( self, dma_rx_buf: DmaRxBuf, dma_tx_buf: DmaTxBuf, ) -> Result<DisplayBus, DisplayOnlyInitError>
Bring up the display only on a descriptor-backed SpiDmaBus, with
no SD-card path. The DMA buffers are supplied by the app (TX sized to
the display stripe; RX unused by a write-only panel). The panel is
reset via its GPIO RST pin; the backlight (GPIO32) is driven high on
success and returned in DisplayBus for the caller to keep alive.
Source§impl Spi2Resources<'static>
impl Spi2Resources<'static>
Sourcepub fn into_parts(
self,
dma_rx_buf: DmaRxBuf,
dma_tx_buf: DmaTxBuf,
) -> Result<(Spi2Parts, Output<'static>), ConfigError>
pub fn into_parts( self, dma_rx_buf: DmaRxBuf, dma_tx_buf: DmaTxBuf, ) -> Result<(Spi2Parts, Output<'static>), ConfigError>
Build the DMA bus and the CS/DC/RST/BL outputs. The DMA buffers are
supplied by the app — their sizing is application policy (SD block size
for RX, display strip size for TX). Returns the card CS separately so
the app can wrap it (e.g. a HIL “no SD card” kill-switch) before
Spi2Parts::finish. The backlight starts LOW (no flicker during
panel init); finish turns it on.