#include "videoprt.h"
#include <debug.h>
Go to the source code of this file.
|
static BOOL | I2CWrite (PVOID HwDeviceExtension, PI2C_CALLBACKS i2c, UCHAR Data) |
|
static UCHAR | I2CRead (PVOID HwDeviceExtension, PI2C_CALLBACKS i2c, BOOL Ack) |
|
static VOID | I2CStop (PVOID HwDeviceExtension, PI2C_CALLBACKS i2c) |
|
static BOOL | I2CStart (PVOID HwDeviceExtension, PI2C_CALLBACKS i2c, UCHAR Address) |
|
static BOOL | I2CRepStart (PVOID HwDeviceExtension, PI2C_CALLBACKS i2c, UCHAR Address) |
|
BOOLEAN NTAPI | VideoPortDDCMonitorHelper (PVOID HwDeviceExtension, PVOID I2CFunctions, PUCHAR pEdidBuffer, ULONG EdidBufferSize) |
|
◆ DDC_EEPROM_ADDRESS
#define DDC_EEPROM_ADDRESS 0xA0 |
Definition at line 27 of file ddc.c.
◆ DELAY_HALF
Definition at line 41 of file ddc.c.
◆ HIGH
Definition at line 32 of file ddc.c.
◆ LOW
Definition at line 31 of file ddc.c.
◆ NDEBUG
Definition at line 24 of file ddc.c.
◆ READ
Definition at line 34 of file ddc.c.
◆ READ_SCL
#define READ_SCL |
( |
| ) |
(i2c->ReadClockLine(HwDeviceExtension)) |
Definition at line 36 of file ddc.c.
◆ READ_SDA
#define READ_SDA |
( |
| ) |
(i2c->ReadDataLine(HwDeviceExtension)) |
Definition at line 35 of file ddc.c.
◆ WRITE
Definition at line 33 of file ddc.c.
◆ WRITE_SCL
Definition at line 38 of file ddc.c.
◆ WRITE_SDA
Definition at line 37 of file ddc.c.
◆ I2CRead()
Definition at line 79 of file ddc.c.
80{
83
84
87
88
89 for (Bit = (1 << 7); Bit != 0; Bit >>= 1)
90 {
97 }
98
99
104 do
105 {
107 }
109
111}
Referenced by VideoPortDDCMonitorHelper().
◆ I2CRepStart()
Definition at line 153 of file ddc.c.
154{
155
162
164}
static BOOL I2CStart(PVOID HwDeviceExtension, PI2C_CALLBACKS i2c, UCHAR Address)
Referenced by VideoPortDDCMonitorHelper().
◆ I2CStart()
Definition at line 127 of file ddc.c.
128{
129
131 {
132 WARN_(VIDEOPRT,
"I2CStart: Bus is not free!\n");
134 }
135
136
140 {
141
142 I2CStop(HwDeviceExtension, i2c);
143 WARN_(VIDEOPRT,
"I2CStart: Device not found (Address = 0x%x)\n",
Address);
145 }
146
147 INFO_(VIDEOPRT,
"I2CStart: SUCCESS!\n");
149}
static BOOL I2CWrite(PVOID HwDeviceExtension, PI2C_CALLBACKS i2c, UCHAR Data)
static VOID I2CStop(PVOID HwDeviceExtension, PI2C_CALLBACKS i2c)
Referenced by I2CRepStart(), and VideoPortDDCMonitorHelper().
◆ I2CStop()
◆ I2CWrite()
Definition at line 45 of file ddc.c.
46{
49
50
51 for (Bit = (1 << 7); Bit != 0; Bit >>= 1)
52 {
58 }
59
60
65 do
66 {
68 }
72
73 INFO_(VIDEOPRT,
"I2CWrite: %s\n", Ack ?
"Ack" :
"Nak");
74 return Ack;
75}
Referenced by I2CStart(), and VideoPortDDCMonitorHelper().
◆ VideoPortDDCMonitorHelper()
Definition at line 173 of file ddc.c.
179{
185
186 TRACE_(VIDEOPRT,
"VideoPortDDCMonitorHelper()\n");
187
190 {
191 WARN_(VIDEOPRT,
"ddc->Size != %d (%d)\n",
sizeof (ddc), ddc->
Size);
193 }
194
195
198
199 if (!
I2CWrite(HwDeviceExtension, i2c, 0x00))
201
204
208 {
211 }
212 I2CStop(HwDeviceExtension, i2c);
213
214
219 {
220 WARN_(VIDEOPRT,
"VideoPortDDCMonitorHelper(): Invalid EDID header!\n");
222 }
223
224 INFO_(VIDEOPRT,
"VideoPortDDCMonitorHelper(): EDID version %d rev. %d\n",
pBuffer[18],
pBuffer[19]);
225 INFO_(VIDEOPRT,
"VideoPortDDCMonitorHelper() - SUCCESS!\n");
227}
static BOOL I2CRepStart(PVOID HwDeviceExtension, PI2C_CALLBACKS i2c, UCHAR Address)
static UCHAR I2CRead(PVOID HwDeviceExtension, PI2C_CALLBACKS i2c, BOOL Ack)
#define DDC_EEPROM_ADDRESS
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
struct _DDC_CONTROL * PDDC_CONTROL
#define ASSERT_IRQL_LESS_OR_EQUAL(x)
IN I2C_CALLBACKS I2CCallbacks
#define RtlZeroMemory(Destination, Length)
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList
◆ HalfPeriodDelay
Definition at line 40 of file ddc.c.