diff options
Diffstat (limited to 'examples/stm32h7/src')
| -rw-r--r-- | examples/stm32h7/src/bin/eth_client.rs | 4 | ||||
| -rw-r--r-- | examples/stm32h7/src/bin/eth_client_mii.rs | 4 | ||||
| -rw-r--r-- | examples/stm32h7/src/bin/usb_serial.rs | 12 |
3 files changed, 9 insertions, 11 deletions
diff --git a/examples/stm32h7/src/bin/eth_client.rs b/examples/stm32h7/src/bin/eth_client.rs index aeb169e19..0639fb99f 100644 --- a/examples/stm32h7/src/bin/eth_client.rs +++ b/examples/stm32h7/src/bin/eth_client.rs | |||
| @@ -64,10 +64,10 @@ async fn main(spawner: Spawner) -> ! { | |||
| 64 | 64 | ||
| 65 | let mac_addr = [0x00, 0x00, 0xDE, 0xAD, 0xBE, 0xEF]; | 65 | let mac_addr = [0x00, 0x00, 0xDE, 0xAD, 0xBE, 0xEF]; |
| 66 | 66 | ||
| 67 | static PACKETS: StaticCell<PacketQueue<16, 16>> = StaticCell::new(); | 67 | static PACKETS: StaticCell<PacketQueue<4, 4>> = StaticCell::new(); |
| 68 | 68 | ||
| 69 | let device = Ethernet::new( | 69 | let device = Ethernet::new( |
| 70 | PACKETS.init(PacketQueue::<16, 16>::new()), | 70 | PACKETS.init(PacketQueue::<4, 4>::new()), |
| 71 | p.ETH, | 71 | p.ETH, |
| 72 | Irqs, | 72 | Irqs, |
| 73 | p.PA1, | 73 | p.PA1, |
diff --git a/examples/stm32h7/src/bin/eth_client_mii.rs b/examples/stm32h7/src/bin/eth_client_mii.rs index de6ea522a..9a52e8d3b 100644 --- a/examples/stm32h7/src/bin/eth_client_mii.rs +++ b/examples/stm32h7/src/bin/eth_client_mii.rs | |||
| @@ -64,10 +64,10 @@ async fn main(spawner: Spawner) -> ! { | |||
| 64 | 64 | ||
| 65 | let mac_addr = [0x00, 0x00, 0xDE, 0xAD, 0xBE, 0xEF]; | 65 | let mac_addr = [0x00, 0x00, 0xDE, 0xAD, 0xBE, 0xEF]; |
| 66 | 66 | ||
| 67 | static PACKETS: StaticCell<PacketQueue<16, 16>> = StaticCell::new(); | 67 | static PACKETS: StaticCell<PacketQueue<4, 4>> = StaticCell::new(); |
| 68 | 68 | ||
| 69 | let device = Ethernet::new_mii( | 69 | let device = Ethernet::new_mii( |
| 70 | PACKETS.init(PacketQueue::<16, 16>::new()), | 70 | PACKETS.init(PacketQueue::<4, 4>::new()), |
| 71 | p.ETH, | 71 | p.ETH, |
| 72 | Irqs, | 72 | Irqs, |
| 73 | p.PA1, | 73 | p.PA1, |
diff --git a/examples/stm32h7/src/bin/usb_serial.rs b/examples/stm32h7/src/bin/usb_serial.rs index 71d0c0a25..1c50fc1c8 100644 --- a/examples/stm32h7/src/bin/usb_serial.rs +++ b/examples/stm32h7/src/bin/usb_serial.rs | |||
| @@ -53,13 +53,11 @@ async fn main(_spawner: Spawner) { | |||
| 53 | let mut ep_out_buffer = [0u8; 256]; | 53 | let mut ep_out_buffer = [0u8; 256]; |
| 54 | let mut config = embassy_stm32::usb::Config::default(); | 54 | let mut config = embassy_stm32::usb::Config::default(); |
| 55 | 55 | ||
| 56 | // Enable vbus_detection | 56 | // Do not enable vbus_detection. This is a safe default that works in all boards. |
| 57 | // Note: some boards don't have this wired up and might not require it, | 57 | // However, if your USB device is self-powered (can stay powered on if USB is unplugged), you need |
| 58 | // as they are powered through usb! | 58 | // to enable vbus_detection to comply with the USB spec. If you enable it, the board |
| 59 | // If you hang on boot, try setting this to "false"! | 59 | // has to support it or USB won't work at all. See docs on `vbus_detection` for details. |
| 60 | // See https://embassy.dev/book/dev/faq.html#_the_usb_examples_are_not_working_on_my_board_is_there_anything_else_i_need_to_configure | 60 | config.vbus_detection = false; |
| 61 | // for more information | ||
| 62 | config.vbus_detection = true; | ||
| 63 | 61 | ||
| 64 | let driver = Driver::new_fs(p.USB_OTG_FS, Irqs, p.PA12, p.PA11, &mut ep_out_buffer, config); | 62 | let driver = Driver::new_fs(p.USB_OTG_FS, Irqs, p.PA12, p.PA11, &mut ep_out_buffer, config); |
| 65 | 63 | ||
