Annotation of kernel/bsd/dev/ppc/drvUSBCMD/CompositeClassDriver/CompositeClassDriver.h, revision 1.1

1.1     ! root        1: /*
        !             2:  * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
        !             3:  *
        !             4:  * @APPLE_LICENSE_HEADER_START@
        !             5:  * 
        !             6:  * Portions Copyright (c) 1999 Apple Computer, Inc.  All Rights
        !             7:  * Reserved.  This file contains Original Code and/or Modifications of
        !             8:  * Original Code as defined in and that are subject to the Apple Public
        !             9:  * Source License Version 1.1 (the "License").  You may not use this file
        !            10:  * except in compliance with the License.  Please obtain a copy of the
        !            11:  * License at http://www.apple.com/publicsource and read it before using
        !            12:  * this file.
        !            13:  * 
        !            14:  * The Original Code and all software distributed under the License are
        !            15:  * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
        !            16:  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
        !            17:  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
        !            18:  * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
        !            19:  * License for the specific language governing rights and limitations
        !            20:  * under the License.
        !            21:  * 
        !            22:  * @APPLE_LICENSE_HEADER_END@
        !            23:  */
        !            24: 
        !            25: /*
        !            26:        File:           CompositeClassDriver.h
        !            27: 
        !            28:        Contains:       Header file for Composite Class Driver 
        !            29: 
        !            30:        Version:        xxx put version here xxx
        !            31: 
        !            32:        Copyright:      � 1997-1998 by Apple Computer, Inc., all rights reserved.
        !            33: 
        !            34:        File Ownership:
        !            35: 
        !            36:                DRI:                            Craig Keithley
        !            37: 
        !            38:                Other Contact:          xxx put other contact here xxx
        !            39: 
        !            40:                Technology:                     xxx put technology here xxx
        !            41: 
        !            42:        Writers:
        !            43: 
        !            44:                (TC)    Tom Clark
        !            45:                (BG)    Bill Galcher
        !            46:                (BT)    Barry Twycross
        !            47:                (CJK)   Craig Keithley
        !            48: 
        !            49:        Change History (most recent first):
        !            50: 
        !            51:          <USB6>          9/4/98        TC              Update CompositeDriverNotifyProc to use version 1.1 of dispatch
        !            52:                                                                        table.
        !            53:          <USB5>          6/8/98        CJK             remove driverentry; not needed
        !            54:          <USB4>          6/5/98        BG              Add missing prototype - DriverEntry().
        !            55:          <USB3>          6/5/98        CJK             add state to handle USBNewInterfaceRef.  add some new fields to
        !            56:                                                                        the global structs to keep track of the interfacerefs, as well
        !            57:                                                                        as flag when it's okay to tear things down.
        !            58:          <USB2>          4/9/98        CJK             change to use USB.h
        !            59:                 <1>      4/7/98        CJK             first checked in as CompositeClassDriver
        !            60:                <25>     3/26/98        CJK             look at problem with Microsoft keyboard
        !            61:                <24>     3/17/98        CJK             Replace "};" with just "}" (where appropriate).  This eliminates
        !            62:                                                                        some error messages from MetroWerks.  Added function prototypes.
        !            63:                <23>     2/26/98        CJK             change pFullConfigurationDescriptor type to
        !            64:                                                                        USBConfigurationDescriptorPtr
        !            65:                <22>      2/9/98        CJK             remove HID Emulation related items (no more HID fields in
        !            66:                                                                        Composite struct, no more include of HIDEmulation.h, etc.)
        !            67:                <21>      2/6/98        CJK             Crank 50ms delay back down to 10ms. Changed name of state to not
        !            68:                                                                        say how many ms.
        !            69:                <20>      2/3/98        CJK             move device descriptor 'next to' the other USB descriptors.
        !            70:                                                                        Removed unused fields from the CompositePBStruct.
        !            71:                <19>      2/2/98        CJK             Add XXGetHIDDescriptor prototype
        !            72:                <18>     1/30/98        CJK             Revise HIDModuleDispatchTable to have better names for the
        !            73:                                                                        dispatch table entries.
        !            74:                <17>     1/27/98        CJK             Add HIDModuleDispatch Table definition
        !            75:                <16>     1/26/98        CJK             change to match codebert
        !            76:                <15>     1/26/98        BT              Mangle names after design review
        !            77:                <14>     1/26/98        CJK             Add other USB/ADB shim dispatch functions
        !            78:                <13>     1/23/98        CJK             remove hub related timer fields from Composite struct.
        !            79:                <12>     1/23/98        CJK             Implement HID data change detection
        !            80:                <11>     1/23/98        CJK             Work on configuration parsing
        !            81:                <10>     1/22/98        CJK             Add configuration pointer and configuration descriptors to
        !            82:                                                                        Composite struct.
        !            83:                 <9>     1/22/98        CJK             Add RetryTransaction flag
        !            84:                 <8>     1/20/98        CJK             Add configuration parser function prototypes.
        !            85:                 <7>     1/20/98        CJK             Add other state values
        !            86:                 <6>     1/15/98        CJK             Change include of USL.h to USBServicesLib.h
        !            87:                 <5>     1/14/98        CJK             Add enum for 'kChangeState'
        !            88:                 <4>      1/8/98        CJK             Removed initialize & finalize function prototypes (they're not
        !            89:                                                                        needed now that the functions are in the description.c file).
        !            90:                 <3>      1/6/98        CJK             Add prototypes for TaskTimeProc, ExpertEntryProc, and related
        !            91:                                                                        functions.
        !            92:                 <2>    12/17/97        CJK             Add BBS file header
        !            93:                 <1>    12/17/97        CJK             First time checkin
        !            94: */
        !            95: #ifndef __CompositeCLASSDRIVERH__
        !            96: #define __CompositeCLASSDRIVERH__
        !            97: 
        !            98: //naga#include "../types.h"
        !            99: //naga#include <Devices.h>
        !           100: //naga#include "../driverservices.h"
        !           101: //naga#include <Processes.h>
        !           102: //naga#include "../USB.h"
        !           103: 
        !           104: Boolean                immediateError(OSStatus err);
        !           105: void           CompositeDeviceInitiateTransaction(USBPB *pb);
        !           106: void           CompositeDeviceCompletionProc(USBPB *pb);
        !           107: void           InitParamBlock(USBDeviceRef theDeviceRef, USBPB * paramblock);
        !           108: 
        !           109: OSStatus       CompositeDriverInitInterface(UInt32 interfaceNum, USBInterfaceDescriptor *interfaceDesc, USBDeviceDescriptor *deviceDesc, USBDeviceRef device);
        !           110: OSStatus       CompositeDriverNotifyProc(UInt32 notification, void *pointer, UInt32 refcon);
        !           111: OSStatus       CompositeDriverValidateHW(USBDeviceRef device, USBDeviceDescriptor *desc);
        !           112: OSStatus       CompositeDriverInitialize(USBDeviceRef device, USBDeviceDescriptorPtr pDesc, UInt32 busPowerAvailable);
        !           113: OSStatus       CompositeDriverFinalize(USBDeviceRef theDeviceRef, USBDeviceDescriptorPtr pDesc);
        !           114: 
        !           115: void           DeviceInitialize(USBDeviceRef device, USBDeviceDescriptorPtr pDeviceDescriptor, UInt32 busPowerAvailable);
        !           116: 
        !           117: OSErr          GetInterfaceDescriptor(LogicalAddress pConfigDesc, UInt32 ReqInterface, USBInterfaceDescriptorPtr *hInterfaceDesc);
        !           118: 
        !           119: #define        kCompositeRetryCount    5
        !           120: 
        !           121: enum driverstates
        !           122: {
        !           123:        kUndefined = 0,
        !           124:        kSetConfig,
        !           125:        kGetFullConfiguration0,
        !           126:        kGetFullConfiguration1,
        !           127:        kNewInterfaceRef,
        !           128:        kExitDriver =                   0x1000,
        !           129:        kRetryTransaction =     0x2000,
        !           130:        kSyncTransaction =              0x4000,
        !           131:        kCompletionPending =    0x8000
        !           132: };
        !           133: 
        !           134: typedef struct
        !           135: {
        !           136:        USBPB                                                   pb;
        !           137:        void (*handler)(USBPB                   *pb);
        !           138: 
        !           139:        USBDeviceRef                                    deviceRef;
        !           140:        
        !           141:        Boolean                                                 disposeCompletedFlag;
        !           142:        Boolean                                                 okayToFinalizeFlag;
        !           143:        
        !           144:        USBDeviceDescriptor                     deviceDescriptor;
        !           145:        USBConfigurationDescriptor              partialConfigDescriptor;
        !           146:        USBConfigurationDescriptorPtr   pFullConfigDescriptor;
        !           147:        
        !           148:        USBInterfaceDescriptor                  interfaceDescriptors[32];
        !           149:        USBInterfaceRef                                 interfaceRefArray[32];
        !           150:        USBRqIndex                                              interfaceCount;
        !           151:        USBRqIndex                                              interfaceIndex;
        !           152:        
        !           153:        SInt32                                                  retryCount;
        !           154:        SInt32                                                  delayLevel;
        !           155:        SInt32                                                  transDepth;
        !           156:        UInt32                                                  busPowerAvailable;
        !           157: } usbCompositePBStruct;
        !           158: 
        !           159: #endif //__CompositeCLASSDRIVERH__

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.