aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2022-04-24 22:46:45 +0200
committerDario Nieuwenhuis <[email protected]>2022-04-24 22:46:45 +0200
commitd409026b95c24c1582e17d3f40daea2b75cb9304 (patch)
treeeb92a11c250eee2797e14357a8baf5172d9d9dec
parentd57fd87ba77f923953e5b4d401c8cf39c45b0842 (diff)
examples/nrf: add product strings to all usb examples.
-rw-r--r--examples/nrf/src/bin/usb_hid_keyboard.rs4
-rw-r--r--examples/nrf/src/bin/usb_hid_mouse.rs5
-rw-r--r--examples/nrf/src/bin/usb_serial.rs7
-rw-r--r--examples/nrf/src/bin/usb_serial_multitask.rs7
4 files changed, 17 insertions, 6 deletions
diff --git a/examples/nrf/src/bin/usb_hid_keyboard.rs b/examples/nrf/src/bin/usb_hid_keyboard.rs
index 9fa7ab334..3852dd8da 100644
--- a/examples/nrf/src/bin/usb_hid_keyboard.rs
+++ b/examples/nrf/src/bin/usb_hid_keyboard.rs
@@ -59,8 +59,8 @@ async fn main(_spawner: Spawner, p: Peripherals) {
59 59
60 // Create embassy-usb Config 60 // Create embassy-usb Config
61 let mut config = Config::new(0xc0de, 0xcafe); 61 let mut config = Config::new(0xc0de, 0xcafe);
62 config.manufacturer = Some("Tactile Engineering"); 62 config.manufacturer = Some("Embassy");
63 config.product = Some("Testy"); 63 config.product = Some("HID keyboard example");
64 config.serial_number = Some("12345678"); 64 config.serial_number = Some("12345678");
65 config.max_power = 100; 65 config.max_power = 100;
66 config.max_packet_size_0 = 64; 66 config.max_packet_size_0 = 64;
diff --git a/examples/nrf/src/bin/usb_hid_mouse.rs b/examples/nrf/src/bin/usb_hid_mouse.rs
index 92aeffda2..e70dc51a5 100644
--- a/examples/nrf/src/bin/usb_hid_mouse.rs
+++ b/examples/nrf/src/bin/usb_hid_mouse.rs
@@ -39,10 +39,11 @@ async fn main(_spawner: Spawner, p: Peripherals) {
39 39
40 // Create embassy-usb Config 40 // Create embassy-usb Config
41 let mut config = Config::new(0xc0de, 0xcafe); 41 let mut config = Config::new(0xc0de, 0xcafe);
42 config.manufacturer = Some("Tactile Engineering"); 42 config.manufacturer = Some("Embassy");
43 config.product = Some("Testy"); 43 config.product = Some("HID mouse example");
44 config.serial_number = Some("12345678"); 44 config.serial_number = Some("12345678");
45 config.max_power = 100; 45 config.max_power = 100;
46 config.max_packet_size_0 = 64;
46 47
47 // Create embassy-usb DeviceBuilder using the driver and config. 48 // Create embassy-usb DeviceBuilder using the driver and config.
48 // It needs some buffers for building the descriptors. 49 // It needs some buffers for building the descriptors.
diff --git a/examples/nrf/src/bin/usb_serial.rs b/examples/nrf/src/bin/usb_serial.rs
index 6081ee917..bc41c2acf 100644
--- a/examples/nrf/src/bin/usb_serial.rs
+++ b/examples/nrf/src/bin/usb_serial.rs
@@ -36,7 +36,12 @@ async fn main(_spawner: Spawner, p: Peripherals) {
36 let driver = Driver::new(p.USBD, irq); 36 let driver = Driver::new(p.USBD, irq);
37 37
38 // Create embassy-usb Config 38 // Create embassy-usb Config
39 let config = Config::new(0xc0de, 0xcafe); 39 let mut config = Config::new(0xc0de, 0xcafe);
40 config.manufacturer = Some("Embassy");
41 config.product = Some("USB-serial example");
42 config.serial_number = Some("12345678");
43 config.max_power = 100;
44 config.max_packet_size_0 = 64;
40 45
41 // Create embassy-usb DeviceBuilder using the driver and config. 46 // Create embassy-usb DeviceBuilder using the driver and config.
42 // It needs some buffers for building the descriptors. 47 // It needs some buffers for building the descriptors.
diff --git a/examples/nrf/src/bin/usb_serial_multitask.rs b/examples/nrf/src/bin/usb_serial_multitask.rs
index d4b3000e7..31e0af483 100644
--- a/examples/nrf/src/bin/usb_serial_multitask.rs
+++ b/examples/nrf/src/bin/usb_serial_multitask.rs
@@ -53,7 +53,12 @@ async fn main(spawner: Spawner, p: Peripherals) {
53 let driver = Driver::new(p.USBD, irq); 53 let driver = Driver::new(p.USBD, irq);
54 54
55 // Create embassy-usb Config 55 // Create embassy-usb Config
56 let config = Config::new(0xc0de, 0xcafe); 56 let mut config = Config::new(0xc0de, 0xcafe);
57 config.manufacturer = Some("Embassy");
58 config.product = Some("USB-serial example");
59 config.serial_number = Some("12345678");
60 config.max_power = 100;
61 config.max_packet_size_0 = 64;
57 62
58 struct Resources { 63 struct Resources {
59 device_descriptor: [u8; 256], 64 device_descriptor: [u8; 256],