LPCOpen Platform for LPC18XX/43XX microcontrollers: CHIP: LPC18xx/43xx LCD driver

| LPCOpen Platform for LPC18XX/43XX microcontrollers 18XX43XX LPCOpen Platform for the NXP LPC18XX/43XX family of Microcontrollers

- Main Page
- Modules
- Data Structures
- Files

Data Structures | Macros | Enumerations | Functions
CHIP: LPC18xx/43xx LCD driver
LPC18xx/43xx chip specific drivers

## Detailed Description

## Data Structures
struct | LPC_LCD_T
| LCD Controller register block structure. More...
struct | LCD_PALETTE_ENTRY_T
| LCD Palette entry format. More...
struct | LCD_CONFIG_T
| 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_T { LCD_TFT = 0x02, LCD_MONO_4 = 0x01, LCD_MONO_8 = 0x05, LCD_CSTN = 0x00 }
| LCD Panel type. More...
enum | LCD_COLOR_FORMAT_OPT_T { LCD_COLOR_FORMAT_RGB = 0, LCD_COLOR_FORMAT_BGR }
| LCD Color Format. More...
enum | LCD_CURSOR_SIZE_OPT_T { LCD_CURSOR_32x32 = 0, LCD_CURSOR_64x64 }
| LCD Cursor Size. More...

## Functions
void | Chip_LCD_Init (LPC_LCD_T *pLCD, LCD_CONFIG_T *LCD_ConfigStruct)
| Initialize the LCD controller. More...
void | Chip_LCD_DeInit (LPC_LCD_T *pLCD)
| Shutdown the LCD controller. More...
STATIC INLINE void | Chip_LCD_PowerOn (LPC_LCD_T *pLCD)
| Power-on the LCD Panel (power pin) More...
STATIC INLINE void | Chip_LCD_PowerOff (LPC_LCD_T *pLCD)
| Power-off the LCD Panel (power pin) More...
STATIC INLINE void | Chip_LCD_Enable (LPC_LCD_T *pLCD)
| Enable/Disable the LCD Controller. More...
STATIC INLINE void | Chip_LCD_Disable (LPC_LCD_T *pLCD)
| Enable/Disable the LCD Controller. More...
STATIC INLINE void | Chip_LCD_SetUPFrameBuffer (LPC_LCD_T *pLCD, void *buffer)
| Set LCD Upper Panel Frame Buffer for Single Panel or Upper Panel Frame Buffer for Dual Panel. More...
STATIC INLINE void | Chip_LCD_SetLPFrameBuffer (LPC_LCD_T *pLCD, void *buffer)
| Set LCD Lower Panel Frame Buffer for Dual Panel. More...
void | Chip_LCD_Cursor_Config (LPC_LCD_T *pLCD, LCD_CURSOR_SIZE_OPT_T cursor_size, bool sync)
| Configure Cursor. More...
STATIC INLINE void | Chip_LCD_Cursor_Enable (LPC_LCD_T *pLCD, uint8_t cursor_num)
| Enable Cursor. More...
STATIC INLINE void | Chip_LCD_Cursor_Disable (LPC_LCD_T *pLCD, uint8_t cursor_num)
| Disable Cursor. More...
STATIC INLINE void | Chip_LCD_Cursor_LoadPalette0 (LPC_LCD_T *pLCD, uint32_t palette_color)
| Load Cursor Palette. More...
STATIC INLINE void | Chip_LCD_Cursor_LoadPalette1 (LPC_LCD_T *pLCD, uint32_t palette_color)
| Load Cursor Palette. More...
STATIC INLINE void | Chip_LCD_Cursor_SetPos (LPC_LCD_T *pLCD, uint16_t x, uint16_t y)
| Set Cursor Position. More...
STATIC INLINE void | Chip_LCD_Cursor_SetClip (LPC_LCD_T *pLCD, uint16_t x, uint16_t y)
| Set Cursor Clipping Position. More...
STATIC INLINE void | Chip_LCD_EnableInts (LPC_LCD_T *pLCD, uint32_t ints)
| Enable Controller Interrupt. More...
STATIC INLINE void | Chip_LCD_DisableInts (LPC_LCD_T *pLCD, uint32_t ints)
| Disable Controller Interrupt. More...
STATIC INLINE void | Chip_LCD_ClearInts (LPC_LCD_T *pLCD, uint32_t ints)
| Clear Controller Interrupt. More...
void | Chip_LCD_Cursor_WriteImage (LPC_LCD_T *pLCD, uint8_t cursor_num, void *Image)
| Write Cursor Image into Internal Cursor Image Buffer. More...
void | Chip_LCD_LoadPalette (LPC_LCD_T *pLCD, void *palette)
| Load LCD Palette. More...

