]>
git.saurik.com Git - apple/xnu.git/blob - iokit/Drivers/hidsystem/drvAppleADBDevices/AppleADBDisplay.h
2 * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
20 * @APPLE_LICENSE_HEADER_END@
23 * Copyright (c) 1997-1998 Apple Computer, Inc.
28 * sdouglas 22 Oct 97 - first checked in.
29 * sdouglas 23 Jul 98 - start IOKit
30 * suurballe 17 Nov 98 - ported to C++
33 #include <IOKit/adb/IOADBDevice.h>
34 #include <IOKit/graphics/IODisplay.h>
37 #define kOrgDisplayAddr 0x7 // Original display ADB address
39 #define kTelecasterADBHandlerID 0x03
40 #define kSmartDisplayADBHandlerID 0xc0
42 #define kADBReg0 0x0 // Device register zero
43 #define kADBReg1 0x1 // Device register one
44 #define kADBReg2 0x2 // Device register two
45 #define kADBReg3 0x3 // Device register three
47 #define kReg2DataRdy 0xFD // data (to be read) ready
48 #define kReg2DataAck 0xFE // data (just written) OK
49 #define kWiggleLADAddr 0x04 // 0x0f on Telecaster & Sousa?
55 #define kSousaSoundUnit 1
61 #define kLastDeviceType kManta
63 #define kDisplayLocalRemoteLADAddr 0x02 // lad address used in SetDisplayRemoteMode
64 #define kAudioKeypadEnableLADAddr 0x7D
72 class AppleADBDisplay
: public IODisplay
74 OSDeclareDefaultStructors(AppleADBDisplay
)
78 IOADBDevice
* adbDevice
;
79 volatile UInt8 waitAckValue
;
85 virtual IOReturn
findADBDisplayInfoForType( UInt16 deviceType
);
86 virtual IOReturn
getConnectFlagsForDisplayMode(
87 IODisplayModeID mode
, UInt32
* flags
);
88 virtual IOReturn
doConnect( void );
89 virtual IOReturn
writeWithAcknowledge( UInt8 regNum
, UInt16 data
,
91 virtual IOReturn
setLogicalRegister( UInt16 address
, UInt16 data
);
92 virtual IOReturn
getLogicalRegister( UInt16 address
, UInt16
* data
);
93 virtual void setWiggle( bool active
);
94 virtual bool tryAttach( IODisplayConnect
* connect
);
98 virtual bool start( IOService
* nub
);
99 virtual IOService
* probe( IOService
* nub
, SInt32
* score
);
101 virtual void packet( UInt8 adbCommand
,
102 IOByteCount length
, UInt8
* data
);