![]() |
nRF5 SDK
v12.3.0
|
| Choose documentation: | nRF5 SDK | S130 SoftDevice API | S132 SoftDevice API | S212 SoftDevice API | S332 SoftDevice API |
nRF52840 only: Module with types definitions used for standard requests processing. More...
Data Structures | |
| union | app_usbd_setup_w_t |
| Universal way to access 16 bit values and its parts. More... | |
| struct | app_usbd_setup_t |
| Internal redefinition of setup structure. More... | |
Macros | |
| #define | APP_USBD_SETUP_REQ_BF_REC BF_CX(5, 0) |
| Recipient bit-field in request type. More... | |
| #define | APP_USBD_SETUP_REQ_BF_TYP BF_CX(2, 5) |
| Type bit-field in request type. More... | |
| #define | APP_USBD_SETUP_REQ_BF_DIR BF_CX(1, 7) |
| Direction bit-field in request type. More... | |
Functions | |
| static app_usbd_setup_reqrec_t | app_usbd_setup_req_rec (uint8_t bmRequestType) |
| Extract recipient from request type. More... | |
| static app_usbd_setup_reqtype_t | app_usbd_setup_req_typ (uint8_t bmRequestType) |
| Extract type from request type. More... | |
| static app_usbd_setup_reqdir_t | app_usbd_setup_req_dir (uint8_t bmRequestType) |
| Extract direction from request type. More... | |
| static uint8_t | app_usbd_setup_req_val (app_usbd_setup_reqrec_t rec, app_usbd_setup_reqtype_t typ, app_usbd_setup_reqdir_t dir) |
| Make request type value. More... | |
nRF52840 only: Module with types definitions used for standard requests processing.
| #define APP_USBD_SETUP_REQ_BF_DIR BF_CX(1, 7) |
Direction bit-field in request type.
Bit 7
| #define APP_USBD_SETUP_REQ_BF_REC BF_CX(5, 0) |
Recipient bit-field in request type.
Bits 4...0
| #define APP_USBD_SETUP_REQ_BF_TYP BF_CX(2, 5) |
Type bit-field in request type.
Bits 6...5
Direction of setup command.
| Enumerator | |
|---|---|
| APP_USBD_SETUP_REQDIR_OUT |
Host to device |
| APP_USBD_SETUP_REQDIR_IN |
Device to host |
Recipient enumerator.
Request type enumerator.
| Enumerator | |
|---|---|
| APP_USBD_SETUP_REQTYPE_STD |
Standard request |
| APP_USBD_SETUP_REQTYPE_CLASS |
Class specific request |
| APP_USBD_SETUP_REQTYPE_VENDOR |
Vendor specific request |
Standard feature selectors.
Standard features that may be disabled or enabled by APP_USBD_SETUP_STDREQ_CLEAR_FEATURE or APP_USBD_SETUP_STDREQ_SET_FEATURE
Standard requests.
Enumerator for standard requests values
| Enumerator | |
|---|---|
| APP_USBD_SETUP_STDREQ_GET_STATUS |
Targets: Device, Interface, Endpoint Expected SETUP frame format:
|
| APP_USBD_SETUP_STDREQ_CLEAR_FEATURE |
Targets: Device, Interface, Endpoint Expected SETUP frame format:
|
| APP_USBD_SETUP_STDREQ_SET_FEATURE |
Targets: Device, Interface, Endpoint Expected SETUP frame format:
|
| APP_USBD_SETUP_STDREQ_SET_ADDRESS |
Targets: Device Expected SETUP frame format:
|
| APP_USBD_SETUP_STDREQ_GET_DESCRIPTOR |
Targets: Device
|
| APP_USBD_SETUP_STDREQ_SET_DESCRIPTOR |
Not supported - Stall when called. |
| APP_USBD_SETUP_STDREQ_GET_CONFIGURATION |
Target: Device Expected SETUP frame format:
|
| APP_USBD_SETUP_STDREQ_SET_CONFIGURATION |
Target: Device Expected SETUP frame format:
|
| APP_USBD_SETUP_STDREQ_GET_INTERFACE |
Target: Interface Expected SETUP frame format:
|
| APP_USBD_SETUP_STDREQ_SET_INTERFACE |
Target: Interface Expected SETUP frame format:
|
| APP_USBD_SETUP_STDREQ_SYNCH_FRAME |
Target: Endpoint Expected SETUP frame format:
|
|
inlinestatic |
Extract direction from request type.
| [in] | bmRequestType |
|
inlinestatic |
Extract recipient from request type.
| [in] | bmRequestType |
|
inlinestatic |
Extract type from request type.
| [in] | bmRequestType |
|
inlinestatic |
Make request type value.
| [in] | rec | Recipient |
| [in] | typ | Request type |
| [in] | dir | Direction |