## Macro Definition Documentation

#define CLCDC_LCDCTRL_ENABLE _BIT(0)

LCD control enable bit

Definition at line 116 of file lcd_18xx_43xx.h.

#define CLCDC_LCDCTRL_PWR _BIT(11)

LCD control power enable bit

Definition at line 117 of file lcd_18xx_43xx.h.

#define LCD_INTMSK_BERIM 0x10

AHB master error interrupt enable

Definition at line 114 of file lcd_18xx_43xx.h.

#define LCD_INTMSK_FUFIM 0x2

LCD Interrupt control mask register bits FIFO underflow interrupt enable

Definition at line 111 of file lcd_18xx_43xx.h.

#define LCD_INTMSK_LNBUIM 0x4

LCD next base address update interrupt enable

Definition at line 112 of file lcd_18xx_43xx.h.

#define LCD_INTMSK_VCOMPIM 0x8

Vertical compare interrupt enable

Definition at line 113 of file lcd_18xx_43xx.h.

## Enumeration Type Documentation

enum LCD_COLOR_FORMAT_OPT_T

LCD Color Format.

Enumerator
LCD_COLOR_FORMAT_RGB |
LCD_COLOR_FORMAT_BGR |

Definition at line 105 of file lcd_18xx_43xx.h.

enum LCD_CURSOR_SIZE_OPT_T

LCD Cursor Size.

Enumerator
LCD_CURSOR_32x32 |
LCD_CURSOR_64x64 |

Definition at line 145 of file lcd_18xx_43xx.h.

enum LCD_PANEL_OPT_T

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 95 of file lcd_18xx_43xx.h.

## Function Documentation

STATIC INLINE void Chip_LCD_ClearInts | ( | LPC_LCD_T * | pLCD,
|  | uint32_t | ints
| ) |  |

Clear Controller Interrupt.

Parameters

  pLCD | : The base of LCD peripheral on the chip
  ints | : OR'ed interrupt bits to clear

Returns
  None

Definition at line 353 of file lcd_18xx_43xx.h.

void Chip_LCD_Cursor_Config | ( | LPC_LCD_T * | pLCD,
|  | LCD_CURSOR_SIZE_OPT_T | cursor_size,
|  | bool | sync
| ) |  |

Configure Cursor.

Parameters

  pLCD | : The base of LCD peripheral on the chip
  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 140 of file lcd_18xx_43xx.c.

STATIC INLINE void Chip_LCD_Cursor_Disable | ( | LPC_LCD_T * | pLCD,
|  | uint8_t | cursor_num
| ) |  |

Disable Cursor.

Parameters

  pLCD | : The base of LCD peripheral on the chip
  cursor_num | : specify number of cursor is going to be written this param must < 4

Returns
  None

Definition at line 266 of file lcd_18xx_43xx.h.

STATIC INLINE void Chip_LCD_Cursor_Enable | ( | LPC_LCD_T * | pLCD,
|  | uint8_t | cursor_num
| ) |  |

Enable Cursor.

Parameters

  pLCD | : The base of LCD peripheral on the chip
  cursor_num | : specify number of cursor is going to be written this param must < 4

Returns
  None

Definition at line 254 of file lcd_18xx_43xx.h.

STATIC INLINE void Chip_LCD_Cursor_LoadPalette0 | ( | LPC_LCD_T * | pLCD,
|  | uint32_t | palette_color
| ) |  |

Load Cursor Palette.

Parameters

  pLCD | : The base of LCD peripheral on the chip
  palette_color | : cursor palette 0 value

Returns
  None

Definition at line 277 of file lcd_18xx_43xx.h.

STATIC INLINE void Chip_LCD_Cursor_LoadPalette1 | ( | LPC_LCD_T * | pLCD,
|  | uint32_t | palette_color
| ) |  |

Load Cursor Palette.

Parameters

  pLCD | : The base of LCD peripheral on the chip
  palette_color | : cursor palette 1 value

Returns
  None

Definition at line 292 of file lcd_18xx_43xx.h.

STATIC INLINE void Chip_LCD_Cursor_SetClip | ( | LPC_LCD_T * | pLCD,
|  | uint16_t | x,
|  | uint16_t | y
| ) |  |

Set Cursor Clipping Position.

Parameters

  pLCD | : The base of LCD peripheral on the chip
  x | : horizontal position, should be in range: 0..63
  y | : vertical position, should be in range: 0..63

Returns
  None

Definition at line 320 of file lcd_18xx_43xx.h.

