34 #if defined(LCD_COUNT) && (LCD_COUNT > 0)
69 uint32_t dispCtrl =
LCD->DISPCTRL;
71 EFM_ASSERT(lcdInit != (
void *) 0);
78 #if defined(LCD_DISPCTRL_MUXE)
88 dispCtrl |= lcdInit->
mux;
89 dispCtrl |= lcdInit->
bias;
90 dispCtrl |= lcdInit->
wave;
91 dispCtrl |= lcdInit->
vlcd;
95 LCD->DISPCTRL = dispCtrl;
114 uint32_t dispctrl =
LCD->DISPCTRL;
130 LCD->DISPCTRL = dispctrl;
156 uint32_t bactrl =
LCD->BACTRL;
158 EFM_ASSERT(fcInit != (
void *) 0);
161 EFM_ASSERT(fcInit->
top < 64);
170 LCD->BACTRL = bactrl;
185 uint32_t bactrl =
LCD->BACTRL;
187 EFM_ASSERT(animInit != (
void *) 0);
202 #if defined(LCD_BACTRL_ALOC)
216 LCD->BACTRL = bactrl;
238 LCD->SEGEN |= segmentRange;
242 LCD->SEGEN &= ~((uint32_t)segmentRange);
267 #if defined(_LCD_SEGD7L_MASK)
275 #if defined(_LCD_SEGD0H_MASK)
276 EFM_ASSERT(bit < 40);
279 EFM_ASSERT(bit < 32);
290 #if defined(_LCD_SEGD0H_MASK)
303 #if defined(_LCD_SEGD1H_MASK)
316 #if defined(_LCD_SEGD2H_MASK)
329 #if defined(_LCD_SEGD3H_MASK)
337 #if defined(_LCD_SEGD4L_MASK)
343 #if defined(_LCD_SEGD4H_MASK)
352 #if defined(_LCD_SEGD5L_MASK)
358 #if defined(_LCD_SEGD5H_MASK)
368 #if defined(_LCD_SEGD6L_MASK)
373 #if defined(_LCD_SEGD6H_MASK)
382 #if defined(_LCD_SEGD7L_MASK)
388 #if defined(_LCD_SEGD7H_MASK)
424 #if defined(_LCD_SEGD7L_MASK)
434 segData =
LCD->SEGD0L;
436 segData |= (mask & bits);
437 LCD->SEGD0L = segData;
440 segData =
LCD->SEGD1L;
442 segData |= (mask & bits);
443 LCD->SEGD1L = segData;
446 segData =
LCD->SEGD2L;
448 segData |= (mask & bits);
449 LCD->SEGD2L = segData;
452 segData =
LCD->SEGD3L;
454 segData |= (mask & bits);
455 LCD->SEGD3L = segData;
457 #if defined(_LCD_SEGD4L_MASK)
459 segData =
LCD->SEGD4L;
461 segData |= (mask & bits);
462 LCD->SEGD4L = segData;
465 #if defined(_LCD_SEGD5L_MASK)
467 segData =
LCD->SEGD5L;
469 segData |= (mask & bits);
470 LCD->SEGD5L = segData;
473 #if defined(_LCD_SEGD6L_MASK)
475 segData =
LCD->SEGD6L;
477 segData |= (mask & bits);
478 LCD->SEGD6L = segData;
481 #if defined(_LCD_SEGD7L_MASK)
483 segData =
LCD->SEGD7L;
485 segData |= (mask & bits);
486 LCD->SEGD7L = segData;
496 #if defined(_LCD_SEGD0H_MASK)
514 #if defined(_LCD_SEGD7H_MASK)
524 segData =
LCD->SEGD0H;
526 segData |= (mask & bits);
527 LCD->SEGD0H = segData;
530 segData =
LCD->SEGD1H;
532 segData |= (mask & bits);
533 LCD->SEGD1H = segData;
536 segData =
LCD->SEGD2H;
538 segData |= (mask & bits);
539 LCD->SEGD2H = segData;
542 segData =
LCD->SEGD3H;
544 segData |= (mask & bits);
545 LCD->SEGD3H = segData;
547 #if defined(_LCD_SEGD4H_MASK)
549 segData =
LCD->SEGD4H;
551 segData |= (mask & bits);
552 LCD->SEGD4H = segData;
555 #if defined(_LCD_SEGD5H_MASK)
557 segData =
LCD->SEGD5H;
559 segData |= (mask & bits);
560 LCD->SEGD5H = segData;
563 #if defined(_LCD_SEGD6H_MASK)
565 segData =
LCD->SEGD6H;
567 segData |= (mask & bits);
568 LCD->SEGD6H = segData;
571 #if defined(_LCD_SEGD7H_MASK)
573 segData =
LCD->SEGD7H;
575 segData |= (mask & bits);
576 LCD->SEGD7H = segData;
594 EFM_ASSERT(level < 32);
617 #if defined(LCD_CTRL_DSC)
641 volatile uint32_t *segmentRegister;
643 #if !defined(_LCD_SEGD0H_MASK)
644 EFM_ASSERT(segmentLine < 20);
647 biasRegister = segmentLine / 8;
648 bitShift = (segmentLine % 8) * 4;
650 switch (biasRegister)
653 segmentRegister = &
LCD->SEGD0L;
656 segmentRegister = &
LCD->SEGD1L;
659 segmentRegister = &
LCD->SEGD2L;
662 segmentRegister = &
LCD->SEGD3L;
665 segmentRegister = (uint32_t *)0x00000000;
670 EFM_ASSERT(segmentLine < 40);
673 biasRegister = segmentLine / 10;
674 bitShift = (segmentLine % 10) * 4;
676 switch (biasRegister)
681 segmentRegister = &
LCD->SEGD0L;
685 segmentRegister = &
LCD->SEGD0H;
692 segmentRegister = &
LCD->SEGD1L;
696 segmentRegister = &
LCD->SEGD1H;
703 segmentRegister = &
LCD->SEGD2L;
707 segmentRegister = &
LCD->SEGD1H;
714 segmentRegister = &
LCD->SEGD3L;
718 segmentRegister = &
LCD->SEGD3H;
723 segmentRegister = (uint32_t *)0x00000000;
730 *segmentRegister = (*segmentRegister & ~(0xF << bitShift)) | (biasLevel << bitShift);
735 #if defined(LCD_CTRL_DSC)
758 EFM_ASSERT(comLine < 8);
760 bitShift = comLine * 4;
761 LCD->SEGD4L = (
LCD->SEGD4L & ~(0xF << bitShift)) | (biasLevel << bitShift);
#define _LCD_DISPCTRL_CONCONF_MASK
LCD_ConConf_TypeDef contrast
#define _LCD_DISPCTRL_VLCDSEL_MASK
#define LCD_DISPCTRL_VLCDSEL_VEXTBOOST
#define _LCD_DISPCTRL_CONLEV_SHIFT
Emlib peripheral API "assert" implementation.
#define LCD_DISPCTRL_VLCDSEL_VDD
void LCD_VBoostSet(LCD_VBoostLevel_TypeDef vboost)
Configure voltage booster.
RAM and peripheral bit-field set and clear API.
void LCD_SegmentSetLow(int com, uint32_t mask, uint32_t bits)
Updates the 0-31 lowest segments on a given COM-line in one operation, according to bit mask...
void LCD_SegmentRangeEnable(LCD_SegmentRange_TypeDef segment, bool enable)
Enables update of this range of LCD segment lines.
void LCD_BiasComSet(int com, int biasLevel)
Configure bias level for a specific segment line.
#define _LCD_DISPCTRL_WAVE_MASK
#define _LCD_CTRL_UDCTRL_MASK
#define _LCD_DISPCTRL_VBLEV_MASK
LCD_AnimShift_TypeDef BShift
void LCD_FrameCountInit(const LCD_FrameCountInit_TypeDef *fcInit)
Initialize LCD Frame Counter.
void LCD_SegmentSet(int com, int bit, bool enable)
Turn on or clear a segment.
#define LCD_BACTRL_ALOC_SEG8TO15
void LCD_VLCDSelect(LCD_VLCDSel_TypeDef vlcd)
Select source for VLCD.
__STATIC_INLINE void LCD_FrameCountEnable(bool enable)
Enables or disables LCD Frame Control.
void LCD_UpdateCtrl(LCD_UpdateCtrl_TypeDef ud)
Configure Update Control.
LCD_FCPreScale_TypeDef prescale
#define _LCD_BACTRL_FCTOP_SHIFT
#define _LCD_BACTRL_ALOC_MASK
#define _LCD_DISPCTRL_BIAS_MASK
#define _LCD_DISPCTRL_MUX_MASK
void LCD_SegmentSetHigh(int com, uint32_t mask, uint32_t bits)
Updated the high (32-39) segments on a given COM-line in one operation.
#define _LCD_BACTRL_AREGBSC_MASK
Liquid Crystal Display (LCD) peripheral API.
#define LCD_BACTRL_ALOC_SEG0TO7
#define _LCD_BACTRL_AREGASC_SHIFT
#define _LCD_DISPCTRL_MUXE_MASK
LCD_AnimShift_TypeDef AShift
void LCD_ContrastSet(int level)
Configure contrast level on LCD panel.
#define _LCD_BACTRL_ALOGSEL_MASK
LCD_AnimLogic_TypeDef animLogic
void LCD_BiasSegmentSet(int segment, int biasLevel)
Configure bias level for a specific segment line for Direct Segment Control.
#define _LCD_BACTRL_FCPRESC_MASK
#define _LCD_DISPCTRL_CONLEV_MASK
#define _LCD_BACTRL_FCTOP_MASK
#define _LCD_BACTRL_AREGBSC_SHIFT
__STATIC_INLINE void BUS_RegBitWrite(volatile uint32_t *addr, unsigned int bit, unsigned int val)
Perform a single-bit write operation on a peripheral register.
#define _LCD_BACTRL_AREGASC_MASK
void LCD_AnimInit(const LCD_AnimInit_TypeDef *animInit)
Configures LCD controller Animation feature.
__STATIC_INLINE void LCD_Enable(bool enable)
Enable or disable LCD controller.
void LCD_Init(const LCD_Init_TypeDef *lcdInit)
Initalize Liquid Crystal Display (LCD) controller.
__STATIC_INLINE void LCD_AnimEnable(bool enable)
Enables or disables LCD Animation feature.