ReactOS  0.4.15-dev-1070-ge1a01de
hwtwl40x.c File Reference
#include "precomp.h"
Include dependency graph for hwtwl40x.c:

Go to the source code of this file.

Functions

UCHAR NTAPI LlbHwOmap3TwlRead1 (IN UCHAR ChipAddress, IN UCHAR RegisterAddress)
 
VOID NTAPI LlbHwOmap3TwlWrite (IN UCHAR ChipAddress, IN UCHAR RegisterAddress, IN UCHAR Length, IN PUCHAR Values)
 
VOID NTAPI LlbHwOmap3TwlWrite1 (IN UCHAR ChipAddress, IN UCHAR RegisterAddress, IN UCHAR Value)
 

Function Documentation

◆ LlbHwOmap3TwlRead1()

UCHAR NTAPI LlbHwOmap3TwlRead1 ( IN UCHAR  ChipAddress,
IN UCHAR  RegisterAddress 
)

Definition at line 15 of file hwtwl40x.c.

17 {
18  volatile int i = 1000;
19 
20  /* Select the register */
21  LlbHwOmap3TwlWrite(ChipAddress, RegisterAddress, 0, NULL);
22 
23  /* Now read it */
24  WRITE_REGISTER_USHORT(0x48070024, 0x8401);
25  for (i = 1000; i > 0; i--);
26  return READ_REGISTER_USHORT(0x4807001c);
27 }
NTKERNELAPI VOID NTAPI WRITE_REGISTER_USHORT(IN PUSHORT Register, IN USHORT Value)
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
Definition: glfuncs.h:248
smooth NULL
Definition: ftsmooth.c:416
NTKERNELAPI USHORT NTAPI READ_REGISTER_USHORT(IN PUSHORT Register)
VOID NTAPI LlbHwOmap3TwlWrite(IN UCHAR ChipAddress, IN UCHAR RegisterAddress, IN UCHAR Length, IN PUCHAR Values)
Definition: hwtwl40x.c:31

Referenced by LlbHwKbdRead(), LlbHwKbdReady(), LlbHwOmap3SynKpdInitialize(), and LlbHwRtcRead().

◆ LlbHwOmap3TwlWrite()

VOID NTAPI LlbHwOmap3TwlWrite ( IN UCHAR  ChipAddress,
IN UCHAR  RegisterAddress,
IN UCHAR  Length,
IN PUCHAR  Values 
)

Definition at line 31 of file hwtwl40x.c.

35 {
36  volatile int i = 1000;
37  ULONG j;
38 
39  /* Select chip address */
40  WRITE_REGISTER_USHORT(0x4807002c, ChipAddress);
41  WRITE_REGISTER_USHORT(0x48070018, Length + 1);
42 
43  /* Enable master transmit mode */
44  WRITE_REGISTER_USHORT(0x48070024, 0x8601);
45  WRITE_REGISTER_USHORT(0x4807001c, RegisterAddress);
46 
47  /* Loop each byte */
48  for (j = 0; j < Length; j++)
49  {
50  /* Write the data */
51  WRITE_REGISTER_USHORT(0x4807001c, Values[j]);
52  }
53 
54  /* Issue stop command */
55  WRITE_REGISTER_USHORT(0x48070024, 0x8602);
56  for (i = 1000; i > 0; i--);
57 }
NTKERNELAPI VOID NTAPI WRITE_REGISTER_USHORT(IN PUSHORT Register, IN USHORT Value)
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
Definition: glfuncs.h:248
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 GLint GLint j
Definition: glfuncs.h:250
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
unsigned int ULONG
Definition: retypes.h:1

Referenced by LlbHwOmap3TwlRead1(), and LlbHwOmap3TwlWrite1().

◆ LlbHwOmap3TwlWrite1()

VOID NTAPI LlbHwOmap3TwlWrite1 ( IN UCHAR  ChipAddress,
IN UCHAR  RegisterAddress,
IN UCHAR  Value 
)

Definition at line 61 of file hwtwl40x.c.

64 {
65  /* Do the actual write */
66  LlbHwOmap3TwlWrite(ChipAddress, RegisterAddress, 1, &Value);
67 }
IN UCHAR Value
Definition: halp.h:394
VOID NTAPI LlbHwOmap3TwlWrite(IN UCHAR ChipAddress, IN UCHAR RegisterAddress, IN UCHAR Length, IN PUCHAR Values)
Definition: hwtwl40x.c:31

Referenced by LlbHwOmap3LcdInitialize(), LlbHwOmap3SynKpdInitialize(), and LlbHwRtcRead().