![]() |
nRF5 SDK
v16.0.0
|
| Choose documentation: | nRF5 SDK | S112 SoftDevice API | S113 SoftDevice API | S132 SoftDevice API | S140 SoftDevice API | S212 SoftDevice API | S312 SoftDevice API | S332 SoftDevice API | S340 SoftDevice API |
Class interface function set. More...
#include <app_usbd_class_base.h>
Data Fields | |
| ret_code_t(* | event_handler )(app_usbd_class_inst_t const *const p_inst, app_usbd_complex_evt_t const *const p_event) |
| Instance callback function. More... | |
| bool(* | feed_descriptors )(app_usbd_class_descriptor_ctx_t *p_ctx, app_usbd_class_inst_t const *p_inst, uint8_t *p_buff, size_t max_size) |
| Instance feed descriptors. More... | |
| ret_code_t(* | iface_select )(app_usbd_class_inst_t const *const p_inst, uint8_t iface_idx, uint8_t alternate) |
| Select interface. More... | |
| void(* | iface_deselect )(app_usbd_class_inst_t const *const p_inst, uint8_t iface_idx) |
| Deselect interface. More... | |
| uint8_t(* | iface_selection_get )(app_usbd_class_inst_t const *const p_inst, uint8_t iface_idx) |
| Get current interface. More... | |
Class interface function set.
| ret_code_t(* app_usbd_class_methods_t::event_handler)(app_usbd_class_inst_t const *const p_inst, app_usbd_complex_evt_t const *const p_event) |
Instance callback function.
The function used by every class instance.
| [in,out] | p_inst | Instance of the class. |
| [in] | p_event | Event to process. |
| bool(* app_usbd_class_methods_t::feed_descriptors)(app_usbd_class_descriptor_ctx_t *p_ctx, app_usbd_class_inst_t const *p_inst, uint8_t *p_buff, size_t max_size) |
Instance feed descriptors.
Feeds whole descriptor of the instance.
| [in] | p_ctx | Class descriptor context. |
| [in,out] | p_inst | Instance of the class. |
| [out] | p_buff | Buffer for descriptor. |
| [in] | max_size | Requested size of the descriptor. |
| void(* app_usbd_class_methods_t::iface_deselect)(app_usbd_class_inst_t const *const p_inst, uint8_t iface_idx) |
Deselect interface.
Function called when the class interface has to be deselected.
This function would be called for every interface when:
| [in,out] | p_inst | Instance of the class. |
| [in] | iface_idx | Index of the interface inside class structure. |
| ret_code_t(* app_usbd_class_methods_t::iface_select)(app_usbd_class_inst_t const *const p_inst, uint8_t iface_idx, uint8_t alternate) |
Select interface.
Function called when class interface has to be selected.
This function would be called for every interface when:
| [in,out] | p_inst | Instance of the class |
| [in] | iface_idx | Index of the interface inside class structure |
| [in] | alternate | Alternate setting that should be selected |
| uint8_t(* app_usbd_class_methods_t::iface_selection_get)(app_usbd_class_inst_t const *const p_inst, uint8_t iface_idx) |
Get current interface.
Function called when class interface has to return its alternate settings in reaction on GET_INTERFACE command. It should be defined in a pair with app_usbd_class_methods_t::iface_select.
| [in] | p_inst | Instance of the class. |
| [in] | iface_idx | Index of the interface inside class structure. |