send buffered data when connected to USB CDC ACM serial port
This commit is contained in:
parent
875e0de18b
commit
3a76222050
|
@ -206,10 +206,11 @@ static int cdcacm_control_request(usbd_device *usbd_dev, struct usb_setup_data *
|
||||||
|
|
||||||
switch (req->bRequest) {
|
switch (req->bRequest) {
|
||||||
case USB_CDC_REQ_SET_CONTROL_LINE_STATE: {
|
case USB_CDC_REQ_SET_CONTROL_LINE_STATE: {
|
||||||
/*
|
|
||||||
bool dtr = (req->wValue & (1 << 0)) ? true : false;
|
bool dtr = (req->wValue & (1 << 0)) ? true : false;
|
||||||
bool rts = (req->wValue & (1 << 1)) ? 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
|
/* this Linux cdc_acm driver requires this to be implemented
|
||||||
* even though it's optional in the CDC spec, and we don't
|
* even though it's optional in the CDC spec, and we don't
|
||||||
* advertise it in the ACM functional descriptor.
|
* advertise it in the ACM functional descriptor.
|
||||||
|
|
Loading…
Reference in New Issue