diff options
Diffstat (limited to 'examples/nrf/src/bin/usb_serial_multitask.rs')
| -rw-r--r-- | examples/nrf/src/bin/usb_serial_multitask.rs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/examples/nrf/src/bin/usb_serial_multitask.rs b/examples/nrf/src/bin/usb_serial_multitask.rs index 31e0af483..0e82ba313 100644 --- a/examples/nrf/src/bin/usb_serial_multitask.rs +++ b/examples/nrf/src/bin/usb_serial_multitask.rs | |||
| @@ -60,11 +60,18 @@ async fn main(spawner: Spawner, p: Peripherals) { | |||
| 60 | config.max_power = 100; | 60 | config.max_power = 100; |
| 61 | config.max_packet_size_0 = 64; | 61 | config.max_packet_size_0 = 64; |
| 62 | 62 | ||
| 63 | // Required for windows compatiblity. | ||
| 64 | // https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help | ||
| 65 | config.device_class = 0xEF; | ||
| 66 | config.device_sub_class = 0x02; | ||
| 67 | config.device_protocol = 0x01; | ||
| 68 | config.composite_with_iads = true; | ||
| 69 | |||
| 63 | struct Resources { | 70 | struct Resources { |
| 64 | device_descriptor: [u8; 256], | 71 | device_descriptor: [u8; 256], |
| 65 | config_descriptor: [u8; 256], | 72 | config_descriptor: [u8; 256], |
| 66 | bos_descriptor: [u8; 256], | 73 | bos_descriptor: [u8; 256], |
| 67 | control_buf: [u8; 7], | 74 | control_buf: [u8; 64], |
| 68 | serial_state: State<'static>, | 75 | serial_state: State<'static>, |
| 69 | } | 76 | } |
| 70 | static RESOURCES: Forever<Resources> = Forever::new(); | 77 | static RESOURCES: Forever<Resources> = Forever::new(); |
| @@ -72,7 +79,7 @@ async fn main(spawner: Spawner, p: Peripherals) { | |||
| 72 | device_descriptor: [0; 256], | 79 | device_descriptor: [0; 256], |
| 73 | config_descriptor: [0; 256], | 80 | config_descriptor: [0; 256], |
| 74 | bos_descriptor: [0; 256], | 81 | bos_descriptor: [0; 256], |
| 75 | control_buf: [0; 7], | 82 | control_buf: [0; 64], |
| 76 | serial_state: State::new(), | 83 | serial_state: State::new(), |
| 77 | }); | 84 | }); |
| 78 | 85 | ||
