diff options
| author | Dario Nieuwenhuis <[email protected]> | 2024-05-21 01:25:49 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2024-05-21 01:25:49 +0200 |
| commit | 45a12fd41f1f6230a4aabbfe87552adc610fdc99 (patch) | |
| tree | 58a666be8741c60b9e3b0d483d761912d2f914ca /examples | |
| parent | 6a508b32101b0af1a77624ef0a22c72c972b1b74 (diff) | |
stm32/i2c: remove peripheral generic param.
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/stm32h7/src/bin/i2c_shared.rs | 5 | ||||
| -rw-r--r-- | examples/stm32l4/src/bin/spe_adin1110_http_server.rs | 2 |
2 files changed, 3 insertions, 4 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; | |||
| 6 | use defmt::*; | 6 | use defmt::*; |
| 7 | use embassy_embedded_hal::shared_bus::blocking::i2c::I2cDevice; | 7 | use embassy_embedded_hal::shared_bus::blocking::i2c::I2cDevice; |
| 8 | use embassy_executor::Spawner; | 8 | use embassy_executor::Spawner; |
| 9 | use embassy_stm32::bind_interrupts; | ||
| 10 | use embassy_stm32::i2c::{self, I2c}; | 9 | use embassy_stm32::i2c::{self, I2c}; |
| 11 | use embassy_stm32::mode::Async; | 10 | use embassy_stm32::mode::Async; |
| 12 | use embassy_stm32::peripherals::{self, I2C1}; | ||
| 13 | use embassy_stm32::time::Hertz; | 11 | use embassy_stm32::time::Hertz; |
| 12 | use embassy_stm32::{bind_interrupts, peripherals}; | ||
| 14 | use embassy_sync::blocking_mutex::NoopMutex; | 13 | use embassy_sync::blocking_mutex::NoopMutex; |
| 15 | use embassy_time::{Duration, Timer}; | 14 | use embassy_time::{Duration, Timer}; |
| 16 | use static_cell::StaticCell; | 15 | use static_cell::StaticCell; |
| @@ -24,7 +23,7 @@ const SHTC3_WAKEUP: [u8; 2] = [0x35, 0x17]; | |||
| 24 | const SHTC3_MEASURE_RH_FIRST: [u8; 2] = [0x5c, 0x24]; | 23 | const SHTC3_MEASURE_RH_FIRST: [u8; 2] = [0x5c, 0x24]; |
| 25 | const SHTC3_SLEEP: [u8; 2] = [0xb0, 0x98]; | 24 | const SHTC3_SLEEP: [u8; 2] = [0xb0, 0x98]; |
| 26 | 25 | ||
| 27 | static I2C_BUS: StaticCell<NoopMutex<RefCell<I2c<'static, I2C1, Async>>>> = StaticCell::new(); | 26 | static I2C_BUS: StaticCell<NoopMutex<RefCell<I2c<'static, Async>>>> = StaticCell::new(); |
| 28 | 27 | ||
| 29 | bind_interrupts!(struct Irqs { | 28 | bind_interrupts!(struct Irqs { |
| 30 | I2C1_EV => i2c::EventInterruptHandler<peripherals::I2C1>; | 29 | I2C1_EV => i2c::EventInterruptHandler<peripherals::I2C1>; |
diff --git a/examples/stm32l4/src/bin/spe_adin1110_http_server.rs b/examples/stm32l4/src/bin/spe_adin1110_http_server.rs index 985ac8171..33149144c 100644 --- a/examples/stm32l4/src/bin/spe_adin1110_http_server.rs +++ b/examples/stm32l4/src/bin/spe_adin1110_http_server.rs | |||
| @@ -60,7 +60,7 @@ pub type SpeSpiCs = ExclusiveDevice<SpeSpi, Output<'static>, Delay>; | |||
| 60 | pub type SpeInt = exti::ExtiInput<'static>; | 60 | pub type SpeInt = exti::ExtiInput<'static>; |
| 61 | pub type SpeRst = Output<'static>; | 61 | pub type SpeRst = Output<'static>; |
| 62 | pub type Adin1110T = ADIN1110<SpeSpiCs>; | 62 | pub type Adin1110T = ADIN1110<SpeSpiCs>; |
| 63 | pub type TempSensI2c = I2c<'static, peripherals::I2C3, Async>; | 63 | pub type TempSensI2c = I2c<'static, Async>; |
| 64 | 64 | ||
| 65 | static TEMP: AtomicI32 = AtomicI32::new(0); | 65 | static TEMP: AtomicI32 = AtomicI32::new(0); |
| 66 | 66 | ||
