Public Attributes | List of all members
udi_api_t Struct Reference

UDI API. More...

#include <udi.h>

Public Attributes

void(* disable )(void)
 Disable the interface. More...
 
bool(* enable )(void)
 Enable the interface. More...
 
uint8_t(* getsetting )(void)
 Returns the current setting of the selected interface. More...
 
bool(* setup )(void)
 Handle a control request directed at an interface. More...
 
void(* sof_notify )(void)
 To signal that a SOF is occurred. More...
 

Detailed Description

UDI API.

The callbacks within this structure are called only by USB Device Controller (UDC)

The udc_get_interface_desc() can be use by UDI to know the interface descriptor selected by UDC.

Definition at line 64 of file udi.h.

Member Data Documentation

◆ disable

void(* udi_api_t::disable) (void)

Disable the interface.

This function is called when this interface is currently active, and

  • the host selects any configuration through a Set Configuration request, or
  • the host issues a USB reset, or
  • the device is detached from the host (i.e. Vbus is no longer present)

Definition at line 88 of file udi.h.

◆ enable

bool(* udi_api_t::enable) (void)

Enable the interface.

This function is called when the host selects a configuration to which this interface belongs through a Set Configuration request, and when the host selects an alternate setting of this interface through a Set Interface request.

Returns
1 if function was successfully done, otherwise 0.

Definition at line 75 of file udi.h.

◆ getsetting

uint8_t(* udi_api_t::getsetting) (void)

Returns the current setting of the selected interface.

This function is called when UDC when know alternate setting of selected interface.

Returns
alternate setting of selected interface

Definition at line 110 of file udi.h.

◆ setup

bool(* udi_api_t::setup) (void)

Handle a control request directed at an interface.

This function is called when this interface is currently active and the host sends a SETUP request with this interface as the recipient.

Use udd_g_ctrlreq to decode and response to SETUP request.

Returns
1 if this interface supports the SETUP request, otherwise 0.

Definition at line 101 of file udi.h.

◆ sof_notify

void(* udi_api_t::sof_notify) (void)

To signal that a SOF is occurred.

Definition at line 115 of file udi.h.


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


inertial_sense_ros
Author(s):
autogenerated on Sat Sep 19 2020 03:19:10