aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenrik Alsér <[email protected]>2022-08-30 22:55:53 +0200
committerHenrik Alsér <[email protected]>2022-09-01 15:12:44 +0200
commit99dd2a9386c83f4e625f4c849c8b5e519e12a87c (patch)
treead486447aafec033167a40df89a6c590d1d5ef48
parent6d347af9fae3a9c594e13900796ec57537c402e6 (diff)
Reorder args
-rw-r--r--embassy-rp/src/spi.rs4
-rw-r--r--examples/rp/src/bin/spi_async.rs2
2 files changed, 3 insertions, 3 deletions
diff --git a/embassy-rp/src/spi.rs b/embassy-rp/src/spi.rs
index 11aad6305..6f68777b2 100644
--- a/embassy-rp/src/spi.rs
+++ b/embassy-rp/src/spi.rs
@@ -264,11 +264,11 @@ impl<'d, T: Instance, M: Mode> Spi<'d, T, M> {
264impl<'d, T: Instance> Spi<'d, T, Async> { 264impl<'d, T: Instance> Spi<'d, T, Async> {
265 pub fn new( 265 pub fn new(
266 inner: impl Peripheral<P = T> + 'd, 266 inner: impl Peripheral<P = T> + 'd,
267 tx_dma: impl Peripheral<P = impl Channel> + 'd,
268 rx_dma: impl Peripheral<P = impl Channel> + 'd,
269 clk: impl Peripheral<P = impl ClkPin<T> + 'd> + 'd, 267 clk: impl Peripheral<P = impl ClkPin<T> + 'd> + 'd,
270 mosi: impl Peripheral<P = impl MosiPin<T> + 'd> + 'd, 268 mosi: impl Peripheral<P = impl MosiPin<T> + 'd> + 'd,
271 miso: impl Peripheral<P = impl MisoPin<T> + 'd> + 'd, 269 miso: impl Peripheral<P = impl MisoPin<T> + 'd> + 'd,
270 tx_dma: impl Peripheral<P = impl Channel> + 'd,
271 rx_dma: impl Peripheral<P = impl Channel> + 'd,
272 config: Config, 272 config: Config,
273 ) -> Self { 273 ) -> Self {
274 into_ref!(tx_dma, rx_dma, clk, mosi, miso); 274 into_ref!(tx_dma, rx_dma, clk, mosi, miso);
diff --git a/examples/rp/src/bin/spi_async.rs b/examples/rp/src/bin/spi_async.rs
index 359ad50e7..b2df0dd11 100644
--- a/examples/rp/src/bin/spi_async.rs
+++ b/examples/rp/src/bin/spi_async.rs
@@ -17,7 +17,7 @@ async fn main(_spawner: Spawner) {
17 let mosi = p.PIN_11; 17 let mosi = p.PIN_11;
18 let clk = p.PIN_10; 18 let clk = p.PIN_10;
19 19
20 let mut spi: Spi<'_, _, Async> = Spi::new(p.SPI1, p.DMA_CH0, p.DMA_CH1, clk, mosi, miso, Config::default()); 20 let mut spi: Spi<'_, _, Async> = Spi::new(p.SPI1, clk, mosi, miso, p.DMA_CH0, p.DMA_CH1, Config::default());
21 21
22 loop { 22 loop {
23 let tx_buf = [1_u8, 2, 3, 4, 5, 6]; 23 let tx_buf = [1_u8, 2, 3, 4, 5, 6];