The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/dev/usb/umidireg.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*      $NetBSD: umidireg.h,v 1.3 2003/12/04 13:57:31 keihan Exp $      */
    2 /*
    3  * Copyright (c) 2001 The NetBSD Foundation, Inc.
    4  * All rights reserved.
    5  *
    6  * This code is derived from software contributed to The NetBSD Foundation
    7  * by Takuya SHIOZAKI (tshiozak@NetBSD.org).
    8  *
    9  * Redistribution and use in source and binary forms, with or without
   10  * modification, are permitted provided that the following conditions
   11  * are met:
   12  * 1. Redistributions of source code must retain the above copyright
   13  *    notice, this list of conditions and the following disclaimer.
   14  * 2. Redistributions in binary form must reproduce the above copyright
   15  *    notice, this list of conditions and the following disclaimer in the
   16  *    documentation and/or other materials provided with the distribution.
   17  * 3. All advertising materials mentioning features or use of this software
   18  *    must display the following acknowledgement:
   19  *        This product includes software developed by the NetBSD
   20  *        Foundation, Inc. and its contributors.
   21  * 4. Neither the name of The NetBSD Foundation nor the names of its
   22  *    contributors may be used to endorse or promote products derived
   23  *    from this software without specific prior written permission.
   24  *
   25  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
   26  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
   27  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
   28  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
   29  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
   30  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
   31  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
   32  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
   33  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   34  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   35  * POSSIBILITY OF SUCH DAMAGE.
   36  */
   37 
   38 /* Jack Descriptor */
   39 #define UMIDI_MS_HEADER 0x01
   40 #define UMIDI_IN_JACK   0x02
   41 #define UMIDI_OUT_JACK  0x03
   42 
   43 /* Jack Type */
   44 #define UMIDI_EMBEDDED  0x01
   45 #define UMIDI_EXTERNAL  0x02
   46 
   47 typedef struct {
   48         uByte           bLength;
   49         uByte           bDescriptorType;
   50         uByte           bDescriptorSubtype;
   51         uWord           bcdMSC;
   52         uWord           wTotalLength;
   53 } UPACKED umidi_cs_interface_descriptor_t;
   54 #define UMIDI_CS_INTERFACE_DESCRIPTOR_SIZE 7
   55 
   56 typedef struct {
   57         uByte           bLength;
   58         uByte           bDescriptorType;
   59         uByte           bDescriptorSubType;
   60         uByte           bNumEmbMIDIJack;
   61 } UPACKED umidi_cs_endpoint_descriptor_t;
   62 #define UMIDI_CS_ENDPOINT_DESCRIPTOR_SIZE 4
   63 
   64 typedef struct {
   65         uByte           bLength;
   66         uByte           bDescriptorType;
   67         uByte           bDescriptorSubtype;
   68         uByte           bJackType;
   69         uByte           bJackID;
   70 } UPACKED umidi_jack_descriptor_t;
   71 #define UMIDI_JACK_DESCRIPTOR_SIZE      5
   72 
   73 
   74 #define TO_D(p) ((usb_descriptor_t *)(p))
   75 #define NEXT_D(desc) TO_D((caddr_t)(desc)+(desc)->bLength)
   76 #define TO_IFD(desc) ((usb_interface_descriptor_t *)(desc))
   77 #define TO_CSIFD(desc) ((umidi_cs_interface_descriptor_t *)(desc))
   78 #define TO_EPD(desc) ((usb_endpoint_descriptor_t *)(desc))
   79 #define TO_CSEPD(desc) ((umidi_cs_endpoint_descriptor_t *)(desc))

Cache object: 87b16d42df5b0c3d661fb0da55027a18


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.