Revise per initial comments

Returns the RT driver to the function state of previous iteration, which
did not support the will_detach.  Behavior should be fine without this
feature.  This removes much of the added bloat to track state, and
handle requests in the APP_DETACH state which is no longer required.

Removes the optional bloat added to the RT driver, such as responding to
GETSTATE requests.

Fixes the DFU Mode to extract the attr bits from the functional
descriptor when opened.

Fixes some incorrect bitwise if checks.

Also, updates some naming of functions to be consistent with the rest of
the library.
This commit is contained in:
Jeremiah McCarthy
2021-04-07 17:05:04 -04:00
parent c39b7b8177
commit 2e2dc7bdc5
9 changed files with 55 additions and 147 deletions

View File

@@ -190,10 +190,10 @@ static usbd_class_driver_t const _usbd_driver[] =
#if CFG_TUD_DFU_MODE
{
DRIVER_NAME("DFU-MODE")
.init = dfu_mode_init,
.reset = dfu_mode_reset,
.open = dfu_mode_open,
.control_xfer_cb = dfu_mode_control_xfer_cb,
.init = dfu_moded_init,
.reset = dfu_moded_reset,
.open = dfu_moded_open,
.control_xfer_cb = dfu_moded_control_xfer_cb,
.xfer_cb = NULL,
.sof = NULL
},
@@ -202,10 +202,10 @@ static usbd_class_driver_t const _usbd_driver[] =
#if CFG_TUD_DFU_RUNTIME_AND_MODE
{
DRIVER_NAME("DFU-RT-MODE")
.init = dfu_init,
.reset = dfu_reset,
.open = dfu_open,
.control_xfer_cb = dfu_control_xfer_cb,
.init = dfu_d_init,
.reset = dfu_d_reset,
.open = dfu_d_open,
.control_xfer_cb = dfu_d_control_xfer_cb,
.xfer_cb = NULL,
.sof = NULL
},