mbed library sources

Dependents:   Marvino mbot

Fork of mbed-src by mbed official

Committer:
jaerts
Date:
Tue Dec 22 13:22:16 2015 +0000
Revision:
637:ed69428d4850
Parent:
610:813dcc80987e
Add very shady LPC1768 CAN Filter implementation

Who changed what in which revision?

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