iPXE
Functions
cdc.c File Reference

USB Communications Device Class (CDC) More...

#include <stddef.h>
#include <ipxe/usb.h>
#include <ipxe/cdc.h>

Go to the source code of this file.

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 
struct cdc_union_descriptorcdc_union_descriptor (struct usb_configuration_descriptor *config, struct usb_interface_descriptor *interface)
 Locate CDC union functional descriptor. More...
 

Detailed Description

USB Communications Device Class (CDC)

Definition in file cdc.c.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )

◆ cdc_union_descriptor()

Locate CDC union functional descriptor.

Parameters
configConfiguration descriptor
interfaceInterface descriptor
Return values
descUnion functional descriptor, or NULL if not found

Definition at line 44 of file cdc.c.

45  {
46  struct cdc_union_descriptor *desc;
47 
49  if ( ( desc->header.type == USB_CS_INTERFACE_DESCRIPTOR ) &&
50  ( desc->subtype == CDC_SUBTYPE_UNION ) )
51  return desc;
52  }
53  return NULL;
54 }
#define CDC_SUBTYPE_UNION
Union functional descriptor subtype.
Definition: cdc.h:38
uint64_t desc
Microcode descriptor list physical address.
Definition: ucode.h:12
#define for_each_interface_descriptor(desc, config, interface)
Iterate over all configuration descriptors within an interface descriptor.
Definition: usb.h:379
An object interface.
Definition: interface.h:124
Union functional descriptor.
Definition: cdc.h:28
#define USB_CS_INTERFACE_DESCRIPTOR
A class-specific interface descriptor.
Definition: usb.h:331
#define NULL
NULL pointer (VOID *)
Definition: Base.h:321

References CDC_SUBTYPE_UNION, desc, for_each_interface_descriptor, NULL, and USB_CS_INTERFACE_DESCRIPTOR.