diff options
| author | Dario Nieuwenhuis <[email protected]> | 2023-11-24 23:08:47 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-11-24 23:08:47 +0000 |
| commit | f5c9e3baa6615928f948cf9ae4c03123d2d84cbc (patch) | |
| tree | d753f3aa382534b952c23d39ece6821146439105 /examples/stm32l4/src | |
| parent | 47bac9df70492cd9c1b1f8617c1abc1209ee3338 (diff) | |
| parent | 3efc3eee5700d2a39e397f1b1b821885301c0862 (diff) | |
Merge pull request #2200 from barnabywalters/asynci2cv1
Implemented async I2C for v1
Diffstat (limited to 'examples/stm32l4/src')
| -rw-r--r-- | examples/stm32l4/src/bin/i2c.rs | 3 | ||||
| -rw-r--r-- | examples/stm32l4/src/bin/i2c_blocking_async.rs | 3 | ||||
| -rw-r--r-- | examples/stm32l4/src/bin/i2c_dma.rs | 3 | ||||
| -rw-r--r-- | examples/stm32l4/src/bin/spe_adin1110_http_server.rs | 3 |
4 files changed, 8 insertions, 4 deletions
diff --git a/examples/stm32l4/src/bin/i2c.rs b/examples/stm32l4/src/bin/i2c.rs index d0060d20c..07dc12e8c 100644 --- a/examples/stm32l4/src/bin/i2c.rs +++ b/examples/stm32l4/src/bin/i2c.rs | |||
| @@ -14,7 +14,8 @@ const ADDRESS: u8 = 0x5F; | |||
| 14 | const WHOAMI: u8 = 0x0F; | 14 | const WHOAMI: u8 = 0x0F; |
| 15 | 15 | ||
| 16 | bind_interrupts!(struct Irqs { | 16 | bind_interrupts!(struct Irqs { |
| 17 | I2C2_EV => i2c::InterruptHandler<peripherals::I2C2>; | 17 | I2C2_EV => i2c::EventInterruptHandler<peripherals::I2C2>; |
| 18 | I2C2_ER => i2c::ErrorInterruptHandler<peripherals::I2C2>; | ||
| 18 | }); | 19 | }); |
| 19 | 20 | ||
| 20 | #[embassy_executor::main] | 21 | #[embassy_executor::main] |
diff --git a/examples/stm32l4/src/bin/i2c_blocking_async.rs b/examples/stm32l4/src/bin/i2c_blocking_async.rs index eca59087b..60a4e2eb3 100644 --- a/examples/stm32l4/src/bin/i2c_blocking_async.rs +++ b/examples/stm32l4/src/bin/i2c_blocking_async.rs | |||
| @@ -16,7 +16,8 @@ const ADDRESS: u8 = 0x5F; | |||
| 16 | const WHOAMI: u8 = 0x0F; | 16 | const WHOAMI: u8 = 0x0F; |
| 17 | 17 | ||
| 18 | bind_interrupts!(struct Irqs { | 18 | bind_interrupts!(struct Irqs { |
| 19 | I2C2_EV => i2c::InterruptHandler<peripherals::I2C2>; | 19 | I2C2_EV => i2c::EventInterruptHandler<peripherals::I2C2>; |
| 20 | I2C2_ER => i2c::ErrorInterruptHandler<peripherals::I2C2>; | ||
| 20 | }); | 21 | }); |
| 21 | 22 | ||
| 22 | #[embassy_executor::main] | 23 | #[embassy_executor::main] |
diff --git a/examples/stm32l4/src/bin/i2c_dma.rs b/examples/stm32l4/src/bin/i2c_dma.rs index cf6f3da67..4c2c224a6 100644 --- a/examples/stm32l4/src/bin/i2c_dma.rs +++ b/examples/stm32l4/src/bin/i2c_dma.rs | |||
| @@ -13,7 +13,8 @@ const ADDRESS: u8 = 0x5F; | |||
| 13 | const WHOAMI: u8 = 0x0F; | 13 | const WHOAMI: u8 = 0x0F; |
| 14 | 14 | ||
| 15 | bind_interrupts!(struct Irqs { | 15 | bind_interrupts!(struct Irqs { |
| 16 | I2C2_EV => i2c::InterruptHandler<peripherals::I2C2>; | 16 | I2C2_EV => i2c::EventInterruptHandler<peripherals::I2C2>; |
| 17 | I2C2_ER => i2c::ErrorInterruptHandler<peripherals::I2C2>; | ||
| 17 | }); | 18 | }); |
| 18 | 19 | ||
| 19 | #[embassy_executor::main] | 20 | #[embassy_executor::main] |
diff --git a/examples/stm32l4/src/bin/spe_adin1110_http_server.rs b/examples/stm32l4/src/bin/spe_adin1110_http_server.rs index 3a7e5370c..4826e0bed 100644 --- a/examples/stm32l4/src/bin/spe_adin1110_http_server.rs +++ b/examples/stm32l4/src/bin/spe_adin1110_http_server.rs | |||
| @@ -40,7 +40,8 @@ use static_cell::make_static; | |||
| 40 | use {embassy_stm32 as hal, panic_probe as _}; | 40 | use {embassy_stm32 as hal, panic_probe as _}; |
| 41 | 41 | ||
| 42 | bind_interrupts!(struct Irqs { | 42 | bind_interrupts!(struct Irqs { |
| 43 | I2C3_EV => i2c::InterruptHandler<peripherals::I2C3>; | 43 | I2C3_EV => i2c::EventInterruptHandler<peripherals::I2C3>; |
| 44 | I2C3_ER => i2c::ErrorInterruptHandler<peripherals::I2C3>; | ||
| 44 | RNG => rng::InterruptHandler<peripherals::RNG>; | 45 | RNG => rng::InterruptHandler<peripherals::RNG>; |
| 45 | }); | 46 | }); |
| 46 | 47 | ||
