diff options
| author | Jeremiah McCarthy <[email protected]> | 2021-04-07 17:05:04 -0400 |
|---|---|---|
| committer | Jeremiah McCarthy <[email protected]> | 2021-04-07 17:05:04 -0400 |
| commit | 2e2dc7bdc5928dfa027291ca8c6d6792698e5b9a (patch) | |
| tree | 214a1cce724b5726190e6bfe234195fd3c4da772 /src/common | |
| parent | c39b7b8177acbab23e82fee295d5f3205aa9752c (diff) | |
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.
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/tusb_types.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/common/tusb_types.h b/src/common/tusb_types.h index a462b498f..7703ebb7b 100644 --- a/src/common/tusb_types.h +++ b/src/common/tusb_types.h @@ -427,13 +427,17 @@ typedef struct TU_ATTR_PACKED uint8_t bLength; uint8_t bDescriptorType; - struct TU_ATTR_PACKED { - uint8_t bitCanDnload : 1; - uint8_t bitCanUpload : 1; - uint8_t bitManifestationTolerant : 1; - uint8_t bitWillDetach : 1; - uint8_t reserved : 4; - } bmAttributes; + union { + struct TU_ATTR_PACKED { + uint8_t bitCanDnload : 1; + uint8_t bitCanUpload : 1; + uint8_t bitManifestationTolerant : 1; + uint8_t bitWillDetach : 1; + uint8_t reserved : 4; + } bmAttributes; + + uint8_t bAttributes; + }; uint16_t wDetachTimeOut; uint16_t wTransferSize; |
