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