RTEMS
6.3
Toggle main menu visibility
Loading...
Searching...
No Matches
bsps
arm
include
bsp
lpc-lcd.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: BSD-2-Clause */
2
10
11
/*
12
* Copyright (c) 2011 embedded brains GmbH & Co. KG
13
*
14
* Redistribution and use in source and binary forms, with or without
15
* modification, are permitted provided that the following conditions
16
* are met:
17
* 1. Redistributions of source code must retain the above copyright
18
* notice, this list of conditions and the following disclaimer.
19
* 2. Redistributions in binary form must reproduce the above copyright
20
* notice, this list of conditions and the following disclaimer in the
21
* documentation and/or other materials provided with the distribution.
22
*
23
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
27
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33
* POSSIBILITY OF SUCH DAMAGE.
34
*/
35
36
#ifndef LIBBSP_ARM_SHARED_LPC_LCD_H
37
#define LIBBSP_ARM_SHARED_LPC_LCD_H
38
39
#include <
bsp/utility.h
>
40
41
#ifdef __cplusplus
42
extern
"C"
{
43
#endif
44
55
56
typedef
struct
{
57
uint8_t img [1024];
58
uint32_t ctrl;
59
uint32_t cfg;
60
uint32_t pal0;
61
uint32_t pal1;
62
uint32_t xy;
63
uint32_t clip;
64
uint32_t intmsk;
65
uint32_t intclr;
66
uint32_t intraw;
67
uint32_t intstat;
68
}
lpc_cursor
;
69
70
typedef
struct
{
71
uint32_t timh;
72
uint32_t timv;
73
uint32_t pol;
74
uint32_t le;
75
uint32_t upbase;
76
uint32_t lpbase;
77
uint32_t ctrl;
78
uint32_t intmsk;
79
uint32_t intraw;
80
uint32_t intstat;
81
uint32_t intclr;
82
uint32_t upcurr;
83
uint32_t lpcurr;
84
uint8_t reserved_0 [0x200 - 0x034];
85
uint16_t pal [256];
86
uint8_t reserved_1 [0x800 - 0x400];
87
lpc_cursor
crsr;
88
}
lpc_lcd
;
89
95
96
#define LCD_CFG_CLKDIV(val) BSP_FLD32(val, 0, 4)
97
#define LCD_CFG_HCLK_ENABLE BSP_BIT32(5)
98
#define LCD_CFG_MODE_SELECT(val) BSP_FLD32(val, 6, 7)
99
#define LCD_CFG_DISPLAY_TYPE BSP_BIT32(8)
100
102
108
109
#define LCD_TIMH_PPL(val) BSP_FLD32(val, 2, 7)
110
#define LCD_TIMH_PPL_GET(reg) BSP_FLD32GET(reg, 2, 7)
111
#define LCD_TIMH_HSW(val) BSP_FLD32(val, 8, 15)
112
#define LCD_TIMH_HSW_GET(reg) BSP_FLD32GET(reg, 8, 15)
113
#define LCD_TIMH_HFP(val) BSP_FLD32(val, 16, 23)
114
#define LCD_TIMH_HFP_GET(reg) BSP_FLD32GET(reg, 16, 23)
115
#define LCD_TIMH_HBP(val) BSP_FLD32(val, 24, 31)
116
#define LCD_TIMH_HBP_GET(reg) BSP_FLD32GET(reg, 24, 31)
117
119
125
126
#define LCD_TIMV_LPP(val) BSP_FLD32(val, 0, 9)
127
#define LCD_TIMV_LPP_GET(reg) BSP_FLD32GET(reg, 0, 9)
128
#define LCD_TIMV_VSW(val) BSP_FLD32(val, 10, 15)
129
#define LCD_TIMV_VSW_GET(reg) BSP_FLD32GET(reg, 10, 15)
130
#define LCD_TIMV_VFP(val) BSP_FLD32(val, 16, 23)
131
#define LCD_TIMV_VFP_GET(reg) BSP_FLD32GET(reg, 16, 23)
132
#define LCD_TIMV_VBP(val) BSP_FLD32(val, 24, 31)
133
#define LCD_TIMV_VBP_GET(reg) BSP_FLD32GET(reg, 24, 31)
134
136
142
143
#define LCD_POL_PCD_LO(val) BSP_FLD32(val, 0, 4)
144
#define LCD_POL_PCD_LO_GET(reg) BSP_FLD32GET(reg, 0, 4)
145
#define LCD_POL_CLKSEL BSP_BIT32(5)
146
#define LCD_POL_ACB(val) BSP_FLD32(val, 6, 10)
147
#define LCD_POL_ACB_GET(reg) BSP_FLD32GET(reg, 6, 10)
148
#define LCD_POL_IVS BSP_BIT32(11)
149
#define LCD_POL_IHS BSP_BIT32(12)
150
#define LCD_POL_IPC BSP_BIT32(13)
151
#define LCD_POL_IOE BSP_BIT32(14)
152
#define LCD_POL_CPL(val) BSP_FLD32(val, 16, 25)
153
#define LCD_POL_CPL_GET(reg) BSP_FLD32GET(reg, 16, 25)
154
#define LCD_POL_BCD BSP_BIT32(26)
155
#define LCD_POL_PCD_HI(val) BSP_FLD32(val, 27, 31)
156
#define LCD_POL_PCD_HI_GET(reg) BSP_FLD32GET(reg, 27, 31)
157
159
165
166
#define LCD_LE_LED(val) BSP_FLD32(val, 0, 6)
167
#define LCD_LE_LEE BSP_BIT32(16)
168
170
176
177
#define LCD_CTRL_LCDEN BSP_BIT32(0)
178
#define LCD_CTRL_LCDBPP(val) BSP_FLD32(val, 1, 3)
179
#define LCD_CTRL_LCDBPP_GET(reg) BSP_FLD32GET(reg, 1, 3)
180
#define LCD_CTRL_LCDBW BSP_BIT32(4)
181
#define LCD_CTRL_LCDTFT BSP_BIT32(5)
182
#define LCD_CTRL_LCDMONO8 BSP_BIT32(6)
183
#define LCD_CTRL_LCDDUAL BSP_BIT32(7)
184
#define LCD_CTRL_BGR BSP_BIT32(8)
185
#define LCD_CTRL_BEBO BSP_BIT32(9)
186
#define LCD_CTRL_BEPO BSP_BIT32(10)
187
#define LCD_CTRL_LCDPWR BSP_BIT32(11)
188
#define LCD_CTRL_LCDVCOMP(val) BSP_FLD32(val, 12, 13)
189
#define LCD_CTRL_LCDVCOMP_GET(reg) BSP_FLD32GET(reg, 12, 13)
190
#define LCD_CTRL_WATERMARK BSP_BIT32(16)
191
193
199
200
#define LCD_INT_FUF BSP_BIT32(1)
201
#define LCD_INT_LNBU BSP_BIT32(2)
202
#define LCD_INT_VCOMP BSP_BIT32(3)
203
#define LCD_INT_BER BSP_BIT32(4)
204
206
212
213
#define LCD_PAL_R(val) BSP_FLD16(val, 0, 4)
214
#define LCD_PAL_G(val) BSP_FLD16(val, 5, 9)
215
#define LCD_PAL_B(val) BSP_FLD16(val, 10, 14)
216
#define LCD_PAL_I BSP_BIT16(15)
217
219
221
222
#ifdef __cplusplus
223
}
224
#endif
/* __cplusplus */
225
226
#endif
/* LIBBSP_ARM_SHARED_LPC_LCD_H */
utility.h
This header file provides utility macros for BSPs.
lpc_cursor
Definition
lpc-lcd.h:56
lpc_lcd
Definition
lpc-lcd.h:70
Generated by
1.18.0