# usb_func_iface_ops Struct Reference

USB device interface driver operations. More...

`#include <function_core.h>`

## Data Fields
int(* | enable )(struct udc *udc, struct usb_func_iface *iface)
| Enable an interface.
void(* | disable )(struct udc *udc, struct usb_func_iface *iface)
| Disable an interface.
int(* | setup )(struct udc *udc, struct usb_func_iface *iface, struct usb_setup_req *req)
| Handle a control request directed at an interface.

## Detailed Description

USB device interface driver operations.

Definition at line 54 of file function_core.h.

## Field Documentation

void(* usb_func_iface_ops::disable)(struct udc *udc, struct usb_func_iface *iface)

Disable an interface.

Parameters:

  | udc | The USB Device Controller.
  | iface | The interface to be disabled.

Referenced by usb_func_set_interface().

int(* usb_func_iface_ops::enable)(struct udc *udc, struct usb_func_iface *iface)

Enable an interface.

Parameters:

  | udc | The USB Device Controller.
  | iface | The interface to be enabled.

Return values:

  | 0 | The interface was successfully enabled.
  | <0 | The interface could not be enabled.

Referenced by usb_func_set_interface().

int(* usb_func_iface_ops::setup)(struct udc *udc, struct usb_func_iface *iface, struct usb_setup_req *req)

Handle a control request directed at an interface.

Parameters:

  | udc | The USB Device Controller.
  | iface | The interface which the request is for.
  | req | The SETUP packet.

Return values:

  | 0 | The control request was successfully handled.
  | <0 | The control request was not handled, and the default control endpoint should be halted.

Referenced by usb_func_process_setup_request().

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

- include/usb/function_core.h