| LPCOpen Platform v1.03 LPCOpen Platform for NXP LPC Microcontrollers

- Main Page
- Modules
- Data Structures
- Files
- Related Pages

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
IP: LCD register block and driver
IP drivers: Common drivers used on multiple NXP devices

## Detailed Description

## Data Structures
struct | IP_LCD_001_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 | IP_LCD_PANEL_OPT_T { LCD_TFT = 0x02, LCD_MONO_4 = 0x01, LCD_MONO_8 = 0x05, LCD_CSTN = 0x00 }
| LCD Panel type. More...
enum | IP_LCD_COLOR_FORMAT_OPT_T { LCD_COLOR_FORMAT_RGB = 0, LCD_COLOR_FORMAT_BGR }
| LCD Color Format. More...
enum | IP_LCD_CURSOR_SIZE_OPT_T { LCD_CURSOR_32x32 = 0, LCD_CURSOR_64x64 }
| LCD Cursor Size. More...

## Functions
STATIC INLINE void | IP_LCD_EnableInts (IP_LCD_001_T *pLCD, uint32_t ints)
| Enable Controller Interrupt.
STATIC INLINE void | IP_LCD_DisableInts (IP_LCD_001_T *pLCD, uint32_t ints)
| Disable Controller Interrupt.
STATIC INLINE void | IP_LCD_ClearInts (IP_LCD_001_T *pLCD, uint32_t ints)
| Clear Controller Interrupt.
STATIC INLINE void | IP_LCD_PowerOn (IP_LCD_001_T *pLCD)
| Power-on the LCD Panel (power pin)
STATIC INLINE void | IP_LCD_PowerOff (IP_LCD_001_T *pLCD)
| Power-off the LCD Panel (power pin)
STATIC INLINE void | IP_LCD_Enable (IP_LCD_001_T *pLCD)
| Enable the LCD Controller.
STATIC INLINE void | IP_LCD_Disable (IP_LCD_001_T *pLCD)
| Enable the LCD Controller.
STATIC INLINE void | IP_LCD_SetUPFrameBuffer (IP_LCD_001_T *pLCD, void *buffer)
| Set LCD Upper Panel Frame Buffer for Single Panel or Upper Panel Frame Buffer for Dual Panel.
STATIC INLINE void | IP_LCD_SetLPFrameBuffer (IP_LCD_001_T *pLCD, void *buffer)
| Set LCD Lower Panel Frame Buffer for Dual Panel.
STATIC INLINE void | IP_LCD_Cursor_Config (IP_LCD_001_T *pLCD, IP_LCD_CURSOR_SIZE_OPT_T cursor_size, bool sync)
| Configure Cursor.
STATIC INLINE void * | IP_LCD_Cursor_GetImageBufferAddress (IP_LCD_001_T *pLCD, uint8_t cursor_num)
| Get Internal Cursor Image Buffer Address.
STATIC INLINE void | IP_LCD_Cursor_Enable (IP_LCD_001_T *pLCD, uint8_t cursor_num)
| Enable Cursor.
STATIC INLINE void | IP_LCD_Cursor_Disable (IP_LCD_001_T *pLCD, uint8_t cursor_num)
| Disable Cursor.
STATIC INLINE void | IP_LCD_Cursor_LoadPalette0 (IP_LCD_001_T *pLCD, uint32_t palette_color)
| Load Cursor Palette.
STATIC INLINE void | IP_LCD_Cursor_LoadPalette1 (IP_LCD_001_T *pLCD, uint32_t palette_color)
| Load Cursor Palette.
STATIC INLINE void | IP_LCD_Cursor_SetPos (IP_LCD_001_T *pLCD, uint16_t x, uint16_t y)
| Set Cursor Position.
STATIC INLINE void | IP_LCD_Cursor_SetClip (IP_LCD_001_T *pLCD, uint16_t x, uint16_t y)
| Set Cursor Clipping Position.
STATIC INLINE void | IP_LCD_Color_LoadPalette (IP_LCD_001_T *pLCD, uint32_t *palette_addr, uint32_t index)
| Load a color Palette entry.
void | IP_LCD_Init (IP_LCD_001_T *pLCD, LCD_Config_T *LCD_ConfigStruct)
| Initialize the LCD controller.

## 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

enum IP_LCD_COLOR_FORMAT_OPT_T

LCD Color Format.

Enumerator:

  LCD_COLOR_FORMAT_RGB |
  LCD_COLOR_FORMAT_BGR |

Definition at line 108 of file lcd_001.h.

enum IP_LCD_CURSOR_SIZE_OPT_T

LCD Cursor Size.

Enumerator:

  LCD_CURSOR_32x32 |
  LCD_CURSOR_64x64 |

Definition at line 148 of file lcd_001.h.

enum IP_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 98 of file lcd_001.h.

## Function Documentation

STATIC INLINE void IP_LCD_ClearInts | ( | IP_LCD_001_T * | pLCD,
|  | uint32_t | ints
| ) |  |

Clear Controller Interrupt.

Parameters

  pLCD | : pointer to LCD Controller Reg Struct
  ints | : OR'ed interrupt bits to clear

Returns
  None

Definition at line 181 of file lcd_001.h.

STATIC INLINE void IP_LCD_Color_LoadPalette | ( | IP_LCD_001_T * | pLCD,
|  | uint32_t * | palette_addr,
|  | uint32_t | index
| ) |  |

Load a color Palette entry.

Parameters

  pLCD | : 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 363 of file lcd_001.h.

