LPCOpen Platform
LPCOpen Platform for NXP LPC Microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
IP: LCD register block and driver

Data Structures

struct  IP_LCD_001_Type
 LCD Controller register block structure. More...
 
struct  LCD_PALETTE_ENTRY_Type
 LCD Palette entry format. More...
 
struct  LCD_Config_Type
 A structure for LCD Configuration. More...
 

Macros

#define LCD_INTMSK_FUFIM   0x2
 
#define LCD_INTMSK_LNBUIM   0x4
 
#define LCD_INTMSK_VCOMPIM   0x8
 
#define LCD_INTMSK_BERIM   0x10
 
#define CLCDC_LCDCTRL_ENABLE   _BIT(0)
 
#define CLCDC_LCDCTRL_PWR   _BIT(11)
 

Enumerations

enum  LCD_PANEL_OPT { LCD_TFT = 0x02, LCD_MONO_4 = 0x01, LCD_MONO_8 = 0x05, LCD_CSTN = 0x00 }
 LCD Panel type. More...
 
enum  LCD_COLOR_FORMAT_OPT { LCD_COLOR_FORMAT_RGB = 0, LCD_COLOR_FORMAT_BGR }
 LCD Color Format. More...
 
enum  LCD_CURSOR_SIZE_OPT { LCD_CURSOR_32x32 = 0, LCD_CURSOR_64x64 }
 LCD Cursor Size. More...
 

Functions

STATIC INLINE void IP_LCD_EnableInts (IP_LCD_001_Type *LCDx, uint32_t ints)
 Enable Controller Interrupt.
 
STATIC INLINE void IP_LCD_DisableInts (IP_LCD_001_Type *LCDx, uint32_t ints)
 Disable Controller Interrupt.
 
STATIC INLINE void IP_LCD_ClearInts (IP_LCD_001_Type *LCDx, uint32_t ints)
 Clear Controller Interrupt.
 
void IP_LCD_Init (IP_LCD_001_Type *LCDx, LCD_Config_Type *LCD_ConfigStruct)
 Initialize the LCD controller.
 
void IP_LCD_Power (IP_LCD_001_Type *LCDx, FunctionalState OnOff)
 Power the LCD Panel (power pin)
 
void IP_LCD_Enable (IP_LCD_001_Type *LCDx, FunctionalState EnDis)
 Enable/Disable the LCD Controller.
 
void IP_LCD_SetUPFrameBuffer (IP_LCD_001_Type *LCDx, void *buffer)
 Set LCD Upper Panel Frame Buffer for Single Panel or Upper Panel Frame Buffer for Dual Panel.
 
void IP_LCD_SetLPFrameBuffer (IP_LCD_001_Type *LCDx, void *buffer)
 Set LCD Lower Panel Frame Buffer for Dual Panel.
 
void IP_LCD_Cursor_Config (IP_LCD_001_Type *LCDx, LCD_CURSOR_SIZE_OPT cursor_size, bool sync)
 Configure Cursor.
 
void * IP_LCD_Cursor_GetImageBufferAddress (IP_LCD_001_Type *LCDx, uint8_t cursor_num)
 Get Internal Cursor Image Buffer Address.
 
void IP_LCD_Cursor_Enable (IP_LCD_001_Type *LCDx, uint8_t cursor_num, FunctionalState OnOff)
 Enable Cursor.
 
void IP_LCD_Cursor_LoadPalette0 (IP_LCD_001_Type *LCDx, uint32_t palette_color)
 Load Cursor Palette.
 
void IP_LCD_Cursor_LoadPalette1 (IP_LCD_001_Type *LCDx, uint32_t palette_color)
 Load Cursor Palette.
 
void IP_LCD_Cursor_SetPos (IP_LCD_001_Type *LCDx, uint16_t x, uint16_t y)
 Set Cursor Position.
 
void IP_LCD_Cursor_SetClip (IP_LCD_001_Type *LCDx, uint16_t x, uint16_t y)
 Set Cursor Clipping Position.
 
