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