aboutsummaryrefslogtreecommitdiff
path: root/embassy-rp/src
diff options
context:
space:
mode:
authorAlex Strandberg <[email protected]>2025-11-24 17:03:29 -0500
committerAlex Strandberg <[email protected]>2025-11-24 20:21:24 -0500
commit883a998b8da7274d1c157157d5a5d4110904a93c (patch)
tree4d5a3a9eed1856f3f65f4c81d6f80d48c205dccb /embassy-rp/src
parenta66d9f6bea6b6e55ba3dfe0f3b86152402e47d3f (diff)
embassy-rp: add support for TX-only, no SCK SPI
Diffstat (limited to 'embassy-rp/src')
-rw-r--r--embassy-rp/src/spi.rs25
1 files changed, 25 insertions, 0 deletions
diff --git a/embassy-rp/src/spi.rs b/embassy-rp/src/spi.rs
index d9410e78d..39f128214 100644
--- a/embassy-rp/src/spi.rs
+++ b/embassy-rp/src/spi.rs
@@ -308,6 +308,11 @@ impl<'d, T: Instance> Spi<'d, T, Blocking> {
308 ) 308 )
309 } 309 }
310 310
311 /// Create an SPI driver in blocking mode supporting writes only, without SCK pin.
312 pub fn new_blocking_txonly_nosck(inner: Peri<'d, T>, mosi: Peri<'d, impl MosiPin<T> + 'd>, config: Config) -> Self {
313 Self::new_inner(inner, None, Some(mosi.into()), None, None, None, None, config)
314 }
315
311 /// Create an SPI driver in blocking mode supporting reads only. 316 /// Create an SPI driver in blocking mode supporting reads only.
312 pub fn new_blocking_rxonly( 317 pub fn new_blocking_rxonly(
313 inner: Peri<'d, T>, 318 inner: Peri<'d, T>,
@@ -371,6 +376,26 @@ impl<'d, T: Instance> Spi<'d, T, Async> {
371 ) 376 )
372 } 377 }
373 378
379 /// Create an SPI driver in async mode supporting DMA write operations only,
380 /// without SCK pin.
381 pub fn new_txonly_nosck(
382 inner: Peri<'d, T>,
383 mosi: Peri<'d, impl MosiPin<T> + 'd>,
384 tx_dma: Peri<'d, impl Channel>,
385 config: Config,
386 ) -> Self {
387 Self::new_inner(
388 inner,
389 None,
390 Some(mosi.into()),
391 None,
392 None,
393 Some(tx_dma.into()),
394 None,
395 config,
396 )
397 }
398
374 /// Create an SPI driver in async mode supporting DMA read operations only. 399 /// Create an SPI driver in async mode supporting DMA read operations only.
375 pub fn new_rxonly( 400 pub fn new_rxonly(
376 inner: Peri<'d, T>, 401 inner: Peri<'d, T>,