HAL_LCD.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442
  1. /*
  2. ******************************************************************************
  3. * @file HAL_LCD.h
  4. * @version V1.0.0
  5. * @date 2020
  6. * @brief Header file of lcd HAL module.
  7. ******************************************************************************
  8. */
  9. #ifndef __HAL_LCD_H__
  10. #define __HAL_LCD_H__
  11. #include "ACM32Fxx_HAL.h"
  12. /******************************************************************************/
  13. /* */
  14. /* LCD Controller (LCD) */
  15. /* */
  16. /******************************************************************************/
  17. /******************************************************************************/
  18. /* Peripheral Registers Bits Definition */
  19. /******************************************************************************/
  20. /******************* Bit definition for LCD_CR0 register *********************/
  21. #define LCD_CR0_LCDEN_Pos (0U)
  22. #define LCD_CR0_LCDEN_Msk (0x1UL << LCD_CR0_LCDEN_Pos)
  23. #define LCD_CR0_LCDEN LCD_CR0_LCDEN_Msk
  24. #define LCD_CR0_LCDCLK_Pos (1U)
  25. #define LCD_CR0_LCDCLK_Msk (0x7UL << LCD_CR0_LCDCLK_Pos)
  26. #define LCD_CR0_LCDCLK LCD_CR0_LCDCLK_Msk
  27. #define LCD_CR0_LCDCLK_0 (0x1UL << LCD_CR0_LCDCLK_Pos)
  28. #define LCD_CR0_LCDCLK_1 (0x2UL << LCD_CR0_LCDCLK_Pos)
  29. #define LCD_CR0_STATIC_Pos (4U)
  30. #define LCD_CR0_STATIC_Msk (0x1UL << LCD_CR0_STATIC_Pos)
  31. #define LCD_CR0_STATIC LCD_CR0_STATIC_Msk
  32. #define LCD_CR0_BIAS_Pos (5U)
  33. #define LCD_CR0_BIAS_Msk (0x3UL << LCD_CR0_BIAS_Pos)
  34. #define LCD_CR0_BIAS LCD_CR0_BIAS_Msk
  35. #define LCD_CR0_BIAS_0 (0x1UL << LCD_CR0_BIAS_Pos)
  36. #define LCD_CR0_BIAS_1 (0x2UL << LCD_CR0_BIAS_Pos)
  37. #define LCD_CR0_DUTY_Pos (7U)
  38. #define LCD_CR0_DUTY_Msk (0x7UL << LCD_CR0_DUTY_Pos)
  39. #define LCD_CR0_DUTY LCD_CR0_DUTY_Msk
  40. #define LCD_CR0_DUTY_0 (0x1UL << LCD_CR0_DUTY_Pos)
  41. #define LCD_CR0_DUTY_1 (0x2UL << LCD_CR0_DUTY_Pos)
  42. #define LCD_CR0_DUTY_2 (0x4UL << LCD_CR0_DUTY_Pos)
  43. #define LCD_CR0_MOD_Pos (11U)
  44. #define LCD_CR0_MOD_Msk (0x3UL << LCD_CR0_MOD_Pos)
  45. #define LCD_CR0_MOD LCD_CR0_MOD_Msk
  46. #define LCD_CR0_MOD_0 (0x1UL << LCD_CR0_MOD_Pos)
  47. #define LCD_CR0_MOD_1 (0x2UL << LCD_CR0_MOD_Pos)
  48. #define LCD_CR0_CONTRAST_Pos (13U)
  49. #define LCD_CR0_CONTRAST_Msk (0xfUL << LCD_CR0_CONTRAST_Pos)
  50. #define LCD_CR0_CONTRAST LCD_CR0_CONTRAST_Msk
  51. #define LCD_CR0_CONTRAST_0 (0x1UL << LCD_CR0_CONTRAST_Pos)
  52. #define LCD_CR0_CONTRAST_1 (0x2UL << LCD_CR0_CONTRAST_Pos)
  53. #define LCD_CR0_CONTRAST_2 (0x4UL << LCD_CR0_CONTRAST_Pos)
  54. #define LCD_CR0_CONTRAST_3 (0x8UL << LCD_CR0_CONTRAST_Pos)
  55. #define LCD_CR0_WSEL_Pos (17U)
  56. #define LCD_CR0_WSEL_Msk (0x1UL << LCD_CR0_WSEL_Pos)
  57. #define LCD_CR0_WSEL LCD_CR0_WSEL_Msk
  58. /******************* Bit definition for LCD_CR1 register *********************/
  59. #define LCD_CR1_BLINKCNT_Pos (0U)
  60. #define LCD_CR1_BLINKCNT_Msk (0x3FUL << LCD_CR1_BLINKCNT_Pos)
  61. #define LCD_CR1_BLINKCNT LCD_CR1_BLINKCNT_Msk
  62. #define LCD_CR1_BLINKEN_Pos (6U)
  63. #define LCD_CR1_BLINKEN_Msk (0x1UL << LCD_CR1_BLINKEN_Pos)
  64. #define LCD_CR1_BLINKEN LCD_CR1_BLINKEN_Msk
  65. #define LCD_CR1_MODE_Pos (8U)
  66. #define LCD_CR1_MODE_Msk (0x1UL << LCD_CR1_MODE_Pos)
  67. #define LCD_CR1_MODE LCD_CR1_MODE_Msk
  68. #define LCD_CR1_IE_Pos (9U)
  69. #define LCD_CR1_IE_Msk (0x1UL << LCD_CR1_IE_Pos)
  70. #define LCD_CR1_IE LCD_CR1_IE_Msk
  71. #define LCD_CR1_DMAEN_Pos (10U)
  72. #define LCD_CR1_DMAEN_Msk (0x1UL << LCD_CR1_DMAEN_Pos)
  73. #define LCD_CR1_DMAEN LCD_CR1_DMAEN_Msk
  74. #define LCD_CR1_INTF_Pos (11U)
  75. #define LCD_CR1_INTF_Msk (0x1UL << LCD_CR1_INTF_Pos)
  76. #define LCD_CR1_INTF LCD_CR1_INTF_Msk
  77. #define LCD_CR1_FCC_Pos (12U)
  78. #define LCD_CR1_FCC_Msk (0x1UL << LCD_CR1_FCC_Pos)
  79. #define LCD_CR1_FCC LCD_CR1_FCC_Msk
  80. #define LCD_CR1_MODSEL_Pos (13U)
  81. #define LCD_CR1_MODSEL_Msk (0x3UL << LCD_CR1_MODSEL_Pos)
  82. #define LCD_CR1_MODSEL LCD_CR1_MODSEL_Msk
  83. #define LCD_CR1_MODSEL_0 (0x1UL << LCD_CR1_MODSEL_Pos)
  84. #define LCD_CR1_MODSEL_1 (0x2UL << LCD_CR1_MODSEL_Pos)
  85. #define LCD_CR1_RSEL_Pos (15U)
  86. #define LCD_CR1_RSEL_Msk (0x1UL << LCD_CR1_RSEL_Pos)
  87. #define LCD_CR1_RSEL LCD_CR1_RSEL_Msk
  88. #define LCD_CR1_PON_Pos (13U)
  89. #define LCD_CR1_PON_Msk (0x3fUL << LCD_CR1_PON_Pos)
  90. #define LCD_CR1_PON LCD_CR1_PON_Msk
  91. /******************* Bit definition for LCD_CR1 register *********************/
  92. #define LCD_INTCLR_INTF_Pos (10U)
  93. #define LCD_INTCLR_INTF_Msk (0x1UL << LCD_INTCLR_INTF_Pos)
  94. #define LCD_INTCLR_INTFT LCD_INTCLR_INTF_Msk
  95. /**
  96. * @brief LCD SegCom Init structure definition
  97. */
  98. typedef struct
  99. {
  100. uint32_t SEG0_31; /*!< Configures the SEG0 to SEG31 Enable or Disable.
  101. This parameter can be a value between 0x0 and 0xFFFFFFFF */
  102. union{
  103. uint32_t SEG32_39_COM0_8; /*!< Configures the SEG32-35 and COM0-8 Enable or Disable.
  104. This parameter can be a value between 0x0 and 0xFFF */
  105. struct
  106. {
  107. uint32_t SEG32_35 :4; /*!< Configures the SEG32-35 Enable or Disable.
  108. This parameter can be a value between 0x0 and 0xF */
  109. uint32_t SEG36_COM7 :1; /*!< Configures the SEG36/COM7 Enable or Disable. */
  110. uint32_t SEG37_COM6 :1; /*!< Configures the SEG37/COM6 Enable or Disable. */
  111. uint32_t SEG38_COM5 :1; /*!< Configures the SEG38/COM5 Enable or Disable. */
  112. uint32_t SEG39_COM4 :1; /*!< Configures the SEG39/COM4 Enable or Disable. */
  113. uint32_t COM0_3 :4; /*!< Configures the COM0-3 Enable or Disable.
  114. This parameter can be a value between 0x0 and 0xF */
  115. }SEGCOM_bit;
  116. }Stc_SEG32_39_COM0_8;
  117. }LCD_SegComInitTypeDef;
  118. /**
  119. * @brief LCD Init structure definition
  120. */
  121. typedef struct
  122. {
  123. uint32_t PONTime; /*!< Configures the Pulse ON duration time.
  124. This parameter can be a value between 0x00 and 0x3F */
  125. uint32_t BiasRes; /*!< Configures the LCD BiasRes.
  126. This parameter can be one value of @ref BiasRes */
  127. uint32_t DriveMod; /*!< Configures the LCD DriveMod.
  128. This parameter can be one value of @ref DriveMod */
  129. uint32_t FastCharge; /*!< Configures the LCD FastCharge.
  130. This parameter can be one value of @ref FastCharge */
  131. uint32_t Contrast; /*!< Configures the LCD Contrast.
  132. This parameter can be one value of @ref LCD_Contrast */
  133. }LCD_InResInitTypeDef;
  134. /**
  135. * @brief LCD Init structure definition
  136. */
  137. typedef struct
  138. {
  139. uint32_t Duty; /*!< Configures the LCD Duty.
  140. This parameter can be one value of @ref LCD_Duty */
  141. uint32_t Bias; /*!< Configures the LCD Bias.
  142. This parameter can be one value of @ref LCD_Bias */
  143. uint32_t Driving_Waveform; /*!< Configures the LCD Drive Waveform.
  144. This parameter can be one value of @ref Driving_Waveform */
  145. uint32_t BiasSrc; /*!< Configures the LCD Bias Src.
  146. This parameter can be one value of @ref BiasSrc*/
  147. uint32_t DisplayMode; /*!< Configures the LCD DisplayMode.
  148. This parameter can be one value of @ref DisplayMode*/
  149. uint32_t StaticPower; /*!< Configures the LCD StaticPower.
  150. This parameter can be one value of @ref StaticPower*/
  151. uint32_t LCDFrequency; /*!< Configures the LCD LCDFrequency.
  152. This parameter can be one value of @ref LCDFrequency*/
  153. uint32_t BlinkEN; /*!< Configures the LCD BlinkEN.
  154. This parameter can be one value of @ref BlinkEN */
  155. uint32_t BlinkFrequency; /*!< Configures the LCD Blink frequency.
  156. This parameter can be a value between 0x00 and 0x3F */
  157. }LCD_InitTypeDef;
  158. /**
  159. * @brief LCD handle Structure definition
  160. */
  161. typedef struct
  162. {
  163. LCD_TypeDef *Instance; /* LCD registers base address */
  164. LCD_InitTypeDef Init; /* LCD communication parameters */
  165. DMA_HandleTypeDef *DMA_Handle; /*!< UART Rx DMA handle parameters */
  166. }LCD_HandleTypeDef;
  167. #define IS_LCD_PERIPH(PERIPH) (((PERIPH) == LCD))
  168. /** @defgroup LCD_Duty LCD Duty
  169. * @{
  170. */
  171. #define LCD_DUTY_STATIC ((uint32_t)0x00000000U) /*!< Static duty */
  172. #define LCD_DUTY_1_2 LCD_CR0_DUTY_0 /*!< 1/2 duty */
  173. #define LCD_DUTY_1_3 LCD_CR0_DUTY_1 /*!< 1/3 duty */
  174. #define LCD_DUTY_1_4 ((LCD_CR0_DUTY_1 | LCD_CR0_DUTY_0)) /*!< 1/4 duty */
  175. #define LCD_DUTY_1_6 ((LCD_CR0_DUTY_2 | LCD_CR0_DUTY_0)) /*!< 1/6 duty */
  176. #define LCD_DUTY_1_8 ((LCD_CR0_DUTY_2 | LCD_CR0_DUTY_1 | LCD_CR0_DUTY_0)) /*!< 1/8 duty */
  177. #define IS_LCD_DUTY(DUTY) (((DUTY) == LCD_DUTY_STATIC) || \
  178. ((DUTY) == LCD_DUTY_1_2) || \
  179. ((DUTY) == LCD_DUTY_1_3) || \
  180. ((DUTY) == LCD_DUTY_1_4) || \
  181. ((DUTY) == LCD_DUTY_1_6) || \
  182. ((DUTY) == LCD_DUTY_1_8))
  183. /**
  184. * @}
  185. */
  186. /**
  187. * @}
  188. */
  189. /** @defgroup LCD_Bias LCD Bias
  190. * @{
  191. */
  192. #define LCD_BIAS_1_4 ((uint32_t)0x00000000U) /*!< 1/4 Bias */
  193. #define LCD_BIAS_1_2 LCD_CR0_BIAS_0 /*!< 1/2 Bias */
  194. #define LCD_BIAS_1_3 LCD_CR0_BIAS_1 /*!< 1/3 Bias */
  195. #define IS_LCD_BIAS(__BIAS__) (((__BIAS__) == LCD_BIAS_1_4) || \
  196. ((__BIAS__) == LCD_BIAS_1_2) || \
  197. ((__BIAS__) == LCD_BIAS_1_3))
  198. /**
  199. * @}
  200. */
  201. /** @defgroup Driving_Waveform Driving_Waveform
  202. * @{
  203. */
  204. #define LCD_Driving_Waveform_A ((uint32_t)0x00000000U) /*!< A类波形*/
  205. #define LCD_Driving_Waveform_B LCD_CR0_WSEL /*!< B类波形 */
  206. #define IS_LCD_Driving_Waveform(__Driving_Waveform__) (((__Driving_Waveform__) == LCD_Driving_Waveform_A) || \
  207. ((__Driving_Waveform__) == LCD_Driving_Waveform_B))
  208. /**
  209. * @}
  210. */
  211. /** @defgroup BiasSrc
  212. * @{
  213. */
  214. #define LCD_BiasSrc_InRes_Seg31_35_Normal ((uint32_t)0x00000000U) /*!< LCD Bias来源:内部电阻分压,且SEG31-35可以作为SEG/IO*/
  215. #define LCD_BiasSrc_InRes_Seg31_35_Cap LCD_CR0_MOD_0 /*!< LCD Bias来源:内部电阻分压,且SEG31-35用于外接电容滤波,SEG/IO功能关闭 */
  216. #define LCD_BiasSrc_ExRes_Seg31_35_Cap LCD_CR0_MOD_1 /*!< LCD Bias来源:外部电阻分压,且SEG31-35用于外接分压电阻和滤波电容,SEG/IO功能关闭 */
  217. #define IS_LCD_BiasSrc(__BiasSrc__) (((__BiasSrc__) == LCD_BiasSrc_InRes_Seg31_35_Normal) || \
  218. ((__BiasSrc__) == LCD_BiasSrc_InRes_Seg31_35_Cap)||\
  219. ((__BiasSrc__) == LCD_BiasSrc_ExRes_Seg31_35_Cap))
  220. /**
  221. * @}
  222. */
  223. /** @defgroup DisplayMode
  224. * @{
  225. */
  226. #define LCD_DisplayMode_0 ((uint32_t)0x00000000U) /*!< LCD RAM显示模式0*/
  227. #define LCD_DisplayMode_1 LCD_CR1_MODE /*!< LCD RAM显示模式1 */
  228. #define IS_LCD_DisplayMode(__DisplayMode__) (((__DisplayMode__) == LCD_DisplayMode_0)||\
  229. ((__DisplayMode__) == LCD_DisplayMode_1))
  230. /**
  231. * @}
  232. */
  233. /** @defgroup StaticPower
  234. * @{
  235. */
  236. #define LCD_StaticPower_NormalPower ((uint32_t)0x00000000U) /*!< LCD RAM显示模式0*/
  237. #define LCD_StaticPower_LowPower LCD_CR0_STATIC /*!< LCD RAM显示模式1 */
  238. #define IS_LCD_StaticPower(__StaticPower__) (((__StaticPower__) == LCD_StaticPower_NormalPower) || \
  239. ((__StaticPower__) == LCD_StaticPower_LowPower))
  240. /**
  241. * @}
  242. */
  243. /** @defgroup LCDFrequency
  244. * @{
  245. */
  246. #define LCD_LCDFrequency_64HZ ((uint32_t)0x00000000U) /*!< LCD扫描频率选择*/
  247. #define LCD_LCDFrequency_128HZ LCD_CR0_LCDCLK_0 /*!< LCD扫描频率选择 */
  248. #define LCD_LCDFrequency_256HZ LCD_CR0_LCDCLK_1 /*!< LCD扫描频率选择 */
  249. #define LCD_LCDFrequency_512HZ ((LCD_CR0_LCDCLK_0 | LCD_CR0_LCDCLK_1)) /*!< LCD扫描频率选择*/
  250. #define IS_LCD_LCDFrequency(__LCDFrequency__) (((__LCDFrequency__) == LCD_LCDFrequency_64HZ) || \
  251. ((__LCDFrequency__) == LCD_LCDFrequency_128HZ)||\
  252. ((__LCDFrequency__) == LCD_LCDFrequency_256HZ)||\
  253. ((__LCDFrequency__) == LCD_LCDFrequency_512HZ))
  254. /**
  255. * @}
  256. */
  257. /** @defgroup BlinkEN
  258. * @{
  259. */
  260. #define LCD_BlinkEN_Disable ((uint32_t)0x00000000U) /*!<LCD闪屏配置使能*/
  261. #define LCD_BlinkEN_Enable LCD_CR1_BLINKEN /*!< LCD闪屏配置使能 */
  262. #define IS_LCD_BlinkEN(__BlinkEN__) (((__BlinkEN__) == LCD_BlinkEN_Disable) || \
  263. ((__BlinkEN__) == LCD_BlinkEN_Enable))
  264. /**
  265. * @}
  266. */
  267. #define IS_LCD_BlinkFrequency(__BlinkFrequency__) ((__BlinkFrequency__)<= ((uint8_t)0x3F)) /*!<LCD闪屏配置*/
  268. /** @defgroup BiasRes
  269. * @{
  270. */
  271. #define LCD_BiasRes_240k ((uint32_t)0x00000000U) /*!<LCD闪屏配置使能*/
  272. #define LCD_BiasRes_4M LCD_CR1_RSEL /*!< LCD闪屏配置使能 */
  273. #define IS_LCD_BiasRes(__BiasRes__) (((__BiasRes__) == LCD_BiasRes_240k) || \
  274. ((__BiasRes__) == LCD_BiasRes_4M))
  275. /**
  276. * @}
  277. */
  278. /** @defgroup DriveMod
  279. * @{
  280. */
  281. #define LCD_DriveMod_Res240k4M ((uint32_t)0x00000000U) /*!<LCD闪屏配置使能*/
  282. #define LCD_DriveMod_Res60k LCD_CR1_MODSEL_0 /*!< LCD闪屏配置使能 */
  283. #define LCD_DriveMod_FC LCD_CR1_MODSEL_1 /*!< LCD闪屏配置使能 */
  284. #define IS_LCD_DriveMod(__DriveMod__) (((__DriveMod__) == LCD_DriveMod_Res240k4M) || \
  285. ((__DriveMod__) == LCD_DriveMod_Res60k)|| \
  286. ((__DriveMod__) == LCD_DriveMod_FC))
  287. /**
  288. * @}
  289. */
  290. /** @defgroup FastCharge
  291. * @{
  292. */
  293. #define LCD_FastCharge_Disable ((uint32_t)0x00000000U) /*!<LCD闪屏配置使能*/
  294. #define LCD_FastCharge_Enable LCD_CR1_FCC /*!< LCD闪屏配置使能 */
  295. #define IS_LCD_FastCharge(__FastCharge__) (((__FastCharge__) == LCD_FastCharge_Disable) || \
  296. ((__FastCharge__) == LCD_FastCharge_Enable))
  297. /**
  298. * @}
  299. */
  300. /** @defgroup LCD_Contrast
  301. * @{
  302. */
  303. #define LCD_Contrast_531VDD ((uint32_t)0x00000000U) /*!<LCD对比度调整*/
  304. #define LCD_Contrast_562VDD (LCD_CR0_CONTRAST_0)
  305. #define LCD_Contrast_593VDD (LCD_CR0_CONTRAST_1)
  306. #define LCD_Contrast_623VDD (LCD_CR0_CONTRAST_1|LCD_CR0_CONTRAST_0)
  307. #define LCD_Contrast_654VDD (LCD_CR0_CONTRAST_2)
  308. #define LCD_Contrast_686VDD (LCD_CR0_CONTRAST_2|LCD_CR0_CONTRAST_0)
  309. #define LCD_Contrast_717VDD (LCD_CR0_CONTRAST_2|LCD_CR0_CONTRAST_1)
  310. #define LCD_Contrast_748VDD (LCD_CR0_CONTRAST_2|LCD_CR0_CONTRAST_1|LCD_CR0_CONTRAST_0)
  311. #define LCD_Contrast_778VDD (LCD_CR0_CONTRAST_3)
  312. #define LCD_Contrast_810VDD (LCD_CR0_CONTRAST_3|LCD_CR0_CONTRAST_0)
  313. #define LCD_Contrast_840VDD (LCD_CR0_CONTRAST_3|LCD_CR0_CONTRAST_1)
  314. #define LCD_Contrast_871VDD (LCD_CR0_CONTRAST_3|LCD_CR0_CONTRAST_1|LCD_CR0_CONTRAST_0)
  315. #define LCD_Contrast_903VDD (LCD_CR0_CONTRAST_3|LCD_CR0_CONTRAST_2)
  316. #define LCD_Contrast_939VDD (LCD_CR0_CONTRAST_3|LCD_CR0_CONTRAST_2|LCD_CR0_CONTRAST_0)
  317. #define LCD_Contrast_969VDD (LCD_CR0_CONTRAST_3|LCD_CR0_CONTRAST_2|LCD_CR0_CONTRAST_1)
  318. #define LCD_Contrast_1000VDD (LCD_CR0_CONTRAST_3|LCD_CR0_CONTRAST_2|LCD_CR0_CONTRAST_1|LCD_CR0_CONTRAST_0)
  319. #define IS_LCD_Contrast(__Contrast__) (((__Contrast__) == LCD_Contrast_531VDD) || \
  320. ((__Contrast__) == LCD_Contrast_562VDD)|| \
  321. ((__Contrast__) == LCD_Contrast_593VDD)|| \
  322. ((__Contrast__) == LCD_Contrast_623VDD)|| \
  323. ((__Contrast__) == LCD_Contrast_654VDD)|| \
  324. ((__Contrast__) == LCD_Contrast_686VDD)|| \
  325. ((__Contrast__) == LCD_Contrast_717VDD)|| \
  326. ((__Contrast__) == LCD_Contrast_748VDD)|| \
  327. ((__Contrast__) == LCD_Contrast_778VDD)|| \
  328. ((__Contrast__) == LCD_Contrast_810VDD)|| \
  329. ((__Contrast__) == LCD_Contrast_840VDD)|| \
  330. ((__Contrast__) == LCD_Contrast_871VDD)|| \
  331. ((__Contrast__) == LCD_Contrast_903VDD)|| \
  332. ((__Contrast__) == LCD_Contrast_939VDD)|| \
  333. ((__Contrast__) == LCD_Contrast_969VDD)| \
  334. ((__Contrast__) == LCD_Contrast_1000VDD))
  335. /**
  336. * @}
  337. */
  338. #define IS_LCD_PONTime(__PONTime__) ((__PONTime__) <= ((uint32_t)0x3F))
  339. /**
  340. * @}
  341. */
  342. void HAL_LCD_MspInit(LCD_HandleTypeDef *hlcd);
  343. void HAL_LCD_MspDeInit(LCD_HandleTypeDef *hlcd);
  344. HAL_StatusTypeDef HAL_LCD_Init(LCD_HandleTypeDef *hlcd);
  345. HAL_StatusTypeDef HAL_LCD_DeInit(LCD_HandleTypeDef *hlcd);
  346. HAL_StatusTypeDef HAL_LCD_InResConfig(LCD_HandleTypeDef *hlcd,LCD_InResInitTypeDef* LCD_InResInitStruct);
  347. HAL_StatusTypeDef HAL_LCD_SegComConfig(LCD_HandleTypeDef *hlcd,LCD_SegComInitTypeDef *SegCom);
  348. HAL_StatusTypeDef HAL_LCD_Write(LCD_HandleTypeDef *hlcd, uint32_t LCDRAMIndex, uint32_t Data);
  349. HAL_StatusTypeDef HAL_LCD_Clear(LCD_HandleTypeDef *hlcd);
  350. HAL_StatusTypeDef HAL_LCD_Start_DMA(LCD_HandleTypeDef *hlcd, uint32_t *pData, uint32_t Length);
  351. HAL_StatusTypeDef HAL_LCD_Stop_DMA(LCD_HandleTypeDef *hlcd);
  352. void HAL_LCD_IRQHandler(LCD_HandleTypeDef *hlcd);
  353. #endif