ReactOS  0.4.15-dev-3303-g1ade494
hwclcd.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS Boot Loader
3  * LICENSE: BSD - See COPYING.ARM in the top level directory
4  * FILE: boot/armllb/hw/versatile/hwclcd.c
5  * PURPOSE: LLB CLCD Routines for Versatile
6  * PROGRAMMERS: ReactOS Portable Systems Group
7  */
8 
9 #include "precomp.h"
10 
11 #define LCDTIMING0_PPL(x) ((((x) / 16 - 1) & 0x3f) << 2)
12 #define LCDTIMING1_LPP(x) (((x) & 0x3ff) - 1)
13 #define LCDCONTROL_LCDPWR (1 << 11)
14 #define LCDCONTROL_LCDEN (1)
15 #define LCDCONTROL_LCDBPP(x) (((x) & 7) << 1)
16 #define LCDCONTROL_LCDTFT (1 << 5)
17 
18 #define PL110_LCDTIMING0 (PVOID)0x10120000
19 #define PL110_LCDTIMING1 (PVOID)0x10120004
20 #define PL110_LCDTIMING2 (PVOID)0x10120008
21 #define PL110_LCDUPBASE (PVOID)0x10120010
22 #define PL110_LCDLPBASE (PVOID)0x10120014
23 #define PL110_LCDCONTROL (PVOID)0x10120018
24 
26 
27 VOID
28 NTAPI
30 {
31  /* Set framebuffer address */
34 
35  /* Initialize timings to 720x400 */
38 
39  /* Enable the TFT/LCD Display */
45 }
46 
47 ULONG
48 NTAPI
50 {
51  return 720;
52 }
53 
54 ULONG
55 NTAPI
57 {
58  return 400;
59 }
60 
61 PVOID
62 NTAPI
64 {
65  return (PVOID)0x000A0000;
66 }
67 
68 ULONG
69 NTAPI
71  IN ULONG Green,
72  IN ULONG Blue)
73 {
74  return (((Blue >> 3) << 11)| ((Green >> 2) << 5)| ((Red >> 3) << 0));
75 }
76 
77 /* EOF */
ULONG NTAPI LlbHwGetScreenHeight(VOID)
Definition: hwclcd.c:56
Definition: bl.h:202
#define IN
Definition: typedefs.h:39
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
Definition: bl.h:199
#define LCDTIMING1_LPP(x)
Definition: hwclcd.c:12
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
ULONG NTAPI LlbHwVideoCreateColor(IN ULONG Red, IN ULONG Green, IN ULONG Blue)
Definition: hwclcd.c:70
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
Definition: bl.h:200
unsigned int ULONG
Definition: retypes.h:1
PUSHORT LlbHwVideoBuffer
Definition: hwclcd.c:25
#define PL110_LCDUPBASE
Definition: hwclcd.c:21
unsigned short * PUSHORT
Definition: retypes.h:2
VOID NTAPI LlbHwVersaClcdInitialize(VOID)
Definition: hwclcd.c:29