STM32L486xx HAL User Manual
stm32l4xx_hal_lcd.h
Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    stm32l4xx_hal_lcd.h
00004   * @author  MCD Application Team
00005   * @brief   Header file of LCD Controller HAL module.
00006   ******************************************************************************
00007   * @attention
00008   *
00009   * <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
00010   *
00011   * Redistribution and use in source and binary forms, with or without modification,
00012   * are permitted provided that the following conditions are met:
00013   *   1. Redistributions of source code must retain the above copyright notice,
00014   *      this list of conditions and the following disclaimer.
00015   *   2. Redistributions in binary form must reproduce the above copyright notice,
00016   *      this list of conditions and the following disclaimer in the documentation
00017   *      and/or other materials provided with the distribution.
00018   *   3. Neither the name of STMicroelectronics nor the names of its contributors
00019   *      may be used to endorse or promote products derived from this software
00020   *      without specific prior written permission.
00021   *
00022   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00023   * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00024   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00025   * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
00026   * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00027   * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00028   * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00029   * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00030   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00031   * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00032   *
00033   ******************************************************************************
00034   */
00035 
00036 /* Define to prevent recursive inclusion -------------------------------------*/
00037 #ifndef __STM32L4xx_HAL_LCD_H
00038 #define __STM32L4xx_HAL_LCD_H
00039 
00040 #ifdef __cplusplus
00041  extern "C" {
00042 #endif
00043 
00044 #if defined(STM32L433xx) || defined(STM32L443xx) || defined(STM32L476xx) || defined(STM32L486xx) || defined(STM32L496xx) || defined(STM32L4A6xx)
00045 
00046 /* Includes ------------------------------------------------------------------*/
00047 #include "stm32l4xx_hal_def.h"
00048 
00049 /** @addtogroup STM32L4xx_HAL_Driver
00050   * @{
00051   */
00052 
00053 /** @addtogroup LCD
00054   * @{
00055   */
00056 
00057 /* Exported types ------------------------------------------------------------*/
00058 /** @defgroup LCD_Exported_Types LCD Exported Types
00059   * @{
00060   */
00061 
00062 /**
00063   * @brief LCD Init structure definition
00064   */
00065 
00066 typedef struct
00067 {
00068   uint32_t Prescaler;       /*!< Configures the LCD Prescaler.
00069                                  This parameter can be one value of @ref LCD_Prescaler */
00070   uint32_t Divider;         /*!< Configures the LCD Divider.
00071                                  This parameter can be one value of @ref LCD_Divider */
00072   uint32_t Duty;            /*!< Configures the LCD Duty.
00073                                  This parameter can be one value of @ref LCD_Duty */
00074   uint32_t Bias;            /*!< Configures the LCD Bias.
00075                                  This parameter can be one value of @ref LCD_Bias */
00076   uint32_t VoltageSource;   /*!< Selects the LCD Voltage source.
00077                                  This parameter can be one value of @ref LCD_Voltage_Source */
00078   uint32_t Contrast;        /*!< Configures the LCD Contrast.
00079                                  This parameter can be one value of @ref LCD_Contrast */
00080   uint32_t DeadTime;        /*!< Configures the LCD Dead Time.
00081                                  This parameter can be one value of @ref LCD_DeadTime */
00082   uint32_t PulseOnDuration; /*!< Configures the LCD Pulse On Duration.
00083                                  This parameter can be one value of @ref LCD_PulseOnDuration */
00084   uint32_t HighDrive;       /*!< Enable or disable the low resistance divider.
00085                                  This parameter can be one value of @ref LCD_HighDrive */
00086   uint32_t BlinkMode;       /*!< Configures the LCD Blink Mode.
00087                                  This parameter can be one value of @ref LCD_BlinkMode */
00088   uint32_t BlinkFrequency;  /*!< Configures the LCD Blink frequency.
00089                                  This parameter can be one value of @ref LCD_BlinkFrequency */
00090   uint32_t MuxSegment;      /*!< Enable or disable mux segment.
00091                                  This parameter can be one value of @ref LCD_MuxSegment */
00092 } LCD_InitTypeDef;
00093 
00094 /**
00095   * @brief HAL LCD State structures definition
00096   */
00097 typedef enum
00098 {
00099   HAL_LCD_STATE_RESET             = 0x00,    /*!< Peripheral is not yet Initialized */
00100   HAL_LCD_STATE_READY             = 0x01,    /*!< Peripheral Initialized and ready for use */
00101   HAL_LCD_STATE_BUSY              = 0x02,    /*!< an internal process is ongoing */
00102   HAL_LCD_STATE_TIMEOUT           = 0x03,    /*!< Timeout state */
00103   HAL_LCD_STATE_ERROR             = 0x04     /*!< Error */
00104 } HAL_LCD_StateTypeDef;
00105 
00106 /**
00107   * @brief  UART handle Structure definition
00108   */
00109 typedef struct
00110 {
00111   LCD_TypeDef                   *Instance;  /* LCD registers base address */
00112 
00113   LCD_InitTypeDef               Init;       /* LCD communication parameters */
00114 
00115   HAL_LockTypeDef               Lock;       /* Locking object */
00116 
00117   __IO HAL_LCD_StateTypeDef     State;      /* LCD communication state */
00118 
00119   __IO uint32_t                 ErrorCode;  /* LCD Error code */
00120 
00121 }LCD_HandleTypeDef;
00122 /**
00123   * @}
00124   */
00125 
00126 /* Exported constants --------------------------------------------------------*/
00127 /** @defgroup LCD_Exported_Constants LCD Exported Constants
00128   * @{
00129   */
00130 
00131 /** @defgroup  LCD_ErrorCode LCD Error Code
00132   * @{
00133   */ 
00134 #define HAL_LCD_ERROR_NONE       ((uint32_t)0x00)    /*!< No error */
00135 #define HAL_LCD_ERROR_FCRSF      ((uint32_t)0x01)    /*!< Synchro flag timeout error */
00136 #define HAL_LCD_ERROR_UDR        ((uint32_t)0x02)    /*!< Update display request flag timeout error */
00137 #define HAL_LCD_ERROR_UDD        ((uint32_t)0x04)    /*!< Update display done flag timeout error */
00138 #define HAL_LCD_ERROR_ENS        ((uint32_t)0x08)    /*!< LCD enabled status flag timeout error */
00139 #define HAL_LCD_ERROR_RDY        ((uint32_t)0x10)    /*!< LCD Booster ready timeout error */
00140 /**
00141   * @}
00142   */
00143   
00144 /** @defgroup LCD_Prescaler LCD Prescaler
00145   * @{
00146   */
00147 #define LCD_PRESCALER_1        ((uint32_t)0x00000000)  /*!< CLKPS = LCDCLK        */
00148 #define LCD_PRESCALER_2        ((uint32_t)0x00400000)  /*!< CLKPS = LCDCLK/2      */
00149 #define LCD_PRESCALER_4        ((uint32_t)0x00800000)  /*!< CLKPS = LCDCLK/4      */
00150 #define LCD_PRESCALER_8        ((uint32_t)0x00C00000)  /*!< CLKPS = LCDCLK/8      */
00151 #define LCD_PRESCALER_16       ((uint32_t)0x01000000)  /*!< CLKPS = LCDCLK/16     */
00152 #define LCD_PRESCALER_32       ((uint32_t)0x01400000)  /*!< CLKPS = LCDCLK/32     */
00153 #define LCD_PRESCALER_64       ((uint32_t)0x01800000)  /*!< CLKPS = LCDCLK/64     */
00154 #define LCD_PRESCALER_128      ((uint32_t)0x01C00000)  /*!< CLKPS = LCDCLK/128    */
00155 #define LCD_PRESCALER_256      ((uint32_t)0x02000000)  /*!< CLKPS = LCDCLK/256    */
00156 #define LCD_PRESCALER_512      ((uint32_t)0x02400000)  /*!< CLKPS = LCDCLK/512    */
00157 #define LCD_PRESCALER_1024     ((uint32_t)0x02800000)  /*!< CLKPS = LCDCLK/1024   */
00158 #define LCD_PRESCALER_2048     ((uint32_t)0x02C00000)  /*!< CLKPS = LCDCLK/2048   */
00159 #define LCD_PRESCALER_4096     ((uint32_t)0x03000000)  /*!< CLKPS = LCDCLK/4096   */
00160 #define LCD_PRESCALER_8192     ((uint32_t)0x03400000)  /*!< CLKPS = LCDCLK/8192   */
00161 #define LCD_PRESCALER_16384    ((uint32_t)0x03800000)  /*!< CLKPS = LCDCLK/16384  */
00162 #define LCD_PRESCALER_32768    ((uint32_t)0x03C00000)  /*!< CLKPS = LCDCLK/32768  */
00163 /**
00164   * @}
00165   */
00166 
00167 /** @defgroup LCD_Divider LCD Divider
00168   * @{
00169   */
00170 #define LCD_DIVIDER_16    ((uint32_t)0x00000000)  /*!< LCD frequency = CLKPS/16 */
00171 #define LCD_DIVIDER_17    ((uint32_t)0x00040000)  /*!< LCD frequency = CLKPS/17 */
00172 #define LCD_DIVIDER_18    ((uint32_t)0x00080000)  /*!< LCD frequency = CLKPS/18 */
00173 #define LCD_DIVIDER_19    ((uint32_t)0x000C0000)  /*!< LCD frequency = CLKPS/19 */
00174 #define LCD_DIVIDER_20    ((uint32_t)0x00100000)  /*!< LCD frequency = CLKPS/20 */
00175 #define LCD_DIVIDER_21    ((uint32_t)0x00140000)  /*!< LCD frequency = CLKPS/21 */
00176 #define LCD_DIVIDER_22    ((uint32_t)0x00180000)  /*!< LCD frequency = CLKPS/22 */
00177 #define LCD_DIVIDER_23    ((uint32_t)0x001C0000)  /*!< LCD frequency = CLKPS/23 */
00178 #define LCD_DIVIDER_24    ((uint32_t)0x00200000)  /*!< LCD frequency = CLKPS/24 */
00179 #define LCD_DIVIDER_25    ((uint32_t)0x00240000)  /*!< LCD frequency = CLKPS/25 */
00180 #define LCD_DIVIDER_26    ((uint32_t)0x00280000)  /*!< LCD frequency = CLKPS/26 */
00181 #define LCD_DIVIDER_27    ((uint32_t)0x002C0000)  /*!< LCD frequency = CLKPS/27 */
00182 #define LCD_DIVIDER_28    ((uint32_t)0x00300000)  /*!< LCD frequency = CLKPS/28 */
00183 #define LCD_DIVIDER_29    ((uint32_t)0x00340000)  /*!< LCD frequency = CLKPS/29 */
00184 #define LCD_DIVIDER_30    ((uint32_t)0x00380000)  /*!< LCD frequency = CLKPS/30 */
00185 #define LCD_DIVIDER_31    ((uint32_t)0x003C0000)  /*!< LCD frequency = CLKPS/31 */
00186 /**
00187   * @}
00188   */
00189 
00190 
00191 /** @defgroup LCD_Duty LCD Duty
00192   * @{
00193   */
00194 #define LCD_DUTY_STATIC                 ((uint32_t)0x00000000)            /*!< Static duty */
00195 #define LCD_DUTY_1_2                    (LCD_CR_DUTY_0)                   /*!< 1/2 duty    */
00196 #define LCD_DUTY_1_3                    (LCD_CR_DUTY_1)                   /*!< 1/3 duty    */
00197 #define LCD_DUTY_1_4                    ((LCD_CR_DUTY_1 | LCD_CR_DUTY_0)) /*!< 1/4 duty    */
00198 #define LCD_DUTY_1_8                    (LCD_CR_DUTY_2)                   /*!< 1/8 duty    */
00199 /**
00200   * @}
00201   */
00202 
00203 
00204 /** @defgroup LCD_Bias LCD Bias
00205   * @{
00206   */
00207 #define LCD_BIAS_1_4                    ((uint32_t)0x00000000)  /*!< 1/4 Bias */
00208 #define LCD_BIAS_1_2                    LCD_CR_BIAS_0           /*!< 1/2 Bias */
00209 #define LCD_BIAS_1_3                    LCD_CR_BIAS_1           /*!< 1/3 Bias */
00210 /**
00211   * @}
00212   */
00213 
00214 /** @defgroup LCD_Voltage_Source LCD Voltage Source
00215   * @{
00216   */
00217 #define LCD_VOLTAGESOURCE_INTERNAL      ((uint32_t)0x00000000)  /*!< Internal voltage source for the LCD */
00218 #define LCD_VOLTAGESOURCE_EXTERNAL      LCD_CR_VSEL             /*!< External voltage source for the LCD */
00219 /**
00220   * @}
00221   */
00222 
00223 /** @defgroup LCD_Interrupts LCD Interrupts
00224   * @{
00225   */
00226 #define LCD_IT_SOF                      LCD_FCR_SOFIE
00227 #define LCD_IT_UDD                      LCD_FCR_UDDIE
00228 /**
00229   * @}
00230   */
00231 
00232 /** @defgroup LCD_PulseOnDuration LCD Pulse On Duration
00233   * @{
00234   */
00235 #define LCD_PULSEONDURATION_0           ((uint32_t)0x00000000)          /*!< Pulse ON duration = 0 pulse   */
00236 #define LCD_PULSEONDURATION_1           (LCD_FCR_PON_0)                 /*!< Pulse ON duration = 1/CK_PS  */
00237 #define LCD_PULSEONDURATION_2           (LCD_FCR_PON_1)                 /*!< Pulse ON duration = 2/CK_PS  */
00238 #define LCD_PULSEONDURATION_3           (LCD_FCR_PON_1 | LCD_FCR_PON_0) /*!< Pulse ON duration = 3/CK_PS  */
00239 #define LCD_PULSEONDURATION_4           (LCD_FCR_PON_2)                 /*!< Pulse ON duration = 4/CK_PS  */
00240 #define LCD_PULSEONDURATION_5           (LCD_FCR_PON_2 | LCD_FCR_PON_0) /*!< Pulse ON duration = 5/CK_PS  */
00241 #define LCD_PULSEONDURATION_6           (LCD_FCR_PON_2 | LCD_FCR_PON_1) /*!< Pulse ON duration = 6/CK_PS  */
00242 #define LCD_PULSEONDURATION_7           (LCD_FCR_PON)                   /*!< Pulse ON duration = 7/CK_PS  */
00243 /**
00244   * @}
00245   */
00246 
00247 
00248 /** @defgroup LCD_DeadTime LCD Dead Time
00249   * @{
00250   */
00251 #define LCD_DEADTIME_0                  ((uint32_t)0x00000000)            /*!< No dead Time  */
00252 #define LCD_DEADTIME_1                  (LCD_FCR_DEAD_0)                  /*!< One Phase between different couple of Frame   */
00253 #define LCD_DEADTIME_2                  (LCD_FCR_DEAD_1)                  /*!< Two Phase between different couple of Frame   */
00254 #define LCD_DEADTIME_3                  (LCD_FCR_DEAD_1 | LCD_FCR_DEAD_0) /*!< Three Phase between different couple of Frame */
00255 #define LCD_DEADTIME_4                  (LCD_FCR_DEAD_2)                  /*!< Four Phase between different couple of Frame  */
00256 #define LCD_DEADTIME_5                  (LCD_FCR_DEAD_2 | LCD_FCR_DEAD_0) /*!< Five Phase between different couple of Frame  */
00257 #define LCD_DEADTIME_6                  (LCD_FCR_DEAD_2 | LCD_FCR_DEAD_1) /*!< Six Phase between different couple of Frame   */
00258 #define LCD_DEADTIME_7                  (LCD_FCR_DEAD)                    /*!< Seven Phase between different couple of Frame */
00259 /**
00260   * @}
00261   */
00262 
00263 /** @defgroup LCD_BlinkMode LCD Blink Mode
00264   * @{
00265   */
00266 #define LCD_BLINKMODE_OFF               ((uint32_t)0x00000000)  /*!< Blink disabled            */
00267 #define LCD_BLINKMODE_SEG0_COM0         (LCD_FCR_BLINK_0)       /*!< Blink enabled on SEG[0], COM[0] (1 pixel)   */
00268 #define LCD_BLINKMODE_SEG0_ALLCOM       (LCD_FCR_BLINK_1)       /*!< Blink enabled on SEG[0], all COM (up to
00269                                                                     8 pixels according to the programmed duty)  */
00270 #define LCD_BLINKMODE_ALLSEG_ALLCOM     (LCD_FCR_BLINK)         /*!< Blink enabled on all SEG and all COM (all pixels)  */
00271 /**
00272   * @}
00273   */
00274 
00275 /** @defgroup LCD_BlinkFrequency LCD Blink Frequency
00276   * @{
00277   */
00278 #define LCD_BLINKFREQUENCY_DIV8         ((uint32_t)0x00000000)                /*!< The Blink frequency = fLCD/8    */
00279 #define LCD_BLINKFREQUENCY_DIV16        (LCD_FCR_BLINKF_0)                    /*!< The Blink frequency = fLCD/16   */
00280 #define LCD_BLINKFREQUENCY_DIV32        (LCD_FCR_BLINKF_1)                    /*!< The Blink frequency = fLCD/32   */
00281 #define LCD_BLINKFREQUENCY_DIV64        (LCD_FCR_BLINKF_1 | LCD_FCR_BLINKF_0) /*!< The Blink frequency = fLCD/64   */
00282 #define LCD_BLINKFREQUENCY_DIV128       (LCD_FCR_BLINKF_2)                    /*!< The Blink frequency = fLCD/128  */
00283 #define LCD_BLINKFREQUENCY_DIV256       (LCD_FCR_BLINKF_2 |LCD_FCR_BLINKF_0)  /*!< The Blink frequency = fLCD/256  */
00284 #define LCD_BLINKFREQUENCY_DIV512       (LCD_FCR_BLINKF_2 |LCD_FCR_BLINKF_1)  /*!< The Blink frequency = fLCD/512  */
00285 #define LCD_BLINKFREQUENCY_DIV1024      (LCD_FCR_BLINKF)                      /*!< The Blink frequency = fLCD/1024 */
00286 /**
00287   * @}
00288   */
00289 
00290 /** @defgroup LCD_Contrast LCD Contrast
00291   * @{
00292   */
00293 #define LCD_CONTRASTLEVEL_0               ((uint32_t)0x00000000)        /*!< Maximum Voltage = 2.60V    */
00294 #define LCD_CONTRASTLEVEL_1               (LCD_FCR_CC_0)                /*!< Maximum Voltage = 2.73V    */
00295 #define LCD_CONTRASTLEVEL_2               (LCD_FCR_CC_1)                /*!< Maximum Voltage = 2.86V    */
00296 #define LCD_CONTRASTLEVEL_3               (LCD_FCR_CC_1 | LCD_FCR_CC_0) /*!< Maximum Voltage = 2.99V    */
00297 #define LCD_CONTRASTLEVEL_4               (LCD_FCR_CC_2)                /*!< Maximum Voltage = 3.12V    */
00298 #define LCD_CONTRASTLEVEL_5               (LCD_FCR_CC_2 | LCD_FCR_CC_0) /*!< Maximum Voltage = 3.26V    */
00299 #define LCD_CONTRASTLEVEL_6               (LCD_FCR_CC_2 | LCD_FCR_CC_1) /*!< Maximum Voltage = 3.40V    */
00300 #define LCD_CONTRASTLEVEL_7               (LCD_FCR_CC)                  /*!< Maximum Voltage = 3.55V    */
00301 /**
00302   * @}
00303   */
00304 
00305 /** @defgroup LCD_RAMRegister LCD RAMRegister
00306   * @{
00307   */
00308 #define LCD_RAM_REGISTER0               ((uint32_t)0x00000000) /*!< LCD RAM Register 0  */
00309 #define LCD_RAM_REGISTER1               ((uint32_t)0x00000001) /*!< LCD RAM Register 1  */
00310 #define LCD_RAM_REGISTER2               ((uint32_t)0x00000002) /*!< LCD RAM Register 2  */
00311 #define LCD_RAM_REGISTER3               ((uint32_t)0x00000003) /*!< LCD RAM Register 3  */
00312 #define LCD_RAM_REGISTER4               ((uint32_t)0x00000004) /*!< LCD RAM Register 4  */
00313 #define LCD_RAM_REGISTER5               ((uint32_t)0x00000005) /*!< LCD RAM Register 5  */
00314 #define LCD_RAM_REGISTER6               ((uint32_t)0x00000006) /*!< LCD RAM Register 6  */
00315 #define LCD_RAM_REGISTER7               ((uint32_t)0x00000007) /*!< LCD RAM Register 7  */
00316 #define LCD_RAM_REGISTER8               ((uint32_t)0x00000008) /*!< LCD RAM Register 8  */
00317 #define LCD_RAM_REGISTER9               ((uint32_t)0x00000009) /*!< LCD RAM Register 9  */
00318 #define LCD_RAM_REGISTER10              ((uint32_t)0x0000000A) /*!< LCD RAM Register 10 */
00319 #define LCD_RAM_REGISTER11              ((uint32_t)0x0000000B) /*!< LCD RAM Register 11 */
00320 #define LCD_RAM_REGISTER12              ((uint32_t)0x0000000C) /*!< LCD RAM Register 12 */
00321 #define LCD_RAM_REGISTER13              ((uint32_t)0x0000000D) /*!< LCD RAM Register 13 */
00322 #define LCD_RAM_REGISTER14              ((uint32_t)0x0000000E) /*!< LCD RAM Register 14 */
00323 #define LCD_RAM_REGISTER15              ((uint32_t)0x0000000F) /*!< LCD RAM Register 15 */
00324 /**
00325   * @}
00326   */
00327 
00328 /** @defgroup LCD_HighDrive LCD High Drive
00329   * @{
00330   */
00331 
00332 #define LCD_HIGHDRIVE_DISABLE             ((uint32_t)0x00000000)        /*!< High drive disabled */
00333 #define LCD_HIGHDRIVE_ENABLE              (LCD_FCR_HD)                  /*!< High drive enabled  */
00334 /**
00335   * @}
00336   */
00337 
00338 /** @defgroup LCD_MuxSegment LCD Mux Segment
00339   * @{
00340   */
00341 
00342 #define LCD_MUXSEGMENT_DISABLE            ((uint32_t)0x00000000)        /*!< SEG pin multiplexing disabled */
00343 #define LCD_MUXSEGMENT_ENABLE             (LCD_CR_MUX_SEG)              /*!< SEG[31:28] are multiplexed with SEG[43:40]    */
00344 /**
00345   * @}
00346   */
00347 
00348 /** @defgroup LCD_Flag_Definition LCD Flags Definition
00349   * @{
00350   */
00351 #define LCD_FLAG_ENS                    LCD_SR_ENS   /*!< LCD enabled status */
00352 #define LCD_FLAG_SOF                    LCD_SR_SOF   /*!< Start of frame flag */
00353 #define LCD_FLAG_UDR                    LCD_SR_UDR   /*!< Update display request */
00354 #define LCD_FLAG_UDD                    LCD_SR_UDD   /*!< Update display done */
00355 #define LCD_FLAG_RDY                    LCD_SR_RDY   /*!< Ready flag */
00356 #define LCD_FLAG_FCRSF                  LCD_SR_FCRSR /*!< LCD Frame Control Register Synchronization flag */
00357 /**
00358   * @}
00359   */
00360 
00361 /**
00362   * @}
00363   */
00364 
00365 /* Exported macros -----------------------------------------------------------*/
00366 /** @defgroup LCD_Exported_Macros LCD Exported Macros
00367   * @{
00368   */
00369 
00370 /** @brief Reset LCD handle state.
00371   * @param  __HANDLE__: specifies the LCD Handle.
00372   * @retval None
00373   */
00374 #define __HAL_LCD_RESET_HANDLE_STATE(__HANDLE__)  ((__HANDLE__)->State = HAL_LCD_STATE_RESET)
00375 
00376 /** @brief  Enable the LCD peripheral.
00377   * @param  __HANDLE__: specifies the LCD Handle.
00378   * @retval None
00379   */
00380 #define __HAL_LCD_ENABLE(__HANDLE__)              SET_BIT((__HANDLE__)->Instance->CR, LCD_CR_LCDEN)
00381 
00382 /** @brief  Disable the LCD peripheral.
00383   * @param  __HANDLE__: specifies the LCD Handle.
00384   * @retval None
00385   */
00386 #define __HAL_LCD_DISABLE(__HANDLE__)             CLEAR_BIT((__HANDLE__)->Instance->CR, LCD_CR_LCDEN)
00387 
00388 /** @brief  Enable the low resistance divider.
00389   * @param  __HANDLE__: specifies the LCD Handle.
00390   * @note   Displays with high internal resistance may need a longer drive time to
00391   *         achieve satisfactory contrast. This function is useful in this case if
00392   *         some additional power consumption can be tolerated.
00393   * @note   When this mode is enabled, the PulseOn Duration (PON) have to be
00394   *         programmed to 1/CK_PS (LCD_PULSEONDURATION_1).
00395   * @retval None
00396   */
00397 #define __HAL_LCD_HIGHDRIVER_ENABLE(__HANDLE__)                       \
00398                   do {                                                \
00399                     SET_BIT((__HANDLE__)->Instance->FCR, LCD_FCR_HD); \
00400                     LCD_WaitForSynchro(__HANDLE__);                   \
00401                   } while(0)
00402 
00403 /** @brief  Disable the low resistance divider.
00404   * @param  __HANDLE__: specifies the LCD Handle.
00405   * @retval None
00406   */
00407 #define __HAL_LCD_HIGHDRIVER_DISABLE(__HANDLE__)                        \
00408                   do {                                                  \
00409                     CLEAR_BIT((__HANDLE__)->Instance->FCR, LCD_FCR_HD); \
00410                     LCD_WaitForSynchro(__HANDLE__);                     \
00411                   } while(0)
00412 
00413 /** @brief  Enable the voltage output buffer for higher driving capability.
00414   * @param  __HANDLE__: specifies the LCD Handle.
00415   * @retval None
00416   */
00417 #define __HAL_LCD_VOLTAGE_BUFFER_ENABLE(__HANDLE__)   SET_BIT((__HANDLE__)->Instance->CR, LCD_CR_BUFEN)
00418 
00419 /** @brief  Disable the voltage output buffer for higher driving capability.
00420   * @param  __HANDLE__: specifies the LCD Handle.
00421   * @retval None
00422   */
00423 #define __HAL_LCD_VOLTAGE_BUFFER_DISABLE(__HANDLE__)  CLEAR_BIT((__HANDLE__)->Instance->CR, LCD_CR_BUFEN)
00424 
00425 /**
00426   * @brief  Configure the LCD pulse on duration.
00427   * @param  __HANDLE__: specifies the LCD Handle.
00428   * @param  __DURATION__: specifies the LCD pulse on duration in terms of
00429   *         CK_PS (prescaled LCD clock period) pulses.
00430   *   This parameter can be one of the following values:
00431   *     @arg LCD_PULSEONDURATION_0: 0 pulse
00432   *     @arg LCD_PULSEONDURATION_1: Pulse ON duration = 1/CK_PS
00433   *     @arg LCD_PULSEONDURATION_2: Pulse ON duration = 2/CK_PS
00434   *     @arg LCD_PULSEONDURATION_3: Pulse ON duration = 3/CK_PS
00435   *     @arg LCD_PULSEONDURATION_4: Pulse ON duration = 4/CK_PS
00436   *     @arg LCD_PULSEONDURATION_5: Pulse ON duration = 5/CK_PS
00437   *     @arg LCD_PULSEONDURATION_6: Pulse ON duration = 6/CK_PS
00438   *     @arg LCD_PULSEONDURATION_7: Pulse ON duration = 7/CK_PS
00439   * @retval None
00440   */
00441 #define __HAL_LCD_PULSEONDURATION_CONFIG(__HANDLE__, __DURATION__)                        \
00442                   do {                                                                    \
00443                     MODIFY_REG((__HANDLE__)->Instance->FCR, LCD_FCR_PON, (__DURATION__)); \
00444                     LCD_WaitForSynchro(__HANDLE__);                                       \
00445                   } while(0)
00446 
00447 /**
00448   * @brief  Configure the LCD dead time.
00449   * @param  __HANDLE__: specifies the LCD Handle.
00450   * @param  __DEADTIME__: specifies the LCD dead time.
00451   *   This parameter can be one of the following values:
00452   *     @arg LCD_DEADTIME_0: No dead Time
00453   *     @arg LCD_DEADTIME_1: One Phase between different couple of Frame
00454   *     @arg LCD_DEADTIME_2: Two Phase between different couple of Frame
00455   *     @arg LCD_DEADTIME_3: Three Phase between different couple of Frame
00456   *     @arg LCD_DEADTIME_4: Four Phase between different couple of Frame
00457   *     @arg LCD_DEADTIME_5: Five Phase between different couple of Frame
00458   *     @arg LCD_DEADTIME_6: Six Phase between different couple of Frame
00459   *     @arg LCD_DEADTIME_7: Seven Phase between different couple of Frame
00460   * @retval None
00461   */
00462 #define __HAL_LCD_DEADTIME_CONFIG(__HANDLE__, __DEADTIME__)                                \
00463                   do {                                                                     \
00464                     MODIFY_REG((__HANDLE__)->Instance->FCR, LCD_FCR_DEAD, (__DEADTIME__)); \
00465                     LCD_WaitForSynchro(__HANDLE__);                                        \
00466                   } while(0)
00467 
00468 /**
00469   * @brief  Configure the LCD contrast.
00470   * @param  __HANDLE__: specifies the LCD Handle.
00471   * @param  __CONTRAST__: specifies the LCD Contrast.
00472   *   This parameter can be one of the following values:
00473   *     @arg LCD_CONTRASTLEVEL_0: Maximum Voltage = 2.60V
00474   *     @arg LCD_CONTRASTLEVEL_1: Maximum Voltage = 2.73V
00475   *     @arg LCD_CONTRASTLEVEL_2: Maximum Voltage = 2.86V
00476   *     @arg LCD_CONTRASTLEVEL_3: Maximum Voltage = 2.99V
00477   *     @arg LCD_CONTRASTLEVEL_4: Maximum Voltage = 3.12V
00478   *     @arg LCD_CONTRASTLEVEL_5: Maximum Voltage = 3.25V
00479   *     @arg LCD_CONTRASTLEVEL_6: Maximum Voltage = 3.38V
00480   *     @arg LCD_CONTRASTLEVEL_7: Maximum Voltage = 3.51V
00481   * @retval None
00482   */
00483 #define __HAL_LCD_CONTRAST_CONFIG(__HANDLE__, __CONTRAST__)                           \
00484               do {                                                                    \
00485                 MODIFY_REG((__HANDLE__)->Instance->FCR, LCD_FCR_CC, (__CONTRAST__));  \
00486                 LCD_WaitForSynchro(__HANDLE__);                                       \
00487               } while(0)
00488 
00489 /**
00490   * @brief  Configure the LCD Blink mode and Blink frequency.
00491   * @param  __HANDLE__: specifies the LCD Handle.
00492   * @param  __BLINKMODE__: specifies the LCD blink mode.
00493   *   This parameter can be one of the following values:
00494   *     @arg LCD_BLINKMODE_OFF:           Blink disabled
00495   *     @arg LCD_BLINKMODE_SEG0_COM0:     Blink enabled on SEG[0], COM[0] (1 pixel)
00496   *     @arg LCD_BLINKMODE_SEG0_ALLCOM:   Blink enabled on SEG[0], all COM (up to 8
00497   *                                       pixels according to the programmed duty)
00498   *     @arg LCD_BLINKMODE_ALLSEG_ALLCOM: Blink enabled on all SEG and all COM
00499   *                                       (all pixels)
00500   * @param  __BLINKFREQUENCY__: specifies the LCD blink frequency.
00501   *     @arg LCD_BLINKFREQUENCY_DIV8:    The Blink frequency = fLcd/8
00502   *     @arg LCD_BLINKFREQUENCY_DIV16:   The Blink frequency = fLcd/16
00503   *     @arg LCD_BLINKFREQUENCY_DIV32:   The Blink frequency = fLcd/32
00504   *     @arg LCD_BLINKFREQUENCY_DIV64:   The Blink frequency = fLcd/64
00505   *     @arg LCD_BLINKFREQUENCY_DIV128:  The Blink frequency = fLcd/128
00506   *     @arg LCD_BLINKFREQUENCY_DIV256:  The Blink frequency = fLcd/256
00507   *     @arg LCD_BLINKFREQUENCY_DIV512:  The Blink frequency = fLcd/512
00508   *     @arg LCD_BLINKFREQUENCY_DIV1024: The Blink frequency = fLcd/1024
00509   * @retval None
00510   */
00511 #define __HAL_LCD_BLINK_CONFIG(__HANDLE__, __BLINKMODE__, __BLINKFREQUENCY__)         \
00512               do {                                                                    \
00513                 MODIFY_REG((__HANDLE__)->Instance->FCR, (LCD_FCR_BLINKF | LCD_FCR_BLINK), ((__BLINKMODE__) | (__BLINKFREQUENCY__))); \
00514                 LCD_WaitForSynchro(__HANDLE__);                                       \
00515               } while(0)
00516 
00517 /** @brief  Enable the specified LCD interrupt.
00518   * @param  __HANDLE__: specifies the LCD Handle.
00519   * @param  __INTERRUPT__: specifies the LCD interrupt source to be enabled.
00520   *          This parameter can be one of the following values:
00521   *     @arg LCD_IT_SOF: Start of Frame Interrupt
00522   *     @arg LCD_IT_UDD: Update Display Done Interrupt
00523   * @retval None
00524   */
00525 #define __HAL_LCD_ENABLE_IT(__HANDLE__, __INTERRUPT__)                      \
00526                   do {                                                      \
00527                     SET_BIT((__HANDLE__)->Instance->FCR, (__INTERRUPT__));  \
00528                     LCD_WaitForSynchro(__HANDLE__);                         \
00529                   } while(0)
00530 
00531 /** @brief  Disable the specified LCD interrupt.
00532   * @param  __HANDLE__: specifies the LCD Handle.
00533   * @param  __INTERRUPT__: specifies the LCD interrupt source to be disabled.
00534   *          This parameter can be one of the following values:
00535   *     @arg LCD_IT_SOF: Start of Frame Interrupt
00536   *     @arg LCD_IT_UDD: Update Display Done Interrupt
00537   * @retval None
00538   */
00539 #define __HAL_LCD_DISABLE_IT(__HANDLE__, __INTERRUPT__)                      \
00540                   do {                                                       \
00541                     CLEAR_BIT((__HANDLE__)->Instance->FCR, (__INTERRUPT__)); \
00542                     LCD_WaitForSynchro(__HANDLE__);                          \
00543                   } while(0)
00544 
00545 /** @brief  Check whether the specified LCD interrupt source is enabled or not.
00546   * @param  __HANDLE__: specifies the LCD Handle.
00547   * @param  __IT__: specifies the LCD interrupt source to check.
00548   *        This parameter can be one of the following values:
00549   *        @arg LCD_IT_SOF: Start of Frame Interrupt
00550   *        @arg LCD_IT_UDD: Update Display Done Interrupt.
00551   * @note If the device is in STOP mode (PCLK not provided) UDD will not
00552   *          generate an interrupt even if UDDIE = 1.
00553   *          If the display is not enabled the UDD interrupt will never occur.
00554   * @retval The state of __IT__ (TRUE or FALSE).
00555   */
00556 #define __HAL_LCD_GET_IT_SOURCE(__HANDLE__, __IT__) (((__HANDLE__)->Instance->FCR) & (__IT__))
00557 
00558 /** @brief  Check whether the specified LCD flag is set or not.
00559   * @param  __HANDLE__: specifies the LCD Handle.
00560   * @param  __FLAG__: specifies the flag to check.
00561   *        This parameter can be one of the following values:
00562   *        @arg LCD_FLAG_ENS: LCD Enabled flag. It indicates the LCD controller status.
00563   * @note  The ENS bit is set immediately when the LCDEN bit in the LCD_CR
00564   *             goes from 0 to 1. On deactivation it reflects the real status of
00565   *             LCD so it becomes 0 at the end of the last displayed frame.
00566   *        @arg LCD_FLAG_SOF: Start of Frame flag. This flag is set by hardware at
00567   *             the beginning of a new frame, at the same time as the display data is
00568   *             updated.
00569   *        @arg LCD_FLAG_UDR: Update Display Request flag.
00570   *        @arg LCD_FLAG_UDD: Update Display Done flag.
00571   *        @arg LCD_FLAG_RDY: Step_up converter Ready flag. It indicates the status
00572   *             of the step-up converter.
00573   *        @arg LCD_FLAG_FCRSF: LCD Frame Control Register Synchronization Flag.
00574   *             This flag is set by hardware each time the LCD_FCR register is updated
00575   *             in the LCDCLK domain.
00576   * @retval The new state of __FLAG__ (TRUE or FALSE).
00577   */
00578 #define __HAL_LCD_GET_FLAG(__HANDLE__, __FLAG__)    (((__HANDLE__)->Instance->SR & (__FLAG__)) == (__FLAG__))
00579 
00580 /** @brief  Clear the specified LCD pending flag.
00581   * @param  __HANDLE__: specifies the LCD Handle.
00582   * @param  __FLAG__: specifies the flag to clear.
00583   *        This parameter can be any combination of the following values:
00584   *        @arg LCD_FLAG_SOF: Start of Frame Interrupt
00585   *        @arg LCD_FLAG_UDD: Update Display Done Interrupt
00586   * @retval None
00587   */
00588 #define __HAL_LCD_CLEAR_FLAG(__HANDLE__, __FLAG__)  WRITE_REG((__HANDLE__)->Instance->CLR, (__FLAG__))
00589 
00590 /**
00591   * @}
00592   */
00593 
00594 /* Exported functions ------------------------------------------------------- */
00595 /** @addtogroup LCD_Exported_Functions
00596   * @{
00597   */
00598 
00599 /* Initialization/de-initialization methods  **********************************/
00600 /** @addtogroup LCD_Exported_Functions_Group1
00601   * @{
00602   */
00603 HAL_StatusTypeDef    HAL_LCD_DeInit(LCD_HandleTypeDef *hlcd);
00604 HAL_StatusTypeDef    HAL_LCD_Init(LCD_HandleTypeDef *hlcd);
00605 void                 HAL_LCD_MspInit(LCD_HandleTypeDef *hlcd);
00606 void                 HAL_LCD_MspDeInit(LCD_HandleTypeDef *hlcd);
00607 /**
00608   * @}
00609   */
00610 
00611 /* IO operation methods *******************************************************/
00612 /** @addtogroup LCD_Exported_Functions_Group2
00613   * @{
00614   */
00615 HAL_StatusTypeDef    HAL_LCD_Write(LCD_HandleTypeDef *hlcd, uint32_t RAMRegisterIndex, uint32_t RAMRegisterMask, uint32_t Data);
00616 HAL_StatusTypeDef    HAL_LCD_Clear(LCD_HandleTypeDef *hlcd);
00617 HAL_StatusTypeDef    HAL_LCD_UpdateDisplayRequest(LCD_HandleTypeDef *hlcd);
00618 /**
00619   * @}
00620   */
00621 
00622 /* Peripheral State methods  **************************************************/
00623 /** @addtogroup LCD_Exported_Functions_Group3
00624   * @{
00625   */
00626 HAL_LCD_StateTypeDef HAL_LCD_GetState(LCD_HandleTypeDef *hlcd);
00627 uint32_t             HAL_LCD_GetError(LCD_HandleTypeDef *hlcd);
00628 /**
00629   * @}
00630   */
00631 
00632 /**
00633   * @}
00634   */
00635 
00636 /* Private types -------------------------------------------------------------*/
00637 /* Private variables ---------------------------------------------------------*/
00638 /* Private constants ---------------------------------------------------------*/
00639 /* Private macros ------------------------------------------------------------*/
00640 /** @defgroup LCD_Private_Macros LCD Private Macros
00641   * @{
00642   */
00643 
00644 #define IS_LCD_PRESCALER(__PRESCALER__) (((__PRESCALER__) == LCD_PRESCALER_1)     || \
00645                                          ((__PRESCALER__) == LCD_PRESCALER_2)     || \
00646                                          ((__PRESCALER__) == LCD_PRESCALER_4)     || \
00647                                          ((__PRESCALER__) == LCD_PRESCALER_8)     || \
00648                                          ((__PRESCALER__) == LCD_PRESCALER_16)    || \
00649                                          ((__PRESCALER__) == LCD_PRESCALER_32)    || \
00650                                          ((__PRESCALER__) == LCD_PRESCALER_64)    || \
00651                                          ((__PRESCALER__) == LCD_PRESCALER_128)   || \
00652                                          ((__PRESCALER__) == LCD_PRESCALER_256)   || \
00653                                          ((__PRESCALER__) == LCD_PRESCALER_512)   || \
00654                                          ((__PRESCALER__) == LCD_PRESCALER_1024)  || \
00655                                          ((__PRESCALER__) == LCD_PRESCALER_2048)  || \
00656                                          ((__PRESCALER__) == LCD_PRESCALER_4096)  || \
00657                                          ((__PRESCALER__) == LCD_PRESCALER_8192)  || \
00658                                          ((__PRESCALER__) == LCD_PRESCALER_16384) || \
00659                                          ((__PRESCALER__) == LCD_PRESCALER_32768))
00660 
00661 #define IS_LCD_DIVIDER(__DIVIDER__) (((__DIVIDER__) == LCD_DIVIDER_16) || \
00662                                      ((__DIVIDER__) == LCD_DIVIDER_17) || \
00663                                      ((__DIVIDER__) == LCD_DIVIDER_18) || \
00664                                      ((__DIVIDER__) == LCD_DIVIDER_19) || \
00665                                      ((__DIVIDER__) == LCD_DIVIDER_20) || \
00666                                      ((__DIVIDER__) == LCD_DIVIDER_21) || \
00667                                      ((__DIVIDER__) == LCD_DIVIDER_22) || \
00668                                      ((__DIVIDER__) == LCD_DIVIDER_23) || \
00669                                      ((__DIVIDER__) == LCD_DIVIDER_24) || \
00670                                      ((__DIVIDER__) == LCD_DIVIDER_25) || \
00671                                      ((__DIVIDER__) == LCD_DIVIDER_26) || \
00672                                      ((__DIVIDER__) == LCD_DIVIDER_27) || \
00673                                      ((__DIVIDER__) == LCD_DIVIDER_28) || \
00674                                      ((__DIVIDER__) == LCD_DIVIDER_29) || \
00675                                      ((__DIVIDER__) == LCD_DIVIDER_30) || \
00676                                      ((__DIVIDER__) == LCD_DIVIDER_31))
00677 
00678 #define IS_LCD_DUTY(__DUTY__) (((__DUTY__) == LCD_DUTY_STATIC)  || \
00679                                ((__DUTY__) == LCD_DUTY_1_2)     || \
00680                                ((__DUTY__) == LCD_DUTY_1_3)     || \
00681                                ((__DUTY__) == LCD_DUTY_1_4)     || \
00682                                ((__DUTY__) == LCD_DUTY_1_8))
00683 
00684 #define IS_LCD_BIAS(__BIAS__) (((__BIAS__) == LCD_BIAS_1_4) || \
00685                                ((__BIAS__) == LCD_BIAS_1_2) || \
00686                                ((__BIAS__) == LCD_BIAS_1_3))
00687 
00688 #define IS_LCD_VOLTAGE_SOURCE(SOURCE) (((SOURCE) == LCD_VOLTAGESOURCE_INTERNAL) || \
00689                                        ((SOURCE) == LCD_VOLTAGESOURCE_EXTERNAL))
00690 
00691 
00692 #define IS_LCD_PULSE_ON_DURATION(__DURATION__) (((__DURATION__) == LCD_PULSEONDURATION_0) || \
00693                                                 ((__DURATION__) == LCD_PULSEONDURATION_1) || \
00694                                                 ((__DURATION__) == LCD_PULSEONDURATION_2) || \
00695                                                 ((__DURATION__) == LCD_PULSEONDURATION_3) || \
00696                                                 ((__DURATION__) == LCD_PULSEONDURATION_4) || \
00697                                                 ((__DURATION__) == LCD_PULSEONDURATION_5) || \
00698                                                 ((__DURATION__) == LCD_PULSEONDURATION_6) || \
00699                                                 ((__DURATION__) == LCD_PULSEONDURATION_7))
00700 
00701 #define IS_LCD_DEAD_TIME(__TIME__) (((__TIME__) == LCD_DEADTIME_0) || \
00702                                     ((__TIME__) == LCD_DEADTIME_1) || \
00703                                     ((__TIME__) == LCD_DEADTIME_2) || \
00704                                     ((__TIME__) == LCD_DEADTIME_3) || \
00705                                     ((__TIME__) == LCD_DEADTIME_4) || \
00706                                     ((__TIME__) == LCD_DEADTIME_5) || \
00707                                     ((__TIME__) == LCD_DEADTIME_6) || \
00708                                     ((__TIME__) == LCD_DEADTIME_7))
00709 
00710 #define IS_LCD_BLINK_MODE(__MODE__) (((__MODE__) == LCD_BLINKMODE_OFF)            || \
00711                                      ((__MODE__) == LCD_BLINKMODE_SEG0_COM0)      || \
00712                                      ((__MODE__) == LCD_BLINKMODE_SEG0_ALLCOM)    || \
00713                                      ((__MODE__) == LCD_BLINKMODE_ALLSEG_ALLCOM))
00714 
00715 #define IS_LCD_BLINK_FREQUENCY(__FREQUENCY__) (((__FREQUENCY__) == LCD_BLINKFREQUENCY_DIV8)   || \
00716                                                ((__FREQUENCY__) == LCD_BLINKFREQUENCY_DIV16)  || \
00717                                                ((__FREQUENCY__) == LCD_BLINKFREQUENCY_DIV32)  || \
00718                                                ((__FREQUENCY__) == LCD_BLINKFREQUENCY_DIV64)  || \
00719                                                ((__FREQUENCY__) == LCD_BLINKFREQUENCY_DIV128) || \
00720                                                ((__FREQUENCY__) == LCD_BLINKFREQUENCY_DIV256) || \
00721                                                ((__FREQUENCY__) == LCD_BLINKFREQUENCY_DIV512) || \
00722                                                ((__FREQUENCY__) == LCD_BLINKFREQUENCY_DIV1024))
00723 
00724 #define IS_LCD_CONTRAST(__CONTRAST__) (((__CONTRAST__) == LCD_CONTRASTLEVEL_0) || \
00725                                        ((__CONTRAST__) == LCD_CONTRASTLEVEL_1) || \
00726                                        ((__CONTRAST__) == LCD_CONTRASTLEVEL_2) || \
00727                                        ((__CONTRAST__) == LCD_CONTRASTLEVEL_3) || \
00728                                        ((__CONTRAST__) == LCD_CONTRASTLEVEL_4) || \
00729                                        ((__CONTRAST__) == LCD_CONTRASTLEVEL_5) || \
00730                                        ((__CONTRAST__) == LCD_CONTRASTLEVEL_6) || \
00731                                        ((__CONTRAST__) == LCD_CONTRASTLEVEL_7))
00732 
00733 #define IS_LCD_RAM_REGISTER(__REGISTER__) (((__REGISTER__) == LCD_RAM_REGISTER0)  || \
00734                                            ((__REGISTER__) == LCD_RAM_REGISTER1)  || \
00735                                            ((__REGISTER__) == LCD_RAM_REGISTER2)  || \
00736                                            ((__REGISTER__) == LCD_RAM_REGISTER3)  || \
00737                                            ((__REGISTER__) == LCD_RAM_REGISTER4)  || \
00738                                            ((__REGISTER__) == LCD_RAM_REGISTER5)  || \
00739                                            ((__REGISTER__) == LCD_RAM_REGISTER6)  || \
00740                                            ((__REGISTER__) == LCD_RAM_REGISTER7)  || \
00741                                            ((__REGISTER__) == LCD_RAM_REGISTER8)  || \
00742                                            ((__REGISTER__) == LCD_RAM_REGISTER9)  || \
00743                                            ((__REGISTER__) == LCD_RAM_REGISTER10) || \
00744                                            ((__REGISTER__) == LCD_RAM_REGISTER11) || \
00745                                            ((__REGISTER__) == LCD_RAM_REGISTER12) || \
00746                                            ((__REGISTER__) == LCD_RAM_REGISTER13) || \
00747                                            ((__REGISTER__) == LCD_RAM_REGISTER14) || \
00748                                            ((__REGISTER__) == LCD_RAM_REGISTER15))
00749 
00750 #define IS_LCD_HIGH_DRIVE(__VALUE__) (((__VALUE__) == LCD_HIGHDRIVE_DISABLE) || \
00751                                       ((__VALUE__) == LCD_HIGHDRIVE_ENABLE))
00752 
00753 #define IS_LCD_MUX_SEGMENT(__VALUE__) (((__VALUE__) == LCD_MUXSEGMENT_ENABLE) || \
00754                                        ((__VALUE__) == LCD_MUXSEGMENT_DISABLE))
00755 
00756 /**
00757   * @}
00758   */
00759 
00760 /* Private functions ---------------------------------------------------------*/
00761 /** @addtogroup LCD_Private_Functions
00762   * @{
00763   */
00764 
00765 HAL_StatusTypeDef     LCD_WaitForSynchro(LCD_HandleTypeDef *hlcd);
00766 
00767 /**
00768   * @}
00769   */
00770 
00771 /**
00772   * @}
00773   */
00774 
00775 /**
00776   * @}
00777   */
00778 
00779 #endif /* STM32L433xx || STM32L443xx || STM32L476xx || STM32L486xx || STM32L496xx || STM32L4A6xx */
00780 
00781 #ifdef __cplusplus
00782 }
00783 #endif
00784 
00785 #endif /* __STM32L4xx_HAL_LCD_H */
00786 
00787 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/