STATIC INLINE void Chip_LCD_Cursor_SetPos | ( | LPC_LCD_T * | pLCD,
|  | uint16_t | x,
|  | uint16_t | y
| ) |  |

Set Cursor Position.

Parameters

  pLCD | : The base of LCD peripheral on the chip
  x | : horizontal position
  y | : vertical position

Returns
  None

Definition at line 308 of file lcd_18xx_43xx.h.

void Chip_LCD_Cursor_WriteImage | ( | LPC_LCD_T * | pLCD,
|  | uint8_t | cursor_num,
|  | void * | Image
| ) |  |

Write Cursor Image into Internal Cursor Image Buffer.

Parameters

  pLCD | : The base of LCD peripheral on the chip
  cursor_num | : Cursor index
  Image | : Pointer to image data

Returns
  None

Definition at line 147 of file lcd_18xx_43xx.c.

void Chip_LCD_DeInit | ( | LPC_LCD_T * | pLCD | ) |

Shutdown the LCD controller.

Parameters

  pLCD | : The base of LCD peripheral on the chip

Returns
  Nothing

Definition at line 134 of file lcd_18xx_43xx.c.

STATIC INLINE void Chip_LCD_Disable | ( | LPC_LCD_T * | pLCD | ) |

Enable/Disable the LCD Controller.

Parameters

  pLCD | : The base of LCD peripheral on the chip

Returns
  None

Definition at line 206 of file lcd_18xx_43xx.h.

STATIC INLINE void Chip_LCD_DisableInts | ( | LPC_LCD_T * | pLCD,
|  | uint32_t | ints
| ) |  |

Disable Controller Interrupt.

Parameters

  pLCD | : The base of LCD peripheral on the chip
  ints | : OR'ed interrupt bits to disable

Returns
  None

Definition at line 342 of file lcd_18xx_43xx.h.

STATIC INLINE void Chip_LCD_Enable | ( | LPC_LCD_T * | pLCD | ) |

Enable/Disable the LCD Controller.

Parameters

  pLCD | : The base of LCD peripheral on the chip

Returns
  None

Definition at line 196 of file lcd_18xx_43xx.h.

STATIC INLINE void Chip_LCD_EnableInts | ( | LPC_LCD_T * | pLCD,
|  | uint32_t | ints
| ) |  |

Enable Controller Interrupt.

Parameters

  pLCD | : The base of LCD peripheral on the chip
  ints | : OR'ed interrupt bits to enable

Returns
  None

Definition at line 331 of file lcd_18xx_43xx.h.

void Chip_LCD_Init | ( | LPC_LCD_T * | pLCD,
|  | LCD_CONFIG_T * | LCD_ConfigStruct
| ) |  |

Initialize the LCD controller.

Parameters

  pLCD | : The base of LCD peripheral on the chip
  LCD_ConfigStruct | : Pointer to LCD configuration

Returns
  LCD_FUNC_OK is executed successfully or LCD_FUNC_ERR on error

Definition at line 53 of file lcd_18xx_43xx.c.

void Chip_LCD_LoadPalette | ( | LPC_LCD_T * | pLCD,
|  | void * | palette
| ) |  |

Load LCD Palette.

Parameters

  pLCD | : The base of LCD peripheral on the chip
  palette | : Address of palette table to load

Returns
  None

Definition at line 173 of file lcd_18xx_43xx.c.

STATIC INLINE void Chip_LCD_PowerOff | ( | LPC_LCD_T * | pLCD | ) |

Power-off the LCD Panel (power pin)

Parameters

  pLCD | : The base of LCD peripheral on the chip

Returns
  None

Definition at line 183 of file lcd_18xx_43xx.h.

STATIC INLINE void Chip_LCD_PowerOn | ( | LPC_LCD_T * | pLCD | ) |

Power-on the LCD Panel (power pin)

Parameters

  pLCD | : The base of LCD peripheral on the chip

Returns
  None

Definition at line 170 of file lcd_18xx_43xx.h.

STATIC INLINE void Chip_LCD_SetLPFrameBuffer | ( | LPC_LCD_T * | pLCD,
|  | void * | buffer
| ) |  |

Set LCD Lower Panel Frame Buffer for Dual Panel.

Parameters

  pLCD | : The base of LCD peripheral on the chip
  buffer | : address of buffer

Returns
  None

Definition at line 229 of file lcd_18xx_43xx.h.

STATIC INLINE void Chip_LCD_SetUPFrameBuffer | ( | LPC_LCD_T * | pLCD,
|  | void * | buffer
| ) |  |

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

Parameters

  pLCD | : The base of LCD peripheral on the chip
  buffer | : address of buffer

Returns
  None

Definition at line 218 of file lcd_18xx_43xx.h.