nRF5 SDK v14.2.0
Data Fields
app_usbd_config_t Struct Reference

Configuration passed to app_usbd_init. More...

#include <app_usbd.h>

Data Fields

void(* ev_handler )(app_usbd_internal_evt_t const *const p_event)
 User defined event handler. More...
 
void(* ev_isr_handler )(app_usbd_internal_evt_t const *const p_event, bool queued)
 User defined event handler. More...
 
void(* ev_state_proc )(app_usbd_event_type_t event)
 User defined event processor. More...
 
bool enable_sof
 SOF processing required by the user event processing. More...
 

Detailed Description

Configuration passed to app_usbd_init.

Field Documentation

bool app_usbd_config_t::enable_sof

SOF processing required by the user event processing.

This flag would enable SOF processing for the user events regardless of the fact if any of the implemented class requires SOF event.

Note
SOF event would be enabled anyway if any of the appended class requires SOF processing.
void(* app_usbd_config_t::ev_handler)(app_usbd_internal_evt_t const *const p_event)

User defined event handler.

This function is called on every event from the interrupt. It is prepared for external user function that would queue events to be processed from the main context. It should be used with operating systems with its own implementation of the queue.

Parameters
p_eventThe event structure pointer.
Note
This field is available only when USB internal queue is disabled (see APP_USBD_EVENT_QUEUE_ENABLE).
void(* app_usbd_config_t::ev_isr_handler)(app_usbd_internal_evt_t const *const p_event, bool queued)

User defined event handler.

This function is called on every event from the interrupt.

Parameters
p_eventThe event structure pointer.
queuedThe event is visible in the queue. If queue conflict is detected the event might not be accessible inside queue until all write operations finish. See Atomic FIFO for more details.
Note
This field is available only when USBD internal queue is configured (see APP_USBD_EVENT_QUEUE_ENABLE).
If is set to NULL no event would be called from interrupt.
This function is called before event is processed. It means that if the event type is APP_USBD_EVT_DRV_SETUP, there would not be setup field present in the event structure.
void(* app_usbd_config_t::ev_state_proc)(app_usbd_event_type_t event)

User defined event processor.

This function is called while state event is processed.

  • Note
    This field is available only when USBD internal queue is configured (see APP_USBD_EVENT_QUEUE_ENABLE).
    Parameters
    eventEvent type. Only following events are sent into this function:
    • APP_USBD_EVT_DRV_SOF
    • APP_USBD_EVT_DRV_RESET - Note that it also exits suspend
    • APP_USBD_EVT_DRV_SUSPEND
    • APP_USBD_EVT_DRV_RESUME - It is also generated when remote wakeup is generated
    • APP_USBD_EVT_START
    • APP_USBD_EVT_STOP
    • APP_USBD_EVT_STATE_CHANGED

The documentation for this struct was generated from the following file:

Documentation feedback | Developer Zone | Subscribe | Updated