summaryrefslogtreecommitdiff
path: root/src/class
diff options
context:
space:
mode:
authorReinhard Panhuber <[email protected]>2021-03-10 19:33:11 +0100
committerReinhard Panhuber <[email protected]>2021-03-10 19:33:11 +0100
commit8cb3bd3cd30172d3023facb2522a435b414a3b7e (patch)
tree1bc65aa35561cc43f4fab139a3a6e2654b110faa /src/class
parentd5a5a1cab63e8e43b22f13db95df35afdfa6befb (diff)
parenta397353916db36d925f5aec654fc66d5ca09f427 (diff)
Merge remote-tracking branch 'upstream/edpt_ISO_xfer' into edpt_ISO_xfer
Diffstat (limited to 'src/class')
-rw-r--r--src/class/cdc/cdc_device.c11
-rw-r--r--src/class/cdc/cdc_device.h3
-rw-r--r--src/class/midi/midi_device.c1
3 files changed, 15 insertions, 0 deletions
diff --git a/src/class/cdc/cdc_device.c b/src/class/cdc/cdc_device.c
index c679dc71e..18919c486 100644
--- a/src/class/cdc/cdc_device.c
+++ b/src/class/cdc/cdc_device.c
@@ -396,6 +396,17 @@ bool cdcd_control_xfer_cb(uint8_t rhport, uint8_t stage, tusb_control_request_t
if ( tud_cdc_line_state_cb ) tud_cdc_line_state_cb(itf, dtr, rts);
}
break;
+ case CDC_REQUEST_SEND_BREAK:
+ if (stage == CONTROL_STAGE_SETUP)
+ {
+ tud_control_status(rhport, request);
+ }
+ else if (stage == CONTROL_STAGE_ACK)
+ {
+ TU_LOG2(" Send Break\r\n");
+ if ( tud_cdc_send_break_cb ) tud_cdc_send_break_cb(itf, request->wValue);
+ }
+ break;
default: return false; // stall unsupported request
}
diff --git a/src/class/cdc/cdc_device.h b/src/class/cdc/cdc_device.h
index 62dcd3c0a..0885922c6 100644
--- a/src/class/cdc/cdc_device.h
+++ b/src/class/cdc/cdc_device.h
@@ -145,6 +145,9 @@ TU_ATTR_WEAK void tud_cdc_line_state_cb(uint8_t itf, bool dtr, bool rts);
// Invoked when line coding is change via SET_LINE_CODING
TU_ATTR_WEAK void tud_cdc_line_coding_cb(uint8_t itf, cdc_line_coding_t const* p_line_coding);
+// Invoked when received send break
+TU_ATTR_WEAK void tud_cdc_send_break_cb(uint8_t itf, uint16_t duration_ms);
+
//--------------------------------------------------------------------+
// Inline Functions
//--------------------------------------------------------------------+
diff --git a/src/class/midi/midi_device.c b/src/class/midi/midi_device.c
index c61bad17c..73536a8b0 100644
--- a/src/class/midi/midi_device.c
+++ b/src/class/midi/midi_device.c
@@ -387,6 +387,7 @@ uint16_t midid_open(uint8_t rhport, tusb_desc_interface_t const * desc_itf, uint
p_midi->ep_out = ep_addr;
}
+ // Class Specific MIDI Stream endpoint descriptor
drv_len += tu_desc_len(p_desc);
p_desc = tu_desc_next(p_desc);