void IP_LCD_Color_LoadPalette (IP_LCD_001_Type *LCDx, uint32_t *palette_addr, uint32_t index)
 Load a color Palette entry.
 

Detailed Description

Macro Definition Documentation

#define CLCDC_LCDCTRL_ENABLE   _BIT(0)

LCD control enable bit

Definition at line 119 of file lcd_001.h.

#define CLCDC_LCDCTRL_PWR   _BIT(11)

LCD control power enable bit

Definition at line 120 of file lcd_001.h.

#define LCD_INTMSK_BERIM   0x10

AHB master error interrupt enable

Definition at line 117 of file lcd_001.h.

#define LCD_INTMSK_FUFIM   0x2

LCD Interrupt control mask register bits FIFO underflow interrupt enable

Definition at line 114 of file lcd_001.h.

#define LCD_INTMSK_LNBUIM   0x4

LCD next base address update interrupt enable

Definition at line 115 of file lcd_001.h.

#define LCD_INTMSK_VCOMPIM   0x8

Vertical compare interrupt enable

Definition at line 116 of file lcd_001.h.

Enumeration Type Documentation

LCD Color Format.

Enumerator:
LCD_COLOR_FORMAT_RGB 
LCD_COLOR_FORMAT_BGR 

Definition at line 108 of file lcd_001.h.

LCD Cursor Size.

Enumerator:
LCD_CURSOR_32x32 
LCD_CURSOR_64x64 

Definition at line 148 of file lcd_001.h.

LCD Panel type.

Enumerator:
LCD_TFT 

standard TFT

LCD_MONO_4 

4-bit STN mono

LCD_MONO_8 

8-bit STN mono

LCD_CSTN 

color STN

Definition at line 98 of file lcd_001.h.

Function Documentation

STATIC INLINE void IP_LCD_ClearInts ( IP_LCD_001_Type LCDx,
uint32_t  ints 
)

Clear Controller Interrupt.

Parameters
LCDx: pointer to LCD Controller Reg Struct
ints: OR'ed interrupt bits to clear
Returns
None

Definition at line 181 of file lcd_001.h.

void IP_LCD_Color_LoadPalette ( IP_LCD_001_Type LCDx,
uint32_t palette_addr,
uint32_t  index 
)

Load a color Palette entry.

Parameters
LCDx: pointer to LCD Controller Reg Struct
palette_addr: Address of palette table to load from
index: palette entry index to load
Returns
None

Definition at line 212 of file lcd_001.c.

void IP_LCD_Cursor_Config ( IP_LCD_001_Type LCDx,
LCD_CURSOR_SIZE_OPT  cursor_size,
bool  sync 
)

Configure Cursor.

Parameters
LCDx: pointer to LCD Controller Reg Struct
cursor_size: specify size of cursor
  • LCD_CURSOR_32x32 :cursor size is 32x32 pixels
  • LCD_CURSOR_64x64 :cursor size is 64x64 pixels
sync: cursor sync mode
  • TRUE :cursor sync to the frame sync pulse
  • FALSE :cursor async mode
Returns
None

Definition at line 164 of file lcd_001.c.

void IP_LCD_Cursor_Enable ( IP_LCD_001_Type LCDx,
uint8_t  cursor_num,
FunctionalState  OnOff 
)

Enable Cursor.

Parameters
LCDx: pointer to LCD Controller Reg Struct
cursor_num: specify number of cursor is going to be written this param must < 4
OnOff: true to turn on LCD, false to turn off
Returns
None

Definition at line 174 of file lcd_001.c.

void* IP_LCD_Cursor_GetImageBufferAddress ( IP_LCD_001_Type LCDx,
uint8_t  cursor_num 
)

Get Internal Cursor Image Buffer Address.

Parameters
LCDx: pointer to LCD Controller Reg Struct
cursor_num: specify number of cursor is going to be written this param must < 4
Returns
Cursor Image Buffer Address

