aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorHenrik Alsér <[email protected]>2022-11-13 01:49:55 +0100
committerHenrik Alsér <[email protected]>2022-11-13 01:49:55 +0100
commitdca11095e2f41d50dbc96d48474a64d9198728c4 (patch)
tree8852d4a647bf4c82e0220cc440d9357609128a80 /examples
parentaf34fc4ccc110bf37165f2b9655585ba3a33889a (diff)
Disable UARTE in embassy-nrf::init
Diffstat (limited to 'examples')
-rw-r--r--examples/nrf/src/bin/spis.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/nrf/src/bin/spis.rs b/examples/nrf/src/bin/spis.rs
index dade5fcbd..fe3b0c53d 100644
--- a/examples/nrf/src/bin/spis.rs
+++ b/examples/nrf/src/bin/spis.rs
@@ -17,9 +17,11 @@ async fn main(_spawner: Spawner) {
17 let mut spis = Spis::new(p.SPI2, irq, p.P0_31, p.P0_29, p.P0_28, p.P0_30, Config::default()); 17 let mut spis = Spis::new(p.SPI2, irq, p.P0_31, p.P0_29, p.P0_28, p.P0_30, Config::default());
18 18
19 loop { 19 loop {
20 let mut buf = [0_u8; 64]; 20 let mut rx_buf = [0_u8; 64];
21 if let Ok(n) = spis.read(&mut buf).await { 21 let tx_buf = [1_u8, 2, 3, 4, 5, 6, 7, 8];
22 info!("RX: {:?}", buf[..n]); 22 if let Ok((n_rx, n_tx)) = spis.transfer(&mut rx_buf, &tx_buf).await {
23 info!("RX: {:?}", rx_buf[..n_rx]);
24 info!("TX: {:?}", tx_buf[..n_tx]);
23 } 25 }
24 } 26 }
25} 27}