1 /* |
1 /* |
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
9 * Initial Contributors: |
9 * Initial Contributors: |
10 * Nokia Corporation - initial contribution. |
10 * Nokia Corporation - initial contribution. |
11 * |
11 * |
12 * Contributors: |
12 * Contributors: |
13 * |
13 * |
14 * Description: This API provides access to the display driver. |
14 * Description: API for DDC (E-EDID and displayID) read from DVI/HDMI display |
15 * |
15 * |
16 */ |
16 */ |
|
17 /* |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 ddc_access.dll |
|
26 ---------------- |
|
27 |
|
28 SW Include Document - C++ |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 Module name: ddc_access.dll |
|
38 |
|
39 Filename: ddc_access.h |
|
40 |
|
41 Working copy: ddc_access |
|
42 |
|
43 * Continuus version : |
|
44 * %version: 2 %, |
|
45 %date_modified: Thu May 06 12:35:27 2010 % |
|
46 |
|
47 ---------------------------------------------------------------------------*/ |
|
48 /** |
|
49 |
|
50 @mainpage |
|
51 @section intro_sec Introduction |
|
52 |
|
53 <p>This is adaptation component which hides hw-drivers from users. |
|
54 Because this is adaptation API, and user is also adaptation, this |
|
55 API is not binary compatible, only source compatible.</p> |
|
56 |
|
57 <p>API for DDC (E-EDID and displayID) read from DVI/HDMI display.</p> |
|
58 |
|
59 <p>@see EDDCv1_2.pdf/DisplayIDv1.pdf/EEDIDrAr2.pdf (or newer) for more details</p> |
|
60 |
|
61 */ |
|
62 /** @file |
|
63 |
|
64 *///========================================================================= |
17 |
65 |
18 |
66 |
19 #ifndef __DDC_ACCESS_H__ |
67 #ifndef __DDC_ACCESS_H__ |
20 #define __DDC_ACCESS_H__ |
68 #define __DDC_ACCESS_H__ |
21 |
69 |
22 |
70 |
23 //- Include Files ---------------------------------------------------------- |
71 //- Include Files ---------------------------------------------------------- |
24 |
72 |
25 #include <e32base.h> |
73 #ifndef __KERNEL_MODE__ |
|
74 #include <e32base.h> |
|
75 #else |
|
76 #include <e32cmn.h> |
|
77 #endif //__KERNEL_MODE__ |
26 |
78 |
27 //- Enumerations and consts ------------------------------------------------- |
79 //- Enumerations and consts ------------------------------------------------- |
28 |
80 |
29 /** API version number: |
81 /** API version number: |
|
82 2: __KERNEL_MODE__ definitions, capability ECapabilityReadDeviceData |
30 1: First version */ |
83 1: First version */ |
31 const TUint KDdcAccessVersion = 1; |
84 const TUint KDdcAccessVersion = 1; |
32 |
85 |
33 ///One DDC segment size |
86 ///One DDC segment size. See that EDID block size is just 128 bytes, so base-EDID read might contain one EDID extension |
34 const TUint KSizeOfSegment = 256; |
87 const TUint KSizeOfSegment = 256; |
35 |
88 |
36 /** One data block array, See that EDID block size is just 128 bytes, so one read contains one EDID extension (if exists) */ |
89 /** One data block array */ |
37 typedef TUint8 TDataBlock[ KSizeOfSegment ]; |
90 typedef TUint8 TDataBlock[ KSizeOfSegment ]; |
38 |
91 |
39 ///DDC port enumerations |
92 ///DDC port enumerations |
40 enum TDdcPort |
93 enum TDdcPort |
41 { |
94 { |
92 User should first read EMonitorPort, if there is EDID found, then read also EDisplayIdPort. |
146 User should first read EMonitorPort, if there is EDID found, then read also EDisplayIdPort. |
93 If DisplayID is found from EMonitorPort, then it is not needed to read EDisplayIdPort. |
147 If DisplayID is found from EMonitorPort, then it is not needed to read EDisplayIdPort. |
94 |
148 |
95 DisplayID is "second generation" of EDID, and it is proposed to be used. |
149 DisplayID is "second generation" of EDID, and it is proposed to be used. |
96 |
150 |
97 See the method reads one TDataBlock, and it size is double of one EDID block, |
151 The method reads one TDataBlock, and its size is double of one EDID block, |
98 so the first EDID read might get base-EDID and first extension, if exists. |
152 so the first EDID read might get base-EDID and first extension, if such exists. |
99 With variable size DisplayID, method reads anyway whole size of TDataBlock, |
153 With variable size DisplayID, method reads the whole size of TDataBlock anyway, |
100 even DisplayID section is smaller. |
154 even if DisplayID section is smaller. |
101 |
155 |
102 @param aDdcPort DDC port which to be read |
156 @param aDdcPort DDC port which needs to be read |
103 @param aBlockNumber Datablock which to be read (parameter maps to segment-register 0x60) |
157 @param aBlockNumber Datablock which needs to be read (parameter maps to segment-register 0x60) |
104 @param aDataBlock Method fills this with read values. Ensure that this data exists all the time, be careful if local variable. |
158 @param aDataBlock Method fills this with read values. Ensure that this data exists all the time, be careful if local variable. |
105 @param aCompletedWhenRead Will be completed when ready, if no errors, then aDataBlock contains read values |
159 @param aCompletedWhenRead Will be completed when ready, if no errors, then aDataBlock contains read values |
106 @return KErrNone if success */ |
160 @return KErrNone if success */ |
107 virtual TInt Read(TDdcPort aDdcPort, TUint aBlockNumber, TDataBlock& aDataBlock, TRequestStatus& aCompletedWhenRead) = 0; |
161 virtual TInt Read(TDdcPort aDdcPort, TUint aBlockNumber, TDataBlock& aDataBlock, TRequestStatus& aCompletedWhenRead) = 0; |
108 |
162 |
109 /** Cancels all TRequestStatuses. |
163 /** Cancels all TRequestStatuses. */ |
110 @return KErrNone if success */ |
|
111 virtual void CancelAll() = 0; |
164 virtual void CancelAll() = 0; |
112 |
165 |
113 protected: |
166 protected: |
114 ///Constructor |
167 ///Constructor |
115 CDdcPortAccess(){}; |
168 CDdcPortAccess(){}; |
116 ///Second phase constructor |
169 ///Second phase constructor |
117 virtual void ConstructL() = 0; |
170 virtual void ConstructL() = 0; |
118 }; |
171 }; |
119 |
172 |
120 |
173 #endif //__KERNEL_MODE__ |
121 //- Global Function Prototypes ---------------------------------------------- |
174 //- Global Function Prototypes ---------------------------------------------- |
122 |
175 |
123 |
176 |
124 //- Inline Functions -------------------------------------------------------- |
177 //- Inline Functions -------------------------------------------------------- |
125 |
178 |