mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #17085 from bergzand/pr/cdcacm/stall_on_no_line_coding
usbus/cdc_acm: Return stall on line coding not supported
This commit is contained in:
commit
1ef44844e0
@ -259,6 +259,11 @@ static int _control_handler(usbus_t *usbus, usbus_handler_t *handler,
|
||||
usbus_cdcacm_device_t *cdcacm = (usbus_cdcacm_device_t*)handler;
|
||||
switch(setup->request) {
|
||||
case USB_CDC_MGNT_REQUEST_SET_LINE_CODING:
|
||||
if (!(cdcacm->coding_cb)) {
|
||||
/* Line coding not supported, return STALL */
|
||||
DEBUG("CDCACM: line coding not supported\n");
|
||||
return -1;
|
||||
}
|
||||
if ((state == USBUS_CONTROL_REQUEST_STATE_OUTDATA) &&
|
||||
(setup->length == sizeof(usb_req_cdcacm_coding_t))) {
|
||||
size_t len = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user