STM32L486xx HAL User Manual
|
Header file of LCD Controller HAL module. More...
#include "stm32l4xx_hal_def.h"
Go to the source code of this file.
Data Structures | |
struct | LCD_InitTypeDef |
LCD Init structure definition. More... | |
struct | LCD_HandleTypeDef |
UART handle Structure definition. More... | |
Defines | |
#define | HAL_LCD_ERROR_NONE ((uint32_t)0x00) |
#define | HAL_LCD_ERROR_FCRSF ((uint32_t)0x01) |
#define | HAL_LCD_ERROR_UDR ((uint32_t)0x02) |
#define | HAL_LCD_ERROR_UDD ((uint32_t)0x04) |
#define | HAL_LCD_ERROR_ENS ((uint32_t)0x08) |
#define | HAL_LCD_ERROR_RDY ((uint32_t)0x10) |
#define | LCD_PRESCALER_1 ((uint32_t)0x00000000) |
#define | LCD_PRESCALER_2 ((uint32_t)0x00400000) |
#define | LCD_PRESCALER_4 ((uint32_t)0x00800000) |
#define | LCD_PRESCALER_8 ((uint32_t)0x00C00000) |
#define | LCD_PRESCALER_16 ((uint32_t)0x01000000) |
#define | LCD_PRESCALER_32 ((uint32_t)0x01400000) |
#define | LCD_PRESCALER_64 ((uint32_t)0x01800000) |
#define | LCD_PRESCALER_128 ((uint32_t)0x01C00000) |
#define | LCD_PRESCALER_256 ((uint32_t)0x02000000) |
#define | LCD_PRESCALER_512 ((uint32_t)0x02400000) |
#define | LCD_PRESCALER_1024 ((uint32_t)0x02800000) |
#define | LCD_PRESCALER_2048 ((uint32_t)0x02C00000) |
#define | LCD_PRESCALER_4096 ((uint32_t)0x03000000) |
#define | LCD_PRESCALER_8192 ((uint32_t)0x03400000) |
#define | LCD_PRESCALER_16384 ((uint32_t)0x03800000) |
#define | LCD_PRESCALER_32768 ((uint32_t)0x03C00000) |
#define | LCD_DIVIDER_16 ((uint32_t)0x00000000) |
#define | LCD_DIVIDER_17 ((uint32_t)0x00040000) |
#define | LCD_DIVIDER_18 ((uint32_t)0x00080000) |
#define | LCD_DIVIDER_19 ((uint32_t)0x000C0000) |
#define | LCD_DIVIDER_20 ((uint32_t)0x00100000) |
#define | LCD_DIVIDER_21 ((uint32_t)0x00140000) |
#define | LCD_DIVIDER_22 ((uint32_t)0x00180000) |
#define | LCD_DIVIDER_23 ((uint32_t)0x001C0000) |
#define | LCD_DIVIDER_24 ((uint32_t)0x00200000) |
#define | LCD_DIVIDER_25 ((uint32_t)0x00240000) |
#define | LCD_DIVIDER_26 ((uint32_t)0x00280000) |
#define | LCD_DIVIDER_27 ((uint32_t)0x002C0000) |
#define | LCD_DIVIDER_28 ((uint32_t)0x00300000) |
#define | LCD_DIVIDER_29 ((uint32_t)0x00340000) |
#define | LCD_DIVIDER_30 ((uint32_t)0x00380000) |
#define | LCD_DIVIDER_31 ((uint32_t)0x003C0000) |
#define | LCD_DUTY_STATIC ((uint32_t)0x00000000) |
#define | LCD_DUTY_1_2 (LCD_CR_DUTY_0) |
#define | LCD_DUTY_1_3 (LCD_CR_DUTY_1) |
#define | LCD_DUTY_1_4 ((LCD_CR_DUTY_1 | LCD_CR_DUTY_0)) |
#define | LCD_DUTY_1_8 (LCD_CR_DUTY_2) |
#define | LCD_BIAS_1_4 ((uint32_t)0x00000000) |
#define | LCD_BIAS_1_2 LCD_CR_BIAS_0 |
#define | LCD_BIAS_1_3 LCD_CR_BIAS_1 |
#define | LCD_VOLTAGESOURCE_INTERNAL ((uint32_t)0x00000000) |
#define | LCD_VOLTAGESOURCE_EXTERNAL LCD_CR_VSEL |
#define | LCD_IT_SOF LCD_FCR_SOFIE |
#define | LCD_IT_UDD LCD_FCR_UDDIE |
#define | LCD_PULSEONDURATION_0 ((uint32_t)0x00000000) |
#define | LCD_PULSEONDURATION_1 (LCD_FCR_PON_0) |
#define | LCD_PULSEONDURATION_2 (LCD_FCR_PON_1) |
#define | LCD_PULSEONDURATION_3 (LCD_FCR_PON_1 | LCD_FCR_PON_0) |
#define | LCD_PULSEONDURATION_4 (LCD_FCR_PON_2) |
#define | LCD_PULSEONDURATION_5 (LCD_FCR_PON_2 | LCD_FCR_PON_0) |
#define | LCD_PULSEONDURATION_6 (LCD_FCR_PON_2 | LCD_FCR_PON_1) |
#define | LCD_PULSEONDURATION_7 (LCD_FCR_PON) |
#define | LCD_DEADTIME_0 ((uint32_t)0x00000000) |
#define | LCD_DEADTIME_1 (LCD_FCR_DEAD_0) |
#define | LCD_DEADTIME_2 (LCD_FCR_DEAD_1) |
#define | LCD_DEADTIME_3 (LCD_FCR_DEAD_1 | LCD_FCR_DEAD_0) |
#define | LCD_DEADTIME_4 (LCD_FCR_DEAD_2) |
#define | LCD_DEADTIME_5 (LCD_FCR_DEAD_2 | LCD_FCR_DEAD_0) |
#define | LCD_DEADTIME_6 (LCD_FCR_DEAD_2 | LCD_FCR_DEAD_1) |
#define | LCD_DEADTIME_7 (LCD_FCR_DEAD) |
#define | LCD_BLINKMODE_OFF ((uint32_t)0x00000000) |
#define | LCD_BLINKMODE_SEG0_COM0 (LCD_FCR_BLINK_0) |
#define | LCD_BLINKMODE_SEG0_ALLCOM (LCD_FCR_BLINK_1) |
#define | LCD_BLINKMODE_ALLSEG_ALLCOM (LCD_FCR_BLINK) |
#define | LCD_BLINKFREQUENCY_DIV8 ((uint32_t)0x00000000) |
#define | LCD_BLINKFREQUENCY_DIV16 (LCD_FCR_BLINKF_0) |
#define | LCD_BLINKFREQUENCY_DIV32 (LCD_FCR_BLINKF_1) |
#define | LCD_BLINKFREQUENCY_DIV64 (LCD_FCR_BLINKF_1 | LCD_FCR_BLINKF_0) |
#define | LCD_BLINKFREQUENCY_DIV128 (LCD_FCR_BLINKF_2) |
#define | LCD_BLINKFREQUENCY_DIV256 (LCD_FCR_BLINKF_2 |LCD_FCR_BLINKF_0) |
#define | LCD_BLINKFREQUENCY_DIV512 (LCD_FCR_BLINKF_2 |LCD_FCR_BLINKF_1) |
#define | LCD_BLINKFREQUENCY_DIV1024 (LCD_FCR_BLINKF) |
#define | LCD_CONTRASTLEVEL_0 ((uint32_t)0x00000000) |
#define | LCD_CONTRASTLEVEL_1 (LCD_FCR_CC_0) |
#define | LCD_CONTRASTLEVEL_2 (LCD_FCR_CC_1) |
#define | LCD_CONTRASTLEVEL_3 (LCD_FCR_CC_1 | LCD_FCR_CC_0) |
#define | LCD_CONTRASTLEVEL_4 (LCD_FCR_CC_2) |
#define | LCD_CONTRASTLEVEL_5 (LCD_FCR_CC_2 | LCD_FCR_CC_0) |
#define | LCD_CONTRASTLEVEL_6 (LCD_FCR_CC_2 | LCD_FCR_CC_1) |
#define | LCD_CONTRASTLEVEL_7 (LCD_FCR_CC) |
#define | LCD_RAM_REGISTER0 ((uint32_t)0x00000000) |
#define | LCD_RAM_REGISTER1 ((uint32_t)0x00000001) |
#define | LCD_RAM_REGISTER2 ((uint32_t)0x00000002) |
#define | LCD_RAM_REGISTER3 ((uint32_t)0x00000003) |
#define | LCD_RAM_REGISTER4 ((uint32_t)0x00000004) |
#define | LCD_RAM_REGISTER5 ((uint32_t)0x00000005) |
#define | LCD_RAM_REGISTER6 ((uint32_t)0x00000006) |
#define | LCD_RAM_REGISTER7 ((uint32_t)0x00000007) |
#define | LCD_RAM_REGISTER8 ((uint32_t)0x00000008) |
#define | LCD_RAM_REGISTER9 ((uint32_t)0x00000009) |
#define | LCD_RAM_REGISTER10 ((uint32_t)0x0000000A) |
#define | LCD_RAM_REGISTER11 ((uint32_t)0x0000000B) |
#define | LCD_RAM_REGISTER12 ((uint32_t)0x0000000C) |
#define | LCD_RAM_REGISTER13 ((uint32_t)0x0000000D) |
#define | LCD_RAM_REGISTER14 ((uint32_t)0x0000000E) |
#define | LCD_RAM_REGISTER15 ((uint32_t)0x0000000F) |
#define | LCD_HIGHDRIVE_DISABLE ((uint32_t)0x00000000) |
#define | LCD_HIGHDRIVE_ENABLE (LCD_FCR_HD) |
#define | LCD_MUXSEGMENT_DISABLE ((uint32_t)0x00000000) |
#define | LCD_MUXSEGMENT_ENABLE (LCD_CR_MUX_SEG) |
#define | LCD_FLAG_ENS LCD_SR_ENS |
#define | LCD_FLAG_SOF LCD_SR_SOF |
#define | LCD_FLAG_UDR LCD_SR_UDR |
#define | LCD_FLAG_UDD LCD_SR_UDD |
#define | LCD_FLAG_RDY LCD_SR_RDY |
#define | LCD_FLAG_FCRSF LCD_SR_FCRSR |
#define | __HAL_LCD_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_LCD_STATE_RESET) |
Reset LCD handle state. | |
#define | __HAL_LCD_ENABLE(__HANDLE__) SET_BIT((__HANDLE__)->Instance->CR, LCD_CR_LCDEN) |
Enable the LCD peripheral. | |
#define | __HAL_LCD_DISABLE(__HANDLE__) CLEAR_BIT((__HANDLE__)->Instance->CR, LCD_CR_LCDEN) |
Disable the LCD peripheral. | |
#define | __HAL_LCD_HIGHDRIVER_ENABLE(__HANDLE__) |
Enable the low resistance divider. | |
#define | __HAL_LCD_HIGHDRIVER_DISABLE(__HANDLE__) |
Disable the low resistance divider. | |
#define | __HAL_LCD_VOLTAGE_BUFFER_ENABLE(__HANDLE__) SET_BIT((__HANDLE__)->Instance->CR, LCD_CR_BUFEN) |
Enable the voltage output buffer for higher driving capability. | |
#define | __HAL_LCD_VOLTAGE_BUFFER_DISABLE(__HANDLE__) CLEAR_BIT((__HANDLE__)->Instance->CR, LCD_CR_BUFEN) |
Disable the voltage output buffer for higher driving capability. | |
#define | __HAL_LCD_PULSEONDURATION_CONFIG(__HANDLE__, __DURATION__) |
Configure the LCD pulse on duration. | |
#define | __HAL_LCD_DEADTIME_CONFIG(__HANDLE__, __DEADTIME__) |
Configure the LCD dead time. | |
#define | __HAL_LCD_CONTRAST_CONFIG(__HANDLE__, __CONTRAST__) |
Configure the LCD contrast. | |
#define | __HAL_LCD_BLINK_CONFIG(__HANDLE__, __BLINKMODE__, __BLINKFREQUENCY__) |
Configure the LCD Blink mode and Blink frequency. | |
#define | __HAL_LCD_ENABLE_IT(__HANDLE__, __INTERRUPT__) |
Enable the specified LCD interrupt. | |
#define | __HAL_LCD_DISABLE_IT(__HANDLE__, __INTERRUPT__) |
Disable the specified LCD interrupt. | |
#define | __HAL_LCD_GET_IT_SOURCE(__HANDLE__, __IT__) (((__HANDLE__)->Instance->FCR) & (__IT__)) |
Check whether the specified LCD interrupt source is enabled or not. | |
#define | __HAL_LCD_GET_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->SR & (__FLAG__)) == (__FLAG__)) |
Check whether the specified LCD flag is set or not. | |
#define | __HAL_LCD_CLEAR_FLAG(__HANDLE__, __FLAG__) WRITE_REG((__HANDLE__)->Instance->CLR, (__FLAG__)) |
Clear the specified LCD pending flag. | |
#define | IS_LCD_PRESCALER(__PRESCALER__) |
#define | IS_LCD_DIVIDER(__DIVIDER__) |
#define | IS_LCD_DUTY(__DUTY__) |
#define | IS_LCD_BIAS(__BIAS__) |
#define | IS_LCD_VOLTAGE_SOURCE(SOURCE) |
#define | IS_LCD_PULSE_ON_DURATION(__DURATION__) |
#define | IS_LCD_DEAD_TIME(__TIME__) |
#define | IS_LCD_BLINK_MODE(__MODE__) |
#define | IS_LCD_BLINK_FREQUENCY(__FREQUENCY__) |
#define | IS_LCD_CONTRAST(__CONTRAST__) |
#define | IS_LCD_RAM_REGISTER(__REGISTER__) |
#define | IS_LCD_HIGH_DRIVE(__VALUE__) |
#define | IS_LCD_MUX_SEGMENT(__VALUE__) |
Enumerations | |
enum | HAL_LCD_StateTypeDef { HAL_LCD_STATE_RESET = 0x00, HAL_LCD_STATE_READY = 0x01, HAL_LCD_STATE_BUSY = 0x02, HAL_LCD_STATE_TIMEOUT = 0x03, HAL_LCD_STATE_ERROR = 0x04 } |
HAL LCD State structures definition. More... | |
Functions | |
HAL_StatusTypeDef | HAL_LCD_DeInit (LCD_HandleTypeDef *hlcd) |
DeInitialize the LCD peripheral. | |
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. | |
__weak void | HAL_LCD_MspInit (LCD_HandleTypeDef *hlcd) |
Initialize the LCD MSP. | |
__weak void | HAL_LCD_MspDeInit (LCD_HandleTypeDef *hlcd) |
DeInitialize 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. |
Header file of LCD Controller HAL module.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of STMicroelectronics nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file stm32l4xx_hal_lcd.h.