1 /* |
1 /* |
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2009 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: API for DDC (E-EDID and displayID) read from DVI/HDMI display |
14 * Description: This API provides access to the display driver. |
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 *///========================================================================= |
|
65 |
17 |
66 |
18 |
67 #ifndef __DDC_ACCESS_H__ |
19 #ifndef __DDC_ACCESS_H__ |
68 #define __DDC_ACCESS_H__ |
20 #define __DDC_ACCESS_H__ |
69 |
21 |
70 |
22 |
71 //- Include Files ---------------------------------------------------------- |
23 //- Include Files ---------------------------------------------------------- |
72 |
24 |
73 #ifndef __KERNEL_MODE__ |
25 #include <e32base.h> |
74 #include <e32base.h> |
|
75 #else |
|
76 #include <e32cmn.h> |
|
77 #endif //__KERNEL_MODE__ |
|
78 |
26 |
79 //- Enumerations and consts ------------------------------------------------- |
27 //- Enumerations and consts ------------------------------------------------- |
80 |
28 |
81 /** API version number: |
29 /** API version number: |
82 2: __KERNEL_MODE__ definitions, capability ECapabilityReadDeviceData |
|
83 1: First version */ |
30 1: First version */ |
84 const TUint KDdcAccessVersion = 1; |
31 const TUint KDdcAccessVersion = 1; |
85 |
32 |
86 ///One DDC segment size. See that EDID block size is just 128 bytes, so base-EDID read might contain one EDID extension |
33 ///One DDC segment size |
87 const TUint KSizeOfSegment = 256; |
34 const TUint KSizeOfSegment = 256; |
88 |
35 |
89 /** One data block array */ |
36 /** One data block array, See that EDID block size is just 128 bytes, so one read contains one EDID extension (if exists) */ |
90 typedef TUint8 TDataBlock[ KSizeOfSegment ]; |
37 typedef TUint8 TDataBlock[ KSizeOfSegment ]; |
91 |
38 |
92 ///DDC port enumerations |
39 ///DDC port enumerations |
93 enum TDdcPort |
40 enum TDdcPort |
94 { |
41 { |
146 User should first read EMonitorPort, if there is EDID found, then read also EDisplayIdPort. |
92 User should first read EMonitorPort, if there is EDID found, then read also EDisplayIdPort. |
147 If DisplayID is found from EMonitorPort, then it is not needed to read EDisplayIdPort. |
93 If DisplayID is found from EMonitorPort, then it is not needed to read EDisplayIdPort. |
148 |
94 |
149 DisplayID is "second generation" of EDID, and it is proposed to be used. |
95 DisplayID is "second generation" of EDID, and it is proposed to be used. |
150 |
96 |
151 The method reads one TDataBlock, and its size is double of one EDID block, |
97 See the method reads one TDataBlock, and it size is double of one EDID block, |
152 so the first EDID read might get base-EDID and first extension, if such exists. |
98 so the first EDID read might get base-EDID and first extension, if exists. |
153 With variable size DisplayID, method reads the whole size of TDataBlock anyway, |
99 With variable size DisplayID, method reads anyway whole size of TDataBlock, |
154 even if DisplayID section is smaller. |
100 even DisplayID section is smaller. |
155 |
101 |
156 @param aDdcPort DDC port which needs to be read |
102 @param aDdcPort DDC port which to be read |
157 @param aBlockNumber Datablock which needs to be read (parameter maps to segment-register 0x60) |
103 @param aBlockNumber Datablock which to be read (parameter maps to segment-register 0x60) |
158 @param aDataBlock Method fills this with read values. Ensure that this data exists all the time, be careful if local variable. |
104 @param aDataBlock Method fills this with read values. Ensure that this data exists all the time, be careful if local variable. |
159 @param aCompletedWhenRead Will be completed when ready, if no errors, then aDataBlock contains read values |
105 @param aCompletedWhenRead Will be completed when ready, if no errors, then aDataBlock contains read values |
160 @return KErrNone if success */ |
106 @return KErrNone if success */ |
161 virtual TInt Read(TDdcPort aDdcPort, TUint aBlockNumber, TDataBlock& aDataBlock, TRequestStatus& aCompletedWhenRead) = 0; |
107 virtual TInt Read(TDdcPort aDdcPort, TUint aBlockNumber, TDataBlock& aDataBlock, TRequestStatus& aCompletedWhenRead) = 0; |
162 |
108 |
163 /** Cancels all TRequestStatuses. */ |
109 /** Cancels all TRequestStatuses. |
|
110 @return KErrNone if success */ |
164 virtual void CancelAll() = 0; |
111 virtual void CancelAll() = 0; |
165 |
112 |
166 protected: |
113 protected: |
167 ///Constructor |
114 ///Constructor |
168 CDdcPortAccess(){}; |
115 CDdcPortAccess(){}; |
169 ///Second phase constructor |
116 ///Second phase constructor |
170 virtual void ConstructL() = 0; |
117 virtual void ConstructL() = 0; |
171 }; |
118 }; |
172 |
119 |
173 #endif //__KERNEL_MODE__ |
120 |
174 //- Global Function Prototypes ---------------------------------------------- |
121 //- Global Function Prototypes ---------------------------------------------- |
175 |
122 |
176 |
123 |
177 //- Inline Functions -------------------------------------------------------- |
124 //- Inline Functions -------------------------------------------------------- |
178 |
125 |