ReactOS  0.4.15-dev-2534-geba00d1
versa.h File Reference

Go to the source code of this file.

Functions

VOID NTAPI LlbHwVersaUartInitialize (VOID)
 
VOID NTAPI LlbHwVersaClcdInitialize (VOID)
 
VOID NTAPI LlbHwVersaKmiInitialize (VOID)
 

Function Documentation

◆ LlbHwVersaClcdInitialize()

VOID NTAPI LlbHwVersaClcdInitialize ( VOID  )

Definition at line 29 of file hwclcd.c.

30 {
31  /* Set framebuffer address */
34 
35  /* Initialize timings to 720x400 */
38 
39  /* Enable the TFT/LCD Display */
45 }
ULONG NTAPI LlbHwGetScreenHeight(VOID)
Definition: hwclcd.c:56
NTKERNELAPI VOID NTAPI WRITE_REGISTER_ULONG(IN PULONG Register, IN ULONG Value)
#define LCDCONTROL_LCDEN
Definition: hwclcd.c:14
#define PL110_LCDTIMING1
Definition: hwclcd.c:19
#define LCDTIMING1_LPP(x)
Definition: hwclcd.c:12
PVOID NTAPI LlbHwGetFrameBuffer(VOID)
Definition: hwclcd.c:63
#define PL110_LCDLPBASE
Definition: hwclcd.c:22
#define LCDCONTROL_LCDTFT
Definition: hwclcd.c:16
#define PL110_LCDCONTROL
Definition: hwclcd.c:23
ULONG NTAPI LlbHwGetScreenWidth(VOID)
Definition: hwclcd.c:49
#define LCDCONTROL_LCDBPP(x)
Definition: hwclcd.c:15
#define LCDTIMING0_PPL(x)
Definition: hwclcd.c:11
#define LCDCONTROL_LCDPWR
Definition: hwclcd.c:13
#define PL110_LCDTIMING0
Definition: hwclcd.c:18
unsigned int ULONG
Definition: retypes.h:1
#define PL110_LCDUPBASE
Definition: hwclcd.c:21

Referenced by LlbHwInitialize().

◆ LlbHwVersaKmiInitialize()

VOID NTAPI LlbHwVersaKmiInitialize ( VOID  )

Definition at line 80 of file hwkmi.c.

81 {
82  UCHAR Divisor;
83 
84  /* Setup divisor and enable KMI */
85  Divisor = (LlbHwGetPClk() / 8000000) - 1;
88 
89  /* Reset PS/2 controller */
91  if (LlbHwKbdRead() != PS2_I_BAT_OK) DbgPrint("PS/2 RESET FAILURE!\n");
92 
93  /* Send PS/2 Initialization Stream */
99 }
#define PL050_KMICLKDIV
Definition: hwkmi.c:38
#define DbgPrint
Definition: loader.c:25
#define PL050_KMICR
Definition: hwkmi.c:35
#define KMICR_EN
Definition: hwkmi.c:17
#define PS2_O_RESET
Definition: hwkmi.c:44
#define PS2_O_ENABLE
Definition: hwkmi.c:47
ULONG NTAPI LlbHwGetPClk(VOID)
Definition: hwinfo.c:20
#define PS2_O_SET_DEFAULT
Definition: hwkmi.c:49
unsigned char UCHAR
Definition: xmlstorage.h:181
INT NTAPI LlbHwKbdRead(VOID)
Definition: hwkmi.c:127
#define PS2_O_SET_SCANSET
Definition: hwkmi.c:51
VOID NTAPI LlbHwVersaKmiSendAndWait(IN ULONG Value)
Definition: hwkmi.c:64
_In_ LARGE_INTEGER Divisor
Definition: rtlfuncs.h:3046
#define PS2_I_BAT_OK
Definition: hwkmi.c:58
NTKERNELAPI VOID NTAPI WRITE_REGISTER_UCHAR(IN PUCHAR Register, IN UCHAR Value)
#define PS2_O_DISABLE
Definition: hwkmi.c:46

Referenced by LlbHwInitialize().

◆ LlbHwVersaUartInitialize()

VOID NTAPI LlbHwVersaUartInitialize ( VOID  )

Definition at line 49 of file hwuart.c.

50 {
51  ULONG Divider, Remainder, Fraction, ClockRate, Baudrate;
52 
53  /* Query peripheral rate, hardcore baudrate */
54  ClockRate = LlbHwGetPClk();
55  Baudrate = 115200;
56 
57  /* Calculate baudrate clock divider and remainder */
58  Divider = ClockRate / (16 * Baudrate);
59  Remainder = ClockRate % (16 * Baudrate);
60 
61  /* Calculate the fractional part */
62  Fraction = (8 * Remainder / Baudrate) >> 1;
63  Fraction += (8 * Remainder / Baudrate) & 1;
64 
65  /* Disable interrupts */
67 
68  /* Set the baud rate to 115200 bps */
71 
72  /* Set 8 bits for data, 1 stop bit, no parity, FIFO enabled */
75 
76  /* Clear and enable FIFO */
81 }
NTKERNELAPI VOID NTAPI WRITE_REGISTER_ULONG(IN PULONG Register, IN ULONG Value)
#define UART_PL011_LCRH_WLEN_8
Definition: hwuart.c:27
#define UART_PL011_CR_UARTEN
Definition: hwuart.c:33
#define UART_PL011_CR
Definition: hwuart.c:21
#define UART_PL011_CR_TXE
Definition: hwuart.c:34
#define UART_PL011_LCRH_FEN
Definition: hwuart.c:28
#define UART_PL011_IBRD
Definition: hwuart.c:18
ULONG NTAPI LlbHwGetPClk(VOID)
Definition: hwinfo.c:20
#define UART_PL011_FBRD
Definition: hwuart.c:19
#define UART_PL011_LCRH
Definition: hwuart.c:20
unsigned int ULONG
Definition: retypes.h:1
#define UART_PL011_CR_RXE
Definition: hwuart.c:35
_In_ LARGE_INTEGER _Out_opt_ PLARGE_INTEGER Remainder
Definition: rtlfuncs.h:3046

Referenced by LlbHwInitialize().