1/** 2 * \brief this file contains definitions for parsing the USB descriptors 3 */ 4 5/* 6 * Copyright (c) 2007-2013 ETH Zurich. 7 * All rights reserved. 8 * 9 * This file is distributed under the terms in the attached LICENSE file. 10 * If you do not find this file, copies can be found by writing to: 11 * ETH Zurich D-INFK, Universitaetstrasse 6, CH-8092 Zurich. Attn: Systems Group. 12 */ 13 14#ifndef USB_PARSE_H_ 15#define USB_PARSE_H_ 16 17struct usb_iface_parse_state { 18 struct usb_descriptor *desc; 19 uint8_t iface_index; /* current interface index */ 20 uint8_t iface_no_last; 21 uint8_t iface_index_alt; /* current alternate setting */ 22}; 23 24struct usb_descriptor *usb_parse_next_descriptor( 25 struct usb_config_descriptor *cd, struct usb_descriptor *_desc); 26 27struct usb_interface_descriptor *usb_parse_next_iface( 28 struct usb_config_descriptor *cd, struct usb_iface_parse_state *ps); 29 30struct usb_endpoint_descriptor *usb_parse_next_edesc( 31 struct usb_config_descriptor *cd, struct usb_endpoint_descriptor *ped); 32 33#endif /* USB_PARSE_H_ */ 34