38 #if defined(LCD_COUNT) && (LCD_COUNT > 0)
64 lcdMuxStatic = LCD_DISPCTRL_MUX_STATIC,
66 lcdMuxDuplex = LCD_DISPCTRL_MUX_DUPLEX,
68 lcdMuxTriplex = LCD_DISPCTRL_MUX_TRIPLEX,
70 lcdMuxQuadruplex = LCD_DISPCTRL_MUX_QUADRUPLEX,
71 #if defined(LCD_DISPCTRL_MUXE_MUXE)
73 lcdMuxSextaplex = LCD_DISPCTRL_MUXE_MUXE | LCD_DISPCTRL_MUX_DUPLEX,
75 lcdMuxOctaplex = LCD_DISPCTRL_MUXE_MUXE | LCD_DISPCTRL_MUX_QUADRUPLEX
83 lcdBiasStatic = LCD_DISPCTRL_BIAS_STATIC,
85 lcdBiasOneHalf = LCD_DISPCTRL_BIAS_ONEHALF,
87 lcdBiasOneThird = LCD_DISPCTRL_BIAS_ONETHIRD,
88 #if defined(LCD_DISPCTRL_BIAS_ONEFOURTH)
90 lcdBiasOneFourth = LCD_DISPCTRL_BIAS_ONEFOURTH,
98 lcdWaveLowPower = LCD_DISPCTRL_WAVE_LOWPOWER,
100 lcdWaveNormal = LCD_DISPCTRL_WAVE_NORMAL
107 lcdVLCDSelVDD = LCD_DISPCTRL_VLCDSEL_VDD,
109 lcdVLCDSelVExtBoost = LCD_DISPCTRL_VLCDSEL_VEXTBOOST
110 } LCD_VLCDSel_TypeDef;
116 lcdConConfVLCD = LCD_DISPCTRL_CONCONF_VLCD,
118 lcdConConfGND = LCD_DISPCTRL_CONCONF_GND
119 } LCD_ConConf_TypeDef;
124 lcdVBoostLevel0 = LCD_DISPCTRL_VBLEV_LEVEL0,
125 lcdVBoostLevel1 = LCD_DISPCTRL_VBLEV_LEVEL1,
126 lcdVBoostLevel2 = LCD_DISPCTRL_VBLEV_LEVEL2,
127 lcdVBoostLevel3 = LCD_DISPCTRL_VBLEV_LEVEL3,
128 lcdVBoostLevel4 = LCD_DISPCTRL_VBLEV_LEVEL4,
129 lcdVBoostLevel5 = LCD_DISPCTRL_VBLEV_LEVEL5,
130 lcdVBoostLevel6 = LCD_DISPCTRL_VBLEV_LEVEL6,
131 lcdVBoostLevel7 = LCD_DISPCTRL_VBLEV_LEVEL7
132 } LCD_VBoostLevel_TypeDef;
138 lcdFCPrescDiv1 = LCD_BACTRL_FCPRESC_DIV1,
140 lcdFCPrescDiv2 = LCD_BACTRL_FCPRESC_DIV2,
142 lcdFCPrescDiv4 = LCD_BACTRL_FCPRESC_DIV4,
144 lcdFCPrescDiv8 = LCD_BACTRL_FCPRESC_DIV8
145 } LCD_FCPreScale_TypeDef;
151 lcdSegment0_3 = (1 << 0),
153 lcdSegment4_7 = (1 << 1),
155 lcdSegment8_11 = (1 << 2),
157 lcdSegment12_15 = (1 << 3),
159 lcdSegment16_19 = (1 << 4),
161 lcdSegment20_23 = (1 << 5),
162 #if defined(_LCD_SEGD0L_MASK) && (_LCD_SEGD0L_MASK == 0x00FFFFFFUL)
164 lcdSegmentAll = (0x003f)
165 #elif defined(_LCD_SEGD0H_MASK) && (_LCD_SEGD0H_MASK == 0x000000FFUL)
167 lcdSegment24_27 = (1 << 6),
169 lcdSegment28_31 = (1 << 7),
171 lcdSegment32_35 = (1 << 8),
173 lcdSegment36_39 = (1 << 9),
175 lcdSegmentAll = (0x03ff)
177 } LCD_SegmentRange_TypeDef;
183 lcdUpdateCtrlRegular = LCD_CTRL_UDCTRL_REGULAR,
185 lcdUpdateCtrlFCEvent = LCD_CTRL_UDCTRL_FCEVENT,
187 lcdUpdateCtrlFrameStart = LCD_CTRL_UDCTRL_FRAMESTART
188 } LCD_UpdateCtrl_TypeDef;
194 lcdAnimShiftNone = _LCD_BACTRL_AREGASC_NOSHIFT,
196 lcdAnimShiftLeft = _LCD_BACTRL_AREGASC_SHIFTLEFT,
198 lcdAnimShiftRight = _LCD_BACTRL_AREGASC_SHIFTRIGHT
199 } LCD_AnimShift_TypeDef;
205 lcdAnimLogicAnd = LCD_BACTRL_ALOGSEL_AND,
207 lcdAnimLogicOr = LCD_BACTRL_ALOGSEL_OR
208 } LCD_AnimLogic_TypeDef;
223 LCD_AnimShift_TypeDef AShift;
227 LCD_AnimShift_TypeDef BShift;
229 LCD_AnimLogic_TypeDef animLogic;
230 #if defined(LCD_BACTRL_ALOC)
234 } LCD_AnimInit_TypeDef;
244 LCD_FCPreScale_TypeDef prescale;
245 } LCD_FrameCountInit_TypeDef;
255 LCD_Bias_TypeDef bias;
257 LCD_Wave_TypeDef wave;
259 LCD_VLCDSel_TypeDef vlcd;
261 LCD_ConConf_TypeDef contrast;
265 #define LCD_INIT_DEFAULT \
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);
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(_LCD_SEGD0H_MASK)
289 void LCD_SegmentSetHigh(
int com, uint32_t mask, uint32_t bits);
291 void LCD_ContrastSet(
int level);
292 void LCD_VBoostSet(LCD_VBoostLevel_TypeDef vboost);
294 #if defined(LCD_CTRL_DSC)
295 void LCD_BiasSegmentSet(
int segment,
int biasLevel);
296 void LCD_BiasComSet(
int com,
int biasLevel);
308 __STATIC_INLINE
void LCD_Enable(
bool enable)
312 LCD->CTRL |= LCD_CTRL_EN;
316 LCD->CTRL &= ~LCD_CTRL_EN;
328 __STATIC_INLINE
void LCD_AnimEnable(
bool enable)
332 LCD->BACTRL |= LCD_BACTRL_AEN;
336 LCD->BACTRL &= ~LCD_BACTRL_AEN;
348 __STATIC_INLINE
void LCD_BlinkEnable(
bool enable)
352 LCD->BACTRL |= LCD_BACTRL_BLINKEN;
356 LCD->BACTRL &= ~LCD_BACTRL_BLINKEN;
368 __STATIC_INLINE
void LCD_BlankEnable(
bool enable)
372 LCD->BACTRL |= LCD_BACTRL_BLANK;
376 LCD->BACTRL &= ~LCD_BACTRL_BLANK;
388 __STATIC_INLINE
void LCD_FrameCountEnable(
bool enable)
392 LCD->BACTRL |= LCD_BACTRL_FCEN;
396 LCD->BACTRL &= ~LCD_BACTRL_FCEN;
408 __STATIC_INLINE
int LCD_AnimState(
void)
410 return (
int)(LCD->STATUS & _LCD_STATUS_ASTATE_MASK) >> _LCD_STATUS_ASTATE_SHIFT;
421 __STATIC_INLINE
int LCD_BlinkState(
void)
423 return (
int)(LCD->STATUS & _LCD_STATUS_BLINK_MASK) >> _LCD_STATUS_BLINK_SHIFT;
435 __STATIC_INLINE
void LCD_FreezeEnable(
bool enable)
439 LCD->FREEZE = LCD_FREEZE_REGFREEZE_FREEZE;
443 LCD->FREEZE = LCD_FREEZE_REGFREEZE_UPDATE;
455 __STATIC_INLINE uint32_t LCD_SyncBusyGet(
void)
457 return LCD->SYNCBUSY;
468 __STATIC_INLINE
void LCD_SyncBusyDelay(uint32_t flags)
470 while (LCD->SYNCBUSY & flags)
483 __STATIC_INLINE uint32_t LCD_IntGet(
void)
507 __STATIC_INLINE uint32_t LCD_IntGetEnabled(
void)
516 return LCD->IF & ien;
529 __STATIC_INLINE
void LCD_IntSet(uint32_t flags)
544 __STATIC_INLINE
void LCD_IntEnable(uint32_t flags)
559 __STATIC_INLINE
void LCD_IntDisable(uint32_t flags)
574 __STATIC_INLINE
void LCD_IntClear(uint32_t flags)
580 #if defined(LCD_CTRL_DSC)
590 __STATIC_INLINE
void LCD_DSCEnable(
bool enable)
594 LCD->CTRL |= LCD_CTRL_DSC;
598 LCD->CTRL &= ~LCD_CTRL_DSC;
CMSIS Cortex-M Peripheral Access Layer for Silicon Laboratories microcontroller devices.