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.

Detailed Description

USB Communications Device Class (CDC)

Definition in file cdc.c.


Function Documentation

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )
struct cdc_union_descriptor* cdc_union_descriptor ( struct usb_configuration_descriptor config,
struct usb_interface_descriptor interface 
) [read]

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.

References CDC_SUBTYPE_UNION, for_each_interface_descriptor, cdc_union_descriptor::header, NULL, cdc_union_descriptor::subtype, usb_descriptor_header::type, and USB_CS_INTERFACE_DESCRIPTOR.

                                                                    {
        struct cdc_union_descriptor *desc;

        for_each_interface_descriptor ( desc, config, interface ) {
                if ( ( desc->header.type == USB_CS_INTERFACE_DESCRIPTOR ) &&
                     ( desc->subtype == CDC_SUBTYPE_UNION ) )
                        return desc;
        }
        return NULL;
}