stm32l4xx_hal_lcd.h 40 KB

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