aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32h7/src/bin
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2024-05-21 01:25:49 +0200
committerDario Nieuwenhuis <[email protected]>2024-05-21 01:25:49 +0200
commit45a12fd41f1f6230a4aabbfe87552adc610fdc99 (patch)
tree58a666be8741c60b9e3b0d483d761912d2f914ca /examples/stm32h7/src/bin
parent6a508b32101b0af1a77624ef0a22c72c972b1b74 (diff)
stm32/i2c: remove peripheral generic param.
Diffstat (limited to 'examples/stm32h7/src/bin')
-rw-r--r--examples/stm32h7/src/bin/i2c_shared.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/examples/stm32h7/src/bin/i2c_shared.rs b/examples/stm32h7/src/bin/i2c_shared.rs
index 79d213ae4..6f4815582 100644
--- a/examples/stm32h7/src/bin/i2c_shared.rs
+++ b/examples/stm32h7/src/bin/i2c_shared.rs
@@ -6,11 +6,10 @@ use core::cell::RefCell;
6use defmt::*; 6use defmt::*;
7use embassy_embedded_hal::shared_bus::blocking::i2c::I2cDevice; 7use embassy_embedded_hal::shared_bus::blocking::i2c::I2cDevice;
8use embassy_executor::Spawner; 8use embassy_executor::Spawner;
9use embassy_stm32::bind_interrupts;
10use embassy_stm32::i2c::{self, I2c}; 9use embassy_stm32::i2c::{self, I2c};
11use embassy_stm32::mode::Async; 10use embassy_stm32::mode::Async;
12use embassy_stm32::peripherals::{self, I2C1};
13use embassy_stm32::time::Hertz; 11use embassy_stm32::time::Hertz;
12use embassy_stm32::{bind_interrupts, peripherals};
14use embassy_sync::blocking_mutex::NoopMutex; 13use embassy_sync::blocking_mutex::NoopMutex;
15use embassy_time::{Duration, Timer}; 14use embassy_time::{Duration, Timer};
16use static_cell::StaticCell; 15use static_cell::StaticCell;
@@ -24,7 +23,7 @@ const SHTC3_WAKEUP: [u8; 2] = [0x35, 0x17];
24const SHTC3_MEASURE_RH_FIRST: [u8; 2] = [0x5c, 0x24]; 23const SHTC3_MEASURE_RH_FIRST: [u8; 2] = [0x5c, 0x24];
25const SHTC3_SLEEP: [u8; 2] = [0xb0, 0x98]; 24const SHTC3_SLEEP: [u8; 2] = [0xb0, 0x98];
26 25
27static I2C_BUS: StaticCell<NoopMutex<RefCell<I2c<'static, I2C1, Async>>>> = StaticCell::new(); 26static I2C_BUS: StaticCell<NoopMutex<RefCell<I2c<'static, Async>>>> = StaticCell::new();
28 27
29bind_interrupts!(struct Irqs { 28bind_interrupts!(struct Irqs {
30 I2C1_EV => i2c::EventInterruptHandler<peripherals::I2C1>; 29 I2C1_EV => i2c::EventInterruptHandler<peripherals::I2C1>;