Definition at line 169 of file lcd_001.c.

void IP_LCD_Cursor_LoadPalette0 ( IP_LCD_001_Type LCDx,
uint32_t  palette_color 
)

Load Cursor Palette.

Parameters
LCDx: pointer to LCD Controller Reg Struct
palette_color: cursor palette 0 value
Returns
None

Definition at line 184 of file lcd_001.c.

void IP_LCD_Cursor_LoadPalette1 ( IP_LCD_001_Type LCDx,
uint32_t  palette_color 
)

Load Cursor Palette.

Parameters
LCDx: pointer to LCD Controller Reg Struct
palette_color: cursor palette 1 value
Returns
None

Definition at line 193 of file lcd_001.c.

void IP_LCD_Cursor_SetClip ( IP_LCD_001_Type LCDx,
uint16_t  x,
uint16_t  y 
)

Set Cursor Clipping Position.

Parameters
LCDx: pointer to LCD Controller Reg Struct
x: horizontal position, should be in range: 0..63
y: vertical position, should be in range: 0..63
Returns
None

Definition at line 207 of file lcd_001.c.

void IP_LCD_Cursor_SetPos ( IP_LCD_001_Type LCDx,
uint16_t  x,
uint16_t  y 
)

Set Cursor Position.

Parameters
LCDx: pointer to LCD Controller Reg Struct
x: horizontal position
y: vertical position
Returns
None

Definition at line 202 of file lcd_001.c.

STATIC INLINE void IP_LCD_DisableInts ( IP_LCD_001_Type LCDx,
uint32_t  ints 
)

Disable Controller Interrupt.

Parameters
LCDx: pointer to LCD Controller Reg Struct
ints: OR'ed interrupt bits to disable
Returns
None

Definition at line 170 of file lcd_001.h.

void IP_LCD_Enable ( IP_LCD_001_Type LCDx,
FunctionalState  EnDis 
)

Enable/Disable the LCD Controller.

Parameters
LCDx: pointer to LCD Controller Reg Struct
EnDis: true to enable, false to disable
Returns
None

Definition at line 144 of file lcd_001.c.

STATIC INLINE void IP_LCD_EnableInts ( IP_LCD_001_Type LCDx,
uint32_t  ints 
)

Enable Controller Interrupt.

Parameters
LCDx: pointer to LCD Controller Reg Struct
ints: OR'ed interrupt bits to enable
Returns
None

Definition at line 159 of file lcd_001.h.

void IP_LCD_Init ( IP_LCD_001_Type LCDx,
LCD_Config_Type LCD_ConfigStruct 
)

Initialize the LCD controller.

Parameters
LCDx: pointer to LCD Controller Reg Struct
LCD_ConfigStruct: Pointer to LCD configuration
Returns
LCD_FUNC_OK is executed successfully or LCD_FUNC_ERR on error

Definition at line 51 of file lcd_001.c.

void IP_LCD_Power ( IP_LCD_001_Type LCDx,
FunctionalState  OnOff 
)

Power the LCD Panel (power pin)

Parameters
LCDx: pointer to LCD Controller Reg Struct
OnOff: true to power on, false to power off
Returns
None

Definition at line 129 of file lcd_001.c.

void IP_LCD_SetLPFrameBuffer ( IP_LCD_001_Type LCDx,
void *  buffer 
)

Set LCD Lower Panel Frame Buffer for Dual Panel.

Parameters
LCDx: pointer to LCD Controller Reg Struct
buffer: address of buffer
Returns
None

Definition at line 159 of file lcd_001.c.

void IP_LCD_SetUPFrameBuffer ( IP_LCD_001_Type LCDx,
void *  buffer 
)

Set LCD Upper Panel Frame Buffer for Single Panel or Upper Panel Frame Buffer for Dual Panel.

Parameters
LCDx: pointer to LCD Controller Reg Struct
buffer: address of buffer
Returns
None

Definition at line 154 of file lcd_001.c.