stm32l4xx_hal_lcd.h 39 KB

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