The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

mbed 2

This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.

Committer:
<>
Date:
Wed Apr 12 16:07:08 2017 +0100
Revision:
140:97feb9bacc10
Parent:
128:9bcdf88f62b0
Child:
145:64910690c574
Release 140 of the mbed library

Ports for Upcoming Targets

3841: Add nRf52840 target https://github.com/ARMmbed/mbed-os/pull/3841
3992: Introducing UBLOX_C030 platform. https://github.com/ARMmbed/mbed-os/pull/3992

Fixes and Changes

3951: [NUCLEO_F303ZE] Correct ARDUINO pin https://github.com/ARMmbed/mbed-os/pull/3951
4021: Fixing a macro to detect when RTOS was in use for the NRF52840_DK https://github.com/ARMmbed/mbed-os/pull/4021
3979: KW24D: Add missing SPI defines and Arduino connector definitions https://github.com/ARMmbed/mbed-os/pull/3979
3990: UBLOX_C027: construct a ticker-based wait, rather than calling wait_ms(), in the https://github.com/ARMmbed/mbed-os/pull/3990
4003: Fixed OBOE in async serial tx for NRF52 target, fixes #4002 https://github.com/ARMmbed/mbed-os/pull/4003
4012: STM32: Correct I2C master error handling https://github.com/ARMmbed/mbed-os/pull/4012
4020: NUCLEO_L011K4 remove unsupported tool chain files https://github.com/ARMmbed/mbed-os/pull/4020
4065: K66F: Move bss section to m_data_2 Section https://github.com/ARMmbed/mbed-os/pull/4065
4014: Issue 3763: Reduce heap allocation in the GCC linker file https://github.com/ARMmbed/mbed-os/pull/4014
4030: [STM32L0] reduce IAR heap and stack size for small targets https://github.com/ARMmbed/mbed-os/pull/4030
4109: NUCLEO_L476RG : minor serial pin update https://github.com/ARMmbed/mbed-os/pull/4109
3982: Ticker - kl25z bugfix for handling events in the past https://github.com/ARMmbed/mbed-os/pull/3982

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kojto 122:f9eeca106725 1 /**
Kojto 122:f9eeca106725 2 ******************************************************************************
Kojto 122:f9eeca106725 3 * @file stm32l4xx_hal_lcd.h
Kojto 122:f9eeca106725 4 * @author MCD Application Team
Kojto 122:f9eeca106725 5 * @version V1.5.1
Kojto 122:f9eeca106725 6 * @date 31-May-2016
Kojto 122:f9eeca106725 7 * @brief Header file of LCD Controller HAL module.
Kojto 122:f9eeca106725 8 ******************************************************************************
Kojto 122:f9eeca106725 9 * @attention
Kojto 122:f9eeca106725 10 *
Kojto 122:f9eeca106725 11 * <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
Kojto 122:f9eeca106725 12 *
Kojto 122:f9eeca106725 13 * Redistribution and use in source and binary forms, with or without modification,
Kojto 122:f9eeca106725 14 * are permitted provided that the following conditions are met:
Kojto 122:f9eeca106725 15 * 1. Redistributions of source code must retain the above copyright notice,
Kojto 122:f9eeca106725 16 * this list of conditions and the following disclaimer.
Kojto 122:f9eeca106725 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
Kojto 122:f9eeca106725 18 * this list of conditions and the following disclaimer in the documentation
Kojto 122:f9eeca106725 19 * and/or other materials provided with the distribution.
Kojto 122:f9eeca106725 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
Kojto 122:f9eeca106725 21 * may be used to endorse or promote products derived from this software
Kojto 122:f9eeca106725 22 * without specific prior written permission.
Kojto 122:f9eeca106725 23 *
Kojto 122:f9eeca106725 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
Kojto 122:f9eeca106725 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Kojto 122:f9eeca106725 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
Kojto 122:f9eeca106725 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
Kojto 122:f9eeca106725 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Kojto 122:f9eeca106725 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
Kojto 122:f9eeca106725 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
Kojto 122:f9eeca106725 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
Kojto 122:f9eeca106725 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Kojto 122:f9eeca106725 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Kojto 122:f9eeca106725 34 *
Kojto 122:f9eeca106725 35 ******************************************************************************
Kojto 122:f9eeca106725 36 */
Kojto 122:f9eeca106725 37
Kojto 122:f9eeca106725 38 /* Define to prevent recursive inclusion -------------------------------------*/
Kojto 122:f9eeca106725 39 #ifndef __STM32L4xx_HAL_LCD_H
Kojto 122:f9eeca106725 40 #define __STM32L4xx_HAL_LCD_H
Kojto 122:f9eeca106725 41
Kojto 122:f9eeca106725 42 #ifdef __cplusplus
Kojto 122:f9eeca106725 43 extern "C" {
Kojto 122:f9eeca106725 44 #endif
Kojto 122:f9eeca106725 45
Kojto 122:f9eeca106725 46 #if defined(STM32L433xx) || defined(STM32L443xx) || defined(STM32L476xx) || defined(STM32L486xx)
Kojto 122:f9eeca106725 47
Kojto 122:f9eeca106725 48 /* Includes ------------------------------------------------------------------*/
Kojto 122:f9eeca106725 49 #include "stm32l4xx_hal_def.h"
Kojto 122:f9eeca106725 50
Kojto 122:f9eeca106725 51 /** @addtogroup STM32L4xx_HAL_Driver
Kojto 122:f9eeca106725 52 * @{
Kojto 122:f9eeca106725 53 */
Kojto 122:f9eeca106725 54
Kojto 122:f9eeca106725 55 /** @addtogroup LCD
Kojto 122:f9eeca106725 56 * @{
Kojto 122:f9eeca106725 57 */
Kojto 122:f9eeca106725 58
Kojto 122:f9eeca106725 59 /* Exported types ------------------------------------------------------------*/
Kojto 122:f9eeca106725 60 /** @defgroup LCD_Exported_Types LCD Exported Types
Kojto 122:f9eeca106725 61 * @{
Kojto 122:f9eeca106725 62 */
Kojto 122:f9eeca106725 63
Kojto 122:f9eeca106725 64 /**
Kojto 122:f9eeca106725 65 * @brief LCD Init structure definition
Kojto 122:f9eeca106725 66 */
Kojto 122:f9eeca106725 67
Kojto 122:f9eeca106725 68 typedef struct
Kojto 122:f9eeca106725 69 {
Kojto 122:f9eeca106725 70 uint32_t Prescaler; /*!< Configures the LCD Prescaler.
Kojto 122:f9eeca106725 71 This parameter can be one value of @ref LCD_Prescaler */
Kojto 122:f9eeca106725 72 uint32_t Divider; /*!< Configures the LCD Divider.
Kojto 122:f9eeca106725 73 This parameter can be one value of @ref LCD_Divider */
Kojto 122:f9eeca106725 74 uint32_t Duty; /*!< Configures the LCD Duty.
Kojto 122:f9eeca106725 75 This parameter can be one value of @ref LCD_Duty */
Kojto 122:f9eeca106725 76 uint32_t Bias; /*!< Configures the LCD Bias.
Kojto 122:f9eeca106725 77 This parameter can be one value of @ref LCD_Bias */
Kojto 122:f9eeca106725 78 uint32_t VoltageSource; /*!< Selects the LCD Voltage source.
Kojto 122:f9eeca106725 79 This parameter can be one value of @ref LCD_Voltage_Source */
Kojto 122:f9eeca106725 80 uint32_t Contrast; /*!< Configures the LCD Contrast.
Kojto 122:f9eeca106725 81 This parameter can be one value of @ref LCD_Contrast */
Kojto 122:f9eeca106725 82 uint32_t DeadTime; /*!< Configures the LCD Dead Time.
Kojto 122:f9eeca106725 83 This parameter can be one value of @ref LCD_DeadTime */
Kojto 122:f9eeca106725 84 uint32_t PulseOnDuration; /*!< Configures the LCD Pulse On Duration.
Kojto 122:f9eeca106725 85 This parameter can be one value of @ref LCD_PulseOnDuration */
Kojto 122:f9eeca106725 86 uint32_t HighDrive; /*!< Enable or disable the low resistance divider.
Kojto 122:f9eeca106725 87 This parameter can be one value of @ref LCD_HighDrive */
Kojto 122:f9eeca106725 88 uint32_t BlinkMode; /*!< Configures the LCD Blink Mode.
Kojto 122:f9eeca106725 89 This parameter can be one value of @ref LCD_BlinkMode */
Kojto 122:f9eeca106725 90 uint32_t BlinkFrequency; /*!< Configures the LCD Blink frequency.
Kojto 122:f9eeca106725 91 This parameter can be one value of @ref LCD_BlinkFrequency */
Kojto 122:f9eeca106725 92 uint32_t MuxSegment; /*!< Enable or disable mux segment.
Kojto 122:f9eeca106725 93 This parameter can be one value of @ref LCD_MuxSegment */
Kojto 122:f9eeca106725 94 } LCD_InitTypeDef;
Kojto 122:f9eeca106725 95
Kojto 122:f9eeca106725 96 /**
Kojto 122:f9eeca106725 97 * @brief HAL LCD State structures definition
Kojto 122:f9eeca106725 98 */
Kojto 122:f9eeca106725 99 typedef enum
Kojto 122:f9eeca106725 100 {
Kojto 122:f9eeca106725 101 HAL_LCD_STATE_RESET = 0x00, /*!< Peripheral is not yet Initialized */
Kojto 122:f9eeca106725 102 HAL_LCD_STATE_READY = 0x01, /*!< Peripheral Initialized and ready for use */
Kojto 122:f9eeca106725 103 HAL_LCD_STATE_BUSY = 0x02, /*!< an internal process is ongoing */
Kojto 122:f9eeca106725 104 HAL_LCD_STATE_TIMEOUT = 0x03, /*!< Timeout state */
Kojto 122:f9eeca106725 105 HAL_LCD_STATE_ERROR = 0x04 /*!< Error */
Kojto 122:f9eeca106725 106 } HAL_LCD_StateTypeDef;
Kojto 122:f9eeca106725 107
Kojto 122:f9eeca106725 108 /**
Kojto 122:f9eeca106725 109 * @brief UART handle Structure definition
Kojto 122:f9eeca106725 110 */
Kojto 122:f9eeca106725 111 typedef struct
Kojto 122:f9eeca106725 112 {
Kojto 122:f9eeca106725 113 LCD_TypeDef *Instance; /* LCD registers base address */
Kojto 122:f9eeca106725 114
Kojto 122:f9eeca106725 115 LCD_InitTypeDef Init; /* LCD communication parameters */
Kojto 122:f9eeca106725 116
Kojto 122:f9eeca106725 117 HAL_LockTypeDef Lock; /* Locking object */
Kojto 122:f9eeca106725 118
Kojto 122:f9eeca106725 119 __IO HAL_LCD_StateTypeDef State; /* LCD communication state */
Kojto 122:f9eeca106725 120
Kojto 122:f9eeca106725 121 __IO uint32_t ErrorCode; /* LCD Error code */
Kojto 122:f9eeca106725 122
Kojto 122:f9eeca106725 123 }LCD_HandleTypeDef;
Kojto 122:f9eeca106725 124 /**
Kojto 122:f9eeca106725 125 * @}
Kojto 122:f9eeca106725 126 */
Kojto 122:f9eeca106725 127
Kojto 122:f9eeca106725 128 /* Exported constants --------------------------------------------------------*/
Kojto 122:f9eeca106725 129 /** @defgroup LCD_Exported_Constants LCD Exported Constants
Kojto 122:f9eeca106725 130 * @{
Kojto 122:f9eeca106725 131 */
Kojto 122:f9eeca106725 132
Kojto 122:f9eeca106725 133 /** @defgroup LCD_ErrorCode LCD Error Code
Kojto 122:f9eeca106725 134 * @{
Kojto 122:f9eeca106725 135 */
Kojto 122:f9eeca106725 136 #define HAL_LCD_ERROR_NONE ((uint32_t)0x00) /*!< No error */
Kojto 122:f9eeca106725 137 #define HAL_LCD_ERROR_FCRSF ((uint32_t)0x01) /*!< Synchro flag timeout error */
Kojto 122:f9eeca106725 138 #define HAL_LCD_ERROR_UDR ((uint32_t)0x02) /*!< Update display request flag timeout error */
Kojto 122:f9eeca106725 139 #define HAL_LCD_ERROR_UDD ((uint32_t)0x04) /*!< Update display done flag timeout error */
Kojto 122:f9eeca106725 140 #define HAL_LCD_ERROR_ENS ((uint32_t)0x08) /*!< LCD enabled status flag timeout error */
Kojto 122:f9eeca106725 141 #define HAL_LCD_ERROR_RDY ((uint32_t)0x10) /*!< LCD Booster ready timeout error */
Kojto 122:f9eeca106725 142 /**
Kojto 122:f9eeca106725 143 * @}
Kojto 122:f9eeca106725 144 */
Kojto 122:f9eeca106725 145
Kojto 122:f9eeca106725 146 /** @defgroup LCD_Prescaler LCD Prescaler
Kojto 122:f9eeca106725 147 * @{
Kojto 122:f9eeca106725 148 */
Kojto 122:f9eeca106725 149 #define LCD_PRESCALER_1 ((uint32_t)0x00000000) /*!< CLKPS = LCDCLK */
Kojto 122:f9eeca106725 150 #define LCD_PRESCALER_2 ((uint32_t)0x00400000) /*!< CLKPS = LCDCLK/2 */
Kojto 122:f9eeca106725 151 #define LCD_PRESCALER_4 ((uint32_t)0x00800000) /*!< CLKPS = LCDCLK/4 */
Kojto 122:f9eeca106725 152 #define LCD_PRESCALER_8 ((uint32_t)0x00C00000) /*!< CLKPS = LCDCLK/8 */
Kojto 122:f9eeca106725 153 #define LCD_PRESCALER_16 ((uint32_t)0x01000000) /*!< CLKPS = LCDCLK/16 */
Kojto 122:f9eeca106725 154 #define LCD_PRESCALER_32 ((uint32_t)0x01400000) /*!< CLKPS = LCDCLK/32 */
Kojto 122:f9eeca106725 155 #define LCD_PRESCALER_64 ((uint32_t)0x01800000) /*!< CLKPS = LCDCLK/64 */
Kojto 122:f9eeca106725 156 #define LCD_PRESCALER_128 ((uint32_t)0x01C00000) /*!< CLKPS = LCDCLK/128 */
Kojto 122:f9eeca106725 157 #define LCD_PRESCALER_256 ((uint32_t)0x02000000) /*!< CLKPS = LCDCLK/256 */
Kojto 122:f9eeca106725 158 #define LCD_PRESCALER_512 ((uint32_t)0x02400000) /*!< CLKPS = LCDCLK/512 */
Kojto 122:f9eeca106725 159 #define LCD_PRESCALER_1024 ((uint32_t)0x02800000) /*!< CLKPS = LCDCLK/1024 */
Kojto 122:f9eeca106725 160 #define LCD_PRESCALER_2048 ((uint32_t)0x02C00000) /*!< CLKPS = LCDCLK/2048 */
Kojto 122:f9eeca106725 161 #define LCD_PRESCALER_4096 ((uint32_t)0x03000000) /*!< CLKPS = LCDCLK/4096 */
Kojto 122:f9eeca106725 162 #define LCD_PRESCALER_8192 ((uint32_t)0x03400000) /*!< CLKPS = LCDCLK/8192 */
Kojto 122:f9eeca106725 163 #define LCD_PRESCALER_16384 ((uint32_t)0x03800000) /*!< CLKPS = LCDCLK/16384 */
Kojto 122:f9eeca106725 164 #define LCD_PRESCALER_32768 ((uint32_t)0x03C00000) /*!< CLKPS = LCDCLK/32768 */
Kojto 122:f9eeca106725 165 /**
Kojto 122:f9eeca106725 166 * @}
Kojto 122:f9eeca106725 167 */
Kojto 122:f9eeca106725 168
Kojto 122:f9eeca106725 169 /** @defgroup LCD_Divider LCD Divider
Kojto 122:f9eeca106725 170 * @{
Kojto 122:f9eeca106725 171 */
Kojto 122:f9eeca106725 172 #define LCD_DIVIDER_16 ((uint32_t)0x00000000) /*!< LCD frequency = CLKPS/16 */
Kojto 122:f9eeca106725 173 #define LCD_DIVIDER_17 ((uint32_t)0x00040000) /*!< LCD frequency = CLKPS/17 */
Kojto 122:f9eeca106725 174 #define LCD_DIVIDER_18 ((uint32_t)0x00080000) /*!< LCD frequency = CLKPS/18 */
Kojto 122:f9eeca106725 175 #define LCD_DIVIDER_19 ((uint32_t)0x000C0000) /*!< LCD frequency = CLKPS/19 */
Kojto 122:f9eeca106725 176 #define LCD_DIVIDER_20 ((uint32_t)0x00100000) /*!< LCD frequency = CLKPS/20 */
Kojto 122:f9eeca106725 177 #define LCD_DIVIDER_21 ((uint32_t)0x00140000) /*!< LCD frequency = CLKPS/21 */
Kojto 122:f9eeca106725 178 #define LCD_DIVIDER_22 ((uint32_t)0x00180000) /*!< LCD frequency = CLKPS/22 */
Kojto 122:f9eeca106725 179 #define LCD_DIVIDER_23 ((uint32_t)0x001C0000) /*!< LCD frequency = CLKPS/23 */
Kojto 122:f9eeca106725 180 #define LCD_DIVIDER_24 ((uint32_t)0x00200000) /*!< LCD frequency = CLKPS/24 */
Kojto 122:f9eeca106725 181 #define LCD_DIVIDER_25 ((uint32_t)0x00240000) /*!< LCD frequency = CLKPS/25 */
Kojto 122:f9eeca106725 182 #define LCD_DIVIDER_26 ((uint32_t)0x00280000) /*!< LCD frequency = CLKPS/26 */
Kojto 122:f9eeca106725 183 #define LCD_DIVIDER_27 ((uint32_t)0x002C0000) /*!< LCD frequency = CLKPS/27 */
Kojto 122:f9eeca106725 184 #define LCD_DIVIDER_28 ((uint32_t)0x00300000) /*!< LCD frequency = CLKPS/28 */
Kojto 122:f9eeca106725 185 #define LCD_DIVIDER_29 ((uint32_t)0x00340000) /*!< LCD frequency = CLKPS/29 */
Kojto 122:f9eeca106725 186 #define LCD_DIVIDER_30 ((uint32_t)0x00380000) /*!< LCD frequency = CLKPS/30 */
Kojto 122:f9eeca106725 187 #define LCD_DIVIDER_31 ((uint32_t)0x003C0000) /*!< LCD frequency = CLKPS/31 */
Kojto 122:f9eeca106725 188 /**
Kojto 122:f9eeca106725 189 * @}
Kojto 122:f9eeca106725 190 */
Kojto 122:f9eeca106725 191
Kojto 122:f9eeca106725 192
Kojto 122:f9eeca106725 193 /** @defgroup LCD_Duty LCD Duty
Kojto 122:f9eeca106725 194 * @{
Kojto 122:f9eeca106725 195 */
Kojto 122:f9eeca106725 196 #define LCD_DUTY_STATIC ((uint32_t)0x00000000) /*!< Static duty */
Kojto 122:f9eeca106725 197 #define LCD_DUTY_1_2 (LCD_CR_DUTY_0) /*!< 1/2 duty */
Kojto 122:f9eeca106725 198 #define LCD_DUTY_1_3 (LCD_CR_DUTY_1) /*!< 1/3 duty */
Kojto 122:f9eeca106725 199 #define LCD_DUTY_1_4 ((LCD_CR_DUTY_1 | LCD_CR_DUTY_0)) /*!< 1/4 duty */
Kojto 122:f9eeca106725 200 #define LCD_DUTY_1_8 (LCD_CR_DUTY_2) /*!< 1/8 duty */
Kojto 122:f9eeca106725 201 /**
Kojto 122:f9eeca106725 202 * @}
Kojto 122:f9eeca106725 203 */
Kojto 122:f9eeca106725 204
Kojto 122:f9eeca106725 205
Kojto 122:f9eeca106725 206 /** @defgroup LCD_Bias LCD Bias
Kojto 122:f9eeca106725 207 * @{
Kojto 122:f9eeca106725 208 */
Kojto 122:f9eeca106725 209 #define LCD_BIAS_1_4 ((uint32_t)0x00000000) /*!< 1/4 Bias */
Kojto 122:f9eeca106725 210 #define LCD_BIAS_1_2 LCD_CR_BIAS_0 /*!< 1/2 Bias */
Kojto 122:f9eeca106725 211 #define LCD_BIAS_1_3 LCD_CR_BIAS_1 /*!< 1/3 Bias */
Kojto 122:f9eeca106725 212 /**
Kojto 122:f9eeca106725 213 * @}
Kojto 122:f9eeca106725 214 */
Kojto 122:f9eeca106725 215
Kojto 122:f9eeca106725 216 /** @defgroup LCD_Voltage_Source LCD Voltage Source
Kojto 122:f9eeca106725 217 * @{
Kojto 122:f9eeca106725 218 */
Kojto 122:f9eeca106725 219 #define LCD_VOLTAGESOURCE_INTERNAL ((uint32_t)0x00000000) /*!< Internal voltage source for the LCD */
Kojto 122:f9eeca106725 220 #define LCD_VOLTAGESOURCE_EXTERNAL LCD_CR_VSEL /*!< External voltage source for the LCD */
Kojto 122:f9eeca106725 221 /**
Kojto 122:f9eeca106725 222 * @}
Kojto 122:f9eeca106725 223 */
Kojto 122:f9eeca106725 224
Kojto 122:f9eeca106725 225 /** @defgroup LCD_Interrupts LCD Interrupts
Kojto 122:f9eeca106725 226 * @{
Kojto 122:f9eeca106725 227 */
Kojto 122:f9eeca106725 228 #define LCD_IT_SOF LCD_FCR_SOFIE
Kojto 122:f9eeca106725 229 #define LCD_IT_UDD LCD_FCR_UDDIE
Kojto 122:f9eeca106725 230 /**
Kojto 122:f9eeca106725 231 * @}
Kojto 122:f9eeca106725 232 */
Kojto 122:f9eeca106725 233
Kojto 122:f9eeca106725 234 /** @defgroup LCD_PulseOnDuration LCD Pulse On Duration
Kojto 122:f9eeca106725 235 * @{
Kojto 122:f9eeca106725 236 */
Kojto 122:f9eeca106725 237 #define LCD_PULSEONDURATION_0 ((uint32_t)0x00000000) /*!< Pulse ON duration = 0 pulse */
Kojto 122:f9eeca106725 238 #define LCD_PULSEONDURATION_1 (LCD_FCR_PON_0) /*!< Pulse ON duration = 1/CK_PS */
Kojto 122:f9eeca106725 239 #define LCD_PULSEONDURATION_2 (LCD_FCR_PON_1) /*!< Pulse ON duration = 2/CK_PS */
Kojto 122:f9eeca106725 240 #define LCD_PULSEONDURATION_3 (LCD_FCR_PON_1 | LCD_FCR_PON_0) /*!< Pulse ON duration = 3/CK_PS */
Kojto 122:f9eeca106725 241 #define LCD_PULSEONDURATION_4 (LCD_FCR_PON_2) /*!< Pulse ON duration = 4/CK_PS */
Kojto 122:f9eeca106725 242 #define LCD_PULSEONDURATION_5 (LCD_FCR_PON_2 | LCD_FCR_PON_0) /*!< Pulse ON duration = 5/CK_PS */
Kojto 122:f9eeca106725 243 #define LCD_PULSEONDURATION_6 (LCD_FCR_PON_2 | LCD_FCR_PON_1) /*!< Pulse ON duration = 6/CK_PS */
Kojto 122:f9eeca106725 244 #define LCD_PULSEONDURATION_7 (LCD_FCR_PON) /*!< Pulse ON duration = 7/CK_PS */
Kojto 122:f9eeca106725 245 /**
Kojto 122:f9eeca106725 246 * @}
Kojto 122:f9eeca106725 247 */
Kojto 122:f9eeca106725 248
Kojto 122:f9eeca106725 249
Kojto 122:f9eeca106725 250 /** @defgroup LCD_DeadTime LCD Dead Time
Kojto 122:f9eeca106725 251 * @{
Kojto 122:f9eeca106725 252 */
Kojto 122:f9eeca106725 253 #define LCD_DEADTIME_0 ((uint32_t)0x00000000) /*!< No dead Time */
Kojto 122:f9eeca106725 254 #define LCD_DEADTIME_1 (LCD_FCR_DEAD_0) /*!< One Phase between different couple of Frame */
Kojto 122:f9eeca106725 255 #define LCD_DEADTIME_2 (LCD_FCR_DEAD_1) /*!< Two Phase between different couple of Frame */
Kojto 122:f9eeca106725 256 #define LCD_DEADTIME_3 (LCD_FCR_DEAD_1 | LCD_FCR_DEAD_0) /*!< Three Phase between different couple of Frame */
Kojto 122:f9eeca106725 257 #define LCD_DEADTIME_4 (LCD_FCR_DEAD_2) /*!< Four Phase between different couple of Frame */
Kojto 122:f9eeca106725 258 #define LCD_DEADTIME_5 (LCD_FCR_DEAD_2 | LCD_FCR_DEAD_0) /*!< Five Phase between different couple of Frame */
Kojto 122:f9eeca106725 259 #define LCD_DEADTIME_6 (LCD_FCR_DEAD_2 | LCD_FCR_DEAD_1) /*!< Six Phase between different couple of Frame */
Kojto 122:f9eeca106725 260 #define LCD_DEADTIME_7 (LCD_FCR_DEAD) /*!< Seven Phase between different couple of Frame */
Kojto 122:f9eeca106725 261 /**
Kojto 122:f9eeca106725 262 * @}
Kojto 122:f9eeca106725 263 */
Kojto 122:f9eeca106725 264
Kojto 122:f9eeca106725 265 /** @defgroup LCD_BlinkMode LCD Blink Mode
Kojto 122:f9eeca106725 266 * @{
Kojto 122:f9eeca106725 267 */
Kojto 122:f9eeca106725 268 #define LCD_BLINKMODE_OFF ((uint32_t)0x00000000) /*!< Blink disabled */
Kojto 122:f9eeca106725 269 #define LCD_BLINKMODE_SEG0_COM0 (LCD_FCR_BLINK_0) /*!< Blink enabled on SEG[0], COM[0] (1 pixel) */
Kojto 122:f9eeca106725 270 #define LCD_BLINKMODE_SEG0_ALLCOM (LCD_FCR_BLINK_1) /*!< Blink enabled on SEG[0], all COM (up to
Kojto 122:f9eeca106725 271 8 pixels according to the programmed duty) */
Kojto 122:f9eeca106725 272 #define LCD_BLINKMODE_ALLSEG_ALLCOM (LCD_FCR_BLINK) /*!< Blink enabled on all SEG and all COM (all pixels) */
Kojto 122:f9eeca106725 273 /**
Kojto 122:f9eeca106725 274 * @}
Kojto 122:f9eeca106725 275 */
Kojto 122:f9eeca106725 276
Kojto 122:f9eeca106725 277 /** @defgroup LCD_BlinkFrequency LCD Blink Frequency
Kojto 122:f9eeca106725 278 * @{
Kojto 122:f9eeca106725 279 */
Kojto 122:f9eeca106725 280 #define LCD_BLINKFREQUENCY_DIV8 ((uint32_t)0x00000000) /*!< The Blink frequency = fLCD/8 */
Kojto 122:f9eeca106725 281 #define LCD_BLINKFREQUENCY_DIV16 (LCD_FCR_BLINKF_0) /*!< The Blink frequency = fLCD/16 */
Kojto 122:f9eeca106725 282 #define LCD_BLINKFREQUENCY_DIV32 (LCD_FCR_BLINKF_1) /*!< The Blink frequency = fLCD/32 */
Kojto 122:f9eeca106725 283 #define LCD_BLINKFREQUENCY_DIV64 (LCD_FCR_BLINKF_1 | LCD_FCR_BLINKF_0) /*!< The Blink frequency = fLCD/64 */
Kojto 122:f9eeca106725 284 #define LCD_BLINKFREQUENCY_DIV128 (LCD_FCR_BLINKF_2) /*!< The Blink frequency = fLCD/128 */
Kojto 122:f9eeca106725 285 #define LCD_BLINKFREQUENCY_DIV256 (LCD_FCR_BLINKF_2 |LCD_FCR_BLINKF_0) /*!< The Blink frequency = fLCD/256 */
Kojto 122:f9eeca106725 286 #define LCD_BLINKFREQUENCY_DIV512 (LCD_FCR_BLINKF_2 |LCD_FCR_BLINKF_1) /*!< The Blink frequency = fLCD/512 */
Kojto 122:f9eeca106725 287 #define LCD_BLINKFREQUENCY_DIV1024 (LCD_FCR_BLINKF) /*!< The Blink frequency = fLCD/1024 */
Kojto 122:f9eeca106725 288 /**
Kojto 122:f9eeca106725 289 * @}
Kojto 122:f9eeca106725 290 */
Kojto 122:f9eeca106725 291
Kojto 122:f9eeca106725 292 /** @defgroup LCD_Contrast LCD Contrast
Kojto 122:f9eeca106725 293 * @{
Kojto 122:f9eeca106725 294 */
Kojto 122:f9eeca106725 295 #define LCD_CONTRASTLEVEL_0 ((uint32_t)0x00000000) /*!< Maximum Voltage = 2.60V */
Kojto 122:f9eeca106725 296 #define LCD_CONTRASTLEVEL_1 (LCD_FCR_CC_0) /*!< Maximum Voltage = 2.73V */
Kojto 122:f9eeca106725 297 #define LCD_CONTRASTLEVEL_2 (LCD_FCR_CC_1) /*!< Maximum Voltage = 2.86V */
Kojto 122:f9eeca106725 298 #define LCD_CONTRASTLEVEL_3 (LCD_FCR_CC_1 | LCD_FCR_CC_0) /*!< Maximum Voltage = 2.99V */
Kojto 122:f9eeca106725 299 #define LCD_CONTRASTLEVEL_4 (LCD_FCR_CC_2) /*!< Maximum Voltage = 3.12V */
Kojto 122:f9eeca106725 300 #define LCD_CONTRASTLEVEL_5 (LCD_FCR_CC_2 | LCD_FCR_CC_0) /*!< Maximum Voltage = 3.26V */
Kojto 122:f9eeca106725 301 #define LCD_CONTRASTLEVEL_6 (LCD_FCR_CC_2 | LCD_FCR_CC_1) /*!< Maximum Voltage = 3.40V */
Kojto 122:f9eeca106725 302 #define LCD_CONTRASTLEVEL_7 (LCD_FCR_CC) /*!< Maximum Voltage = 3.55V */
Kojto 122:f9eeca106725 303 /**
Kojto 122:f9eeca106725 304 * @}
Kojto 122:f9eeca106725 305 */
Kojto 122:f9eeca106725 306
Kojto 122:f9eeca106725 307 /** @defgroup LCD_RAMRegister LCD RAMRegister
Kojto 122:f9eeca106725 308 * @{
Kojto 122:f9eeca106725 309 */
Kojto 122:f9eeca106725 310 #define LCD_RAM_REGISTER0 ((uint32_t)0x00000000) /*!< LCD RAM Register 0 */
Kojto 122:f9eeca106725 311 #define LCD_RAM_REGISTER1 ((uint32_t)0x00000001) /*!< LCD RAM Register 1 */
Kojto 122:f9eeca106725 312 #define LCD_RAM_REGISTER2 ((uint32_t)0x00000002) /*!< LCD RAM Register 2 */
Kojto 122:f9eeca106725 313 #define LCD_RAM_REGISTER3 ((uint32_t)0x00000003) /*!< LCD RAM Register 3 */
Kojto 122:f9eeca106725 314 #define LCD_RAM_REGISTER4 ((uint32_t)0x00000004) /*!< LCD RAM Register 4 */
Kojto 122:f9eeca106725 315 #define LCD_RAM_REGISTER5 ((uint32_t)0x00000005) /*!< LCD RAM Register 5 */
Kojto 122:f9eeca106725 316 #define LCD_RAM_REGISTER6 ((uint32_t)0x00000006) /*!< LCD RAM Register 6 */
Kojto 122:f9eeca106725 317 #define LCD_RAM_REGISTER7 ((uint32_t)0x00000007) /*!< LCD RAM Register 7 */
Kojto 122:f9eeca106725 318 #define LCD_RAM_REGISTER8 ((uint32_t)0x00000008) /*!< LCD RAM Register 8 */
Kojto 122:f9eeca106725 319 #define LCD_RAM_REGISTER9 ((uint32_t)0x00000009) /*!< LCD RAM Register 9 */
Kojto 122:f9eeca106725 320 #define LCD_RAM_REGISTER10 ((uint32_t)0x0000000A) /*!< LCD RAM Register 10 */
Kojto 122:f9eeca106725 321 #define LCD_RAM_REGISTER11 ((uint32_t)0x0000000B) /*!< LCD RAM Register 11 */
Kojto 122:f9eeca106725 322 #define LCD_RAM_REGISTER12 ((uint32_t)0x0000000C) /*!< LCD RAM Register 12 */
Kojto 122:f9eeca106725 323 #define LCD_RAM_REGISTER13 ((uint32_t)0x0000000D) /*!< LCD RAM Register 13 */
Kojto 122:f9eeca106725 324 #define LCD_RAM_REGISTER14 ((uint32_t)0x0000000E) /*!< LCD RAM Register 14 */
Kojto 122:f9eeca106725 325 #define LCD_RAM_REGISTER15 ((uint32_t)0x0000000F) /*!< LCD RAM Register 15 */
Kojto 122:f9eeca106725 326 /**
Kojto 122:f9eeca106725 327 * @}
Kojto 122:f9eeca106725 328 */
Kojto 122:f9eeca106725 329
Kojto 122:f9eeca106725 330 /** @defgroup LCD_HighDrive LCD High Drive
Kojto 122:f9eeca106725 331 * @{
Kojto 122:f9eeca106725 332 */
Kojto 122:f9eeca106725 333
Kojto 122:f9eeca106725 334 #define LCD_HIGHDRIVE_DISABLE ((uint32_t)0x00000000) /*!< High drive disabled */
Kojto 122:f9eeca106725 335 #define LCD_HIGHDRIVE_ENABLE (LCD_FCR_HD) /*!< High drive enabled */
Kojto 122:f9eeca106725 336 /**
Kojto 122:f9eeca106725 337 * @}
Kojto 122:f9eeca106725 338 */
Kojto 122:f9eeca106725 339
Kojto 122:f9eeca106725 340 /** @defgroup LCD_MuxSegment LCD Mux Segment
Kojto 122:f9eeca106725 341 * @{
Kojto 122:f9eeca106725 342 */
Kojto 122:f9eeca106725 343
Kojto 122:f9eeca106725 344 #define LCD_MUXSEGMENT_DISABLE ((uint32_t)0x00000000) /*!< SEG pin multiplexing disabled */
Kojto 122:f9eeca106725 345 #define LCD_MUXSEGMENT_ENABLE (LCD_CR_MUX_SEG) /*!< SEG[31:28] are multiplexed with SEG[43:40] */
Kojto 122:f9eeca106725 346 /**
Kojto 122:f9eeca106725 347 * @}
Kojto 122:f9eeca106725 348 */
Kojto 122:f9eeca106725 349
Kojto 122:f9eeca106725 350 /** @defgroup LCD_Flag_Definition LCD Flags Definition
Kojto 122:f9eeca106725 351 * @{
Kojto 122:f9eeca106725 352 */
Kojto 122:f9eeca106725 353 #define LCD_FLAG_ENS LCD_SR_ENS /*!< LCD enabled status */
Kojto 122:f9eeca106725 354 #define LCD_FLAG_SOF LCD_SR_SOF /*!< Start of frame flag */
Kojto 122:f9eeca106725 355 #define LCD_FLAG_UDR LCD_SR_UDR /*!< Update display request */
Kojto 122:f9eeca106725 356 #define LCD_FLAG_UDD LCD_SR_UDD /*!< Update display done */
Kojto 122:f9eeca106725 357 #define LCD_FLAG_RDY LCD_SR_RDY /*!< Ready flag */
Kojto 122:f9eeca106725 358 #define LCD_FLAG_FCRSF LCD_SR_FCRSR /*!< LCD Frame Control Register Synchronization flag */
Kojto 122:f9eeca106725 359 /**
Kojto 122:f9eeca106725 360 * @}
Kojto 122:f9eeca106725 361 */
Kojto 122:f9eeca106725 362
Kojto 122:f9eeca106725 363 /**
Kojto 122:f9eeca106725 364 * @}
Kojto 122:f9eeca106725 365 */
Kojto 122:f9eeca106725 366
Kojto 122:f9eeca106725 367 /* Exported macros -----------------------------------------------------------*/
Kojto 122:f9eeca106725 368 /** @defgroup LCD_Exported_Macros LCD Exported Macros
Kojto 122:f9eeca106725 369 * @{
Kojto 122:f9eeca106725 370 */
Kojto 122:f9eeca106725 371
Kojto 122:f9eeca106725 372 /** @brief Reset LCD handle state.
Kojto 122:f9eeca106725 373 * @param __HANDLE__: specifies the LCD Handle.
Kojto 122:f9eeca106725 374 * @retval None
Kojto 122:f9eeca106725 375 */
Kojto 122:f9eeca106725 376 #define __HAL_LCD_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_LCD_STATE_RESET)
Kojto 122:f9eeca106725 377
Kojto 122:f9eeca106725 378 /** @brief Enable the LCD peripheral.
Kojto 122:f9eeca106725 379 * @param __HANDLE__: specifies the LCD Handle.
Kojto 122:f9eeca106725 380 * @retval None
Kojto 122:f9eeca106725 381 */
Kojto 122:f9eeca106725 382 #define __HAL_LCD_ENABLE(__HANDLE__) SET_BIT((__HANDLE__)->Instance->CR, LCD_CR_LCDEN)
Kojto 122:f9eeca106725 383
Kojto 122:f9eeca106725 384 /** @brief Disable the LCD peripheral.
Kojto 122:f9eeca106725 385 * @param __HANDLE__: specifies the LCD Handle.
Kojto 122:f9eeca106725 386 * @retval None
Kojto 122:f9eeca106725 387 */
Kojto 122:f9eeca106725 388 #define __HAL_LCD_DISABLE(__HANDLE__) CLEAR_BIT((__HANDLE__)->Instance->CR, LCD_CR_LCDEN)
Kojto 122:f9eeca106725 389
Kojto 122:f9eeca106725 390 /** @brief Enable the low resistance divider.
Kojto 122:f9eeca106725 391 * @param __HANDLE__: specifies the LCD Handle.
Kojto 122:f9eeca106725 392 * @note Displays with high internal resistance may need a longer drive time to
Kojto 122:f9eeca106725 393 * achieve satisfactory contrast. This function is useful in this case if
Kojto 122:f9eeca106725 394 * some additional power consumption can be tolerated.
Kojto 122:f9eeca106725 395 * @note When this mode is enabled, the PulseOn Duration (PON) have to be
Kojto 122:f9eeca106725 396 * programmed to 1/CK_PS (LCD_PULSEONDURATION_1).
Kojto 122:f9eeca106725 397 * @retval None
Kojto 122:f9eeca106725 398 */
Kojto 122:f9eeca106725 399 #define __HAL_LCD_HIGHDRIVER_ENABLE(__HANDLE__) \
Kojto 122:f9eeca106725 400 do { \
Kojto 122:f9eeca106725 401 SET_BIT((__HANDLE__)->Instance->FCR, LCD_FCR_HD); \
Kojto 122:f9eeca106725 402 LCD_WaitForSynchro(__HANDLE__); \
Kojto 122:f9eeca106725 403 } while(0)
Kojto 122:f9eeca106725 404
Kojto 122:f9eeca106725 405 /** @brief Disable the low resistance divider.
Kojto 122:f9eeca106725 406 * @param __HANDLE__: specifies the LCD Handle.
Kojto 122:f9eeca106725 407 * @retval None
Kojto 122:f9eeca106725 408 */
Kojto 122:f9eeca106725 409 #define __HAL_LCD_HIGHDRIVER_DISABLE(__HANDLE__) \
Kojto 122:f9eeca106725 410 do { \
Kojto 122:f9eeca106725 411 CLEAR_BIT((__HANDLE__)->Instance->FCR, LCD_FCR_HD); \
Kojto 122:f9eeca106725 412 LCD_WaitForSynchro(__HANDLE__); \
Kojto 122:f9eeca106725 413 } while(0)
Kojto 122:f9eeca106725 414
Kojto 122:f9eeca106725 415 /** @brief Enable the voltage output buffer for higher driving capability.
Kojto 122:f9eeca106725 416 * @param __HANDLE__: specifies the LCD Handle.
Kojto 122:f9eeca106725 417 * @retval None
Kojto 122:f9eeca106725 418 */
Kojto 122:f9eeca106725 419 #define __HAL_LCD_VOLTAGE_BUFFER_ENABLE(__HANDLE__) SET_BIT((__HANDLE__)->Instance->CR, LCD_CR_BUFEN)
Kojto 122:f9eeca106725 420
Kojto 122:f9eeca106725 421 /** @brief Disable the voltage output buffer for higher driving capability.
Kojto 122:f9eeca106725 422 * @param __HANDLE__: specifies the LCD Handle.
Kojto 122:f9eeca106725 423 * @retval None
Kojto 122:f9eeca106725 424 */
Kojto 122:f9eeca106725 425 #define __HAL_LCD_VOLTAGE_BUFFER_DISABLE(__HANDLE__) CLEAR_BIT((__HANDLE__)->Instance->CR, LCD_CR_BUFEN)
Kojto 122:f9eeca106725 426
Kojto 122:f9eeca106725 427 /**
Kojto 122:f9eeca106725 428 * @brief Configure the LCD pulse on duration.
Kojto 122:f9eeca106725 429 * @param __HANDLE__: specifies the LCD Handle.
Kojto 122:f9eeca106725 430 * @param __DURATION__: specifies the LCD pulse on duration in terms of
Kojto 122:f9eeca106725 431 * CK_PS (prescaled LCD clock period) pulses.
Kojto 122:f9eeca106725 432 * This parameter can be one of the following values:
Kojto 122:f9eeca106725 433 * @arg LCD_PULSEONDURATION_0: 0 pulse
Kojto 122:f9eeca106725 434 * @arg LCD_PULSEONDURATION_1: Pulse ON duration = 1/CK_PS
Kojto 122:f9eeca106725 435 * @arg LCD_PULSEONDURATION_2: Pulse ON duration = 2/CK_PS
Kojto 122:f9eeca106725 436 * @arg LCD_PULSEONDURATION_3: Pulse ON duration = 3/CK_PS
Kojto 122:f9eeca106725 437 * @arg LCD_PULSEONDURATION_4: Pulse ON duration = 4/CK_PS
Kojto 122:f9eeca106725 438 * @arg LCD_PULSEONDURATION_5: Pulse ON duration = 5/CK_PS
Kojto 122:f9eeca106725 439 * @arg LCD_PULSEONDURATION_6: Pulse ON duration = 6/CK_PS
Kojto 122:f9eeca106725 440 * @arg LCD_PULSEONDURATION_7: Pulse ON duration = 7/CK_PS
Kojto 122:f9eeca106725 441 * @retval None
Kojto 122:f9eeca106725 442 */
Kojto 122:f9eeca106725 443 #define __HAL_LCD_PULSEONDURATION_CONFIG(__HANDLE__, __DURATION__) \
Kojto 122:f9eeca106725 444 do { \
Kojto 122:f9eeca106725 445 MODIFY_REG((__HANDLE__)->Instance->FCR, LCD_FCR_PON, (__DURATION__)); \
Kojto 122:f9eeca106725 446 LCD_WaitForSynchro(__HANDLE__); \
Kojto 122:f9eeca106725 447 } while(0)
Kojto 122:f9eeca106725 448
Kojto 122:f9eeca106725 449 /**
Kojto 122:f9eeca106725 450 * @brief Configure the LCD dead time.
Kojto 122:f9eeca106725 451 * @param __HANDLE__: specifies the LCD Handle.
Kojto 122:f9eeca106725 452 * @param __DEADTIME__: specifies the LCD dead time.
Kojto 122:f9eeca106725 453 * This parameter can be one of the following values:
Kojto 122:f9eeca106725 454 * @arg LCD_DEADTIME_0: No dead Time
Kojto 122:f9eeca106725 455 * @arg LCD_DEADTIME_1: One Phase between different couple of Frame
Kojto 122:f9eeca106725 456 * @arg LCD_DEADTIME_2: Two Phase between different couple of Frame
Kojto 122:f9eeca106725 457 * @arg LCD_DEADTIME_3: Three Phase between different couple of Frame
Kojto 122:f9eeca106725 458 * @arg LCD_DEADTIME_4: Four Phase between different couple of Frame
Kojto 122:f9eeca106725 459 * @arg LCD_DEADTIME_5: Five Phase between different couple of Frame
Kojto 122:f9eeca106725 460 * @arg LCD_DEADTIME_6: Six Phase between different couple of Frame
Kojto 122:f9eeca106725 461 * @arg LCD_DEADTIME_7: Seven Phase between different couple of Frame
Kojto 122:f9eeca106725 462 * @retval None
Kojto 122:f9eeca106725 463 */
Kojto 122:f9eeca106725 464 #define __HAL_LCD_DEADTIME_CONFIG(__HANDLE__, __DEADTIME__) \
Kojto 122:f9eeca106725 465 do { \
Kojto 122:f9eeca106725 466 MODIFY_REG((__HANDLE__)->Instance->FCR, LCD_FCR_DEAD, (__DEADTIME__)); \
Kojto 122:f9eeca106725 467 LCD_WaitForSynchro(__HANDLE__); \
Kojto 122:f9eeca106725 468 } while(0)
Kojto 122:f9eeca106725 469
Kojto 122:f9eeca106725 470 /**
Kojto 122:f9eeca106725 471 * @brief Configure the LCD contrast.
Kojto 122:f9eeca106725 472 * @param __HANDLE__: specifies the LCD Handle.
Kojto 122:f9eeca106725 473 * @param __CONTRAST__: specifies the LCD Contrast.
Kojto 122:f9eeca106725 474 * This parameter can be one of the following values:
Kojto 122:f9eeca106725 475 * @arg LCD_CONTRASTLEVEL_0: Maximum Voltage = 2.60V
Kojto 122:f9eeca106725 476 * @arg LCD_CONTRASTLEVEL_1: Maximum Voltage = 2.73V
Kojto 122:f9eeca106725 477 * @arg LCD_CONTRASTLEVEL_2: Maximum Voltage = 2.86V
Kojto 122:f9eeca106725 478 * @arg LCD_CONTRASTLEVEL_3: Maximum Voltage = 2.99V
Kojto 122:f9eeca106725 479 * @arg LCD_CONTRASTLEVEL_4: Maximum Voltage = 3.12V
Kojto 122:f9eeca106725 480 * @arg LCD_CONTRASTLEVEL_5: Maximum Voltage = 3.25V
Kojto 122:f9eeca106725 481 * @arg LCD_CONTRASTLEVEL_6: Maximum Voltage = 3.38V
Kojto 122:f9eeca106725 482 * @arg LCD_CONTRASTLEVEL_7: Maximum Voltage = 3.51V
Kojto 122:f9eeca106725 483 * @retval None
Kojto 122:f9eeca106725 484 */
Kojto 122:f9eeca106725 485 #define __HAL_LCD_CONTRAST_CONFIG(__HANDLE__, __CONTRAST__) \
Kojto 122:f9eeca106725 486 do { \
Kojto 122:f9eeca106725 487 MODIFY_REG((__HANDLE__)->Instance->FCR, LCD_FCR_CC, (__CONTRAST__)); \
Kojto 122:f9eeca106725 488 LCD_WaitForSynchro(__HANDLE__); \
Kojto 122:f9eeca106725 489 } while(0)
Kojto 122:f9eeca106725 490
Kojto 122:f9eeca106725 491 /**
Kojto 122:f9eeca106725 492 * @brief Configure the LCD Blink mode and Blink frequency.
Kojto 122:f9eeca106725 493 * @param __HANDLE__: specifies the LCD Handle.
Kojto 122:f9eeca106725 494 * @param __BLINKMODE__: specifies the LCD blink mode.
Kojto 122:f9eeca106725 495 * This parameter can be one of the following values:
Kojto 122:f9eeca106725 496 * @arg LCD_BLINKMODE_OFF: Blink disabled
Kojto 122:f9eeca106725 497 * @arg LCD_BLINKMODE_SEG0_COM0: Blink enabled on SEG[0], COM[0] (1 pixel)
Kojto 122:f9eeca106725 498 * @arg LCD_BLINKMODE_SEG0_ALLCOM: Blink enabled on SEG[0], all COM (up to 8
Kojto 122:f9eeca106725 499 * pixels according to the programmed duty)
Kojto 122:f9eeca106725 500 * @arg LCD_BLINKMODE_ALLSEG_ALLCOM: Blink enabled on all SEG and all COM
Kojto 122:f9eeca106725 501 * (all pixels)
Kojto 122:f9eeca106725 502 * @param __BLINKFREQUENCY__: specifies the LCD blink frequency.
Kojto 122:f9eeca106725 503 * @arg LCD_BLINKFREQUENCY_DIV8: The Blink frequency = fLcd/8
Kojto 122:f9eeca106725 504 * @arg LCD_BLINKFREQUENCY_DIV16: The Blink frequency = fLcd/16
Kojto 122:f9eeca106725 505 * @arg LCD_BLINKFREQUENCY_DIV32: The Blink frequency = fLcd/32
Kojto 122:f9eeca106725 506 * @arg LCD_BLINKFREQUENCY_DIV64: The Blink frequency = fLcd/64
Kojto 122:f9eeca106725 507 * @arg LCD_BLINKFREQUENCY_DIV128: The Blink frequency = fLcd/128
Kojto 122:f9eeca106725 508 * @arg LCD_BLINKFREQUENCY_DIV256: The Blink frequency = fLcd/256
Kojto 122:f9eeca106725 509 * @arg LCD_BLINKFREQUENCY_DIV512: The Blink frequency = fLcd/512
Kojto 122:f9eeca106725 510 * @arg LCD_BLINKFREQUENCY_DIV1024: The Blink frequency = fLcd/1024
Kojto 122:f9eeca106725 511 * @retval None
Kojto 122:f9eeca106725 512 */
Kojto 122:f9eeca106725 513 #define __HAL_LCD_BLINK_CONFIG(__HANDLE__, __BLINKMODE__, __BLINKFREQUENCY__) \
Kojto 122:f9eeca106725 514 do { \
Kojto 122:f9eeca106725 515 MODIFY_REG((__HANDLE__)->Instance->FCR, (LCD_FCR_BLINKF | LCD_FCR_BLINK), ((__BLINKMODE__) | (__BLINKFREQUENCY__))); \
Kojto 122:f9eeca106725 516 LCD_WaitForSynchro(__HANDLE__); \
Kojto 122:f9eeca106725 517 } while(0)
Kojto 122:f9eeca106725 518
Kojto 122:f9eeca106725 519 /** @brief Enable the specified LCD interrupt.
Kojto 122:f9eeca106725 520 * @param __HANDLE__: specifies the LCD Handle.
Kojto 122:f9eeca106725 521 * @param __INTERRUPT__: specifies the LCD interrupt source to be enabled.
Kojto 122:f9eeca106725 522 * This parameter can be one of the following values:
Kojto 122:f9eeca106725 523 * @arg LCD_IT_SOF: Start of Frame Interrupt
Kojto 122:f9eeca106725 524 * @arg LCD_IT_UDD: Update Display Done Interrupt
Kojto 122:f9eeca106725 525 * @retval None
Kojto 122:f9eeca106725 526 */
Kojto 122:f9eeca106725 527 #define __HAL_LCD_ENABLE_IT(__HANDLE__, __INTERRUPT__) \
Kojto 122:f9eeca106725 528 do { \
Kojto 122:f9eeca106725 529 SET_BIT((__HANDLE__)->Instance->FCR, (__INTERRUPT__)); \
Kojto 122:f9eeca106725 530 LCD_WaitForSynchro(__HANDLE__); \
Kojto 122:f9eeca106725 531 } while(0)
Kojto 122:f9eeca106725 532
Kojto 122:f9eeca106725 533 /** @brief Disable the specified LCD interrupt.
Kojto 122:f9eeca106725 534 * @param __HANDLE__: specifies the LCD Handle.
Kojto 122:f9eeca106725 535 * @param __INTERRUPT__: specifies the LCD interrupt source to be disabled.
Kojto 122:f9eeca106725 536 * This parameter can be one of the following values:
Kojto 122:f9eeca106725 537 * @arg LCD_IT_SOF: Start of Frame Interrupt
Kojto 122:f9eeca106725 538 * @arg LCD_IT_UDD: Update Display Done Interrupt
Kojto 122:f9eeca106725 539 * @retval None
Kojto 122:f9eeca106725 540 */
Kojto 122:f9eeca106725 541 #define __HAL_LCD_DISABLE_IT(__HANDLE__, __INTERRUPT__) \
Kojto 122:f9eeca106725 542 do { \
Kojto 122:f9eeca106725 543 CLEAR_BIT((__HANDLE__)->Instance->FCR, (__INTERRUPT__)); \
Kojto 122:f9eeca106725 544 LCD_WaitForSynchro(__HANDLE__); \
Kojto 122:f9eeca106725 545 } while(0)
Kojto 122:f9eeca106725 546
Kojto 122:f9eeca106725 547 /** @brief Check whether the specified LCD interrupt source is enabled or not.
Kojto 122:f9eeca106725 548 * @param __HANDLE__: specifies the LCD Handle.
Kojto 122:f9eeca106725 549 * @param __IT__: specifies the LCD interrupt source to check.
Kojto 122:f9eeca106725 550 * This parameter can be one of the following values:
Kojto 122:f9eeca106725 551 * @arg LCD_IT_SOF: Start of Frame Interrupt
Kojto 122:f9eeca106725 552 * @arg LCD_IT_UDD: Update Display Done Interrupt.
Kojto 122:f9eeca106725 553 * @note If the device is in STOP mode (PCLK not provided) UDD will not
Kojto 122:f9eeca106725 554 * generate an interrupt even if UDDIE = 1.
Kojto 122:f9eeca106725 555 * If the display is not enabled the UDD interrupt will never occur.
Kojto 122:f9eeca106725 556 * @retval The state of __IT__ (TRUE or FALSE).
Kojto 122:f9eeca106725 557 */
Kojto 122:f9eeca106725 558 #define __HAL_LCD_GET_IT_SOURCE(__HANDLE__, __IT__) (((__HANDLE__)->Instance->FCR) & (__IT__))
Kojto 122:f9eeca106725 559
Kojto 122:f9eeca106725 560 /** @brief Check whether the specified LCD flag is set or not.
Kojto 122:f9eeca106725 561 * @param __HANDLE__: specifies the LCD Handle.
Kojto 122:f9eeca106725 562 * @param __FLAG__: specifies the flag to check.
Kojto 122:f9eeca106725 563 * This parameter can be one of the following values:
Kojto 122:f9eeca106725 564 * @arg LCD_FLAG_ENS: LCD Enabled flag. It indicates the LCD controller status.
Kojto 122:f9eeca106725 565 * @note The ENS bit is set immediately when the LCDEN bit in the LCD_CR
Kojto 122:f9eeca106725 566 * goes from 0 to 1. On deactivation it reflects the real status of
Kojto 122:f9eeca106725 567 * LCD so it becomes 0 at the end of the last displayed frame.
Kojto 122:f9eeca106725 568 * @arg LCD_FLAG_SOF: Start of Frame flag. This flag is set by hardware at
Kojto 122:f9eeca106725 569 * the beginning of a new frame, at the same time as the display data is
Kojto 122:f9eeca106725 570 * updated.
Kojto 122:f9eeca106725 571 * @arg LCD_FLAG_UDR: Update Display Request flag.
Kojto 122:f9eeca106725 572 * @arg LCD_FLAG_UDD: Update Display Done flag.
Kojto 122:f9eeca106725 573 * @arg LCD_FLAG_RDY: Step_up converter Ready flag. It indicates the status
Kojto 122:f9eeca106725 574 * of the step-up converter.
Kojto 122:f9eeca106725 575 * @arg LCD_FLAG_FCRSF: LCD Frame Control Register Synchronization Flag.
Kojto 122:f9eeca106725 576 * This flag is set by hardware each time the LCD_FCR register is updated
Kojto 122:f9eeca106725 577 * in the LCDCLK domain.
Kojto 122:f9eeca106725 578 * @retval The new state of __FLAG__ (TRUE or FALSE).
Kojto 122:f9eeca106725 579 */
Kojto 122:f9eeca106725 580 #define __HAL_LCD_GET_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->SR & (__FLAG__)) == (__FLAG__))
Kojto 122:f9eeca106725 581
Kojto 122:f9eeca106725 582 /** @brief Clear the specified LCD pending flag.
Kojto 122:f9eeca106725 583 * @param __HANDLE__: specifies the LCD Handle.
Kojto 122:f9eeca106725 584 * @param __FLAG__: specifies the flag to clear.
Kojto 122:f9eeca106725 585 * This parameter can be any combination of the following values:
Kojto 122:f9eeca106725 586 * @arg LCD_FLAG_SOF: Start of Frame Interrupt
Kojto 122:f9eeca106725 587 * @arg LCD_FLAG_UDD: Update Display Done Interrupt
Kojto 122:f9eeca106725 588 * @retval None
Kojto 122:f9eeca106725 589 */
Kojto 122:f9eeca106725 590 #define __HAL_LCD_CLEAR_FLAG(__HANDLE__, __FLAG__) WRITE_REG((__HANDLE__)->Instance->CLR, (__FLAG__))
Kojto 122:f9eeca106725 591
Kojto 122:f9eeca106725 592 /**
Kojto 122:f9eeca106725 593 * @}
Kojto 122:f9eeca106725 594 */
Kojto 122:f9eeca106725 595
Kojto 122:f9eeca106725 596 /* Exported functions ------------------------------------------------------- */
Kojto 122:f9eeca106725 597 /** @addtogroup LCD_Exported_Functions
Kojto 122:f9eeca106725 598 * @{
Kojto 122:f9eeca106725 599 */
Kojto 122:f9eeca106725 600
Kojto 122:f9eeca106725 601 /* Initialization/de-initialization methods **********************************/
Kojto 122:f9eeca106725 602 /** @addtogroup LCD_Exported_Functions_Group1
Kojto 122:f9eeca106725 603 * @{
Kojto 122:f9eeca106725 604 */
Kojto 122:f9eeca106725 605 HAL_StatusTypeDef HAL_LCD_DeInit(LCD_HandleTypeDef *hlcd);
Kojto 122:f9eeca106725 606 HAL_StatusTypeDef HAL_LCD_Init(LCD_HandleTypeDef *hlcd);
Kojto 122:f9eeca106725 607 void HAL_LCD_MspInit(LCD_HandleTypeDef *hlcd);
Kojto 122:f9eeca106725 608 void HAL_LCD_MspDeInit(LCD_HandleTypeDef *hlcd);
Kojto 122:f9eeca106725 609 /**
Kojto 122:f9eeca106725 610 * @}
Kojto 122:f9eeca106725 611 */
Kojto 122:f9eeca106725 612
Kojto 122:f9eeca106725 613 /* IO operation methods *******************************************************/
Kojto 122:f9eeca106725 614 /** @addtogroup LCD_Exported_Functions_Group2
Kojto 122:f9eeca106725 615 * @{
Kojto 122:f9eeca106725 616 */
Kojto 122:f9eeca106725 617 HAL_StatusTypeDef HAL_LCD_Write(LCD_HandleTypeDef *hlcd, uint32_t RAMRegisterIndex, uint32_t RAMRegisterMask, uint32_t Data);
Kojto 122:f9eeca106725 618 HAL_StatusTypeDef HAL_LCD_Clear(LCD_HandleTypeDef *hlcd);
Kojto 122:f9eeca106725 619 HAL_StatusTypeDef HAL_LCD_UpdateDisplayRequest(LCD_HandleTypeDef *hlcd);
Kojto 122:f9eeca106725 620 /**
Kojto 122:f9eeca106725 621 * @}
Kojto 122:f9eeca106725 622 */
Kojto 122:f9eeca106725 623
Kojto 122:f9eeca106725 624 /* Peripheral State methods **************************************************/
Kojto 122:f9eeca106725 625 /** @addtogroup LCD_Exported_Functions_Group3
Kojto 122:f9eeca106725 626 * @{
Kojto 122:f9eeca106725 627 */
Kojto 122:f9eeca106725 628 HAL_LCD_StateTypeDef HAL_LCD_GetState(LCD_HandleTypeDef *hlcd);
Kojto 122:f9eeca106725 629 uint32_t HAL_LCD_GetError(LCD_HandleTypeDef *hlcd);
Kojto 122:f9eeca106725 630 /**
Kojto 122:f9eeca106725 631 * @}
Kojto 122:f9eeca106725 632 */
Kojto 122:f9eeca106725 633
Kojto 122:f9eeca106725 634 /**
Kojto 122:f9eeca106725 635 * @}
Kojto 122:f9eeca106725 636 */
Kojto 122:f9eeca106725 637
Kojto 122:f9eeca106725 638 /* Private types -------------------------------------------------------------*/
Kojto 122:f9eeca106725 639 /* Private variables ---------------------------------------------------------*/
Kojto 122:f9eeca106725 640 /* Private constants ---------------------------------------------------------*/
Kojto 122:f9eeca106725 641 /* Private macros ------------------------------------------------------------*/
Kojto 122:f9eeca106725 642 /** @defgroup LCD_Private_Macros LCD Private Macros
Kojto 122:f9eeca106725 643 * @{
Kojto 122:f9eeca106725 644 */
Kojto 122:f9eeca106725 645
Kojto 122:f9eeca106725 646 #define IS_LCD_PRESCALER(__PRESCALER__) (((__PRESCALER__) == LCD_PRESCALER_1) || \
Kojto 122:f9eeca106725 647 ((__PRESCALER__) == LCD_PRESCALER_2) || \
Kojto 122:f9eeca106725 648 ((__PRESCALER__) == LCD_PRESCALER_4) || \
Kojto 122:f9eeca106725 649 ((__PRESCALER__) == LCD_PRESCALER_8) || \
Kojto 122:f9eeca106725 650 ((__PRESCALER__) == LCD_PRESCALER_16) || \
Kojto 122:f9eeca106725 651 ((__PRESCALER__) == LCD_PRESCALER_32) || \
Kojto 122:f9eeca106725 652 ((__PRESCALER__) == LCD_PRESCALER_64) || \
Kojto 122:f9eeca106725 653 ((__PRESCALER__) == LCD_PRESCALER_128) || \
Kojto 122:f9eeca106725 654 ((__PRESCALER__) == LCD_PRESCALER_256) || \
Kojto 122:f9eeca106725 655 ((__PRESCALER__) == LCD_PRESCALER_512) || \
Kojto 122:f9eeca106725 656 ((__PRESCALER__) == LCD_PRESCALER_1024) || \
Kojto 122:f9eeca106725 657 ((__PRESCALER__) == LCD_PRESCALER_2048) || \
Kojto 122:f9eeca106725 658 ((__PRESCALER__) == LCD_PRESCALER_4096) || \
Kojto 122:f9eeca106725 659 ((__PRESCALER__) == LCD_PRESCALER_8192) || \
Kojto 122:f9eeca106725 660 ((__PRESCALER__) == LCD_PRESCALER_16384) || \
Kojto 122:f9eeca106725 661 ((__PRESCALER__) == LCD_PRESCALER_32768))
Kojto 122:f9eeca106725 662
Kojto 122:f9eeca106725 663 #define IS_LCD_DIVIDER(__DIVIDER__) (((__DIVIDER__) == LCD_DIVIDER_16) || \
Kojto 122:f9eeca106725 664 ((__DIVIDER__) == LCD_DIVIDER_17) || \
Kojto 122:f9eeca106725 665 ((__DIVIDER__) == LCD_DIVIDER_18) || \
Kojto 122:f9eeca106725 666 ((__DIVIDER__) == LCD_DIVIDER_19) || \
Kojto 122:f9eeca106725 667 ((__DIVIDER__) == LCD_DIVIDER_20) || \
Kojto 122:f9eeca106725 668 ((__DIVIDER__) == LCD_DIVIDER_21) || \
Kojto 122:f9eeca106725 669 ((__DIVIDER__) == LCD_DIVIDER_22) || \
Kojto 122:f9eeca106725 670 ((__DIVIDER__) == LCD_DIVIDER_23) || \
Kojto 122:f9eeca106725 671 ((__DIVIDER__) == LCD_DIVIDER_24) || \
Kojto 122:f9eeca106725 672 ((__DIVIDER__) == LCD_DIVIDER_25) || \
Kojto 122:f9eeca106725 673 ((__DIVIDER__) == LCD_DIVIDER_26) || \
Kojto 122:f9eeca106725 674 ((__DIVIDER__) == LCD_DIVIDER_27) || \
Kojto 122:f9eeca106725 675 ((__DIVIDER__) == LCD_DIVIDER_28) || \
Kojto 122:f9eeca106725 676 ((__DIVIDER__) == LCD_DIVIDER_29) || \
Kojto 122:f9eeca106725 677 ((__DIVIDER__) == LCD_DIVIDER_30) || \
Kojto 122:f9eeca106725 678 ((__DIVIDER__) == LCD_DIVIDER_31))
Kojto 122:f9eeca106725 679
Kojto 122:f9eeca106725 680 #define IS_LCD_DUTY(__DUTY__) (((__DUTY__) == LCD_DUTY_STATIC) || \
Kojto 122:f9eeca106725 681 ((__DUTY__) == LCD_DUTY_1_2) || \
Kojto 122:f9eeca106725 682 ((__DUTY__) == LCD_DUTY_1_3) || \
Kojto 122:f9eeca106725 683 ((__DUTY__) == LCD_DUTY_1_4) || \
Kojto 122:f9eeca106725 684 ((__DUTY__) == LCD_DUTY_1_8))
Kojto 122:f9eeca106725 685
Kojto 122:f9eeca106725 686 #define IS_LCD_BIAS(__BIAS__) (((__BIAS__) == LCD_BIAS_1_4) || \
Kojto 122:f9eeca106725 687 ((__BIAS__) == LCD_BIAS_1_2) || \
Kojto 122:f9eeca106725 688 ((__BIAS__) == LCD_BIAS_1_3))
Kojto 122:f9eeca106725 689
Kojto 122:f9eeca106725 690 #define IS_LCD_VOLTAGE_SOURCE(SOURCE) (((SOURCE) == LCD_VOLTAGESOURCE_INTERNAL) || \
Kojto 122:f9eeca106725 691 ((SOURCE) == LCD_VOLTAGESOURCE_EXTERNAL))
Kojto 122:f9eeca106725 692
Kojto 122:f9eeca106725 693
Kojto 122:f9eeca106725 694 #define IS_LCD_PULSE_ON_DURATION(__DURATION__) (((__DURATION__) == LCD_PULSEONDURATION_0) || \
Kojto 122:f9eeca106725 695 ((__DURATION__) == LCD_PULSEONDURATION_1) || \
Kojto 122:f9eeca106725 696 ((__DURATION__) == LCD_PULSEONDURATION_2) || \
Kojto 122:f9eeca106725 697 ((__DURATION__) == LCD_PULSEONDURATION_3) || \
Kojto 122:f9eeca106725 698 ((__DURATION__) == LCD_PULSEONDURATION_4) || \
Kojto 122:f9eeca106725 699 ((__DURATION__) == LCD_PULSEONDURATION_5) || \
Kojto 122:f9eeca106725 700 ((__DURATION__) == LCD_PULSEONDURATION_6) || \
Kojto 122:f9eeca106725 701 ((__DURATION__) == LCD_PULSEONDURATION_7))
Kojto 122:f9eeca106725 702
Kojto 122:f9eeca106725 703 #define IS_LCD_DEAD_TIME(__TIME__) (((__TIME__) == LCD_DEADTIME_0) || \
Kojto 122:f9eeca106725 704 ((__TIME__) == LCD_DEADTIME_1) || \
Kojto 122:f9eeca106725 705 ((__TIME__) == LCD_DEADTIME_2) || \
Kojto 122:f9eeca106725 706 ((__TIME__) == LCD_DEADTIME_3) || \
Kojto 122:f9eeca106725 707 ((__TIME__) == LCD_DEADTIME_4) || \
Kojto 122:f9eeca106725 708 ((__TIME__) == LCD_DEADTIME_5) || \
Kojto 122:f9eeca106725 709 ((__TIME__) == LCD_DEADTIME_6) || \
Kojto 122:f9eeca106725 710 ((__TIME__) == LCD_DEADTIME_7))
Kojto 122:f9eeca106725 711
Kojto 122:f9eeca106725 712 #define IS_LCD_BLINK_MODE(__MODE__) (((__MODE__) == LCD_BLINKMODE_OFF) || \
Kojto 122:f9eeca106725 713 ((__MODE__) == LCD_BLINKMODE_SEG0_COM0) || \
Kojto 122:f9eeca106725 714 ((__MODE__) == LCD_BLINKMODE_SEG0_ALLCOM) || \
Kojto 122:f9eeca106725 715 ((__MODE__) == LCD_BLINKMODE_ALLSEG_ALLCOM))
Kojto 122:f9eeca106725 716
Kojto 122:f9eeca106725 717 #define IS_LCD_BLINK_FREQUENCY(__FREQUENCY__) (((__FREQUENCY__) == LCD_BLINKFREQUENCY_DIV8) || \
Kojto 122:f9eeca106725 718 ((__FREQUENCY__) == LCD_BLINKFREQUENCY_DIV16) || \
Kojto 122:f9eeca106725 719 ((__FREQUENCY__) == LCD_BLINKFREQUENCY_DIV32) || \
Kojto 122:f9eeca106725 720 ((__FREQUENCY__) == LCD_BLINKFREQUENCY_DIV64) || \
Kojto 122:f9eeca106725 721 ((__FREQUENCY__) == LCD_BLINKFREQUENCY_DIV128) || \
Kojto 122:f9eeca106725 722 ((__FREQUENCY__) == LCD_BLINKFREQUENCY_DIV256) || \
Kojto 122:f9eeca106725 723 ((__FREQUENCY__) == LCD_BLINKFREQUENCY_DIV512) || \
Kojto 122:f9eeca106725 724 ((__FREQUENCY__) == LCD_BLINKFREQUENCY_DIV1024))
Kojto 122:f9eeca106725 725
Kojto 122:f9eeca106725 726 #define IS_LCD_CONTRAST(__CONTRAST__) (((__CONTRAST__) == LCD_CONTRASTLEVEL_0) || \
Kojto 122:f9eeca106725 727 ((__CONTRAST__) == LCD_CONTRASTLEVEL_1) || \
Kojto 122:f9eeca106725 728 ((__CONTRAST__) == LCD_CONTRASTLEVEL_2) || \
Kojto 122:f9eeca106725 729 ((__CONTRAST__) == LCD_CONTRASTLEVEL_3) || \
Kojto 122:f9eeca106725 730 ((__CONTRAST__) == LCD_CONTRASTLEVEL_4) || \
Kojto 122:f9eeca106725 731 ((__CONTRAST__) == LCD_CONTRASTLEVEL_5) || \
Kojto 122:f9eeca106725 732 ((__CONTRAST__) == LCD_CONTRASTLEVEL_6) || \
Kojto 122:f9eeca106725 733 ((__CONTRAST__) == LCD_CONTRASTLEVEL_7))
Kojto 122:f9eeca106725 734
Kojto 122:f9eeca106725 735 #define IS_LCD_RAM_REGISTER(__REGISTER__) (((__REGISTER__) == LCD_RAM_REGISTER0) || \
Kojto 122:f9eeca106725 736 ((__REGISTER__) == LCD_RAM_REGISTER1) || \
Kojto 122:f9eeca106725 737 ((__REGISTER__) == LCD_RAM_REGISTER2) || \
Kojto 122:f9eeca106725 738 ((__REGISTER__) == LCD_RAM_REGISTER3) || \
Kojto 122:f9eeca106725 739 ((__REGISTER__) == LCD_RAM_REGISTER4) || \
Kojto 122:f9eeca106725 740 ((__REGISTER__) == LCD_RAM_REGISTER5) || \
Kojto 122:f9eeca106725 741 ((__REGISTER__) == LCD_RAM_REGISTER6) || \
Kojto 122:f9eeca106725 742 ((__REGISTER__) == LCD_RAM_REGISTER7) || \
Kojto 122:f9eeca106725 743 ((__REGISTER__) == LCD_RAM_REGISTER8) || \
Kojto 122:f9eeca106725 744 ((__REGISTER__) == LCD_RAM_REGISTER9) || \
Kojto 122:f9eeca106725 745 ((__REGISTER__) == LCD_RAM_REGISTER10) || \
Kojto 122:f9eeca106725 746 ((__REGISTER__) == LCD_RAM_REGISTER11) || \
Kojto 122:f9eeca106725 747 ((__REGISTER__) == LCD_RAM_REGISTER12) || \
Kojto 122:f9eeca106725 748 ((__REGISTER__) == LCD_RAM_REGISTER13) || \
Kojto 122:f9eeca106725 749 ((__REGISTER__) == LCD_RAM_REGISTER14) || \
Kojto 122:f9eeca106725 750 ((__REGISTER__) == LCD_RAM_REGISTER15))
Kojto 122:f9eeca106725 751
Kojto 122:f9eeca106725 752 #define IS_LCD_HIGH_DRIVE(__VALUE__) (((__VALUE__) == LCD_HIGHDRIVE_DISABLE) || \
Kojto 122:f9eeca106725 753 ((__VALUE__) == LCD_HIGHDRIVE_ENABLE))
Kojto 122:f9eeca106725 754
Kojto 122:f9eeca106725 755 #define IS_LCD_MUX_SEGMENT(__VALUE__) (((__VALUE__) == LCD_MUXSEGMENT_ENABLE) || \
Kojto 122:f9eeca106725 756 ((__VALUE__) == LCD_MUXSEGMENT_DISABLE))
Kojto 122:f9eeca106725 757
Kojto 122:f9eeca106725 758 /**
Kojto 122:f9eeca106725 759 * @}
Kojto 122:f9eeca106725 760 */
Kojto 122:f9eeca106725 761
Kojto 122:f9eeca106725 762 /* Private functions ---------------------------------------------------------*/
Kojto 122:f9eeca106725 763 /** @addtogroup LCD_Private_Functions
Kojto 122:f9eeca106725 764 * @{
Kojto 122:f9eeca106725 765 */
Kojto 122:f9eeca106725 766
Kojto 122:f9eeca106725 767 HAL_StatusTypeDef LCD_WaitForSynchro(LCD_HandleTypeDef *hlcd);
Kojto 122:f9eeca106725 768
Kojto 122:f9eeca106725 769 /**
Kojto 122:f9eeca106725 770 * @}
Kojto 122:f9eeca106725 771 */
Kojto 122:f9eeca106725 772
Kojto 122:f9eeca106725 773 /**
Kojto 122:f9eeca106725 774 * @}
Kojto 122:f9eeca106725 775 */
Kojto 122:f9eeca106725 776
Kojto 122:f9eeca106725 777 /**
Kojto 122:f9eeca106725 778 * @}
Kojto 122:f9eeca106725 779 */
Kojto 122:f9eeca106725 780
Kojto 122:f9eeca106725 781 #endif /* STM32L433xx || STM32L443xx || STM32L476xx || STM32L486xx */
Kojto 122:f9eeca106725 782
Kojto 122:f9eeca106725 783 #ifdef __cplusplus
Kojto 122:f9eeca106725 784 }
Kojto 122:f9eeca106725 785 #endif
Kojto 122:f9eeca106725 786
Kojto 122:f9eeca106725 787 #endif /* __STM32L4xx_HAL_LCD_H */
Kojto 122:f9eeca106725 788
Kojto 122:f9eeca106725 789 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/