Commit Graph

19 Commits

Author SHA1 Message Date
hathach d10326cb4e rename TUSB_OPT_DEVICE_ENABLED to CFG_TUD_ENABLED
TUSB_OPT_DEVICE_ENABLED still usable for backward compatible
2022-02-25 18:35:21 +07:00
hathach daca9e520b wrap up DFU update 2021-07-15 20:47:50 +07:00
hathach 9736e54734
include clean up 2021-05-27 17:40:39 +07:00
Jeremiah McCarthy 88dea7a0a8 Move debug from .h to .c 2021-04-22 15:02:50 -04:00
Jeremiah McCarthy 7b45b38fe4 Remove DFU mode and rt 2021-04-12 11:17:01 -04:00
Jeremiah McCarthy 2e2dc7bdc5 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.
2021-04-07 17:05:04 -04:00
Jeremiah McCarthy c39b7b8177 Add DFU runtime and mode "class"
With the runtime and mode portions in separate classes, a single
application should only be building with one or the other enabled.  In
some applications both might be desired at build time.

The CFG_TUD_DFU_RUNTIME_AND_MODE option creates a DFU class, which asks
the application which mode to initialize to.  This allows a runtime
change between RT and DFU mode, by just reinitializing tusb.
2021-04-05 17:52:33 -04:00
Jeremiah McCarthy c5b8ef1529 Separate DFU RT and Mode. Untested 2021-04-05 16:32:58 -04:00
Jeremiah McCarthy 164d3e82e3 Fix incorrect DNLOAD request len passed to app
Fixes bug where the app callback was getting the length of the status
request transfer rather than the length of the data stage payload.

TODO: Right now this returns the expected length, when it really should
be returning the transfer length.
2021-04-05 11:13:42 -04:00
Jeremiah McCarthy fb7b47cf07 Minor cleanup 2021-03-26 17:32:03 -04:00
Jeremiah McCarthy 1138f8cc70 Add DFU Class per Version 1.1 Spec 2021-03-26 15:30:43 -04:00
hathach e12c25ec2c rename dfu_rt to dfu_runtime for easy reading
also rename tud_dfu_rt_reboot_to_dfu to tud_dfu_runtime_reboot_to_dfu_cb
2021-02-11 12:05:22 +07:00
hathach 3cc1979adb migrate dfu runtime device to new control xfer cb 2020-11-20 15:42:32 +07:00
hathach 12a145b27d fix dfu-rt to response to SET_INTERFACE and DFU_GETSTATUS
fix #450
2020-07-01 01:33:02 +07:00
hathach fb214f7cf7 rename to drv_len to be consistent 2020-05-28 13:57:49 +07:00
hathach 2eeeda1bcf
change signature for dfu runtime 2020-05-28 00:46:32 +07:00
hathach 3ef6e33533
use class driver open() for interface support detection
tested with dfu_runtime
2020-04-15 01:00:37 +07:00
hathach fe1eadf177 fix #229 2019-11-27 12:34:30 +07:00
Sylvain Munaut ec4ecfa817 Add support for DFU Runtime class for devices
This is really just a few descriptors and then answering to the
request from the host to reboot into DFU mode.

That latter part is delegated to the app since this is platform
specific.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2019-10-28 16:11:08 +01:00