Fork of the official mbed C/C SDK provides the software platform and libraries to build your applications for RenBED.

Dependents:   1-RenBuggyTimed RenBED_RGB RenBED_RGB_PWM RenBED_RGB

Fork of mbed by mbed official

Committer:
Kojto
Date:
Wed Sep 16 15:32:31 2015 +0100
Revision:
107:4f6c30876dfa
Release 107  of the mbed library

Changes:
- new platforms - DISCO_F746NG, DISCO_L476VG, NUCLEO_L476RG
- KL43Z - bugfix RTC init function
- K20 - SPI mode fix

Who changed what in which revision?

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