aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2022-02-15 16:29:59 +0000
committerGitHub <[email protected]>2022-02-15 16:29:59 +0000
commit59f909e66533097b56093ec55fdd1341dbff6744 (patch)
tree720588304798671a11794cf1d107e0626530d24c /examples
parentd7aea31a859ea3ba0ed3055fcbc5d08a604b6428 (diff)
parentd9aec181a4612ba5ffff4c2a9d1ba762021e3b29 (diff)
Merge #626
626: rp: impl eh1.0 blocking traits r=Dirbaio a=Dirbaio Co-authored-by: Dario Nieuwenhuis <[email protected]>
Diffstat (limited to 'examples')
-rw-r--r--examples/rp/.cargo/config.toml2
-rw-r--r--examples/rp/Cargo.toml2
-rw-r--r--examples/rp/src/bin/spi.rs2
-rw-r--r--examples/rp/src/bin/spi_display.rs4
4 files changed, 5 insertions, 5 deletions
diff --git a/examples/rp/.cargo/config.toml b/examples/rp/.cargo/config.toml
index 1ce57510b..ac54f9693 100644
--- a/examples/rp/.cargo/config.toml
+++ b/examples/rp/.cargo/config.toml
@@ -1,5 +1,5 @@
1[target.'cfg(all(target_arch = "arm", target_os = "none"))'] 1[target.'cfg(all(target_arch = "arm", target_os = "none"))']
2runner = "probe-run-rp --chip RP2040" 2runner = "probe-run --chip RP2040"
3 3
4[build] 4[build]
5target = "thumbv6m-none-eabi" # Cortex-M0 and Cortex-M0+ 5target = "thumbv6m-none-eabi" # Cortex-M0 and Cortex-M0+
diff --git a/examples/rp/Cargo.toml b/examples/rp/Cargo.toml
index b3dfb04dc..c067fbbcf 100644
--- a/examples/rp/Cargo.toml
+++ b/examples/rp/Cargo.toml
@@ -7,7 +7,7 @@ version = "0.1.0"
7 7
8[dependencies] 8[dependencies]
9embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt"] } 9embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt"] }
10embassy-rp = { version = "0.1.0", path = "../../embassy-rp", features = ["defmt"] } 10embassy-rp = { version = "0.1.0", path = "../../embassy-rp", features = ["defmt", "unstable-traits", "nightly", "unstable-pac"] }
11atomic-polyfill = "0.1.5" 11atomic-polyfill = "0.1.5"
12 12
13defmt = "0.3" 13defmt = "0.3"
diff --git a/examples/rp/src/bin/spi.rs b/examples/rp/src/bin/spi.rs
index 71dec94f3..3348dc999 100644
--- a/examples/rp/src/bin/spi.rs
+++ b/examples/rp/src/bin/spi.rs
@@ -34,7 +34,7 @@ async fn main(_spawner: Spawner, p: Peripherals) {
34 loop { 34 loop {
35 cs.set_low(); 35 cs.set_low();
36 let mut buf = [0x90, 0x00, 0x00, 0xd0, 0x00, 0x00]; 36 let mut buf = [0x90, 0x00, 0x00, 0xd0, 0x00, 0x00];
37 spi.transfer(&mut buf); 37 spi.blocking_transfer_in_place(&mut buf).unwrap();
38 cs.set_high(); 38 cs.set_high();
39 39
40 let x = (buf[1] as u32) << 5 | (buf[2] as u32) >> 3; 40 let x = (buf[1] as u32) << 5 | (buf[2] as u32) >> 3;
diff --git a/examples/rp/src/bin/spi_display.rs b/examples/rp/src/bin/spi_display.rs
index 96f0cf378..01149c250 100644
--- a/examples/rp/src/bin/spi_display.rs
+++ b/examples/rp/src/bin/spi_display.rs
@@ -131,7 +131,7 @@ impl<'a> embedded_hal::blocking::spi::Write<u8> for DisplaySpi<'a> {
131 this.display_cs.set_low(); 131 this.display_cs.set_low();
132 this.last_mode = SpiMode::Display; 132 this.last_mode = SpiMode::Display;
133 } 133 }
134 this.spi.write(words); 134 this.spi.write(words).unwrap();
135 Ok(()) 135 Ok(())
136 } 136 }
137} 137}
@@ -147,7 +147,7 @@ impl<'a> embedded_hal::blocking::spi::Transfer<u8> for TouchSpi<'a> {
147 this.display_cs.set_high(); 147 this.display_cs.set_high();
148 this.last_mode = SpiMode::Touch; 148 this.last_mode = SpiMode::Touch;
149 } 149 }
150 this.spi.transfer(words); 150 this.spi.transfer(words).unwrap();
151 Ok(words) 151 Ok(words)
152 } 152 }
153} 153}