1 /***************************************************************************//**
2 * @file
3 * @brief Liquid Crystal Display (LCD) peripheral API
4 * @author Energy Micro AS
5 * @version 3.0.0
6 *******************************************************************************
7 * @section License
8 * <b>(C) Copyright 2012 Energy Micro AS, http://www.energymicro.com</b>
9 *******************************************************************************
10 *
11 * Permission is granted to anyone to use this software for any purpose,
12 * including commercial applications, and to alter it and redistribute it
13 * freely, subject to the following restrictions:
14 *
15 * 1. The origin of this software must not be misrepresented; you must not
16 * claim that you wrote the original software.
17 * 2. Altered source versions must be plainly marked as such, and must not be
18 * misrepresented as being the original software.
19 * 3. This notice may not be removed or altered from any source distribution.
20 *
21 * DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Energy Micro AS has no
22 * obligation to support this Software. Energy Micro AS is providing the
23 * Software "AS IS", with no express or implied warranties of any kind,
24 * including, but not limited to, any implied warranties of merchantability
25 * or fitness for any particular purpose or warranties against infringement
26 * of any proprietary rights of a third party.
27 *
28 * Energy Micro AS will not be liable for any consequential, incidental, or
29 * special damages, or any other relief, or for any claim by any third party,
30 * arising from your use of this Software.
31 *
32 ******************************************************************************/
33 #ifndef __EM_LCD_H
34 #define __EM_LCD_H
35
36 #include "em_part.h"
37
38 #if defined(LCD_COUNT) && (LCD_COUNT > 0)
39 #include <stdint.h>
40 #include <stdbool.h>
41
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45
46 /***************************************************************************//**
47 * @addtogroup EM_Library
48 * @{
49 ******************************************************************************/
50
51 /***************************************************************************//**
52 * @addtogroup LCD
53 * @{
54 ******************************************************************************/
55
56 /*******************************************************************************
57 ******************************** ENUMS ************************************
58 ******************************************************************************/
59
60 /** MUX setting */
61 typedef enum
62 {
63 /** Static (segments can be multiplexed with LCD_COM[0]) */
64 lcdMuxStatic = LCD_DISPCTRL_MUX_STATIC,
65 /** Duplex / 1/2 Duty cycle (segments can be multiplexed with LCD_COM[0:1]) */
66 lcdMuxDuplex = LCD_DISPCTRL_MUX_DUPLEX,
67 /** Triplex / 1/3 Duty cycle (segments can be multiplexed with LCD_COM[0:2]) */
68 lcdMuxTriplex = LCD_DISPCTRL_MUX_TRIPLEX,
69 /** Quadruplex / 1/4 Duty cycle (segments can be multiplexed with LCD_COM[0:3]) */
70 lcdMuxQuadruplex = LCD_DISPCTRL_MUX_QUADRUPLEX,
71 #if defined(_EFM32_TINY_FAMILY) || defined(_EFM32_GIANT_FAMILY)
72 /** Sextaplex / 1/6 Duty cycle (segments can be multiplexed with LCD_COM[0:5]) */
73 lcdMuxSextaplex = LCD_DISPCTRL_MUXE_MUXE | LCD_DISPCTRL_MUX_DUPLEX,
74 /** Octaplex / 1/6 Duty cycle (segments can be multiplexed with LCD_COM[0:5]) */
75 lcdMuxOctaplex = LCD_DISPCTRL_MUXE_MUXE | LCD_DISPCTRL_MUX_QUADRUPLEX
76 #endif
77 } LCD_Mux_TypeDef;
78
79 /** Bias setting */
80 typedef enum
81 {
82 /** Static (2 levels) */
83 lcdBiasStatic = LCD_DISPCTRL_BIAS_STATIC,
84 /** 1/2 Bias (3 levels) */
85 lcdBiasOneHalf = LCD_DISPCTRL_BIAS_ONEHALF,
86 /** 1/3 Bias (4 levels) */
87 lcdBiasOneThird = LCD_DISPCTRL_BIAS_ONETHIRD,
88 #if defined(_EFM32_TINY_FAMILY) || defined(_EFM32_GIANT_FAMILY)
89 /** 1/4 Bias (5 levels) */
90 lcdBiasOneFourth = LCD_DISPCTRL_BIAS_ONEFOURTH,
91 #endif
92 } LCD_Bias_TypeDef;
93
94 /** Wave type */
95 typedef enum
96 {
97 /** Low power optimized waveform output */
98 lcdWaveLowPower = LCD_DISPCTRL_WAVE_LOWPOWER,
99 /** Regular waveform output */
100 lcdWaveNormal = LCD_DISPCTRL_WAVE_NORMAL
101 } LCD_Wave_TypeDef;
102
103 /** VLCD Voltage Source */
104 typedef enum
105 {
106 /** VLCD Powered by VDD */
107 lcdVLCDSelVDD = LCD_DISPCTRL_VLCDSEL_VDD,
108 /** VLCD Powered by external VDD / Voltage Boost */
109 lcdVLCDSelVExtBoost = LCD_DISPCTRL_VLCDSEL_VEXTBOOST
110 } LCD_VLCDSel_TypeDef;
111
112 /** Contrast Configuration */
113 typedef enum
114 {
115 /** Contrast is adjusted relative to VDD (VLCD) */
116 lcdConConfVLCD = LCD_DISPCTRL_CONCONF_VLCD,
117 /** Contrast is adjusted relative to Ground */
118 lcdConConfGND = LCD_DISPCTRL_CONCONF_GND
119 } LCD_ConConf_TypeDef;
120
121 /** Voltage Boost Level - Datasheets document setting for each part number */
122 typedef enum
123 {
124 lcdVBoostLevel0 = LCD_DISPCTRL_VBLEV_LEVEL0, /**< Voltage boost LEVEL0 */
125 lcdVBoostLevel1 = LCD_DISPCTRL_VBLEV_LEVEL1, /**< Voltage boost LEVEL1 */
126 lcdVBoostLevel2 = LCD_DISPCTRL_VBLEV_LEVEL2, /**< Voltage boost LEVEL2 */
127 lcdVBoostLevel3 = LCD_DISPCTRL_VBLEV_LEVEL3, /**< Voltage boost LEVEL3 */
128 lcdVBoostLevel4 = LCD_DISPCTRL_VBLEV_LEVEL4, /**< Voltage boost LEVEL4 */
129 lcdVBoostLevel5 = LCD_DISPCTRL_VBLEV_LEVEL5, /**< Voltage boost LEVEL5 */
130 lcdVBoostLevel6 = LCD_DISPCTRL_VBLEV_LEVEL6, /**< Voltage boost LEVEL6 */
131 lcdVBoostLevel7 = LCD_DISPCTRL_VBLEV_LEVEL7 /**< Voltage boost LEVEL7 */
132 } LCD_VBoostLevel_TypeDef;
133
134 /** Frame Counter Clock Prescaler, FC-CLK = FrameRate (Hz) / this factor */
135 typedef enum
136 {
137 /** Prescale Div 1 */
138 lcdFCPrescDiv1 = LCD_BACTRL_FCPRESC_DIV1,
139 /** Prescale Div 2 */
140 lcdFCPrescDiv2 = LCD_BACTRL_FCPRESC_DIV2,
141 /** Prescale Div 4 */
142 lcdFCPrescDiv4 = LCD_BACTRL_FCPRESC_DIV4,
143 /** Prescale Div 8 */
144 lcdFCPrescDiv8 = LCD_BACTRL_FCPRESC_DIV8
145 } LCD_FCPreScale_TypeDef;
146
147 /** Segment selection */
148 typedef enum
149 {
150 /** Select segment lines 0 to 3 */
151 lcdSegment0_3 = (1 << 0),
152 /** Select segment lines 4 to 7 */
153 lcdSegment4_7 = (1 << 1),
154 /** Select segment lines 8 to 11 */
155 lcdSegment8_11 = (1 << 2),
156 /** Select segment lines 12 to 15 */
157 lcdSegment12_15 = (1 << 3),
158 /** Select segment lines 16 to 19 */
159 lcdSegment16_19 = (1 << 4),
160 /** Select segment lines 20 to 23 */
161 lcdSegment20_23 = (1 << 5),
162 #if defined(_EFM32_TINY_FAMILY)
163 /** Select all segment lines */
164 lcdSegmentAll = (0x003f)
165 #endif
166 #if defined(_EFM32_GECKO_FAMILY) || defined(_EFM32_GIANT_FAMILY)
167 /** Select segment lines 24 to 27 */
168 lcdSegment24_27 = (1 << 6),
169 /** Select segment lines 28 to 31 */
170 lcdSegment28_31 = (1 << 7),
171 /** Select segment lines 32 to 35 */
172 lcdSegment32_35 = (1 << 8),
173 /** Select segment lines 36 to 39 */
174 lcdSegment36_39 = (1 << 9),
175 /** Select all segment lines */
176 lcdSegmentAll = (0x03ff)
177 #endif
178 } LCD_SegmentRange_TypeDef;
179
180 /** Update Data Control */
181 typedef enum
182 {
183 /** Regular update, data transfer done immediately */
184 lcdUpdateCtrlRegular = LCD_CTRL_UDCTRL_REGULAR,
185 /** Data transfer done at Frame Counter event */
186 lcdUpdateCtrlFCEvent = LCD_CTRL_UDCTRL_FCEVENT,
187 /** Data transfer done at Frame Start */
188 lcdUpdateCtrlFrameStart = LCD_CTRL_UDCTRL_FRAMESTART
189 } LCD_UpdateCtrl_TypeDef;
190
191 /** Animation Shift operation; none, left or right */
192 typedef enum
193 {
194 /** No shift */
195 lcdAnimShiftNone = _LCD_BACTRL_AREGASC_NOSHIFT,
196 /** Shift segment bits left */
197 lcdAnimShiftLeft = _LCD_BACTRL_AREGASC_SHIFTLEFT,
198 /** Shift segment bits right */
199 lcdAnimShiftRight = _LCD_BACTRL_AREGASC_SHIFTRIGHT
200 } LCD_AnimShift_TypeDef;
201
202 /** Animation Logic Control, how AReg and BReg should be combined */
203 typedef enum
204 {
205 /** Use bitwise logic AND to mix animation register A (AREGA) and B (AREGB) */
206 lcdAnimLogicAnd = LCD_BACTRL_ALOGSEL_AND,
207 /** Use bitwise logic OR to mix animation register A (AREGA) and B (AREGB) */
208 lcdAnimLogicOr = LCD_BACTRL_ALOGSEL_OR
209 } LCD_AnimLogic_TypeDef;
210
211
212 /*******************************************************************************
213 ******************************* STRUCTS ***********************************
214 ******************************************************************************/
215
216 /** LCD Animation Configuration */
217 typedef struct
218 {
219 /** Enable Animation at end of initialization */
220 bool enable;
221 /** Initial Animation Register A Value */
222 uint32_t AReg;
223 /** Shift operation of Animation Register A */
224 LCD_AnimShift_TypeDef AShift;
225 /** Initial Animation Register B Value */
226 uint32_t BReg;
227 /** Shift operation of Animation Register B */
228 LCD_AnimShift_TypeDef BShift;
229 /** A and B Logical Operation to use for mixing and outputting resulting segments */
230 LCD_AnimLogic_TypeDef animLogic;
231 #if defined(_EFM32_GIANT_FAMILY)
232 /** Number of first segment to animate. Options are 0 or 8 for Giant/Leopard. End is startSeg+7 */
233 int startSeg;
234 #endif
235 } LCD_AnimInit_TypeDef;
236
237 /** LCD Frame Control Initialization */
238 typedef struct
239 {
240 /** Enable at end */
241 bool enable;
242 /** Frame Counter top value */
243 uint32_t top;
244 /** Frame Counter clock prescaler */
245 LCD_FCPreScale_TypeDef prescale;
246 } LCD_FrameCountInit_TypeDef;
247
248 /** LCD Controller Initialization structure */
249 typedef struct
250 {
251 /** Enable controller at end of initialization */
252 bool enable;
253 /** Mux configuration */
254 LCD_Mux_TypeDef mux;
255 /** Bias configuration */
256 LCD_Bias_TypeDef bias;
257 /** Wave configuration */
258 LCD_Wave_TypeDef wave;
259 /** VLCD Select */
260 LCD_VLCDSel_TypeDef vlcd;
261 /** Contrast Configuration */
262 LCD_ConConf_TypeDef contrast;
263 } LCD_Init_TypeDef;
264
265 /** Default config for LCD init structure, enables 160 segments */
266 #define LCD_INIT_DEFAULT \
267 { true, \
268 lcdMuxQuadruplex, \
269 lcdBiasOneThird, \
270 lcdWaveLowPower, \
271 lcdVLCDSelVDD, \
272 lcdConConfVLCD \
273 }
274
275 /*******************************************************************************
276 ***************************** PROTOTYPES **********************************
277 ******************************************************************************/
278
279 void LCD_Init(const LCD_Init_TypeDef *lcdInit);
280 void LCD_VLCDSelect(LCD_VLCDSel_TypeDef vlcd);
281 void LCD_UpdateCtrl(LCD_UpdateCtrl_TypeDef ud);
282 void LCD_FrameCountInit(const LCD_FrameCountInit_TypeDef *fcInit);
283 void LCD_AnimInit(const LCD_AnimInit_TypeDef *animInit);
284
285 void LCD_SegmentRangeEnable(LCD_SegmentRange_TypeDef segment, bool enable);
286 void LCD_SegmentSet(int com, int bit, bool enable);
287 void LCD_SegmentSetLow(int com, uint32_t mask, uint32_t bits);
288 #if defined(_EFM32_GECKO_FAMILY) || defined(_EFM32_GIANT_FAMILY)
289 void LCD_SegmentSetHigh(int com, uint32_t mask, uint32_t bits);
290 #endif
291 void LCD_ContrastSet(int level);
292 void LCD_VBoostSet(LCD_VBoostLevel_TypeDef vboost);
293
294 #if defined(_EFM32_TINY_FAMILY) || defined(_EFM32_GIANT_FAMILY)
295 void LCD_BiasSegmentSet(int segment, int biasLevel);
296 void LCD_BiasComSet(int com, int biasLevel);
297 #endif
298
299 __STATIC_INLINE void LCD_Enable(bool enable);
300 __STATIC_INLINE void LCD_AnimEnable(bool enable);
301 __STATIC_INLINE void LCD_BlinkEnable(bool enable);
302 __STATIC_INLINE void LCD_BlankEnable(bool enable);
303 __STATIC_INLINE void LCD_FrameCountEnable(bool enable);
304 __STATIC_INLINE int LCD_AnimState(void);
305 __STATIC_INLINE int LCD_BlinkState(void);
306 __STATIC_INLINE void LCD_FreezeEnable(bool enable);
307 __STATIC_INLINE uint32_t LCD_SyncBusyGet(void);
308 __STATIC_INLINE void LCD_SyncBusyDelay(uint32_t flags);
309 __STATIC_INLINE uint32_t LCD_IntGet(void);
310 __STATIC_INLINE uint32_t LCD_IntGetEnabled(void);
311 __STATIC_INLINE void LCD_IntSet(uint32_t flags);
312 __STATIC_INLINE void LCD_IntEnable(uint32_t flags);
313 __STATIC_INLINE void LCD_IntDisable(uint32_t flags);
314 __STATIC_INLINE void LCD_IntClear(uint32_t flags);
315 #if defined(_EFM32_TINY_FAMILY) || defined(_EFM32_GIANT_FAMILY)
316 __STATIC_INLINE void LCD_DSCEnable(bool enable);
317 #endif
318
319 /***************************************************************************//**
320 * @brief
321 * Enable or disable LCD controller
322 *
323 * @param[in] enable
324 * If true, enables LCD controller with current configuration, if false
325 * disables LCD controller. CMU clock for LCD must be enabled for correct
326 * operation.
327 ******************************************************************************/
LCD_Enable(bool enable)328 __STATIC_INLINE void LCD_Enable(bool enable)
329 {
330 if (enable)
331 {
332 LCD->CTRL |= LCD_CTRL_EN;
333 }
334 else
335 {
336 LCD->CTRL &= ~(LCD_CTRL_EN);
337 }
338 }
339
340
341 /***************************************************************************//**
342 * @brief
343 * Enables or disables LCD Animation feature
344 *
345 * @param[in] enable
346 * Boolean true enables animation, false disables animation
347 ******************************************************************************/
LCD_AnimEnable(bool enable)348 __STATIC_INLINE void LCD_AnimEnable(bool enable)
349 {
350 if (enable)
351 {
352 LCD->BACTRL |= LCD_BACTRL_AEN;
353 }
354 else
355 {
356 LCD->BACTRL &= ~(LCD_BACTRL_AEN);
357 }
358 }
359
360
361 /***************************************************************************//**
362 * @brief
363 * Enables or disables LCD blink
364 *
365 * @param[in] enable
366 * Boolean true enables blink, false disables blink
367 ******************************************************************************/
LCD_BlinkEnable(bool enable)368 __STATIC_INLINE void LCD_BlinkEnable(bool enable)
369 {
370 if (enable)
371 {
372 LCD->BACTRL |= LCD_BACTRL_BLINKEN;
373 }
374 else
375 {
376 LCD->BACTRL &= ~(LCD_BACTRL_BLINKEN);
377 }
378 }
379
380
381 /***************************************************************************//**
382 * @brief
383 * Disables all segments, while keeping segment state
384 *
385 * @param[in] enable
386 * Boolean true clears all segments, boolean false restores all segment lines
387 ******************************************************************************/
LCD_BlankEnable(bool enable)388 __STATIC_INLINE void LCD_BlankEnable(bool enable)
389 {
390 if (enable)
391 {
392 LCD->BACTRL |= LCD_BACTRL_BLANK;
393 }
394 else
395 {
396 LCD->BACTRL &= ~(LCD_BACTRL_BLANK);
397 }
398 }
399
400
401 /***************************************************************************//**
402 * @brief
403 * Enables or disables LCD Frame Control
404 *
405 * @param[in] enable
406 * Boolean true enables frame counter, false disables frame counter
407 ******************************************************************************/
LCD_FrameCountEnable(bool enable)408 __STATIC_INLINE void LCD_FrameCountEnable(bool enable)
409 {
410 if (enable)
411 {
412 LCD->BACTRL |= LCD_BACTRL_FCEN;
413 }
414 else
415 {
416 LCD->BACTRL &= ~(LCD_BACTRL_FCEN);
417 }
418 }
419
420
421 /***************************************************************************//**
422 * @brief
423 * Returns current animation state
424 *
425 * @return
426 * Animation state, in range 0-15
427 ******************************************************************************/
LCD_AnimState(void)428 __STATIC_INLINE int LCD_AnimState(void)
429 {
430 return (int)(LCD->STATUS & _LCD_STATUS_ASTATE_MASK) >> _LCD_STATUS_ASTATE_SHIFT;
431 }
432
433
434 /***************************************************************************//**
435 * @brief
436 * Returns current blink state
437 *
438 * @return
439 * Return value is 1 if segments are enabled, 0 if disabled
440 ******************************************************************************/
LCD_BlinkState(void)441 __STATIC_INLINE int LCD_BlinkState(void)
442 {
443 return (int)(LCD->STATUS & _LCD_STATUS_BLINK_MASK) >> _LCD_STATUS_BLINK_SHIFT;
444 }
445
446
447 /***************************************************************************//**
448 * @brief
449 * When set, LCD registers will not be updated until cleared,
450 *
451 * @param[in] enable
452 * When enable is true, update is stopped, when false all registers are
453 * updated
454 ******************************************************************************/
LCD_FreezeEnable(bool enable)455 __STATIC_INLINE void LCD_FreezeEnable(bool enable)
456 {
457 if (enable)
458 {
459 LCD->FREEZE = LCD_FREEZE_REGFREEZE_FREEZE;
460 }
461 else
462 {
463 LCD->FREEZE = LCD_FREEZE_REGFREEZE_UPDATE;
464 }
465 }
466
467
468 /***************************************************************************//**
469 * @brief
470 * Returns SYNCBUSY bits, indicating which registers have pending updates
471 *
472 * @return
473 * Bit fields for LCD registers which have pending updates
474 ******************************************************************************/
LCD_SyncBusyGet(void)475 __STATIC_INLINE uint32_t LCD_SyncBusyGet(void)
476 {
477 return(LCD->SYNCBUSY);
478 }
479
480
481 /***************************************************************************//**
482 * @brief
483 * Polls LCD SYNCBUSY flags, until flag has been cleared
484 *
485 * @param[in] flags
486 * Bit fields for LCD registers that shall be updated before we continue
487 ******************************************************************************/
LCD_SyncBusyDelay(uint32_t flags)488 __STATIC_INLINE void LCD_SyncBusyDelay(uint32_t flags)
489 {
490 while (LCD->SYNCBUSY & flags)
491 ;
492 }
493
494
495 /***************************************************************************//**
496 * @brief
497 * Get pending LCD interrupt flags
498 *
499 * @return
500 * Pending LCD interrupt sources. Returns a set of interrupt flags OR-ed
501 * together for multiple interrupt sources in the LCD module (LCD_IFS_nnn).
502 ******************************************************************************/
LCD_IntGet(void)503 __STATIC_INLINE uint32_t LCD_IntGet(void)
504 {
505 return(LCD->IF);
506 }
507
508
509 /***************************************************************************//**
510 * @brief
511 * Get enabled and pending LCD interrupt flags.
512 *
513 * @details
514 * Useful for handling more interrupt sources in the same interrupt handler.
515 *
516 * @note
517 * The event bits are not cleared by the use of this function.
518 *
519 * @return
520 * Pending and enabled LCD interrupt sources.
521 * The return value is the bitwise AND combination of
522 * - the OR combination of enabled interrupt sources in LCD_IEN_nnn
523 * register (LCD_IEN_nnn) and
524 * - the bitwise OR combination of valid interrupt flags of the LCD module
525 * (LCD_IF_nnn).
526 ******************************************************************************/
LCD_IntGetEnabled(void)527 __STATIC_INLINE uint32_t LCD_IntGetEnabled(void)
528 {
529 uint32_t tmp = 0U;
530
531 /* Store LCD->IEN in temporary variable in order to define explicit order
532 * of volatile accesses. */
533 tmp = LCD->IEN;
534
535 /* Bitwise AND of pending and enabled interrupts */
536 return LCD->IF & tmp;
537 }
538
539
540 /***************************************************************************//**
541 * @brief
542 * Set one or more pending LCD interrupts from SW.
543 *
544 * @param[in] flags
545 * LCD interrupt sources to set to pending. Use a set of interrupt flags
546 * OR-ed together to set multiple interrupt sources for the LCD module
547 * (LCD_IFS_nnn).
548 ******************************************************************************/
LCD_IntSet(uint32_t flags)549 __STATIC_INLINE void LCD_IntSet(uint32_t flags)
550 {
551 LCD->IFS = flags;
552 }
553
554
555 /***************************************************************************//**
556 * @brief
557 * Enable LCD interrupts
558 *
559 * @param[in] flags
560 * LCD interrupt sources to enable. Use a set of interrupt flags OR-ed
561 * together to set multiple interrupt sources for the LCD module
562 * (LCD_IFS_nnn).
563 ******************************************************************************/
LCD_IntEnable(uint32_t flags)564 __STATIC_INLINE void LCD_IntEnable(uint32_t flags)
565 {
566 LCD->IEN |= flags;
567 }
568
569
570 /***************************************************************************//**
571 * @brief
572 * Disable LCD interrupts
573 *
574 * @param[in] flags
575 * LCD interrupt sources to disable. Use a set of interrupt flags OR-ed
576 * together to disable multiple interrupt sources for the LCD module
577 * (LCD_IFS_nnn).
578 ******************************************************************************/
LCD_IntDisable(uint32_t flags)579 __STATIC_INLINE void LCD_IntDisable(uint32_t flags)
580 {
581 LCD->IEN &= ~(flags);
582 }
583
584
585 /***************************************************************************//**
586 * @brief
587 * Clear one or more interrupt flags
588 *
589 * @param[in] flags
590 * LCD interrupt sources to clear. Use a set of interrupt flags OR-ed
591 * together to clear multiple interrupt sources for the LCD module
592 * (LCD_IFS_nnn).
593 ******************************************************************************/
LCD_IntClear(uint32_t flags)594 __STATIC_INLINE void LCD_IntClear(uint32_t flags)
595 {
596 LCD->IFC = flags;
597 }
598
599
600 #if defined(_EFM32_TINY_FAMILY) || defined(_EFM32_GIANT_FAMILY)
601 /***************************************************************************//**
602 * @brief
603 * Enable or disable LCD Direct Segment Control
604 *
605 * @param[in] enable
606 * If true, enables LCD controller Direct Segment Control
607 * Segment and COM line bias levels needs to be set explicitly with the
608 * LCD_BiasSegmentSet() and LCD_BiasComSet() function calls.
609 ******************************************************************************/
LCD_DSCEnable(bool enable)610 __STATIC_INLINE void LCD_DSCEnable(bool enable)
611 {
612 if (enable)
613 {
614 LCD->CTRL |= LCD_CTRL_DSC;
615 }
616 else
617 {
618 LCD->CTRL &= ~(LCD_CTRL_DSC);
619 }
620 }
621 #endif
622
623 /** @} (end addtogroup LCD) */
624 /** @} (end addtogroup EM_Library) */
625
626 #ifdef __cplusplus
627 }
628 #endif
629
630 #endif /* defined(LCD_COUNT) && (LCD_COUNT > 0) */
631
632 #endif /* __EM_LCD_H */
633