Description of defect
My PC side application needs to send a break signal to the board, but mbed-os will not handle it, and return failure.
I did some changes to the source for just making it return success, but I think it will be wonderful if this can be supported officially.
Related codes:
|
#define CDC_SET_LINE_CODING 0x20 |
|
#define CDC_GET_LINE_CODING 0x21 |
|
#define CDC_SET_CONTROL_LINE_STATE 0x22 |
↑ add the following codes.
#define CDC_SEND_BREAK 0x23
|
/* Only process class-specific requests */ |
|
if (setup->bmRequestType.Type == CLASS_TYPE) { |
|
switch (setup->bRequest) { |
|
case CDC_GET_LINE_CODING: |
|
result = Send; |
|
data = _cdc_line_coding; |
|
size = 7; |
|
break; |
|
case CDC_SET_LINE_CODING: |
|
result = Receive; |
|
data = _cdc_new_line_coding; |
|
size = 7; |
|
break; |
|
case CDC_SET_CONTROL_LINE_STATE: |
|
if (setup->wValue & CLS_DTR) { |
|
_change_terminal_connected(true); |
|
} else { |
|
_change_terminal_connected(false); |
|
} |
|
result = Success; |
|
break; |
|
default: |
|
result = Failure; |
|
break; |
|
} |
|
} |
↑ add a new case in this
switch
case CDC_SEND_BREAK:
/* Do something here */
result = Success;
break;
Target(s) affected by this defect ?
I think all targets affected by this defect.
I'm using Arduino Giga r1 wifi
Toolchain(s) (name and version) displaying this defect ?
I'm using ArduinoCore-mbed v4.0.6
What version of Mbed-os are you using (tag or sha) ?
ArduinoCore-mbed v4.0.6 is based on mbed-os-6.17.0 I think
What version(s) of tools are you using. List all that apply (E.g. mbed-cli)
arduino ide
How is this defect reproduced ?
You should prepare an PC application.
The application will connect to the board by CDC, and at last send CDC_SEND_BREAK request, and the board will response failed because it is not defined.
Description of defect
My PC side application needs to send a break signal to the board, but mbed-os will not handle it, and return failure.
I did some changes to the source for just making it return success, but I think it will be wonderful if this can be supported officially.
Related codes:
mbed-os/drivers/usb/source/USBCDC.cpp
Lines 29 to 31 in f0d9090
↑ add the following codes.
mbed-os/drivers/usb/source/USBCDC.cpp
Lines 218 to 243 in f0d9090
↑ add a new case in this
switchTarget(s) affected by this defect ?
I think all targets affected by this defect.
I'm using Arduino Giga r1 wifi
Toolchain(s) (name and version) displaying this defect ?
I'm using ArduinoCore-mbed v4.0.6
What version of Mbed-os are you using (tag or sha) ?
ArduinoCore-mbed v4.0.6 is based on mbed-os-6.17.0 I think
What version(s) of tools are you using. List all that apply (E.g. mbed-cli)
arduino ide
How is this defect reproduced ?
You should prepare an PC application.
The application will connect to the board by CDC, and at last send
CDC_SEND_BREAKrequest, and the board will response failed because it is not defined.