| Nano102_112 Series BSP V3.03.002 The Board Support Package for Nano102_112 Series

Macros | Functions
LCD Exported Functions
NANO102/112 Device Driver » LCD Driver

## Macros
#define | LCD_GET_PD_INT_FLAG() ((LCD->FCSTS & LCD_FCSTS_PDSTS_Msk) >> LCD_FCSTS_PDSTS_Pos)
| Get LCD Power Down interrupt flag. More...
#define | LCD_CLR_PD_INT_FLAG() (LCD->FCSTS = LCD_FCSTS_PDSTS_Msk)
| Clear LCD Power Down interrupt flag. More...
#define | LCD_GET_FRAME_CNT_INT_FLAG() ((LCD->FCSTS & LCD_FCSTS_FCSTS_Msk) >> LCD_FCSTS_FCSTS_Pos)
| Get LCD Frame Count interrupt flag. More...
#define | LCD_CLR_FRAME_CNT_INT_FLAG() (LCD->FCSTS = LCD_FCSTS_FCSTS_Msk)
| Clear LCD Frame Count interrupt flag. More...
#define | LCD_ENABLE_PD_DISPLAY() (LCD->CTL |= LCD_CTL_PDDISP_EN_Msk)
| Enable LCD Power Down Display function. More...
#define | LCD_DISABLE_PD_DISPLAY() (LCD->CTL &= ~LCD_CTL_PDDISP_EN_Msk)
| Disable LCD Power Down Display function. More...

## Functions
uint32_t | LCD_EnableFrameCounter (uint32_t u32Count)
| Set Frame Count and Enable frame count. More...
void | LCD_DisableFrameCounter (void)
| Disable frame count function. More...
uint32_t | LCD_EnableBlink (uint32_t u32ms)
| Enable Blink function in LCD controller. More...
void | LCD_DisableBlink (void)
| Disable Blink function in LCD controller. More...
void | LCD_EnableInt (uint32_t IntSrc)
| This function is used to enable LCD interrupt. More...
void | LCD_DisableInt (uint32_t IntSrc)
| This function is used to disable LCD specified interrupt. More...
uint32_t | LCD_Open (uint32_t u32DrivingType, uint32_t u32ComNum, uint32_t u32BiasLevel, uint32_t u32FramerateDiv, uint32_t u32DrivingVol)
| LCD Initialization routine. More...
void | LCD_SetPixel (uint32_t u32Com, uint32_t u32Seg, uint32_t u32OnFlag)
| Enables a segment on the LCD display. More...
void | LCD_SetAllPixels (uint32_t u32OnOff)
| LCD Enable/Disable all segments. More...
void | LCD_Close (void)
| The function is used to disable LCD controller. More...
static __INLINE void | LCD_EnableDisplay (void)
| Enable LCD controller. More...
static __INLINE void | LCD_DisableDisplay (void)
| Disable LCD controller. More...

## Detailed Description

## Macro Definition Documentation

## ◆ LCD_CLR_FRAME_CNT_INT_FLAG

#define LCD_CLR_FRAME_CNT_INT_FLAG | ( |  | ) | (LCD->FCSTS = LCD_FCSTS_FCSTS_Msk)

Clear LCD Frame Count interrupt flag.

Parameters

  None |

Returns
  None.

Definition at line 145 of file lcd.h.

## ◆ LCD_CLR_PD_INT_FLAG

#define LCD_CLR_PD_INT_FLAG | ( |  | ) | (LCD->FCSTS = LCD_FCSTS_PDSTS_Msk)

Clear LCD Power Down interrupt flag.

Parameters

  None |

Returns
  None.

Definition at line 127 of file lcd.h.

## ◆ LCD_DISABLE_PD_DISPLAY

#define LCD_DISABLE_PD_DISPLAY | ( |  | ) | (LCD->CTL &= ~LCD_CTL_PDDISP_EN_Msk)

Disable LCD Power Down Display function.

Parameters

  None |

Returns
  None.

Definition at line 163 of file lcd.h.

## ◆ LCD_ENABLE_PD_DISPLAY

#define LCD_ENABLE_PD_DISPLAY | ( |  | ) | (LCD->CTL |= LCD_CTL_PDDISP_EN_Msk)

Enable LCD Power Down Display function.

Parameters

  None |

Returns
  None.

Definition at line 154 of file lcd.h.

## ◆ LCD_GET_FRAME_CNT_INT_FLAG

#define LCD_GET_FRAME_CNT_INT_FLAG | ( |  | ) | ((LCD->FCSTS & LCD_FCSTS_FCSTS_Msk) >> LCD_FCSTS_FCSTS_Pos)

Get LCD Frame Count interrupt flag.

Parameters

  None |

Returns
  LCD Frame Count interrupt Flag.

Definition at line 136 of file lcd.h.

## ◆ LCD_GET_PD_INT_FLAG

#define LCD_GET_PD_INT_FLAG | ( |  | ) | ((LCD->FCSTS & LCD_FCSTS_PDSTS_Msk) >> LCD_FCSTS_PDSTS_Pos)

