aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32l5
diff options
context:
space:
mode:
authorAdam Greig <[email protected]>2024-03-23 00:11:05 +0000
committerAdam Greig <[email protected]>2024-03-23 00:35:15 +0000
commit7cf6490fbaea88410c91755f57cf8703806ab4a1 (patch)
tree0c40346604eb25a5eefb538d814d434fdd8a0ef0 /examples/stm32l5
parentc2aa95016a6891782bf4e04d7c78e30bcb3afd9c (diff)
usb: remove device_descriptor buffer, store bytes in UsbDevice.inner instead
Diffstat (limited to 'examples/stm32l5')
-rw-r--r--examples/stm32l5/src/bin/usb_ethernet.rs2
-rw-r--r--examples/stm32l5/src/bin/usb_hid_mouse.rs2
-rw-r--r--examples/stm32l5/src/bin/usb_serial.rs2
3 files changed, 0 insertions, 6 deletions
diff --git a/examples/stm32l5/src/bin/usb_ethernet.rs b/examples/stm32l5/src/bin/usb_ethernet.rs
index dc1e7022d..7f73fd677 100644
--- a/examples/stm32l5/src/bin/usb_ethernet.rs
+++ b/examples/stm32l5/src/bin/usb_ethernet.rs
@@ -79,14 +79,12 @@ async fn main(spawner: Spawner) {
79 config.device_protocol = 0x01; 79 config.device_protocol = 0x01;
80 80
81 // Create embassy-usb DeviceBuilder using the driver and config. 81 // Create embassy-usb DeviceBuilder using the driver and config.
82 static DEVICE_DESC: StaticCell<[u8; 256]> = StaticCell::new();
83 static CONFIG_DESC: StaticCell<[u8; 256]> = StaticCell::new(); 82 static CONFIG_DESC: StaticCell<[u8; 256]> = StaticCell::new();
84 static BOS_DESC: StaticCell<[u8; 256]> = StaticCell::new(); 83 static BOS_DESC: StaticCell<[u8; 256]> = StaticCell::new();
85 static CONTROL_BUF: StaticCell<[u8; 128]> = StaticCell::new(); 84 static CONTROL_BUF: StaticCell<[u8; 128]> = StaticCell::new();
86 let mut builder = Builder::new( 85 let mut builder = Builder::new(
87 driver, 86 driver,
88 config, 87 config,
89 &mut DEVICE_DESC.init([0; 256])[..],
90 &mut CONFIG_DESC.init([0; 256])[..], 88 &mut CONFIG_DESC.init([0; 256])[..],
91 &mut BOS_DESC.init([0; 256])[..], 89 &mut BOS_DESC.init([0; 256])[..],
92 &mut [], // no msos descriptors 90 &mut [], // no msos descriptors
diff --git a/examples/stm32l5/src/bin/usb_hid_mouse.rs b/examples/stm32l5/src/bin/usb_hid_mouse.rs
index b86fba455..9d30205bb 100644
--- a/examples/stm32l5/src/bin/usb_hid_mouse.rs
+++ b/examples/stm32l5/src/bin/usb_hid_mouse.rs
@@ -51,7 +51,6 @@ async fn main(_spawner: Spawner) {
51 51
52 // Create embassy-usb DeviceBuilder using the driver and config. 52 // Create embassy-usb DeviceBuilder using the driver and config.
53 // It needs some buffers for building the descriptors. 53 // It needs some buffers for building the descriptors.
54 let mut device_descriptor = [0; 256];
55 let mut config_descriptor = [0; 256]; 54 let mut config_descriptor = [0; 256];
56 let mut bos_descriptor = [0; 256]; 55 let mut bos_descriptor = [0; 256];
57 let mut control_buf = [0; 64]; 56 let mut control_buf = [0; 64];
@@ -62,7 +61,6 @@ async fn main(_spawner: Spawner) {
62 let mut builder = Builder::new( 61 let mut builder = Builder::new(
63 driver, 62 driver,
64 config, 63 config,
65 &mut device_descriptor,
66 &mut config_descriptor, 64 &mut config_descriptor,
67 &mut bos_descriptor, 65 &mut bos_descriptor,
68 &mut [], // no msos descriptors 66 &mut [], // no msos descriptors
diff --git a/examples/stm32l5/src/bin/usb_serial.rs b/examples/stm32l5/src/bin/usb_serial.rs
index 5e2378b58..a64bda31b 100644
--- a/examples/stm32l5/src/bin/usb_serial.rs
+++ b/examples/stm32l5/src/bin/usb_serial.rs
@@ -47,7 +47,6 @@ async fn main(_spawner: Spawner) {
47 47
48 // Create embassy-usb DeviceBuilder using the driver and config. 48 // Create embassy-usb DeviceBuilder using the driver and config.
49 // It needs some buffers for building the descriptors. 49 // It needs some buffers for building the descriptors.
50 let mut device_descriptor = [0; 256];
51 let mut config_descriptor = [0; 256]; 50 let mut config_descriptor = [0; 256];
52 let mut bos_descriptor = [0; 256]; 51 let mut bos_descriptor = [0; 256];
53 let mut control_buf = [0; 7]; 52 let mut control_buf = [0; 7];
@@ -57,7 +56,6 @@ async fn main(_spawner: Spawner) {
57 let mut builder = Builder::new( 56 let mut builder = Builder::new(
58 driver, 57 driver,
59 config, 58 config,
60 &mut device_descriptor,
61 &mut config_descriptor, 59 &mut config_descriptor,
62 &mut bos_descriptor, 60 &mut bos_descriptor,
63 &mut [], // no msos descriptors 61 &mut [], // no msos descriptors