2 * @brief LPC18xx/43xx LCD chip driver
\r
5 * Copyright(C) NXP Semiconductors, 2012
\r
6 * All rights reserved.
\r
9 * Software that is described herein is for illustrative purposes only
\r
10 * which provides customers with programming information regarding the
\r
11 * LPC products. This software is supplied "AS IS" without any warranties of
\r
12 * any kind, and NXP Semiconductors and its licensor disclaim any and
\r
13 * all warranties, express or implied, including all implied warranties of
\r
14 * merchantability, fitness for a particular purpose and non-infringement of
\r
15 * intellectual property rights. NXP Semiconductors assumes no responsibility
\r
16 * or liability for the use of the software, conveys no license or rights under any
\r
17 * patent, copyright, mask work right, or any other intellectual property rights in
\r
18 * or to any products. NXP Semiconductors reserves the right to make changes
\r
19 * in the software without notification. NXP Semiconductors also makes no
\r
20 * representation or warranty that such application will be suitable for the
\r
21 * specified use without further testing or modification.
\r
24 * Permission to use, copy, modify, and distribute this software and its
\r
25 * documentation is hereby granted, under NXP Semiconductors' and its
\r
26 * licensor's relevant copyrights in the software, without fee, provided that it
\r
27 * is used in conjunction with NXP Semiconductors microcontrollers. This
\r
28 * copyright, permission, and disclaimer notice must appear in all copies of
\r
32 #ifndef __LCD_18XX_43XX_H_
\r
33 #define __LCD_18XX_43XX_H_
\r
39 /** @defgroup LCD_18XX_43XX CHIP: LPC18xx/43xx LCD driver
\r
40 * @ingroup CHIP_18XX_43XX_Drivers
\r
45 * @brief Initialize the LCD controller
\r
46 * @param pLCD : The base of LCD peripheral on the chip
\r
47 * @param LCD_ConfigStruct : Pointer to LCD configuration
\r
48 * @return LCD_FUNC_OK is executed successfully or LCD_FUNC_ERR on error
\r
50 void Chip_LCD_Init(LPC_LCD_T *pLCD, LCD_Config_T *LCD_ConfigStruct);
\r
53 * @brief Shutdown the LCD controller
\r
54 * @param pLCD : The base of LCD peripheral on the chip
\r
57 void Chip_LCD_DeInit(LPC_LCD_T *pLCD);
\r
60 * @brief Power-on the LCD Panel (power pin)
\r
61 * @param pLCD : The base of LCD peripheral on the chip
\r
64 STATIC INLINE void Chip_LCD_PowerOn(LPC_LCD_T *pLCD)
\r
66 IP_LCD_PowerOn(pLCD);
\r
70 * @brief Power-off the LCD Panel (power pin)
\r
71 * @param pLCD : The base of LCD peripheral on the chip
\r
74 STATIC INLINE void Chip_LCD_PowerOff(LPC_LCD_T *pLCD)
\r
76 IP_LCD_PowerOff(pLCD);
\r
80 * @brief Enable/Disable the LCD Controller
\r
81 * @param pLCD : The base of LCD peripheral on the chip
\r
84 STATIC INLINE void Chip_LCD_Enable(LPC_LCD_T *pLCD)
\r
86 IP_LCD_Enable(pLCD);
\r
90 * @brief Enable/Disable the LCD Controller
\r
91 * @param pLCD : The base of LCD peripheral on the chip
\r
94 STATIC INLINE void Chip_LCD_Disable(LPC_LCD_T *pLCD)
\r
96 IP_LCD_Disable(pLCD);
\r
100 * @brief Set LCD Upper Panel Frame Buffer for Single Panel or Upper Panel Frame
\r
101 * Buffer for Dual Panel
\r
102 * @param pLCD : The base of LCD peripheral on the chip
\r
103 * @param buffer : address of buffer
\r
106 STATIC INLINE void Chip_LCD_SetUPFrameBuffer(LPC_LCD_T *pLCD, void *buffer)
\r
108 IP_LCD_SetUPFrameBuffer(pLCD, buffer);
\r
112 * @brief Set LCD Lower Panel Frame Buffer for Dual Panel
\r
113 * @param pLCD : The base of LCD peripheral on the chip
\r
114 * @param buffer : address of buffer
\r
117 STATIC INLINE void Chip_LCD_SetLPFrameBuffer(LPC_LCD_T *pLCD, void *buffer)
\r
119 IP_LCD_SetLPFrameBuffer(pLCD, buffer);
\r
123 * @brief Configure Cursor
\r
124 * @param pLCD : The base of LCD peripheral on the chip
\r
125 * @param cursor_size : specify size of cursor
\r
126 * - LCD_CURSOR_32x32 :cursor size is 32x32 pixels
\r
127 * - LCD_CURSOR_64x64 :cursor size is 64x64 pixels
\r
128 * @param sync : cursor sync mode
\r
129 * - TRUE :cursor sync to the frame sync pulse
\r
130 * - FALSE :cursor async mode
\r
133 void Chip_LCD_Cursor_Config(LPC_LCD_T *pLCD, IP_LCD_CURSOR_SIZE_OPT_T cursor_size, bool sync);
\r
136 * @brief Enable Cursor
\r
137 * @param pLCD : The base of LCD peripheral on the chip
\r
138 * @param cursor_num : specify number of cursor is going to be written
\r
139 * this param must < 4
\r
142 STATIC INLINE void Chip_LCD_Cursor_Enable(LPC_LCD_T *pLCD, uint8_t cursor_num)
\r
144 IP_LCD_Cursor_Enable(pLCD, cursor_num);
\r
148 * @brief Disable Cursor
\r
149 * @param pLCD : The base of LCD peripheral on the chip
\r
150 * @param cursor_num : specify number of cursor is going to be written
\r
151 * this param must < 4
\r
154 STATIC INLINE void Chip_LCD_Cursor_Disable(LPC_LCD_T *pLCD, uint8_t cursor_num)
\r
156 IP_LCD_Cursor_Disable(pLCD, cursor_num);
\r
160 * @brief Load Cursor Palette
\r
161 * @param pLCD : The base of LCD peripheral on the chip
\r
162 * @param palette_color : cursor palette 0 value
\r
165 STATIC INLINE void Chip_LCD_Cursor_LoadPalette0(LPC_LCD_T *pLCD, uint32_t palette_color)
\r
167 IP_LCD_Cursor_LoadPalette0(pLCD, palette_color);
\r
171 * @brief Load Cursor Palette
\r
172 * @param pLCD : The base of LCD peripheral on the chip
\r
173 * @param palette_color : cursor palette 1 value
\r
176 STATIC INLINE void Chip_LCD_Cursor_LoadPalette1(LPC_LCD_T *pLCD, uint32_t palette_color)
\r
178 IP_LCD_Cursor_LoadPalette1(pLCD, palette_color);
\r
182 * @brief Set Cursor Position
\r
183 * @param pLCD : The base of LCD peripheral on the chip
\r
184 * @param x : horizontal position
\r
185 * @param y : vertical position
\r
188 STATIC INLINE void Chip_LCD_Cursor_SetPos(LPC_LCD_T *pLCD, uint16_t x, uint16_t y)
\r
190 IP_LCD_Cursor_SetPos(pLCD, x, y);
\r
194 * @brief Set Cursor Clipping Position
\r
195 * @param pLCD : The base of LCD peripheral on the chip
\r
196 * @param x : horizontal position, should be in range: 0..63
\r
197 * @param y : vertical position, should be in range: 0..63
\r
200 STATIC INLINE void Chip_LCD_Cursor_SetClip(LPC_LCD_T *pLCD, uint16_t x, uint16_t y)
\r
202 IP_LCD_Cursor_SetClip(pLCD, x, y);
\r
206 * @brief Enable Controller Interrupt
\r
207 * @param pLCD : The base of LCD peripheral on the chip
\r
208 * @param ints : OR'ed interrupt bits to enable
\r
211 STATIC INLINE void Chip_LCD_EnableInts(LPC_LCD_T *pLCD, uint32_t ints)
\r
213 IP_LCD_EnableInts(pLCD, ints);
\r
217 * @brief Disable Controller Interrupt
\r
218 * @param pLCD : The base of LCD peripheral on the chip
\r
219 * @param ints : OR'ed interrupt bits to disable
\r
222 STATIC INLINE void Chip_LCD_DisableInts(LPC_LCD_T *pLCD, uint32_t ints)
\r
224 IP_LCD_DisableInts(pLCD, ints);
\r
228 * @brief Clear Controller Interrupt
\r
229 * @param pLCD : The base of LCD peripheral on the chip
\r
230 * @param ints : OR'ed interrupt bits to clear
\r
233 STATIC INLINE void Chip_LCD_ClearInts(LPC_LCD_T *pLCD, uint32_t ints)
\r
235 IP_LCD_ClearInts(pLCD, ints);
\r
239 * @brief Write Cursor Image into Internal Cursor Image Buffer
\r
240 * @param pLCD : The base of LCD peripheral on the chip
\r
241 * @param cursor_num : Cursor index
\r
242 * @param Image : Pointer to image data
\r
245 void Chip_LCD_Cursor_WriteImage(LPC_LCD_T *pLCD, uint8_t cursor_num, void *Image);
\r
248 * @brief Load LCD Palette
\r
249 * @param pLCD : The base of LCD peripheral on the chip
\r
250 * @param palette : Address of palette table to load
\r
253 void Chip_LCD_LoadPalette(LPC_LCD_T *pLCD, void *palette);
\r
263 #endif /* __LCD_18XX_43XX_H_ */
\r