iPXE
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)
 FILE_SECBOOT (PERMITTED)
struct cdc_union_descriptor * cdc_union_descriptor (struct usb_configuration_descriptor *config, struct usb_interface_descriptor *interface)
 Locate CDC union functional descriptor.

Detailed Description

USB Communications Device Class (CDC)

Definition in file cdc.c.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )

◆ FILE_SECBOOT()

FILE_SECBOOT ( PERMITTED )

◆ cdc_union_descriptor()

struct cdc_union_descriptor * cdc_union_descriptor ( struct usb_configuration_descriptor * config,
struct usb_interface_descriptor * interface )

Locate CDC union functional descriptor.

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

Definition at line 45 of file cdc.c.

46 {
48
50 if ( ( desc->header.type == USB_CS_INTERFACE_DESCRIPTOR ) &&
51 ( desc->subtype == CDC_SUBTYPE_UNION ) )
52 return desc;
53 }
54 return NULL;
55}
#define NULL
NULL pointer (VOID *)
Definition Base.h:322
#define CDC_SUBTYPE_UNION
Union functional descriptor subtype.
Definition cdc.h:39
struct ena_llq_option desc
Descriptor counts.
Definition ena.h:9
#define for_each_interface_descriptor(desc, config, interface)
Iterate over all configuration descriptors within an interface descriptor.
Definition usb.h:394
#define USB_CS_INTERFACE_DESCRIPTOR
A class-specific interface descriptor.
Definition usb.h:346
Union functional descriptor.
Definition cdc.h:29
An object interface.
Definition interface.h:125

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