|
STM32L4xx_HAL_Driver
1.14.0
|
LCD Controller HAL module driver. This file provides firmware functions to manage the following functionalities of the LCD Controller (LCD) peripheral: More...
Go to the source code of this file.
Functions | |
| HAL_StatusTypeDef | HAL_LCD_Init (LCD_HandleTypeDef *hlcd) |
| Initialize the LCD peripheral according to the specified parameters in the LCD_InitStruct and initialize the associated handle. More... | |
| HAL_StatusTypeDef | HAL_LCD_DeInit (LCD_HandleTypeDef *hlcd) |
| DeInitialize the LCD peripheral. More... | |
| void | HAL_LCD_MspDeInit (LCD_HandleTypeDef *hlcd) |
| DeInitialize the LCD MSP. More... | |
| void | HAL_LCD_MspInit (LCD_HandleTypeDef *hlcd) |
| Initialize the LCD MSP. More... | |
| HAL_StatusTypeDef | HAL_LCD_Write (LCD_HandleTypeDef *hlcd, uint32_t RAMRegisterIndex, uint32_t RAMRegisterMask, uint32_t Data) |
| Write a word in the specific LCD RAM. More... | |
| HAL_StatusTypeDef | HAL_LCD_Clear (LCD_HandleTypeDef *hlcd) |
| Clear the LCD RAM registers. More... | |
| HAL_StatusTypeDef | HAL_LCD_UpdateDisplayRequest (LCD_HandleTypeDef *hlcd) |
| Enable the Update Display Request. More... | |
| HAL_LCD_StateTypeDef | HAL_LCD_GetState (LCD_HandleTypeDef *hlcd) |
| Return the LCD handle state. More... | |
| uint32_t | HAL_LCD_GetError (LCD_HandleTypeDef *hlcd) |
| Return the LCD error code. More... | |
| HAL_StatusTypeDef | LCD_WaitForSynchro (LCD_HandleTypeDef *hlcd) |
| Wait until the LCD FCR register is synchronized in the LCDCLK domain. This function must be called after any write operation to LCD_FCR register. More... | |
LCD Controller HAL module driver. This file provides firmware functions to manage the following functionalities of the LCD Controller (LCD) peripheral:
==============================================================================
##### How to use this driver #####
==============================================================================
[..] The LCD HAL driver can be used as follows:
(#) Declare a LCD_HandleTypeDef handle structure.
-@- The frequency generator allows you to achieve various LCD frame rates
starting from an LCD input clock frequency (LCDCLK) which can vary
from 32 kHz up to 1 MHz.
(#) Initialize the LCD low level resources by implementing the HAL_LCD_MspInit() API:
(++) Enable the LCDCLK (same as RTCCLK): to configure the RTCCLK/LCDCLK, proceed as follows:
(+++) Use RCC function HAL_RCCEx_PeriphCLKConfig in indicating RCC_PERIPHCLK_LCD and
selected clock source (HSE, LSI or LSE)
(++) LCD pins configuration:
(+++) Enable the clock for the LCD GPIOs.
(+++) Configure these LCD pins as alternate function no-pull.
(++) Enable the LCD interface clock.
(#) Program the Prescaler, Divider, Blink mode, Blink Frequency Duty, Bias,
Voltage Source, Dead Time, Pulse On Duration, Contrast, High drive and Multiplexer
Segment in the Init structure of the LCD handle.
(#) Initialize the LCD registers by calling the HAL_LCD_Init() API.
-@- The HAL_LCD_Init() API configures also the low level Hardware GPIO, CLOCK, ...etc)
by calling the customized HAL_LCD_MspInit() API.
-@- After calling the HAL_LCD_Init() the LCD RAM memory is cleared
(#) Optionally you can update the LCD configuration using these macros:
(++) LCD High Drive using the __HAL_LCD_HIGHDRIVER_ENABLE() and __HAL_LCD_HIGHDRIVER_DISABLE() macros
(++) Voltage output buffer using __HAL_LCD_VOLTAGE_BUFFER_ENABLE() and __HAL_LCD_VOLTAGE_BUFFER_DISABLE() macros
(++) LCD Pulse ON Duration using the __HAL_LCD_PULSEONDURATION_CONFIG() macro
(++) LCD Dead Time using the __HAL_LCD_DEADTIME_CONFIG() macro
(++) The LCD Blink mode and frequency using the __HAL_LCD_BLINK_CONFIG() macro
(++) The LCD Contrast using the __HAL_LCD_CONTRAST_CONFIG() macro
(#) Write to the LCD RAM memory using the HAL_LCD_Write() API, this API can be called
more time to update the different LCD RAM registers before calling
HAL_LCD_UpdateDisplayRequest() API.
(#) The HAL_LCD_Clear() API can be used to clear the LCD RAM memory.
(#) When LCD RAM memory is updated enable the update display request using
the HAL_LCD_UpdateDisplayRequest() API.
[..] LCD and low power modes:
(#) The LCD remain active during Sleep, Low Power run, Low Power Sleep and
STOP modes.This software component is licensed by ST under BSD 3-Clause license, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: opensource.org/licenses/BSD-3-Clause
Definition in file stm32l4xx_hal_lcd.c.