STATIC INLINE void IP_LCD_Cursor_Config | ( | IP_LCD_001_T * | pLCD,
|  | IP_LCD_CURSOR_SIZE_OPT_T | cursor_size,
|  | bool | sync
| ) |  |

Configure Cursor.

Parameters

  pLCD | : 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 262 of file lcd_001.h.

STATIC INLINE void IP_LCD_Cursor_Disable | ( | IP_LCD_001_T * | pLCD,
|  | uint8_t | cursor_num
| ) |  |

Disable Cursor.

Parameters

  pLCD | : pointer to LCD Controller Reg Struct
  cursor_num | : specify number of cursor is going to be written this param must < 4

Returns
  None

Definition at line 297 of file lcd_001.h.

STATIC INLINE void IP_LCD_Cursor_Enable | ( | IP_LCD_001_T * | pLCD,
|  | uint8_t | cursor_num
| ) |  |

Enable Cursor.

Parameters

  pLCD | : pointer to LCD Controller Reg Struct
  cursor_num | : specify number of cursor is going to be written this param must < 4

Returns
  None

Definition at line 286 of file lcd_001.h.

STATIC INLINE void* IP_LCD_Cursor_GetImageBufferAddress | ( | IP_LCD_001_T * | pLCD,
|  | uint8_t | cursor_num
| ) |  |

Get Internal Cursor Image Buffer Address.

Parameters

  pLCD | : 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 274 of file lcd_001.h.

STATIC INLINE void IP_LCD_Cursor_LoadPalette0 | ( | IP_LCD_001_T * | pLCD,
|  | uint32_t | palette_color
| ) |  |

Load Cursor Palette.

Parameters

  pLCD | : pointer to LCD Controller Reg Struct
  palette_color | : cursor palette 0 value

Returns
  None

Definition at line 307 of file lcd_001.h.

STATIC INLINE void IP_LCD_Cursor_LoadPalette1 | ( | IP_LCD_001_T * | pLCD,
|  | uint32_t | palette_color
| ) |  |

Load Cursor Palette.

Parameters

  pLCD | : pointer to LCD Controller Reg Struct
  palette_color | : cursor palette 1 value

Returns
  None

Definition at line 322 of file lcd_001.h.

STATIC INLINE void IP_LCD_Cursor_SetClip | ( | IP_LCD_001_T * | pLCD,
|  | uint16_t | x,
|  | uint16_t | y
| ) |  |

Set Cursor Clipping Position.

Parameters

  pLCD | : 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 351 of file lcd_001.h.

STATIC INLINE void IP_LCD_Cursor_SetPos | ( | IP_LCD_001_T * | pLCD,
|  | uint16_t | x,
|  | uint16_t | y
| ) |  |

Set Cursor Position.

Parameters

  pLCD | : pointer to LCD Controller Reg Struct
  x | : horizontal position
  y | : vertical position

Returns
  None

Definition at line 339 of file lcd_001.h.

STATIC INLINE void IP_LCD_Disable | ( | IP_LCD_001_T * | pLCD | ) |

Enable the LCD Controller.

Parameters

  pLCD | : pointer to LCD Controller Reg Struct

Returns
  None

Definition at line 224 of file lcd_001.h.

STATIC INLINE void IP_LCD_DisableInts | ( | IP_LCD_001_T * | pLCD,
|  | uint32_t | ints
| ) |  |

Disable Controller Interrupt.

Parameters

  pLCD | : pointer to LCD Controller Reg Struct
  ints | : OR'ed interrupt bits to disable

Returns
  None

Definition at line 170 of file lcd_001.h.

STATIC INLINE void IP_LCD_Enable | ( | IP_LCD_001_T * | pLCD | ) |

Enable the LCD Controller.

Parameters

  pLCD | : pointer to LCD Controller Reg Struct

Returns
  None

Definition at line 215 of file lcd_001.h.

STATIC INLINE void IP_LCD_EnableInts | ( | IP_LCD_001_T * | pLCD,
|  | uint32_t | ints
| ) |  |

Enable Controller Interrupt.

Parameters

  pLCD | : 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_T * | pLCD,
|  | LCD_Config_T * | LCD_ConfigStruct
| ) |  |

Initialize the LCD controller.

Parameters

  pLCD | : 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.

STATIC INLINE void IP_LCD_PowerOff | ( | IP_LCD_001_T * | pLCD | ) |

Power-off the LCD Panel (power pin)

Parameters

  pLCD | : pointer to LCD Controller Reg Struct

Returns
  None

Definition at line 203 of file lcd_001.h.

STATIC INLINE void IP_LCD_PowerOn | ( | IP_LCD_001_T * | pLCD | ) |

Power-on the LCD Panel (power pin)

Parameters

  pLCD | : pointer to LCD Controller Reg Struct

Returns
  None

Definition at line 191 of file lcd_001.h.

STATIC INLINE void IP_LCD_SetLPFrameBuffer | ( | IP_LCD_001_T * | pLCD,
|  | void * | buffer
| ) |  |

Set LCD Lower Panel Frame Buffer for Dual Panel.

Parameters

  pLCD | : pointer to LCD Controller Reg Struct
  buffer | : address of buffer

Returns
  None

Definition at line 246 of file lcd_001.h.

STATIC INLINE void IP_LCD_SetUPFrameBuffer | ( | IP_LCD_001_T * | pLCD,
|  | void * | buffer
| ) |  |

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

Parameters

  pLCD | : pointer to LCD Controller Reg Struct
  buffer | : address of buffer

Returns
  None

Definition at line 235 of file lcd_001.h.