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/stm32h7/src | |
| parent | 47bac9df70492cd9c1b1f8617c1abc1209ee3338 (diff) | |
| parent | 3efc3eee5700d2a39e397f1b1b821885301c0862 (diff) | |
Merge pull request #2200 from barnabywalters/asynci2cv1
Implemented async I2C for v1
Diffstat (limited to 'examples/stm32h7/src')
| -rw-r--r-- | examples/stm32h7/src/bin/camera.rs | 3 | ||||
| -rw-r--r-- | examples/stm32h7/src/bin/i2c.rs | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/examples/stm32h7/src/bin/camera.rs b/examples/stm32h7/src/bin/camera.rs index 23ece1c38..489fb03dd 100644 --- a/examples/stm32h7/src/bin/camera.rs +++ b/examples/stm32h7/src/bin/camera.rs | |||
| @@ -19,7 +19,8 @@ const HEIGHT: usize = 100; | |||
| 19 | static mut FRAME: [u32; WIDTH * HEIGHT / 2] = [0u32; WIDTH * HEIGHT / 2]; | 19 | static mut FRAME: [u32; WIDTH * HEIGHT / 2] = [0u32; WIDTH * HEIGHT / 2]; |
| 20 | 20 | ||
| 21 | bind_interrupts!(struct Irqs { | 21 | bind_interrupts!(struct Irqs { |
| 22 | I2C1_EV => i2c::InterruptHandler<peripherals::I2C1>; | 22 | I2C1_EV => i2c::EventInterruptHandler<peripherals::I2C1>; |
| 23 | I2C1_ER => i2c::ErrorInterruptHandler<peripherals::I2C1>; | ||
| 23 | DCMI => dcmi::InterruptHandler<peripherals::DCMI>; | 24 | DCMI => dcmi::InterruptHandler<peripherals::DCMI>; |
| 24 | }); | 25 | }); |
| 25 | 26 | ||
diff --git a/examples/stm32h7/src/bin/i2c.rs b/examples/stm32h7/src/bin/i2c.rs index 9aa0ca08b..aea21ec6f 100644 --- a/examples/stm32h7/src/bin/i2c.rs +++ b/examples/stm32h7/src/bin/i2c.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] |