Get LCD Power Down interrupt flag.

Parameters

  None |

Returns
  LCD Power Down interrupt Flag.

Definition at line 118 of file lcd.h.

## Function Documentation

## ◆ LCD_Close()

void LCD_Close | ( | void |  | ) |

The function is used to disable LCD controller.

Parameters

  None |

Returns
  None

Definition at line 362 of file lcd.c.

## ◆ LCD_DisableBlink()

void LCD_DisableBlink | ( | void |  | ) |

Disable Blink function in LCD controller.

Parameters

  None |

Returns
  None

Definition at line 423 of file lcd.c.

## ◆ LCD_DisableDisplay()

static __INLINE void LCD_DisableDisplay | ( | void |  | ) |
| static

Disable LCD controller.

Parameters

  None |

Returns
  None

Definition at line 198 of file lcd.h.

## ◆ LCD_DisableFrameCounter()

void LCD_DisableFrameCounter | ( | void |  | ) |

Disable frame count function.

Parameters

  None |

Returns
  None

Definition at line 264 of file lcd.c.

## ◆ LCD_DisableInt()

void LCD_DisableInt | ( | uint32_t | IntSrc | ) |

This function is used to disable LCD specified interrupt.

Parameters

  [in] | IntSrc | Interrupt Source: LCD_FRAMECOUNT_INT / LCD_POWERDOWN_INT / LCD_ALL_INT

Returns
  None

Definition at line 466 of file lcd.c.

## ◆ LCD_EnableBlink()

uint32_t LCD_EnableBlink | ( | uint32_t | u32ms | ) |

Enable Blink function in LCD controller.

Parameters

  [in] | u32ms | Blinking display time(unit: ms).

Returns
  Real blinking delay time(ms).

Definition at line 376 of file lcd.c.

## ◆ LCD_EnableDisplay()

static __INLINE void LCD_EnableDisplay | ( | void |  | ) |
| static

Enable LCD controller.

Parameters

  None |

Returns
  None

Definition at line 184 of file lcd.h.

## ◆ LCD_EnableFrameCounter()

uint32_t LCD_EnableFrameCounter | ( | uint32_t | u32Count | ) |

Set Frame Count and Enable frame count.

Parameters

  [in] | u32Count | Frame count value

Returns
  real frame count value.

Definition at line 210 of file lcd.c.

## ◆ LCD_EnableInt()

void LCD_EnableInt | ( | uint32_t | IntSrc | ) |

This function is used to enable LCD interrupt.

Parameters

  [in] | IntSrc | Interrupt Source: LCD_FRAMECOUNT_INT / LCD_POWERDOWN_INT / LCD_ALL_INT

Returns
  None

Definition at line 444 of file lcd.c.

## ◆ LCD_Open()

uint32_t LCD_Open | ( | uint32_t | u32DrivingType,
|  | uint32_t | u32ComNum,
|  | uint32_t | u32BiasLevel,
|  | uint32_t | u32FramerateDiv,
|  | uint32_t | u32DrivingVol
| ) |  |

LCD Initialization routine.

Parameters

  [in] | u32DrivingType | LCD driving type: LCD_C_TYPE / LCD_EXTERNAL_R_TYPE / LCD_INTERNAL_R_TYPE / LCD_EXTERNAL_C_TYPE
  [in] | u32ComNum | LCD Com number: 1 ~6
  [in] | u32BiasLevel | LCD bias level: LCD_BIAS_STATIC / LCD_BIAS_HALF / LCD_BIAS_THIRD
  [in] | u32FramerateDiv | LCD frequency divider: LCD_FREQ_DIV32 / LCD_FREQ_DIV64 / LCD_FREQ_DIV96 / LCD_FREQ_DIV128 / LCD_FREQ_DIV192/ LCD_FREQ_DIV256 / LCD_FREQ_DIV384 / LCD_FREQ_DIV512
  [in] | u32DrivingVol | LCD charge pump driving voltage: LCD_CPVOl_2_7V / LCD_CPVOl_2_8V / LCD_CPVOl_2_9V / LCD_CPVOl_3V / LCD_CPVOl_3_1V / LCD_CPVOl_3_2V / LCD_CPVOl_3_3V / LCD_CPVOl_3_4V

Returns
  LCD frame rate.

Definition at line 287 of file lcd.c.

## ◆ LCD_SetAllPixels()

void LCD_SetAllPixels | ( | uint32_t | u32OnOff | ) |

LCD Enable/Disable all segments.

Parameters

  [in] | u32OnOff | 1: Enable all segments 0: Disable all segment

Returns
  None

Definition at line 166 of file lcd.c.

## ◆ LCD_SetPixel()

void LCD_SetPixel | ( | uint32_t | u32Com,
|  | uint32_t | u32Seg,
|  | uint32_t | u32OnFlag
| ) |  |

Enables a segment on the LCD display.

Parameters

  [in] | u32Com | COM number
  [in] | u32Seg | Segment number
  [in] | u32OnFlag | 1: segment display 0: segment not display

Returns
  None

Definition at line 62 of file lcd.c.