diff options
| author | hathach <[email protected]> | 2020-11-19 21:26:06 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2020-11-19 21:26:06 +0700 |
| commit | dd07fecc5f37c85b87060c7f7158d26ff19757a6 (patch) | |
| tree | 50a3ef387e1abc116a3658894d46cdff6d05d525 /src/device/usbd_control.c | |
| parent | 3c31d0805130e9551f97afae94f765b5d032991b (diff) | |
migrate cdc_device to new control_xfer_cb
Diffstat (limited to 'src/device/usbd_control.c')
| -rw-r--r-- | src/device/usbd_control.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/device/usbd_control.c b/src/device/usbd_control.c index f1edad376..bb631320a 100644 --- a/src/device/usbd_control.c +++ b/src/device/usbd_control.c @@ -171,7 +171,16 @@ bool usbd_control_xfer_cb (uint8_t rhport, uint8_t ep_addr, xfer_result_t result if ( tu_edpt_dir(ep_addr) != _ctrl_xfer.request.bmRequestType_bit.direction ) { TU_ASSERT(0 == xferred_bytes); + + // invoke optional dcd hook if available if (dcd_edpt0_status_complete) dcd_edpt0_status_complete(rhport, &_ctrl_xfer.request); + + if (_ctrl_xfer.complete_cb) + { + // TODO refactor with usbd_driver_print_control_complete_name + _ctrl_xfer.complete_cb(rhport, CONTROL_STAGE_ACK, &_ctrl_xfer.request); + } + return true; } |
