STM32L443xx HAL User Manual
|
LCD Controller HAL module driver. This file provides firmware functions to manage the following functionalities of the LCD Controller (LCD) peripheral: + Initialization/de-initialization methods + I/O operation methods + Peripheral State methods. More...
#include "stm32l4xx_hal.h"
Go to the source code of this file.
Defines | |
#define | LCD_TIMEOUT_VALUE 1000U |
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. | |
HAL_StatusTypeDef | HAL_LCD_DeInit (LCD_HandleTypeDef *hlcd) |
DeInitialize the LCD peripheral. | |
__weak void | HAL_LCD_MspDeInit (LCD_HandleTypeDef *hlcd) |
DeInitialize the LCD MSP. | |
__weak void | HAL_LCD_MspInit (LCD_HandleTypeDef *hlcd) |
Initialize the LCD MSP. | |
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. | |
HAL_StatusTypeDef | HAL_LCD_Clear (LCD_HandleTypeDef *hlcd) |
Clear the LCD RAM registers. | |
HAL_StatusTypeDef | HAL_LCD_UpdateDisplayRequest (LCD_HandleTypeDef *hlcd) |
Enable the Update Display Request. | |
HAL_LCD_StateTypeDef | HAL_LCD_GetState (LCD_HandleTypeDef *hlcd) |
Return the LCD handle state. | |
uint32_t | HAL_LCD_GetError (LCD_HandleTypeDef *hlcd) |
Return the LCD error code. | |
HAL_StatusTypeDef | LCD_WaitForSynchro (LCD_HandleTypeDef *hlcd) |
Wait until the LCD FCR register is synchronized in the LCDCLK domain. |
LCD Controller HAL module driver. This file provides firmware functions to manage the following functionalities of the LCD Controller (LCD) peripheral: + Initialization/de-initialization methods + I/O operation methods + Peripheral State methods.
Copyright (c) 2017 STMicroelectronics. All rights reserved.
This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.
============================================================================== ##### 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.
Definition in file stm32l4xx_hal_lcd.c.