nRF52840 only: All types used by USB Device high level library are defined here. This helps to avoid cross referencing into types in different files. More...
Files | |
file | app_usbd_class_base.h |
Base instance of a USBD class. | |
Data Structures | |
struct | app_usbd_evt_t |
Specific application event structure. More... | |
struct | app_usbd_setup_evt_t |
Specific application event structure with setup structure included. More... | |
union | app_usbd_complex_evt_t |
Complex event variable type. More... | |
union | app_usbd_internal_evt_t |
Internal event variable type. More... | |
struct | app_usbd_class_inst_t |
Macros | |
#define | APP_USBD_BCD_2_MAKE(val) |
Change given value to 2 digits in BCD notation. More... | |
#define | APP_USBD_BCD_VER_MAKE(major, minor) ((APP_USBD_BCD_2_MAKE(major) << 8) | APP_USBD_BCD_2_MAKE(minor)) |
Change given decimal version values to 4 digits in BCD notation. More... | |
Typedefs | |
typedef ret_code_t(* | app_usbd_ep_event_handler_t )(app_usbd_class_inst_t const *const p_inst, app_usbd_complex_evt_t const *const p_event) |
Endpoint callback function. More... | |
Enumerations | |
enum | app_usbd_event_type_t { APP_USBD_EVT_DRV_SOF = NRF_DRV_USBD_EVT_SOF, APP_USBD_EVT_DRV_RESET = NRF_DRV_USBD_EVT_RESET, APP_USBD_EVT_DRV_SUSPEND = NRF_DRV_USBD_EVT_SUSPEND, APP_USBD_EVT_DRV_RESUME = NRF_DRV_USBD_EVT_RESUME, APP_USBD_EVT_DRV_WUREQ = NRF_DRV_USBD_EVT_WUREQ, APP_USBD_EVT_DRV_SETUP = NRF_DRV_USBD_EVT_SETUP, APP_USBD_EVT_DRV_EPTRANSFER = NRF_DRV_USBD_EVT_EPTRANSFER, APP_USBD_EVT_FIRST_APP, APP_USBD_EVT_INST_APPEND = APP_USBD_EVT_FIRST_APP, APP_USBD_EVT_INST_REMOVE, APP_USBD_EVT_STARTED, APP_USBD_EVT_STOPPED, APP_USBD_EVT_STATE_CHANGED, APP_USBD_EVT_FIRST_INTERNAL = 0x80, APP_USBD_EVT_HFCLK_READY = APP_USBD_EVT_FIRST_INTERNAL, APP_USBD_EVT_START_REQ, APP_USBD_EVT_STOP_REQ, APP_USBD_EVT_SUSPEND_REQ, APP_USBD_EVT_WAKEUP_REQ } |
Events codes. More... | |
nRF52840 only: All types used by USB Device high level library are defined here. This helps to avoid cross referencing into types in different files.
#define APP_USBD_BCD_2_MAKE | ( | val | ) |
Change given value to 2 digits in BCD notation.
[in] | val | The decimal value to be converted in the range from 0 to 99. |
#define APP_USBD_BCD_VER_MAKE | ( | major, | |
minor | |||
) | ((APP_USBD_BCD_2_MAKE(major) << 8) | APP_USBD_BCD_2_MAKE(minor)) |
Change given decimal version values to 4 digits in BCD notation.
USB specification uses 4 digits BCD version notation in many descriptors. This macro changes 2 values to 4 BCD digits (one 16 bit value) that describes version in USB standard.
[in] | major | Major version |
[in] | minor | Minor version |
typedef ret_code_t(* app_usbd_ep_event_handler_t)(app_usbd_class_inst_t const *const p_inst, app_usbd_complex_evt_t const *const p_event) |
Endpoint callback function.
The function used by every class instance.
[in,out] | p_inst | Instance of the class |
[in] | p_event | Event to process |
Events codes.
Redefined application event codes
Enumerator | |
---|---|
APP_USBD_EVT_DRV_SOF |
See documentation for NRF_DRV_USBD_EVT_SOF |
APP_USBD_EVT_DRV_RESET |
See documentation for NRF_DRV_USBD_EVT_RESET |
APP_USBD_EVT_DRV_SUSPEND |
See documentation for NRF_DRV_USBD_EVT_SUSPEND |
APP_USBD_EVT_DRV_RESUME |
See documentation for NRF_DRV_USBD_EVT_RESUME |
APP_USBD_EVT_DRV_WUREQ |
See documentation for NRF_DRV_USBD_EVT_WUREQ |
APP_USBD_EVT_DRV_SETUP |
This event type has special structure. See app_usbd_setup_evt_t |
APP_USBD_EVT_DRV_EPTRANSFER |
See documentation for NRF_DRV_USBD_EVT_EPTRANSFER |
APP_USBD_EVT_FIRST_APP |
First application event code - for internal static assert checking |
APP_USBD_EVT_INST_APPEND |
The instance was attached to the library, any configuration action can be done now |
APP_USBD_EVT_INST_REMOVE |
The instance is going to be removed, this event is called just before removing the instance. This removing cannot be stopped. |
APP_USBD_EVT_STARTED |
USBD library has just been started and functional - event passed to all instances, before USBD interrupts have been enabled |
APP_USBD_EVT_STOPPED |
USBD library has just been stopped and is not functional - event passed to all instances, after USBD interrupts have been disabled |
APP_USBD_EVT_STATE_CHANGED |
Informs all the classes that base state has been changed. This event is processed before setup stage that caused the state change finishes (before acknowledging it). |
APP_USBD_EVT_FIRST_INTERNAL |
First internal event, used by the APP library internally. |
APP_USBD_EVT_HFCLK_READY |
High frequency clock started |
APP_USBD_EVT_START_REQ |
Start requested |
APP_USBD_EVT_STOP_REQ |
Stop requested |
APP_USBD_EVT_SUSPEND_REQ |
Suspend request - HFCLK would be released and USBD peripheral clock would be disconnected |
APP_USBD_EVT_WAKEUP_REQ |
Wakeup request - start the whole wakeup generation. |