aboutsummaryrefslogtreecommitdiff
path: root/examples/nrf/src/bin/usb_serial.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/nrf/src/bin/usb_serial.rs')
-rw-r--r--examples/nrf/src/bin/usb_serial.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/examples/nrf/src/bin/usb_serial.rs b/examples/nrf/src/bin/usb_serial.rs
index bc41c2acf..2551c4ba1 100644
--- a/examples/nrf/src/bin/usb_serial.rs
+++ b/examples/nrf/src/bin/usb_serial.rs
@@ -43,12 +43,19 @@ async fn main(_spawner: Spawner, p: Peripherals) {
43 config.max_power = 100; 43 config.max_power = 100;
44 config.max_packet_size_0 = 64; 44 config.max_packet_size_0 = 64;
45 45
46 // Required for windows compatiblity.
47 // https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help
48 config.device_class = 0xEF;
49 config.device_sub_class = 0x02;
50 config.device_protocol = 0x01;
51 config.composite_with_iads = true;
52
46 // Create embassy-usb DeviceBuilder using the driver and config. 53 // Create embassy-usb DeviceBuilder using the driver and config.
47 // It needs some buffers for building the descriptors. 54 // It needs some buffers for building the descriptors.
48 let mut device_descriptor = [0; 256]; 55 let mut device_descriptor = [0; 256];
49 let mut config_descriptor = [0; 256]; 56 let mut config_descriptor = [0; 256];
50 let mut bos_descriptor = [0; 256]; 57 let mut bos_descriptor = [0; 256];
51 let mut control_buf = [0; 7]; 58 let mut control_buf = [0; 64];
52 59
53 let mut state = State::new(); 60 let mut state = State::new();
54 61