diff options
| author | William <[email protected]> | 2024-10-28 08:46:07 +0100 |
|---|---|---|
| committer | William <[email protected]> | 2024-10-28 08:46:07 +0100 |
| commit | 76606b6fe040d0735ab8a0e9ac99894de06264c4 (patch) | |
| tree | cecaa759a4fc079b47658c02f5d48a6ce2a6cf0f /examples/stm32u5/src | |
| parent | bfff50a3619be3a9fbc052a70b2e43c95cc5dc42 (diff) | |
Update chip from stm32u585ai to stm32u5g9zj and fix pinout
Diffstat (limited to 'examples/stm32u5/src')
| -rw-r--r-- | examples/stm32u5/src/bin/i2c.rs | 2 | ||||
| -rw-r--r-- | examples/stm32u5/src/bin/usb_serial.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/examples/stm32u5/src/bin/i2c.rs b/examples/stm32u5/src/bin/i2c.rs index 19a78eac9..d5f5d6f60 100644 --- a/examples/stm32u5/src/bin/i2c.rs +++ b/examples/stm32u5/src/bin/i2c.rs | |||
| @@ -13,7 +13,7 @@ const WHOAMI: u8 = 0x0F; | |||
| 13 | #[embassy_executor::main] | 13 | #[embassy_executor::main] |
| 14 | async fn main(_spawner: Spawner) { | 14 | async fn main(_spawner: Spawner) { |
| 15 | let p = embassy_stm32::init(Default::default()); | 15 | let p = embassy_stm32::init(Default::default()); |
| 16 | let mut i2c = I2c::new_blocking(p.I2C2, p.PH4, p.PH5, Hertz(100_000), Default::default()); | 16 | let mut i2c = I2c::new_blocking(p.I2C2, p.PF1, p.PF0, Hertz(100_000), Default::default()); |
| 17 | 17 | ||
| 18 | let mut data = [0u8; 1]; | 18 | let mut data = [0u8; 1]; |
| 19 | unwrap!(i2c.blocking_write_read(HTS221_ADDRESS, &[WHOAMI], &mut data)); | 19 | unwrap!(i2c.blocking_write_read(HTS221_ADDRESS, &[WHOAMI], &mut data)); |
diff --git a/examples/stm32u5/src/bin/usb_serial.rs b/examples/stm32u5/src/bin/usb_serial.rs index 4d56395da..4bb1a6079 100644 --- a/examples/stm32u5/src/bin/usb_serial.rs +++ b/examples/stm32u5/src/bin/usb_serial.rs | |||
| @@ -13,7 +13,7 @@ use embassy_usb::Builder; | |||
| 13 | use panic_probe as _; | 13 | use panic_probe as _; |
| 14 | 14 | ||
| 15 | bind_interrupts!(struct Irqs { | 15 | bind_interrupts!(struct Irqs { |
| 16 | OTG_FS => usb::InterruptHandler<peripherals::USB_OTG_FS>; | 16 | OTG_HS => usb::InterruptHandler<peripherals::USB_OTG_HS>; |
| 17 | }); | 17 | }); |
| 18 | 18 | ||
| 19 | #[embassy_executor::main] | 19 | #[embassy_executor::main] |
| @@ -48,7 +48,7 @@ async fn main(_spawner: Spawner) { | |||
| 48 | // to enable vbus_detection to comply with the USB spec. If you enable it, the board | 48 | // to enable vbus_detection to comply with the USB spec. If you enable it, the board |
| 49 | // has to support it or USB won't work at all. See docs on `vbus_detection` for details. | 49 | // has to support it or USB won't work at all. See docs on `vbus_detection` for details. |
| 50 | config.vbus_detection = false; | 50 | config.vbus_detection = false; |
| 51 | let driver = Driver::new_fs(p.USB_OTG_FS, Irqs, p.PA12, p.PA11, &mut ep_out_buffer, config); | 51 | let driver = Driver::new_hs(p.USB_OTG_HS, Irqs, p.PA12, p.PA11, &mut ep_out_buffer, config); |
| 52 | 52 | ||
| 53 | // Create embassy-usb Config | 53 | // Create embassy-usb Config |
| 54 | let mut config = embassy_usb::Config::new(0xc0de, 0xcafe); | 54 | let mut config = embassy_usb::Config::new(0xc0de, 0xcafe); |
