|
|
|
@ -206,10 +206,11 @@ static int cdcacm_control_request(usbd_device *usbd_dev, struct usb_setup_data * |
|
|
|
|
|
|
|
|
|
switch (req->bRequest) { |
|
|
|
|
case USB_CDC_REQ_SET_CONTROL_LINE_STATE: { |
|
|
|
|
/*
|
|
|
|
|
bool dtr = (req->wValue & (1 << 0)) ? true : false; |
|
|
|
|
bool rts = (req->wValue & (1 << 1)) ? true : false; |
|
|
|
|
*/ |
|
|
|
|
if (dtr || rts) { // host opened serial port
|
|
|
|
|
usbd_ep_write_packet(usb_device, 0x82, NULL, 0); // start transmitting
|
|
|
|
|
} |
|
|
|
|
/* this Linux cdc_acm driver requires this to be implemented
|
|
|
|
|
* even though it's optional in the CDC spec, and we don't |
|
|
|
|
* advertise it in the ACM functional descriptor. |
|
|
|
|