Root/
Source at commit 1164 created 13 years 12 days ago. By azimutz, Add some pauses to nvidia.c and ati.c to help user feedback collection. | |
---|---|
1 | /*␊ |
2 | * Copyright (c) 2000-2008 Apple Inc. All rights reserved.␊ |
3 | *␊ |
4 | * @APPLE_LICENSE_HEADER_START@␊ |
5 | * ␊ |
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.␊ |
11 | * ␊ |
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␊ |
18 | * under the License.␊ |
19 | * ␊ |
20 | * @APPLE_LICENSE_HEADER_END@␊ |
21 | */␊ |
22 | ␊ |
23 | #ifndef _IOATAREGI386_H␊ |
24 | #define _IOATAREGI386_H␊ |
25 | ␊ |
26 | #include <libkern/c++/OSObject.h>␊ |
27 | ␊ |
28 | /*␊ |
29 | * IOATAReg: ATA register abstract base class.␊ |
30 | */␊ |
31 | #define DefineIOATAReg(w) \␊ |
32 | class IOATAReg##w : public OSObject \␊ |
33 | { \␊ |
34 | OSDeclareAbstractStructors( IOATAReg##w ) \␊ |
35 | \␊ |
36 | public: \␊ |
37 | virtual void operator = (UInt##w rhs) = 0; \␊ |
38 | virtual operator UInt##w() const = 0; \␊ |
39 | }␊ |
40 | ␊ |
41 | DefineIOATAReg( 8 );␊ |
42 | DefineIOATAReg( 16 );␊ |
43 | DefineIOATAReg( 32 );␊ |
44 | ␊ |
45 | typedef IOATAReg8 * IOATARegPtr8;␊ |
46 | typedef IOATAReg16 * IOATARegPtr16;␊ |
47 | typedef IOATAReg32 * IOATARegPtr32;␊ |
48 | ␊ |
49 | #define IOATARegPtr8Cast(x) (x)␊ |
50 | ␊ |
51 | /*␊ |
52 | * IOATAIOReg: I/O mapped ATA registers.␊ |
53 | */␊ |
54 | #define DefineIOATAIOReg(w) \␊ |
55 | class IOATAIOReg##w : public IOATAReg##w \␊ |
56 | { \␊ |
57 | OSDeclareDefaultStructors( IOATAIOReg##w ) \␊ |
58 | \␊ |
59 | protected: \␊ |
60 | UInt16 _address; \␊ |
61 | \␊ |
62 | public: \␊ |
63 | static IOATAIOReg##w * withAddress( UInt16 address ); \␊ |
64 | \␊ |
65 | virtual bool initWithAddress( UInt16 address ); \␊ |
66 | virtual UInt16 getAddress() const; \␊ |
67 | \␊ |
68 | virtual void operator = (UInt##w rhs); \␊ |
69 | virtual operator UInt##w() const; \␊ |
70 | }␊ |
71 | ␊ |
72 | DefineIOATAIOReg( 8 );␊ |
73 | DefineIOATAIOReg( 16 );␊ |
74 | DefineIOATAIOReg( 32 );␊ |
75 | ␊ |
76 | #endif /* !_IOATAREGI386_H */␊ |
77 |