diff options
| author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2023-01-02 22:51:58 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-01-02 22:51:58 +0000 |
| commit | a6b52bde58069ba266a7f7902ee4acc063ce8e92 (patch) | |
| tree | c06750bbf3696d20c9ccb167dc9f1265f1de43c0 /embassy-usb | |
| parent | 42f1b3ac74f451230f657bbe148efce7b9924577 (diff) | |
| parent | 4e0d563997017492aa46025e8809653c14e0f875 (diff) | |
Merge #1130
1130: USB serial (CDC-ACM) improvements r=Dirbaio a=timokroeger
* Remove unused call management descriptor
* Set flag for supported capabilities
The rp `usb_serial` example still works with windows hosts.
Co-authored-by: Timo Kröger <[email protected]>
Diffstat (limited to 'embassy-usb')
| -rw-r--r-- | embassy-usb/src/class/cdc_acm.rs | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/embassy-usb/src/class/cdc_acm.rs b/embassy-usb/src/class/cdc_acm.rs index 09bb1cc8d..84db20621 100644 --- a/embassy-usb/src/class/cdc_acm.rs +++ b/embassy-usb/src/class/cdc_acm.rs | |||
| @@ -18,7 +18,6 @@ const CDC_PROTOCOL_NONE: u8 = 0x00; | |||
| 18 | 18 | ||
| 19 | const CS_INTERFACE: u8 = 0x24; | 19 | const CS_INTERFACE: u8 = 0x24; |
| 20 | const CDC_TYPE_HEADER: u8 = 0x00; | 20 | const CDC_TYPE_HEADER: u8 = 0x00; |
| 21 | const CDC_TYPE_CALL_MANAGEMENT: u8 = 0x01; | ||
| 22 | const CDC_TYPE_ACM: u8 = 0x02; | 21 | const CDC_TYPE_ACM: u8 = 0x02; |
| 23 | const CDC_TYPE_UNION: u8 = 0x06; | 22 | const CDC_TYPE_UNION: u8 = 0x06; |
| 24 | 23 | ||
| @@ -186,7 +185,10 @@ impl<'d, D: Driver<'d>> CdcAcmClass<'d, D> { | |||
| 186 | CS_INTERFACE, | 185 | CS_INTERFACE, |
| 187 | &[ | 186 | &[ |
| 188 | CDC_TYPE_ACM, // bDescriptorSubtype | 187 | CDC_TYPE_ACM, // bDescriptorSubtype |
| 189 | 0x00, // bmCapabilities | 188 | 0x02, // bmCapabilities: |
| 189 | // D1: Device supports the request combination of | ||
| 190 | // Set_Line_Coding, Set_Control_Line_State, Get_Line_Coding, | ||
| 191 | // and the Notification Serial_State. | ||
| 190 | ], | 192 | ], |
| 191 | ); | 193 | ); |
| 192 | alt.descriptor( | 194 | alt.descriptor( |
| @@ -197,14 +199,6 @@ impl<'d, D: Driver<'d>> CdcAcmClass<'d, D> { | |||
| 197 | data_if.into(), // bSubordinateInterface | 199 | data_if.into(), // bSubordinateInterface |
| 198 | ], | 200 | ], |
| 199 | ); | 201 | ); |
| 200 | alt.descriptor( | ||
| 201 | CS_INTERFACE, | ||
| 202 | &[ | ||
| 203 | CDC_TYPE_CALL_MANAGEMENT, // bDescriptorSubtype | ||
| 204 | 0x00, // bmCapabilities | ||
| 205 | data_if.into(), // bDataInterface | ||
| 206 | ], | ||
| 207 | ); | ||
| 208 | 202 | ||
| 209 | let comm_ep = alt.endpoint_interrupt_in(8, 255); | 203 | let comm_ep = alt.endpoint_interrupt_in(8, 255); |
| 210 | 204 | ||
