MSPM0L122X_L222X Driver Library  2.05.01.00
dl_lcd.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2023, Texas Instruments Incorporated
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * * Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  *
12  * * Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in the
14  * documentation and/or other materials provided with the distribution.
15  *
16  * * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32 /*!****************************************************************************
33  * @file dl_lcd.h
34  * @brief Liquid Crystal Display (LCD) Driver Library
35  * @defgroup LCD Liquid Crystal Display (LCD)
36  *
37  * @anchor ti_dl_dl_lcd_Overview
38  * # Overview
39  *
40  * The LCD Library allows full configuration of the MSPM0 LCD module.
41  * The LCD controller creates the AC segment and common voltage signals to
42  * directly drive LCD displays.
43  *
44  * <hr>
45  ******************************************************************************
46  */
50 #ifndef ti_dl_dl_lcd__include
51 #define ti_dl_dl_lcd__include
52 
53 #include <stdbool.h>
54 #include <stdint.h>
55 
56 #include <ti/devices/msp/msp.h>
57 #include <ti/driverlib/dl_common.h>
58 
59 #ifdef __MSPM0_HAS_LCD__
60 
61 #ifdef __cplusplus
62 extern "C" {
63 #endif
64 
65 /* clang-format off */
66 
73 #define DL_LCD_INTERRUPT_FRAME_START (LCD_IMASK_FRMSTART_SET)
74 
78 #define DL_LCD_INTERRUPT_BLINKING_SEGMENTS_OFF (LCD_IMASK_BLKOFF_SET)
79 
83 #define DL_LCD_INTERRUPT_BLINKING_SEGMENTS_ON (LCD_IMASK_BLKON_SET)
84 
93 #define DL_LCD_SEGMENT_LINE_0 (0)
94 
97 #define DL_LCD_SEGMENT_LINE_1 (1)
98 
101 #define DL_LCD_SEGMENT_LINE_2 (2)
102 
105 #define DL_LCD_SEGMENT_LINE_3 (3)
106 
109 #define DL_LCD_SEGMENT_LINE_4 (4)
110 
113 #define DL_LCD_SEGMENT_LINE_5 (5)
114 
117 #define DL_LCD_SEGMENT_LINE_6 (6)
118 
121 #define DL_LCD_SEGMENT_LINE_7 (7)
122 
125 #define DL_LCD_SEGMENT_LINE_8 (8)
126 
129 #define DL_LCD_SEGMENT_LINE_9 (9)
130 
133 #define DL_LCD_SEGMENT_LINE_10 (10)
134 
137 #define DL_LCD_SEGMENT_LINE_11 (11)
138 
141 #define DL_LCD_SEGMENT_LINE_12 (12)
142 
145 #define DL_LCD_SEGMENT_LINE_13 (13)
146 
149 #define DL_LCD_SEGMENT_LINE_14 (14)
150 
153 #define DL_LCD_SEGMENT_LINE_15 (15)
154 
157 #define DL_LCD_SEGMENT_LINE_16 (16)
158 
161 #define DL_LCD_SEGMENT_LINE_17 (17)
162 
165 #define DL_LCD_SEGMENT_LINE_18 (18)
166 
169 #define DL_LCD_SEGMENT_LINE_19 (19)
170 
173 #define DL_LCD_SEGMENT_LINE_20 (20)
174 
177 #define DL_LCD_SEGMENT_LINE_21 (21)
178 
181 #define DL_LCD_SEGMENT_LINE_22 (22)
182 
185 #define DL_LCD_SEGMENT_LINE_23 (23)
186 
189 #define DL_LCD_SEGMENT_LINE_24 (24)
190 
193 #define DL_LCD_SEGMENT_LINE_25 (25)
194 
197 #define DL_LCD_SEGMENT_LINE_26 (26)
198 
201 #define DL_LCD_SEGMENT_LINE_27 (27)
202 
205 #define DL_LCD_SEGMENT_LINE_28 (28)
206 
209 #define DL_LCD_SEGMENT_LINE_29 (29)
210 
213 #define DL_LCD_SEGMENT_LINE_30 (30)
214 
217 #define DL_LCD_SEGMENT_LINE_31 (31)
218 
221 #define DL_LCD_SEGMENT_LINE_32 (32)
222 
225 #define DL_LCD_SEGMENT_LINE_33 (33)
226 
229 #define DL_LCD_SEGMENT_LINE_34 (34)
230 
233 #define DL_LCD_SEGMENT_LINE_35 (35)
234 
237 #define DL_LCD_SEGMENT_LINE_36 (36)
238 
241 #define DL_LCD_SEGMENT_LINE_37 (37)
242 
245 #define DL_LCD_SEGMENT_LINE_38 (38)
246 
249 #define DL_LCD_SEGMENT_LINE_39 (39)
250 
253 #define DL_LCD_SEGMENT_LINE_40 (40)
254 
257 #define DL_LCD_SEGMENT_LINE_41 (41)
258 
261 #define DL_LCD_SEGMENT_LINE_42 (42)
262 
265 #define DL_LCD_SEGMENT_LINE_43 (43)
266 
269 #define DL_LCD_SEGMENT_LINE_44 (44)
270 
273 #define DL_LCD_SEGMENT_LINE_45 (45)
274 
277 #define DL_LCD_SEGMENT_LINE_46 (46)
278 
281 #define DL_LCD_SEGMENT_LINE_47 (47)
282 
285 #define DL_LCD_SEGMENT_LINE_48 (48)
286 
289 #define DL_LCD_SEGMENT_LINE_49 (49)
290 
293 #define DL_LCD_SEGMENT_LINE_50 (50)
294 
297 #define DL_LCD_SEGMENT_LINE_51 (51)
298 
301 #define DL_LCD_SEGMENT_LINE_52 (52)
302 
305 #define DL_LCD_SEGMENT_LINE_53 (53)
306 
309 #define DL_LCD_SEGMENT_LINE_54 (54)
310 
313 #define DL_LCD_SEGMENT_LINE_55 (55)
314 
317 #define DL_LCD_SEGMENT_LINE_56 (56)
318 
321 #define DL_LCD_SEGMENT_LINE_57 (57)
322 
325 #define DL_LCD_SEGMENT_LINE_58 (58)
326 
329 #define DL_LCD_SEGMENT_LINE_59 (59)
330 
333 #define DL_LCD_SEGMENT_LINE_60 (60)
334 
337 #define DL_LCD_SEGMENT_LINE_61 (61)
338 
341 #define DL_LCD_SEGMENT_LINE_62 (62)
342 
345 #define DL_LCD_SEGMENT_LINE_63 (63)
346 
358 #define DL_LCD_MEMORY_BIT_0 (LCD_LCDM_MBIT0_MASK)
359 
367 #define DL_LCD_MEMORY_BIT_1 (LCD_LCDM_MBIT1_MASK)
368 
376 #define DL_LCD_MEMORY_BIT_2 (LCD_LCDM_MBIT2_MASK)
377 
385 #define DL_LCD_MEMORY_BIT_3 (LCD_LCDM_MBIT3_MASK)
386 
394 #define DL_LCD_MEMORY_BIT_4 (LCD_LCDM_MBIT4_MASK)
395 
403 #define DL_LCD_MEMORY_BIT_5 (LCD_LCDM_MBIT5_MASK)
404 
412 #define DL_LCD_MEMORY_BIT_6 (LCD_LCDM_MBIT6_MASK)
413 
421 #define DL_LCD_MEMORY_BIT_7 (LCD_LCDM_MBIT7_MASK)
422 
435 #define DL_LCD_BLINK_MEMORY_BIT_0 (LCD_LCDBM_MBIT0_MASK)
436 
444 #define DL_LCD_BLINK_MEMORY_BIT_1 (LCD_LCDBM_MBIT1_MASK)
445 
453 #define DL_LCD_BLINK_MEMORY_BIT_2 (LCD_LCDBM_MBIT2_MASK)
454 
462 #define DL_LCD_BLINK_MEMORY_BIT_3 (LCD_LCDBM_MBIT3_MASK)
463 
471 #define DL_LCD_BLINK_MEMORY_BIT_4 (LCD_LCDBM_MBIT4_MASK)
472 
480 #define DL_LCD_BLINK_MEMORY_BIT_5 (LCD_LCDBM_MBIT5_MASK)
481 
489 #define DL_LCD_BLINK_MEMORY_BIT_6 (LCD_LCDBM_MBIT6_MASK)
490 
498 #define DL_LCD_BLINK_MEMORY_BIT_7 (LCD_LCDBM_MBIT7_MASK)
499 
503 typedef enum {
505  DL_LCD_FREQ_DIVIDE_1 = LCD_LCDCTL0_LCDDIVX_DIV_BY_1,
507  DL_LCD_FREQ_DIVIDE_2 = LCD_LCDCTL0_LCDDIVX_DIV_BY_2,
509  DL_LCD_FREQ_DIVIDE_3 = LCD_LCDCTL0_LCDDIVX_DIV_BY_3,
511  DL_LCD_FREQ_DIVIDE_4 = LCD_LCDCTL0_LCDDIVX_DIV_BY_4,
513  DL_LCD_FREQ_DIVIDE_5 = LCD_LCDCTL0_LCDDIVX_DIV_BY_5,
515  DL_LCD_FREQ_DIVIDE_6 = LCD_LCDCTL0_LCDDIVX_DIV_BY_6,
517  DL_LCD_FREQ_DIVIDE_7 = LCD_LCDCTL0_LCDDIVX_DIV_BY_7,
519  DL_LCD_FREQ_DIVIDE_8 = LCD_LCDCTL0_LCDDIVX_DIV_BY_8,
521  DL_LCD_FREQ_DIVIDE_9 = LCD_LCDCTL0_LCDDIVX_DIV_BY_9,
523  DL_LCD_FREQ_DIVIDE_10 = LCD_LCDCTL0_LCDDIVX_DIV_BY_10,
525  DL_LCD_FREQ_DIVIDE_11 = LCD_LCDCTL0_LCDDIVX_DIV_BY_11,
527  DL_LCD_FREQ_DIVIDE_12 = LCD_LCDCTL0_LCDDIVX_DIV_BY_12,
529  DL_LCD_FREQ_DIVIDE_13 = LCD_LCDCTL0_LCDDIVX_DIV_BY_13,
531  DL_LCD_FREQ_DIVIDE_14 = LCD_LCDCTL0_LCDDIVX_DIV_BY_14,
533  DL_LCD_FREQ_DIVIDE_15 = LCD_LCDCTL0_LCDDIVX_DIV_BY_15,
535  DL_LCD_FREQ_DIVIDE_16 = LCD_LCDCTL0_LCDDIVX_DIV_BY_16,
537  DL_LCD_FREQ_DIVIDE_17 = LCD_LCDCTL0_LCDDIVX_DIV_BY_17,
539  DL_LCD_FREQ_DIVIDE_18 = LCD_LCDCTL0_LCDDIVX_DIV_BY_18,
541  DL_LCD_FREQ_DIVIDE_19 = LCD_LCDCTL0_LCDDIVX_DIV_BY_19,
543  DL_LCD_FREQ_DIVIDE_20 = LCD_LCDCTL0_LCDDIVX_DIV_BY_20,
545  DL_LCD_FREQ_DIVIDE_21 = LCD_LCDCTL0_LCDDIVX_DIV_BY_21,
547  DL_LCD_FREQ_DIVIDE_22 = LCD_LCDCTL0_LCDDIVX_DIV_BY_22,
549  DL_LCD_FREQ_DIVIDE_23 = LCD_LCDCTL0_LCDDIVX_DIV_BY_23,
551  DL_LCD_FREQ_DIVIDE_24 = LCD_LCDCTL0_LCDDIVX_DIV_BY_24,
553  DL_LCD_FREQ_DIVIDE_25 = LCD_LCDCTL0_LCDDIVX_DIV_BY_25,
555  DL_LCD_FREQ_DIVIDE_26 = LCD_LCDCTL0_LCDDIVX_DIV_BY_26,
557  DL_LCD_FREQ_DIVIDE_27 = LCD_LCDCTL0_LCDDIVX_DIV_BY_27,
559  DL_LCD_FREQ_DIVIDE_28 = LCD_LCDCTL0_LCDDIVX_DIV_BY_28,
561  DL_LCD_FREQ_DIVIDE_29 = LCD_LCDCTL0_LCDDIVX_DIV_BY_29,
563  DL_LCD_FREQ_DIVIDE_30 = LCD_LCDCTL0_LCDDIVX_DIV_BY_30,
565  DL_LCD_FREQ_DIVIDE_31 = LCD_LCDCTL0_LCDDIVX_DIV_BY_31,
567  DL_LCD_FREQ_DIVIDE_32 = LCD_LCDCTL0_LCDDIVX_DIV_BY_32,
569 
571 typedef enum {
573  DL_LCD_MUX_RATE_STATIC = LCD_LCDCTL0_LCDMXX_MX_STATIC,
575  DL_LCD_MUX_RATE_2 = LCD_LCDCTL0_LCDMXX_MX_2,
577  DL_LCD_MUX_RATE_3 = LCD_LCDCTL0_LCDMXX_MX_3,
579  DL_LCD_MUX_RATE_4 = LCD_LCDCTL0_LCDMXX_MX_4,
581  DL_LCD_MUX_RATE_5 = LCD_LCDCTL0_LCDMXX_MX_5,
583  DL_LCD_MUX_RATE_6 = LCD_LCDCTL0_LCDMXX_MX_6,
585  DL_LCD_MUX_RATE_7 = LCD_LCDCTL0_LCDMXX_MX_7,
587  DL_LCD_MUX_RATE_8 = LCD_LCDCTL0_LCDMXX_MX_8,
589 
591 typedef enum {
593  DL_LCD_WAVEFORM_POWERMODE_LOWPOWER = LCD_LCDCTL0_LCDLP_LP_LCD,
595  DL_LCD_WAVEFORM_POWERMODE_STANDARD = LCD_LCDCTL0_LCDLP_STD_LCD,
597 
599 typedef enum {
601  DL_LCD_BLINKING_DIVIDE_BY_2 = LCD_LCDBLKCTL_LCDBLKPREX_DIV_BY_2,
603  DL_LCD_BLINKING_DIVIDE_BY_4 = LCD_LCDBLKCTL_LCDBLKPREX_DIV_BY_4,
605  DL_LCD_BLINKING_DIVIDE_BY_8 = LCD_LCDBLKCTL_LCDBLKPREX_DIV_BY_8,
607  DL_LCD_BLINKING_DIVIDE_BY_16 = LCD_LCDBLKCTL_LCDBLKPREX_DIV_BY_16,
609  DL_LCD_BLINKING_DIVIDE_BY_32 = LCD_LCDBLKCTL_LCDBLKPREX_DIV_BY_32,
611  DL_LCD_BLINKING_DIVIDE_BY_64 = LCD_LCDBLKCTL_LCDBLKPREX_DIV_BY_64,
613  DL_LCD_BLINKING_DIVIDE_BY_128 = LCD_LCDBLKCTL_LCDBLKPREX_DIV_BY_128,
615  DL_LCD_BLINKING_DIVIDE_BY_256 = LCD_LCDBLKCTL_LCDBLKPREX_DIV_BY_256,
617 
619 typedef enum {
621  DL_LCD_BLINKING_MODE_DISABLED = LCD_LCDBLKCTL_LCDBLKMODX_BLINK_DISABLE,
624  LCD_LCDBLKCTL_LCDBLKMODX_BLINK_SELECED,
626  DL_LCD_BLINKING_MODE_ALL_SEGMENTS = LCD_LCDBLKCTL_LCDBLKMODX_BLINK_ALL,
628  DL_LCD_BLINKING_MODE_TOGGLE = LCD_LCDBLKCTL_LCDBLKMODX_BKINK_TOGGLE,
630 
632 typedef enum {
634  DL_LCD_CHARGE_PUMP_FREQUENCY_4096HZ = LCD_LCDVCTL_LCDCPFSELX_DIV_BY_1_BY_8,
636  DL_LCD_CHARGE_PUMP_FREQUENCY_2048HZ = LCD_LCDVCTL_LCDCPFSELX_DIV_BY_2_BY_8,
638  DL_LCD_CHARGE_PUMP_FREQUENCY_1365HZ = LCD_LCDVCTL_LCDCPFSELX_DIV_BY_3_BY_8,
640  DL_LCD_CHARGE_PUMP_FREQUENCY_1024HZ = LCD_LCDVCTL_LCDCPFSELX_DIV_BY_4_BY_8,
642  DL_LCD_CHARGE_PUMP_FREQUENCY_819HZ = LCD_LCDVCTL_LCDCPFSELX_DIV_BY_5_BY_8,
644  DL_LCD_CHARGE_PUMP_FREQUENCY_682HZ = LCD_LCDVCTL_LCDCPFSELX_DIV_BY_6_BY_8,
646  DL_LCD_CHARGE_PUMP_FREQUENCY_585HZ = LCD_LCDVCTL_LCDCPFSELX_DIV_BY_7_BY_8,
648  DL_LCD_CHARGE_PUMP_FREQUENCY_512HZ = LCD_LCDVCTL_LCDCPFSELX_DIV_BY_8_BY_8,
650  DL_LCD_CHARGE_PUMP_FREQUENCY_455HZ = LCD_LCDVCTL_LCDCPFSELX_DIV_BY_9_BY_8,
652  DL_LCD_CHARGE_PUMP_FREQUENCY_409HZ = LCD_LCDVCTL_LCDCPFSELX_DIV_BY_10_BY_8,
654  DL_LCD_CHARGE_PUMP_FREQUENCY_372HZ = LCD_LCDVCTL_LCDCPFSELX_DIV_BY_11_BY_8,
656  DL_LCD_CHARGE_PUMP_FREQUENCY_341HZ = LCD_LCDVCTL_LCDCPFSELX_DIV_BY_12_BY_8,
658  DL_LCD_CHARGE_PUMP_FREQUENCY_315HZ = LCD_LCDVCTL_LCDCPFSELX_DIV_BY_13_BY_8,
660  DL_LCD_CHARGE_PUMP_FREQUENCY_292HZ = LCD_LCDVCTL_LCDCPFSELX_DIV_BY_14_BY_8,
662  DL_LCD_CHARGE_PUMP_FREQUENCY_273HZ = LCD_LCDVCTL_LCDCPFSELX_DIV_BY_15_BY_8,
664  DL_LCD_CHARGE_PUMP_FREQUENCY_256HZ = LCD_LCDVCTL_LCDCPFSELX_DIV_BY_16_BY_8,
666 
668 typedef enum {
670  DL_LCD_VREF_INTERNAL_2_60V = LCD_LCDVCTL_VLCDX_SEL_2P60V,
672  DL_LCD_VREF_INTERNAL_2_66V = LCD_LCDVCTL_VLCDX_SEL_2P66V,
674  DL_LCD_VREF_INTERNAL_2_72V = LCD_LCDVCTL_VLCDX_SEL_2P72V,
676  DL_LCD_VREF_INTERNAL_2_78V = LCD_LCDVCTL_VLCDX_SEL_2P78V,
678  DL_LCD_VREF_INTERNAL_2_84V = LCD_LCDVCTL_VLCDX_SEL_2P84V,
680  DL_LCD_VREF_INTERNAL_2_90V = LCD_LCDVCTL_VLCDX_SEL_2P90V,
682  DL_LCD_VREF_INTERNAL_2_96V = LCD_LCDVCTL_VLCDX_SEL_2P96V,
684  DL_LCD_VREF_INTERNAL_3_02V = LCD_LCDVCTL_VLCDX_SEL_3P02V,
686  DL_LCD_VREF_INTERNAL_3_08V = LCD_LCDVCTL_VLCDX_SEL_3P08V,
688  DL_LCD_VREF_INTERNAL_3_14V = LCD_LCDVCTL_VLCDX_SEL_3P14V,
690  DL_LCD_VREF_INTERNAL_3_20V = LCD_LCDVCTL_VLCDX_SEL_3P20V,
692  DL_LCD_VREF_INTERNAL_3_26V = LCD_LCDVCTL_VLCDX_SEL_3P26V,
694  DL_LCD_VREF_INTERNAL_3_32V = LCD_LCDVCTL_VLCDX_SEL_3P32V,
696  DL_LCD_VREF_INTERNAL_3_38V = LCD_LCDVCTL_VLCDX_SEL_3P38V,
698  DL_LCD_VREF_INTERNAL_3_44V = LCD_LCDVCTL_VLCDX_SEL_3P44V,
700  DL_LCD_VREF_INTERNAL_3_50V = LCD_LCDVCTL_VLCDX_SEL_3P50V,
702 
704 typedef enum {
706  DL_LCD_R33_SOURCE_EXTERNAL = LCD_LCDVCTL_LCDSELVDD_SEL_EXT_SUPPLY,
708  DL_LCD_R33_SOURCE_INTERNAL = LCD_LCDVCTL_LCDSELVDD_SEL_AVDD,
710 
712 typedef enum {
714  DL_LCD_POWER_MODE_LOW = LCD_LCDVCTL_LCD_HP_LP_LP_MODE,
716  DL_LCD_POWER_MODE_HIGH = LCD_LCDVCTL_LCD_HP_LP_HP_MODE,
718 
720 typedef enum {
722  DL_LCD_BIAS_VOLTAGE_SOURCE_R33 = LCD_LCDVCTL_VLCDSEL_VDD_R33_SEL_R33,
724  DL_LCD_BIAS_VOLTAGE_SOURCE_AVDD = LCD_LCDVCTL_VLCDSEL_VDD_R33_SEL_AVDD,
726 
728 typedef enum {
730  DL_LCD_BIAS_ONE_THIRD = LCD_LCDVCTL_LCDBIASSEL_ONE_BY_3_BIAS,
732  DL_LCD_BIAS_ONE_FOURTH = LCD_LCDVCTL_LCDBIASSEL_ONE_BY_4_BIAS,
733 } DL_LCD_BIAS;
734 
736 typedef enum {
738  DL_LCD_REFERENCE_MODE_STATIC = LCD_LCDVCTL_LCDREFMODE_STATIC_MODE,
740  DL_LCD_REFERENCE_MODE_SWITCHED = LCD_LCDVCTL_LCDREFMODE_SWITCHED_MODE,
742 
744 typedef enum {
746  DL_LCD_DISPLAY_REGISTERS_MEMORY = LCD_LCDMEMCTL_LCDDISP_SEL_LCD_MEM_REGS,
749  LCD_LCDMEMCTL_LCDDISP_SEL_BLNK_MEM_REGS,
750 } DL_LCD_DISP;
751 
753 typedef enum {
755  DL_LCD_EVENT_LINE_MODE_DISABLED = LCD_EVT_MODE_INT0_CFG_DISABLE,
757  DL_LCD_EVENT_LINE_MODE_SOFTWARE = LCD_EVT_MODE_INT0_CFG_SOFTWARE,
759  DL_LCD_EVENT_LINE_MODE_HARDWARE = LCD_EVT_MODE_INT0_CFG_HARDWARE,
761 
763 typedef enum {
765  DL_LCD_IIDX_NO_INT = LCD_IIDX_STAT_NO_INTR,
767  DL_LCD_IIDX_FRAME_START = LCD_IIDX_STAT_FRAME_START,
769  DL_LCD_IIDX_BLINKING_SEGMENTS_OFF = LCD_IIDX_STAT_BLK_OFF,
771  DL_LCD_IIDX_BLINKING_SEGMENTS_ON = LCD_IIDX_STAT_BLK_ON,
772 } DL_LCD_IIDX;
773 
775 typedef enum {
904 } DL_LCD_MEMORY;
905 
907 typedef enum {
973 
975 typedef enum {
977  DL_LCD_COM_0 = 0x01,
979  DL_LCD_COM_1 = 0x02,
981  DL_LCD_COM_2 = 0x04,
983  DL_LCD_COM_3 = 0x08,
985  DL_LCD_COM_4 = 0x10,
987  DL_LCD_COM_5 = 0x20,
989  DL_LCD_COM_6 = 0x40,
991  DL_LCD_COM_7 = 0x80,
992 } DL_LCD_COM;
993 
995 typedef enum {
997  DL_LCD_VREFGEN_CYCLES_16 = LCD_LCDVREFCFG_ONTIME_ONTIME16,
999  DL_LCD_VREFGEN_CYCLES_32 = LCD_LCDVREFCFG_ONTIME_ONTIME32,
1001  DL_LCD_VREFGEN_CYCLES_128 = LCD_LCDVREFCFG_ONTIME_ONTIME128,
1003  DL_LCD_VREFGEN_CYCLES_256 = LCD_LCDVREFCFG_ONTIME_ONTIME256,
1005 
1009 typedef struct {
1011  DL_LCD_FREQ_DIVIDE frequencyDivider;
1013  DL_LCD_MUX_RATE muxRate;
1015  DL_LCD_WAVEFORM_POWERMODE lowPowerWaveform;
1016 } DL_LCD_Config;
1017 
1028 void DL_LCD_init(LCD_Regs *lcd, const DL_LCD_Config *config);
1029 
1041 void DL_LCD_setPinAsLCDFunction(LCD_Regs *lcd, uint32_t pin);
1042 
1053 void DL_LCD_setPinAsPortFunction(LCD_Regs *lcd, uint8_t pin);
1054 
1064 void DL_LCD_setPinAsCommon(LCD_Regs *lcd, uint8_t pin, uint32_t com);
1065 
1073 void DL_LCD_setPinAsSegment(LCD_Regs *lcd, uint8_t pin);
1074 
1087 __STATIC_INLINE void DL_LCD_enablePower(LCD_Regs *lcd)
1088 {
1089  lcd->PWREN |= (LCD_PWREN_KEY_UNLOCK_W | LCD_PWREN_ENABLE_ENABLE);
1090 }
1091 
1103 __STATIC_INLINE void DL_LCD_disablePower(LCD_Regs *lcd)
1104 {
1105  lcd->PWREN = (LCD_PWREN_KEY_UNLOCK_W | LCD_PWREN_ENABLE_DISABLE);
1106 }
1107 
1126 __STATIC_INLINE bool DL_LCD_isPowerEnabled(const LCD_Regs *lcd)
1127 {
1128  return ((lcd->PWREN & LCD_PWREN_ENABLE_MASK) ==
1129  LCD_PWREN_ENABLE_ENABLE);
1130 }
1131 
1138 __STATIC_INLINE void DL_LCD_reset(LCD_Regs *lcd)
1139 {
1140  lcd->RSTCTL = (LCD_RSTCTL_KEY_UNLOCK_W | LCD_RSTCTL_RESETSTKYCLR_CLR |
1141  LCD_RSTCTL_RESETASSERT_ASSERT);
1142 }
1143 
1155 __STATIC_INLINE bool DL_LCD_isReset(const LCD_Regs *lcd)
1156 {
1157  return ((lcd->STAT & LCD_STAT_RESETSTKY_MASK) ==
1158  LCD_STAT_RESETSTKY_RESET);
1159 }
1160 
1170 __STATIC_INLINE DL_LCD_EVENT_LINE_MODE DL_LCD_getEventLineMode(const LCD_Regs *lcd)
1171 {
1172  uint32_t eventLineMode = (lcd->EVT_MODE & LCD_EVT_MODE_INT0_CFG_MASK);
1173 
1174  return (DL_LCD_EVENT_LINE_MODE)(eventLineMode);
1175 }
1176 
1190 __STATIC_INLINE DL_LCD_IIDX DL_LCD_getPendingInterrupt(const LCD_Regs *lcd)
1191 {
1192  return ((DL_LCD_IIDX) lcd->INT_EVENT0.IIDX);
1193 }
1194 
1203 __STATIC_INLINE void DL_LCD_enableInterrupt(
1204  LCD_Regs *lcd, uint32_t interruptMask)
1205 {
1206  lcd->INT_EVENT0.IMASK |= interruptMask;
1207 }
1208 
1217 __STATIC_INLINE void DL_LCD_disableInterrupt(
1218  LCD_Regs *lcd, uint32_t interruptMask)
1219 {
1220  lcd->INT_EVENT0.IMASK &= ~(interruptMask);
1221 }
1222 
1235 __STATIC_INLINE uint32_t DL_LCD_getEnabledInterrupts(
1236  const LCD_Regs *lcd, uint32_t interruptMask)
1237 {
1238  return (lcd->INT_EVENT0.IMASK & interruptMask);
1239 }
1240 
1256 __STATIC_INLINE uint32_t DL_LCD_getRawInterruptStatus(
1257  const LCD_Regs *lcd, uint32_t interruptMask)
1258 {
1259  return (lcd->INT_EVENT0.RIS & interruptMask);
1260 }
1261 
1279 __STATIC_INLINE uint32_t DL_LCD_getEnabledInterruptStatus(
1280  const LCD_Regs *lcd, uint32_t interruptMask)
1281 {
1282  return (lcd->INT_EVENT0.MIS & interruptMask);
1283 }
1284 
1293 __STATIC_INLINE void DL_LCD_setInterrupts(
1294  LCD_Regs *lcd, uint32_t interruptMask)
1295 {
1296  lcd->INT_EVENT0.ISET = interruptMask;
1297 }
1298 
1307 __STATIC_INLINE void DL_LCD_clearInterruptStatus(
1308  LCD_Regs *lcd, uint32_t interruptMask)
1309 {
1310  lcd->INT_EVENT0.ICLR = interruptMask;
1311 }
1312 
1318 __STATIC_INLINE void DL_LCD_enableExternalSync(LCD_Regs *lcd)
1319 {
1320  lcd->LCDCTL0 |= LCD_LCDCTL0_LCDSYNCEXT_LCD_EXT_SYNC_ON;
1321 }
1322 
1328 __STATIC_INLINE void DL_LCD_disableExternalSync(LCD_Regs *lcd)
1329 {
1330  lcd->LCDCTL0 &= ~(LCD_LCDCTL0_LCDSYNCEXT_MASK);
1331 }
1332 
1343 __STATIC_INLINE bool DL_LCD_isExternalSyncEnabled(const LCD_Regs *lcd)
1344 {
1345  return ((lcd->LCDCTL0 & LCD_LCDCTL0_LCDSYNCEXT_MASK) ==
1346  LCD_LCDCTL0_LCDSYNCEXT_LCD_EXT_SYNC_ON);
1347 }
1348 
1361 __STATIC_INLINE void DL_LCD_setFreqDiv(
1362  LCD_Regs *lcd, DL_LCD_FREQ_DIVIDE fDiv)
1363 {
1365  &lcd->LCDCTL0, (uint32_t) fDiv, LCD_LCDCTL0_LCDDIVX_MASK);
1366 }
1367 
1377 __STATIC_INLINE DL_LCD_FREQ_DIVIDE DL_LCD_getFreqDiv(const LCD_Regs *lcd)
1378 {
1379  uint32_t fDiv = (lcd->LCDCTL0 & LCD_LCDCTL0_LCDDIVX_MASK);
1380 
1381  return (DL_LCD_FREQ_DIVIDE)(fDiv);
1382 }
1383 
1396 __STATIC_INLINE void DL_LCD_setMuxRate(
1397  LCD_Regs *lcd, DL_LCD_MUX_RATE muxRate)
1398 {
1400  &lcd->LCDCTL0, (uint32_t) muxRate, LCD_LCDCTL0_LCDMXX_MASK);
1401 }
1402 
1412 __STATIC_INLINE DL_LCD_MUX_RATE DL_LCD_getMuxRate(const LCD_Regs *lcd)
1413 {
1414  uint32_t muxRate = (lcd->LCDCTL0 & LCD_LCDCTL0_LCDMXX_MASK);
1415 
1416  return (DL_LCD_MUX_RATE)(muxRate);
1417 }
1418 
1424 __STATIC_INLINE void DL_LCD_turnSegmentsOn(LCD_Regs *lcd)
1425 {
1426  lcd->LCDCTL0 |= LCD_LCDCTL0_LCDSON_LCD_SEG_ON;
1427 }
1428 
1437 __STATIC_INLINE void DL_LCD_turnSegmentsOff(LCD_Regs *lcd)
1438 {
1439  lcd->LCDCTL0 &= ~(LCD_LCDCTL0_LCDSON_MASK);
1440 }
1441 
1453 __STATIC_INLINE void DL_LCD_setWaveformPowerMode(
1454  LCD_Regs *lcd, DL_LCD_WAVEFORM_POWERMODE waveformPowerMode)
1455 {
1457  &lcd->LCDCTL0, (uint32_t) waveformPowerMode, LCD_LCDCTL0_LCDLP_MASK);
1458 }
1459 
1469 __STATIC_INLINE DL_LCD_WAVEFORM_POWERMODE DL_LCD_getWaveformPowerMode(
1470  const LCD_Regs *lcd)
1471 {
1472  uint32_t waveformPowerMode = (lcd->LCDCTL0 & LCD_LCDCTL0_LCDLP_MASK);
1473 
1474  return (DL_LCD_WAVEFORM_POWERMODE)(waveformPowerMode);
1475 }
1476 
1482 __STATIC_INLINE void DL_LCD_enable(LCD_Regs *lcd)
1483 {
1484  lcd->LCDCTL0 |= LCD_LCDCTL0_LCDON_LCD_MOD_ENABLE;
1485 }
1486 
1492 __STATIC_INLINE void DL_LCD_disable(LCD_Regs *lcd)
1493 {
1494  lcd->LCDCTL0 &= ~(LCD_LCDCTL0_LCDON_MASK);
1495 }
1496 
1506 __STATIC_INLINE void DL_LCD_setBlinkingControl(
1507  LCD_Regs *lcd, DL_LCD_BLINKING_DIVIDE blinkFreqDiv,
1508  DL_LCD_BLINKING_MODE blinkMode)
1509 {
1510  DL_Common_updateReg(&lcd->LCDBLKCTL, (uint32_t) blinkFreqDiv |
1511  (uint32_t) blinkMode, LCD_LCDBLKCTL_LCDBLKPREX_MASK |
1512  LCD_LCDBLKCTL_LCDBLKMODX_MASK);
1513 }
1514 
1524 __STATIC_INLINE DL_LCD_BLINKING_DIVIDE DL_LCD_getBlinkingFreqDiv(const LCD_Regs *lcd)
1525 {
1526  uint32_t blinkFreqDiv = (lcd->LCDBLKCTL & LCD_LCDBLKCTL_LCDBLKPREX_MASK);
1527 
1528  return (DL_LCD_BLINKING_DIVIDE)(blinkFreqDiv);
1529 }
1530 
1540 __STATIC_INLINE DL_LCD_BLINKING_MODE DL_LCD_getBlinkingMode(const LCD_Regs *lcd)
1541 {
1542  uint32_t blinkMode = (lcd->LCDBLKCTL & LCD_LCDBLKCTL_LCDBLKMODX_MASK);
1543 
1544  return (DL_LCD_BLINKING_MODE)(blinkMode);
1545 }
1546 
1555 __STATIC_INLINE void DL_LCD_clearAllBlinkingMemoryRegs(LCD_Regs *lcd)
1556 {
1557  DL_Common_updateReg(&lcd->LCDMEMCTL,
1558  LCD_LCDMEMCTL_LCDCLRBM_CLR_BLNK_MEM_REGS, LCD_LCDMEMCTL_LCDCLRBM_MASK);
1559 }
1560 
1569 __STATIC_INLINE void DL_LCD_clearAllMemoryRegs(LCD_Regs *lcd)
1570 {
1571  DL_Common_updateReg(&lcd->LCDMEMCTL, LCD_LCDMEMCTL_LCDCLRM_CLR_LCD_MEM_REGS,
1572  LCD_LCDMEMCTL_LCDCLRM_MASK);
1573 }
1574 
1586 __STATIC_INLINE void DL_LCD_selectMemRegsForDisplay(
1587  LCD_Regs *lcd, DL_LCD_DISP dispSel)
1588 {
1589  DL_Common_updateReg(&lcd->LCDMEMCTL, (uint32_t) dispSel,
1590  LCD_LCDMEMCTL_LCDDISP_MASK);
1591 }
1592 
1606 __STATIC_INLINE DL_LCD_DISP DL_LCD_getSelectedMemRegsForDisplay(const LCD_Regs *lcd)
1607 {
1608  uint32_t dispSel = (lcd->LCDMEMCTL & LCD_LCDMEMCTL_LCDDISP_MASK);
1609 
1610  return (DL_LCD_DISP)(dispSel);
1611 }
1612 
1618 __STATIC_INLINE void DL_LCD_enableVBOOST(LCD_Regs *lcd)
1619 {
1620  lcd->LCDVCTL |= LCD_LCDVCTL_LCDVBSTEN_ENABLE;
1621 }
1622 
1628 __STATIC_INLINE void DL_LCD_disableVBOOST(LCD_Regs *lcd)
1629 {
1630  lcd->LCDVCTL &= ~(LCD_LCDVCTL_LCDVBSTEN_MASK);
1631 }
1632 
1642 __STATIC_INLINE void DL_LCD_setChargePumpFreq(
1643  LCD_Regs *lcd, DL_LCD_CHARGE_PUMP_FREQUENCY chargePumpFreq)
1644 {
1645  DL_Common_updateReg(&lcd->LCDVCTL, (uint32_t) chargePumpFreq,
1646  LCD_LCDVCTL_LCDCPFSELX_MASK);
1647 }
1648 
1658 __STATIC_INLINE DL_LCD_CHARGE_PUMP_FREQUENCY DL_LCD_getChargePumpFreq(
1659  const LCD_Regs *lcd)
1660 {
1661  uint32_t chargePumpFreq = (lcd->LCDVCTL & LCD_LCDVCTL_LCDCPFSELX_MASK);
1662 
1663  return (DL_LCD_CHARGE_PUMP_FREQUENCY)(chargePumpFreq);
1664 }
1665 
1674 __STATIC_INLINE void DL_LCD_setVREFInternal(
1675  LCD_Regs *lcd, DL_LCD_VREF_INTERNAL vrefInternal)
1676 {
1677  DL_Common_updateReg(&lcd->LCDVCTL, (uint32_t) vrefInternal,
1678  LCD_LCDVCTL_VLCDX_MASK);
1679 }
1680 
1690 __STATIC_INLINE DL_LCD_VREF_INTERNAL DL_LCD_getVREFInternal(const LCD_Regs *lcd)
1691 {
1692  uint32_t vrefInternal = (lcd->LCDVCTL & LCD_LCDVCTL_VLCDX_MASK);
1693 
1694  return (DL_LCD_VREF_INTERNAL)(vrefInternal);
1695 }
1696 
1705 __STATIC_INLINE void DL_LCD_enableChargePump(LCD_Regs *lcd)
1706 {
1707  lcd->LCDVCTL |= LCD_LCDVCTL_LCDCPEN_CP_ENABLE;
1708 }
1709 
1715 __STATIC_INLINE void DL_LCD_disableChargePump(LCD_Regs *lcd)
1716 {
1717  lcd->LCDVCTL &= ~(LCD_LCDVCTL_LCDCPEN_MASK);
1718 }
1719 
1726 __STATIC_INLINE void DL_LCD_enableVREFInternal(LCD_Regs *lcd)
1727 {
1728  lcd->LCDVCTL |= LCD_LCDVCTL_LCDREFEN_INT_REF_ENABLE;
1729 }
1730 
1736 __STATIC_INLINE void DL_LCD_disableVREFInternal(LCD_Regs *lcd)
1737 {
1738  lcd->LCDVCTL &= ~(LCD_LCDVCTL_LCDREFEN_MASK);
1739 }
1740 
1749 __STATIC_INLINE void DL_LCD_setR33source(
1750  LCD_Regs *lcd, DL_LCD_R33_SOURCE r33Source)
1751 {
1752  DL_Common_updateReg(&lcd->LCDVCTL, (uint32_t) r33Source,
1753  LCD_LCDVCTL_LCDSELVDD_MASK);
1754 }
1755 
1765 __STATIC_INLINE DL_LCD_R33_SOURCE DL_LCD_getR33Source(const LCD_Regs *lcd)
1766 {
1767  uint32_t r33Source = (lcd->LCDVCTL & LCD_LCDVCTL_LCDSELVDD_MASK);
1768 
1769  return (DL_LCD_R33_SOURCE)(r33Source);
1770 }
1771 
1782 __STATIC_INLINE void DL_LCD_setInternalBiasPowerMode(
1783  LCD_Regs *lcd, DL_LCD_POWER_MODE powerMode)
1784 {
1785  DL_Common_updateReg(&lcd->LCDVCTL, (uint32_t) powerMode,
1786  LCD_LCDVCTL_LCD_HP_LP_MASK);
1787 }
1788 
1798 __STATIC_INLINE DL_LCD_POWER_MODE DL_LCD_getPowerMode(const LCD_Regs *lcd)
1799 {
1800  uint32_t powerMode = (lcd->LCDVCTL & LCD_LCDVCTL_LCDSELVDD_MASK);
1801 
1802  return (DL_LCD_POWER_MODE)(powerMode);
1803 }
1804 
1816 __STATIC_INLINE void DL_LCD_setBiasVoltageSource(
1817  LCD_Regs *lcd, DL_LCD_BIAS_VOLTAGE_SOURCE biasVoltageSource)
1818 {
1819  DL_Common_updateReg(&lcd->LCDVCTL, (uint32_t) biasVoltageSource,
1820  LCD_LCDVCTL_VLCDSEL_VDD_R33_MASK);
1821 }
1822 
1832 __STATIC_INLINE DL_LCD_BIAS_VOLTAGE_SOURCE DL_LCD_getBiasVoltageSource(
1833  const LCD_Regs *lcd)
1834 {
1835  uint32_t biasVoltageSource = (
1836  lcd->LCDVCTL & LCD_LCDVCTL_VLCDSEL_VDD_R33_MASK);
1837 
1838  return (DL_LCD_BIAS_VOLTAGE_SOURCE)(biasVoltageSource);
1839 }
1840 
1847 __STATIC_INLINE void DL_LCD_enableInternalBias(LCD_Regs *lcd)
1848 {
1849  lcd->LCDVCTL |= LCD_LCDVCTL_LCDINTBIASEN_INT_BIAS_ENABLE;
1850 }
1851 
1857 __STATIC_INLINE void DL_LCD_disableInternalBias(LCD_Regs *lcd)
1858 {
1859  lcd->LCDVCTL &= ~(LCD_LCDVCTL_LCDINTBIASEN_MASK);
1860 }
1861 
1871 __STATIC_INLINE void DL_LCD_setBias(
1872  LCD_Regs *lcd, DL_LCD_BIAS biasSel)
1873 {
1875  &lcd->LCDVCTL, (uint32_t) biasSel, LCD_LCDVCTL_LCDBIASSEL_MASK);
1876 }
1877 
1887 __STATIC_INLINE DL_LCD_BIAS DL_LCD_getBias(const LCD_Regs *lcd)
1888 {
1889  uint32_t biasSel = (lcd->LCDVCTL & LCD_LCDVCTL_LCDBIASSEL_MASK);
1890 
1891  return (DL_LCD_BIAS)(biasSel);
1892 }
1893 
1901 __STATIC_INLINE void DL_LCD_setRefMode(
1902  LCD_Regs *lcd, DL_LCD_REFERENCE_MODE refMode)
1903 {
1905  &lcd->LCDVCTL, (uint32_t) refMode, LCD_LCDVCTL_LCDREFMODE_MASK);
1906 }
1907 
1917 __STATIC_INLINE DL_LCD_REFERENCE_MODE DL_LCD_getRefMode(const LCD_Regs *lcd)
1918 {
1919  uint32_t refMode = (lcd->LCDVCTL & LCD_LCDVCTL_LCDREFMODE_MASK);
1920 
1921  return (DL_LCD_REFERENCE_MODE)(refMode);
1922 }
1923 
1933 __STATIC_INLINE void DL_LCD_writeMemory(
1934  LCD_Regs *lcd, DL_LCD_MEMORY memIndex, uint32_t mask)
1935 {
1936  lcd -> LCDM[(uint32_t) memIndex] = mask;
1937 }
1938 
1948 __STATIC_INLINE void DL_LCD_setMemory(
1949  LCD_Regs *lcd, DL_LCD_MEMORY memIndex, uint32_t mask)
1950 {
1951  lcd -> LCDM[(uint32_t) memIndex] |= mask;
1952 }
1953 
1963 __STATIC_INLINE void DL_LCD_toggleMemory(
1964  LCD_Regs *lcd, DL_LCD_MEMORY memIndex, uint32_t mask)
1965 {
1966  lcd -> LCDM[(uint32_t) memIndex] ^= mask;
1967 }
1968 
1978 __STATIC_INLINE void DL_LCD_clearMemory(
1979  LCD_Regs *lcd, DL_LCD_MEMORY memIndex, uint32_t mask)
1980 {
1981  lcd -> LCDM[(uint32_t) memIndex] &= ~(mask);
1982 }
1983 
1994 __STATIC_INLINE uint32_t DL_LCD_getMemory(
1995  const LCD_Regs *lcd, DL_LCD_MEMORY memIndex)
1996 {
1997  return lcd -> LCDM[(uint32_t) memIndex];
1998 }
1999 
2009 __STATIC_INLINE void DL_LCD_writeBlinkingMemory(
2010  LCD_Regs *lcd, DL_LCD_BLINKING_MEMORY memIndex, uint32_t mask)
2011 {
2012  lcd -> LCDBM[(uint32_t) memIndex] = mask;
2013 }
2014 
2024 __STATIC_INLINE void DL_LCD_setBlinkingMemory(
2025  LCD_Regs *lcd, DL_LCD_BLINKING_MEMORY memIndex, uint32_t mask)
2026 {
2027  lcd -> LCDBM[(uint32_t) memIndex] |= mask;
2028 }
2029 
2039 __STATIC_INLINE void DL_LCD_toggleBlinkingMemory(
2040  LCD_Regs *lcd, DL_LCD_BLINKING_MEMORY memIndex, uint32_t mask)
2041 {
2042  lcd -> LCDBM[(uint32_t) memIndex] ^= mask;
2043 }
2044 
2054 __STATIC_INLINE void DL_LCD_clearBlinkingMemory(
2055  LCD_Regs *lcd, DL_LCD_BLINKING_MEMORY memIndex, uint32_t mask)
2056 {
2057  lcd -> LCDBM[(uint32_t) memIndex] &= ~(mask);
2058 }
2059 
2070 __STATIC_INLINE uint32_t DL_LCD_getBlinkingMemory(
2071  const LCD_Regs *lcd, DL_LCD_BLINKING_MEMORY memIndex)
2072 {
2073  return lcd -> LCDBM[(uint32_t) memIndex];
2074 }
2075 
2083 __STATIC_INLINE void DL_LCD_setVrefOnTimeCycles(
2084  LCD_Regs *lcd, DL_LCD_VREFGEN_CYCLES cycles)
2085 {
2086  DL_Common_updateReg(&lcd->LCDVREFCFG, (uint32_t) cycles,
2087  LCD_LCDVREFCFG_ONTIME_MASK);
2088 }
2089 
2099 __STATIC_INLINE DL_LCD_VREFGEN_CYCLES DL_LCD_getVrefOnTimeCycles(const LCD_Regs *lcd)
2100 {
2101  uint32_t cycles = (lcd->LCDVREFCFG & LCD_LCDVREFCFG_ONTIME_MASK);
2102 
2103  return (DL_LCD_VREFGEN_CYCLES)(cycles);
2104 }
2105 
2106 #ifdef __cplusplus
2107 }
2108 #endif
2109 
2110 #endif /* __MSPM0_HAS_LCD__ */
2111 
2112 #endif /* ti_dl_dl_lcd__include */
2113 
__STATIC_INLINE void DL_LCD_setBias(LCD_Regs *lcd, DL_LCD_BIAS biasSel)
Select LCD bias.
Definition: dl_lcd.h:1871
DL_LCD_POWER_MODE
Definition: dl_lcd.h:712
Definition: dl_lcd.h:646
__STATIC_INLINE void DL_Common_updateReg(volatile uint32_t *reg, uint32_t val, uint32_t mask)
Writes value to specified register - retaining bits unaffected by mask.
Definition: dl_common.h:63
Definition: dl_lcd.h:746
Definition: dl_lcd.h:829
__STATIC_INLINE DL_LCD_REFERENCE_MODE DL_LCD_getRefMode(const LCD_Regs *lcd)
Get reference mode for R13 voltage.
Definition: dl_lcd.h:1917
__STATIC_INLINE void DL_LCD_setVREFInternal(LCD_Regs *lcd, DL_LCD_VREF_INTERNAL vrefInternal)
Set internal reference voltage.
Definition: dl_lcd.h:1674
__STATIC_INLINE void DL_LCD_enableInternalBias(LCD_Regs *lcd)
Enables internal bias voltage resistor divider.
Definition: dl_lcd.h:1847
__STATIC_INLINE bool DL_LCD_isPowerEnabled(const LCD_Regs *lcd)
Returns if the Peripheral Write Enable (PWREN) register for the LCD is enabled.
Definition: dl_lcd.h:1126
Definition: dl_lcd.h:605
Definition: dl_lcd.h:740
Definition: dl_lcd.h:795
Definition: dl_lcd.h:943
__STATIC_INLINE void DL_LCD_setBlinkingMemory(LCD_Regs *lcd, DL_LCD_BLINKING_MEMORY memIndex, uint32_t mask)
Set bits in LCD blinking memory index register.
Definition: dl_lcd.h:2024
Definition: dl_lcd.h:561
Definition: dl_lcd.h:873
Definition: dl_lcd.h:533
__STATIC_INLINE void DL_LCD_enableChargePump(LCD_Regs *lcd)
Enables charge pump.
Definition: dl_lcd.h:1705
Definition: dl_lcd.h:963
Definition: dl_lcd.h:706
Definition: dl_lcd.h:738
Definition: dl_lcd.h:628
Definition: dl_lcd.h:595
Definition: dl_lcd.h:915
DL_LCD_FREQ_DIVIDE
Definition: dl_lcd.h:503
Definition: dl_lcd.h:885
Definition: dl_lcd.h:813
Definition: dl_lcd.h:861
Definition: dl_lcd.h:921
Definition: dl_lcd.h:917
Definition: dl_lcd.h:811
Definition: dl_lcd.h:613
Definition: dl_lcd.h:835
Definition: dl_lcd.h:857
Definition: dl_lcd.h:545
__STATIC_INLINE DL_LCD_VREFGEN_CYCLES DL_LCD_getVrefOnTimeCycles(const LCD_Regs *lcd)
Get the number of cycles set to enable voltage generation circuitry.
Definition: dl_lcd.h:2099
Definition: dl_lcd.h:793
Definition: dl_lcd.h:781
__STATIC_INLINE void DL_LCD_enableVREFInternal(LCD_Regs *lcd)
Enables internal reference voltage.
Definition: dl_lcd.h:1726
Definition: dl_lcd.h:955
__STATIC_INLINE void DL_LCD_disableInternalBias(LCD_Regs *lcd)
Disables internal bias voltage resistor divider.
Definition: dl_lcd.h:1857
__STATIC_INLINE void DL_LCD_setChargePumpFreq(LCD_Regs *lcd, DL_LCD_CHARGE_PUMP_FREQUENCY chargePumpFreq)
Set charge pump frequency.
Definition: dl_lcd.h:1642
__STATIC_INLINE void DL_LCD_disableExternalSync(LCD_Regs *lcd)
Disable external synchronization.
Definition: dl_lcd.h:1328
Definition: dl_lcd.h:843
DL_LCD_IIDX
Definition: dl_lcd.h:763
Definition: dl_lcd.h:686
Definition: dl_lcd.h:999
__STATIC_INLINE void DL_LCD_toggleMemory(LCD_Regs *lcd, DL_LCD_MEMORY memIndex, uint32_t mask)
Toggle bits in LCD memory index register.
Definition: dl_lcd.h:1963
DL_LCD_BLINKING_MEMORY
Definition: dl_lcd.h:907
Definition: dl_lcd.h:919
Definition: dl_lcd.h:987
Definition: dl_lcd.h:529
__STATIC_INLINE void DL_LCD_selectMemRegsForDisplay(LCD_Regs *lcd, DL_LCD_DISP dispSel)
Select LCD memory registers for display.
Definition: dl_lcd.h:1586
DL_LCD_BLINKING_MODE
Definition: dl_lcd.h:619
Definition: dl_lcd.h:841
__STATIC_INLINE void DL_LCD_setMuxRate(LCD_Regs *lcd, DL_LCD_MUX_RATE muxRate)
Set the LCD mux rate.
Definition: dl_lcd.h:1396
DL_LCD_WAVEFORM_POWERMODE
Definition: dl_lcd.h:591
Definition: dl_lcd.h:535
DL_LCD_VREF_INTERNAL
Definition: dl_lcd.h:668
Definition: dl_lcd.h:563
Definition: dl_lcd.h:672
__STATIC_INLINE DL_LCD_VREF_INTERNAL DL_LCD_getVREFInternal(const LCD_Regs *lcd)
Get the internal reference voltage.
Definition: dl_lcd.h:1690
__STATIC_INLINE DL_LCD_EVENT_LINE_MODE DL_LCD_getEventLineMode(const LCD_Regs *lcd)
Get the event line mode.
Definition: dl_lcd.h:1170
__STATIC_INLINE void DL_LCD_setVrefOnTimeCycles(LCD_Regs *lcd, DL_LCD_VREFGEN_CYCLES cycles)
Set number of cycles to enable voltage generation circuitry.
Definition: dl_lcd.h:2083
__STATIC_INLINE void DL_LCD_disableInterrupt(LCD_Regs *lcd, uint32_t interruptMask)
Disable LCD interrupts.
Definition: dl_lcd.h:1217
__STATIC_INLINE void DL_LCD_enableExternalSync(LCD_Regs *lcd)
Enable external synchronization.
Definition: dl_lcd.h:1318
Definition: dl_lcd.h:678
__STATIC_INLINE void DL_LCD_disableChargePump(LCD_Regs *lcd)
Disables charge pump.
Definition: dl_lcd.h:1715
Definition: dl_lcd.h:722
__STATIC_INLINE DL_LCD_MUX_RATE DL_LCD_getMuxRate(const LCD_Regs *lcd)
Get the LCD mux rate.
Definition: dl_lcd.h:1412
Definition: dl_lcd.h:957
Definition: dl_lcd.h:801
Definition: dl_lcd.h:947
__STATIC_INLINE void DL_LCD_disablePower(LCD_Regs *lcd)
Disables the Peripheral Write Enable (PWREN) register for the LCD.
Definition: dl_lcd.h:1103
Definition: dl_lcd.h:694
Definition: dl_lcd.h:903
__STATIC_INLINE void DL_LCD_disableVBOOST(LCD_Regs *lcd)
Disables VBOOST on LCD module.
Definition: dl_lcd.h:1628
Definition: dl_lcd.h:837
__STATIC_INLINE void DL_LCD_disable(LCD_Regs *lcd)
Disables the LCD module.
Definition: dl_lcd.h:1492
Definition: dl_lcd.h:789
DL_LCD_R33_SOURCE
Definition: dl_lcd.h:704
Definition: dl_lcd.h:891
__STATIC_INLINE DL_LCD_DISP DL_LCD_getSelectedMemRegsForDisplay(const LCD_Regs *lcd)
Get the LCD memory registers selected for display.
Definition: dl_lcd.h:1606
Definition: dl_lcd.h:531
__STATIC_INLINE DL_LCD_FREQ_DIVIDE DL_LCD_getFreqDiv(const LCD_Regs *lcd)
Get the LCD frequency divider.
Definition: dl_lcd.h:1377
Definition: dl_lcd.h:656
Definition: dl_lcd.h:827
Definition: dl_lcd.h:859
Definition: dl_lcd.h:652
Definition: dl_lcd.h:676
Definition: dl_lcd.h:883
Definition: dl_lcd.h:664
Configuration struct for DL_LCD_init.
Definition: dl_lcd.h:1009
Definition: dl_lcd.h:931
Definition: dl_lcd.h:821
Definition: dl_lcd.h:927
Definition: dl_lcd.h:724
Definition: dl_lcd.h:688
Definition: dl_lcd.h:593
Definition: dl_lcd.h:941
Definition: dl_lcd.h:965
Definition: dl_lcd.h:949
__STATIC_INLINE uint32_t DL_LCD_getEnabledInterruptStatus(const LCD_Regs *lcd, uint32_t interruptMask)
Check interrupt flag of enabled LCD interrupts.
Definition: dl_lcd.h:1279
__STATIC_INLINE void DL_LCD_turnSegmentsOff(LCD_Regs *lcd)
Turns LCD segments off.
Definition: dl_lcd.h:1437
Definition: dl_lcd.h:638
Definition: dl_lcd.h:911
__STATIC_INLINE void DL_LCD_setR33source(LCD_Regs *lcd, DL_LCD_R33_SOURCE r33Source)
Set source for R33.
Definition: dl_lcd.h:1749
DriverLib Common APIs.
Definition: dl_lcd.h:951
Definition: dl_lcd.h:575
DL_LCD_WAVEFORM_POWERMODE lowPowerWaveform
Definition: dl_lcd.h:1015
Definition: dl_lcd.h:961
Definition: dl_lcd.h:925
Definition: dl_lcd.h:783
Definition: dl_lcd.h:549
Definition: dl_lcd.h:791
Definition: dl_lcd.h:513
Definition: dl_lcd.h:825
Definition: dl_lcd.h:933
Definition: dl_lcd.h:869
__STATIC_INLINE void DL_LCD_writeBlinkingMemory(LCD_Regs *lcd, DL_LCD_BLINKING_MEMORY memIndex, uint32_t mask)
Write to bits in LCD blinking memory index register.
Definition: dl_lcd.h:2009
Definition: dl_lcd.h:871
Definition: dl_lcd.h:969
Definition: dl_lcd.h:767
Definition: dl_lcd.h:797
Definition: dl_lcd.h:658
__STATIC_INLINE DL_LCD_CHARGE_PUMP_FREQUENCY DL_LCD_getChargePumpFreq(const LCD_Regs *lcd)
Get the charge pump frequency.
Definition: dl_lcd.h:1658
Definition: dl_lcd.h:621
Definition: dl_lcd.h:867
Definition: dl_lcd.h:634
Definition: dl_lcd.h:803
Definition: dl_lcd.h:527
Definition: dl_lcd.h:877
Definition: dl_lcd.h:557
Definition: dl_lcd.h:909
Definition: dl_lcd.h:807
__STATIC_INLINE void DL_LCD_clearAllBlinkingMemoryRegs(LCD_Regs *lcd)
Clear LCD blinking memory.
Definition: dl_lcd.h:1555
Definition: dl_lcd.h:983
__STATIC_INLINE void DL_LCD_clearBlinkingMemory(LCD_Regs *lcd, DL_LCD_BLINKING_MEMORY memIndex, uint32_t mask)
Clear bits in LCD blinking memory index register.
Definition: dl_lcd.h:2054
Definition: dl_lcd.h:777
DL_LCD_BIAS_VOLTAGE_SOURCE
Definition: dl_lcd.h:720
DL_LCD_MEMORY
Definition: dl_lcd.h:775
void DL_LCD_setPinAsSegment(LCD_Regs *lcd, uint8_t pin)
Enable an LCD function pin as Segment.
Definition: dl_lcd.h:897
Definition: dl_lcd.h:716
Definition: dl_lcd.h:644
Definition: dl_lcd.h:849
__STATIC_INLINE DL_LCD_R33_SOURCE DL_LCD_getR33Source(const LCD_Regs *lcd)
Get the source for R33.
Definition: dl_lcd.h:1765
Definition: dl_lcd.h:831
void DL_LCD_setPinAsCommon(LCD_Regs *lcd, uint8_t pin, uint32_t com)
Enable an LCD function pin as COM.
Definition: dl_lcd.h:603
__STATIC_INLINE void DL_LCD_setMemory(LCD_Regs *lcd, DL_LCD_MEMORY memIndex, uint32_t mask)
Set bits in LCD memory index register.
Definition: dl_lcd.h:1948
Definition: dl_lcd.h:1001
Definition: dl_lcd.h:779
Definition: dl_lcd.h:785
Definition: dl_lcd.h:979
Definition: dl_lcd.h:989
Definition: dl_lcd.h:985
Definition: dl_lcd.h:615
Definition: dl_lcd.h:901
Definition: dl_lcd.h:648
Definition: dl_lcd.h:887
__STATIC_INLINE uint32_t DL_LCD_getRawInterruptStatus(const LCD_Regs *lcd, uint32_t interruptMask)
Check interrupt flag of any LCD interrupt.
Definition: dl_lcd.h:1256
Definition: dl_lcd.h:579
Definition: dl_lcd.h:573
Definition: dl_lcd.h:967
__STATIC_INLINE void DL_LCD_clearInterruptStatus(LCD_Regs *lcd, uint32_t interruptMask)
Clear pending LCD interrupts.
Definition: dl_lcd.h:1307
Definition: dl_lcd.h:771
__STATIC_INLINE void DL_LCD_disableVREFInternal(LCD_Regs *lcd)
Disables internal reference voltage.
Definition: dl_lcd.h:1736
__STATIC_INLINE DL_LCD_POWER_MODE DL_LCD_getPowerMode(const LCD_Regs *lcd)
Get power mode.
Definition: dl_lcd.h:1798
__STATIC_INLINE void DL_LCD_setInterrupts(LCD_Regs *lcd, uint32_t interruptMask)
Set LCD interrupts.
Definition: dl_lcd.h:1293
__STATIC_INLINE void DL_LCD_enableVBOOST(LCD_Regs *lcd)
Enables VBOOST on LCD module.
Definition: dl_lcd.h:1618
DL_LCD_BLINKING_DIVIDE
Definition: dl_lcd.h:599
Definition: dl_lcd.h:587
Definition: dl_lcd.h:939
Definition: dl_lcd.h:893
Definition: dl_lcd.h:515
Definition: dl_lcd.h:650
__STATIC_INLINE void DL_LCD_setRefMode(LCD_Regs *lcd, DL_LCD_REFERENCE_MODE refMode)
Set reference mode for R13 voltage.
Definition: dl_lcd.h:1901
Definition: dl_lcd.h:517
DL_LCD_DISP
Definition: dl_lcd.h:744
Definition: dl_lcd.h:698
Definition: dl_lcd.h:696
Definition: dl_lcd.h:567
Definition: dl_lcd.h:555
DL_LCD_CHARGE_PUMP_FREQUENCY
Definition: dl_lcd.h:632
Definition: dl_lcd.h:547
Definition: dl_lcd.h:839
DL_LCD_COM
Definition: dl_lcd.h:975
Definition: dl_lcd.h:1003
Definition: dl_lcd.h:923
__STATIC_INLINE uint32_t DL_LCD_getEnabledInterrupts(const LCD_Regs *lcd, uint32_t interruptMask)
Check which LCD interrupts are enabled.
Definition: dl_lcd.h:1235
__STATIC_INLINE void DL_LCD_turnSegmentsOn(LCD_Regs *lcd)
Turns LCD segments on.
Definition: dl_lcd.h:1424
Definition: dl_lcd.h:732
Definition: dl_lcd.h:692
Definition: dl_lcd.h:670
__STATIC_INLINE void DL_LCD_setBlinkingControl(LCD_Regs *lcd, DL_LCD_BLINKING_DIVIDE blinkFreqDiv, DL_LCD_BLINKING_MODE blinkMode)
Set the blinking frequency divider and blinking mode.
Definition: dl_lcd.h:1506
__STATIC_INLINE void DL_LCD_setFreqDiv(LCD_Regs *lcd, DL_LCD_FREQ_DIVIDE fDiv)
Set the LCD frequency divider.
Definition: dl_lcd.h:1361
Definition: dl_lcd.h:769
Definition: dl_lcd.h:505
Definition: dl_lcd.h:847
Definition: dl_lcd.h:559
Definition: dl_lcd.h:935
Definition: dl_lcd.h:553
Definition: dl_lcd.h:879
void DL_LCD_setPinAsPortFunction(LCD_Regs *lcd, uint8_t pin)
Enable a pin as port function.
Definition: dl_lcd.h:700
Definition: dl_lcd.h:929
Definition: dl_lcd.h:607
Definition: dl_lcd.h:945
Definition: dl_lcd.h:997
DL_LCD_MUX_RATE
Definition: dl_lcd.h:571
Definition: dl_lcd.h:815
Definition: dl_lcd.h:511
Definition: dl_lcd.h:865
Definition: dl_lcd.h:543
DL_LCD_FREQ_DIVIDE frequencyDivider
Definition: dl_lcd.h:1011
Definition: dl_lcd.h:953
__STATIC_INLINE void DL_LCD_clearMemory(LCD_Regs *lcd, DL_LCD_MEMORY memIndex, uint32_t mask)
Clear bits in LCD memory index register.
Definition: dl_lcd.h:1978
__STATIC_INLINE void DL_LCD_setWaveformPowerMode(LCD_Regs *lcd, DL_LCD_WAVEFORM_POWERMODE waveformPowerMode)
Set the waveform power mode.
Definition: dl_lcd.h:1453
Definition: dl_lcd.h:660
__STATIC_INLINE void DL_LCD_writeMemory(LCD_Regs *lcd, DL_LCD_MEMORY memIndex, uint32_t mask)
Write to bits in LCD memory index register.
Definition: dl_lcd.h:1933
__STATIC_INLINE uint32_t DL_LCD_getBlinkingMemory(const LCD_Regs *lcd, DL_LCD_BLINKING_MEMORY memIndex)
Get bits in LCD blinking memory index register.
Definition: dl_lcd.h:2070
__STATIC_INLINE bool DL_LCD_isExternalSyncEnabled(const LCD_Regs *lcd)
Checks if external synchronization is enabled.
Definition: dl_lcd.h:1343
Definition: dl_lcd.h:539
__STATIC_INLINE DL_LCD_BLINKING_MODE DL_LCD_getBlinkingMode(const LCD_Regs *lcd)
Get the blinking mode.
Definition: dl_lcd.h:1540
Definition: dl_lcd.h:855
Definition: dl_lcd.h:581
Definition: dl_lcd.h:609
Definition: dl_lcd.h:551
Definition: dl_lcd.h:981
Definition: dl_lcd.h:959
Definition: dl_lcd.h:708
DL_LCD_MUX_RATE muxRate
Definition: dl_lcd.h:1013
__STATIC_INLINE DL_LCD_WAVEFORM_POWERMODE DL_LCD_getWaveformPowerMode(const LCD_Regs *lcd)
Get the waveform power mode.
Definition: dl_lcd.h:1469
__STATIC_INLINE DL_LCD_IIDX DL_LCD_getPendingInterrupt(const LCD_Regs *lcd)
Gets the highest priority pending interrupt.
Definition: dl_lcd.h:1190
__STATIC_INLINE void DL_LCD_toggleBlinkingMemory(LCD_Regs *lcd, DL_LCD_BLINKING_MEMORY memIndex, uint32_t mask)
Toggle bits in LCD blinking memory index register.
Definition: dl_lcd.h:2039
Definition: dl_lcd.h:642
Definition: dl_lcd.h:519
Definition: dl_lcd.h:714
Definition: dl_lcd.h:805
Definition: dl_lcd.h:662
void DL_LCD_setPinAsLCDFunction(LCD_Regs *lcd, uint32_t pin)
Enable a pin as LCD function.
Definition: dl_lcd.h:565
Definition: dl_lcd.h:881
__STATIC_INLINE void DL_LCD_enable(LCD_Regs *lcd)
Enables the LCD module.
Definition: dl_lcd.h:1482
Definition: dl_lcd.h:823
Definition: dl_lcd.h:899
Definition: dl_lcd.h:684
Definition: dl_lcd.h:525
DL_LCD_REFERENCE_MODE
Definition: dl_lcd.h:736
Definition: dl_lcd.h:577
Definition: dl_lcd.h:601
Definition: dl_lcd.h:636
Definition: dl_lcd.h:682
Definition: dl_lcd.h:507
Definition: dl_lcd.h:765
Definition: dl_lcd.h:809
DL_LCD_BIAS
Definition: dl_lcd.h:728
Definition: dl_lcd.h:755
__STATIC_INLINE DL_LCD_BLINKING_DIVIDE DL_LCD_getBlinkingFreqDiv(const LCD_Regs *lcd)
Get the blinking frequency divider.
Definition: dl_lcd.h:1524
Definition: dl_lcd.h:787
__STATIC_INLINE void DL_LCD_clearAllMemoryRegs(LCD_Regs *lcd)
Clear LCD memory.
Definition: dl_lcd.h:1569
Definition: dl_lcd.h:977
Definition: dl_lcd.h:971
void DL_LCD_init(LCD_Regs *lcd, const DL_LCD_Config *config)
Initialize the LCD peripheral.
Definition: dl_lcd.h:817
Definition: dl_lcd.h:537
Definition: dl_lcd.h:523
Definition: dl_lcd.h:680
__STATIC_INLINE void DL_LCD_setBiasVoltageSource(LCD_Regs *lcd, DL_LCD_BIAS_VOLTAGE_SOURCE biasVoltageSource)
Set bias voltage source.
Definition: dl_lcd.h:1816
Definition: dl_lcd.h:640
__STATIC_INLINE DL_LCD_BIAS_VOLTAGE_SOURCE DL_LCD_getBiasVoltageSource(const LCD_Regs *lcd)
Get bias voltage source.
Definition: dl_lcd.h:1832
Definition: dl_lcd.h:895
Definition: dl_lcd.h:611
DL_LCD_VREFGEN_CYCLES
Definition: dl_lcd.h:995
Definition: dl_lcd.h:875
Definition: dl_lcd.h:759
Definition: dl_lcd.h:851
DL_LCD_EVENT_LINE_MODE
Definition: dl_lcd.h:753
Definition: dl_lcd.h:889
Definition: dl_lcd.h:845
Definition: dl_lcd.h:690
Definition: dl_lcd.h:509
Definition: dl_lcd.h:674
Definition: dl_lcd.h:730
Definition: dl_lcd.h:833
Definition: dl_lcd.h:626
__STATIC_INLINE uint32_t DL_LCD_getMemory(const LCD_Regs *lcd, DL_LCD_MEMORY memIndex)
Get bits in LCD memory index register.
Definition: dl_lcd.h:1994
Definition: dl_lcd.h:853
__STATIC_INLINE void DL_LCD_enableInterrupt(LCD_Regs *lcd, uint32_t interruptMask)
Enable LCD interrupts.
Definition: dl_lcd.h:1203
__STATIC_INLINE void DL_LCD_setInternalBiasPowerMode(LCD_Regs *lcd, DL_LCD_POWER_MODE powerMode)
Select internal bias power mode.
Definition: dl_lcd.h:1782
Definition: dl_lcd.h:913
Definition: dl_lcd.h:799
Definition: dl_lcd.h:521
__STATIC_INLINE DL_LCD_BIAS DL_LCD_getBias(const LCD_Regs *lcd)
Get bias for LCD.
Definition: dl_lcd.h:1887
Definition: dl_lcd.h:937
Definition: dl_lcd.h:541
__STATIC_INLINE void DL_LCD_enablePower(LCD_Regs *lcd)
Enables the Peripheral Write Enable (PWREN) register for the LCD.
Definition: dl_lcd.h:1087
Definition: dl_lcd.h:757
Definition: dl_lcd.h:583
Definition: dl_lcd.h:991
Definition: dl_lcd.h:654
Definition: dl_lcd.h:585
Definition: dl_lcd.h:863
Definition: dl_lcd.h:819
__STATIC_INLINE bool DL_LCD_isReset(const LCD_Regs *lcd)
Checks if LCD peripheral was reset.
Definition: dl_lcd.h:1155
__STATIC_INLINE void DL_LCD_reset(LCD_Regs *lcd)
Resets LCD peripheral.
Definition: dl_lcd.h:1138
© Copyright 1995-2025, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale