nRF5 SDK v15.0.0
Data Fields
app_usbd_hid_methods_t Struct Reference

HID unified interface. More...

#include <app_usbd_hid.h>

Data Fields

ret_code_t(* on_get_report )(app_usbd_class_inst_t const *p_inst, app_usbd_setup_evt_t const *p_setup_ev)
 Function called on HID specific, GetReport request. More...
 
ret_code_t(* on_set_report )(app_usbd_class_inst_t const *p_inst, app_usbd_setup_evt_t const *p_setup_ev)
 Function called on HID specific, SetReport request. More...
 
ret_code_t(* ep_transfer_in )(app_usbd_class_inst_t const *p_inst)
 Function called on IN endpoint transfer. More...
 
ret_code_t(* ep_transfer_out )(app_usbd_class_inst_t const *p_inst)
 Function called on OUT endpoint transfer. More...
 
bool(* feed_subclass_descriptor )(app_usbd_class_descriptor_ctx_t *p_ctx, app_usbd_class_inst_t const *p_inst, uint8_t *buff, size_t max_size, uint8_t index)
 Instance feed subclass descriptor. More...
 

Detailed Description

HID unified interface.

Field Documentation

ret_code_t(* app_usbd_hid_methods_t::ep_transfer_in)(app_usbd_class_inst_t const *p_inst)

Function called on IN endpoint transfer.

This function should trigger next endpoint IN transfer if required.

Parameters
[in]p_instClass instance.
Returns
Standard error code.
ret_code_t(* app_usbd_hid_methods_t::ep_transfer_out)(app_usbd_class_inst_t const *p_inst)

Function called on OUT endpoint transfer.

This function should should read data from OUT endpoint. This function is not required and NULL could be pinned to this handler when class doesn't have OUT endpoint.

Parameters
[in]p_instClass instance.
Returns
Standard error code.
bool(* app_usbd_hid_methods_t::feed_subclass_descriptor)(app_usbd_class_descriptor_ctx_t *p_ctx, app_usbd_class_inst_t const *p_inst, uint8_t *buff, size_t max_size, uint8_t index)

Instance feed subclass descriptor.

Feeds whole descriptor of the instance

Parameters
[in]p_ctxClass descriptor context
[in,out]p_instInstance of the class
[out]buffBuffer for subclass descriptor
[in]max_sizeRequested size of the subclass descriptor
[in]indexIndex of the subclass descriptor
Returns
True if not finished feeding the descriptor, false if done
ret_code_t(* app_usbd_hid_methods_t::on_get_report)(app_usbd_class_inst_t const *p_inst, app_usbd_setup_evt_t const *p_setup_ev)

Function called on HID specific, GetReport request.

This function should trigger data write to control pipe.

Parameters
[in]p_instClass instance.
[in]p_setup_evSetup event.
Returns
Standard error code.
ret_code_t(* app_usbd_hid_methods_t::on_set_report)(app_usbd_class_inst_t const *p_inst, app_usbd_setup_evt_t const *p_setup_ev)

Function called on HID specific, SetReport request.

This function should trigger data read from control pipe. This function is not required and NULL could be pinned to this handler when output report is not defined in report descriptor.

Parameters
[in]p_instClass instance.
[in]p_setup_evSetup event.
Returns
Standard error code.

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

Documentation feedback | Developer Zone | Subscribe | Updated