EFM32 Gecko Software Documentation  efm32g-doc-5.1.2
em_lcd.h File Reference

Detailed Description

Liquid Crystal Display (LCD) peripheral API.

Version
5.1.2

License

Copyright 2016 Silicon Laboratories, Inc. http://www.silabs.com

Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:

  1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software.
  2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
  3. This notice may not be removed or altered from any source distribution.

DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Silicon Labs has no obligation to support this Software. Silicon Labs is providing the Software "AS IS", with no express or implied warranties of any kind, including, but not limited to, any implied warranties of merchantability or fitness for any particular purpose or warranties against infringement of any proprietary rights of a third party.

Silicon Labs will not be liable for any consequential, incidental, or special damages, or any other relief, or for any claim by any third party, arising from your use of this Software.

Definition in file em_lcd.h.

#include "em_device.h"
#include <stdint.h>
#include <stdbool.h>

Go to the source code of this file.

Data Structures

struct  LCD_AnimInit_TypeDef
 
struct  LCD_FrameCountInit_TypeDef
 
struct  LCD_Init_TypeDef
 

Macros

#define LCD_INIT_DEFAULT
 

Enumerations

enum  LCD_AnimLogic_TypeDef {
  lcdAnimLogicAnd = LCD_BACTRL_ALOGSEL_AND,
  lcdAnimLogicOr = LCD_BACTRL_ALOGSEL_OR
}
 
enum  LCD_AnimShift_TypeDef {
  lcdAnimShiftNone = _LCD_BACTRL_AREGASC_NOSHIFT,
  lcdAnimShiftLeft = _LCD_BACTRL_AREGASC_SHIFTLEFT,
  lcdAnimShiftRight = _LCD_BACTRL_AREGASC_SHIFTRIGHT
}
 
enum  LCD_Bias_TypeDef {
  lcdBiasStatic = LCD_DISPCTRL_BIAS_STATIC,
  lcdBiasOneHalf = LCD_DISPCTRL_BIAS_ONEHALF,
  lcdBiasOneThird = LCD_DISPCTRL_BIAS_ONETHIRD
}
 
enum  LCD_ConConf_TypeDef {
  lcdConConfVLCD = LCD_DISPCTRL_CONCONF_VLCD,
  lcdConConfGND = LCD_DISPCTRL_CONCONF_GND
}
 
enum  LCD_FCPreScale_TypeDef {
  lcdFCPrescDiv1 = LCD_BACTRL_FCPRESC_DIV1,
  lcdFCPrescDiv2 = LCD_BACTRL_FCPRESC_DIV2,
  lcdFCPrescDiv4 = LCD_BACTRL_FCPRESC_DIV4,
  lcdFCPrescDiv8 = LCD_BACTRL_FCPRESC_DIV8
}
 
enum  LCD_Mux_TypeDef {
  lcdMuxStatic = LCD_DISPCTRL_MUX_STATIC,
  lcdMuxDuplex = LCD_DISPCTRL_MUX_DUPLEX,
  lcdMuxTriplex = LCD_DISPCTRL_MUX_TRIPLEX,
  lcdMuxQuadruplex = LCD_DISPCTRL_MUX_QUADRUPLEX
}
 
enum  LCD_SegmentRange_TypeDef {
  lcdSegment0_3 = (1 << 0),
  lcdSegment4_7 = (1 << 1),
  lcdSegment8_11 = (1 << 2),
  lcdSegment12_15 = (1 << 3),
  lcdSegment16_19 = (1 << 4),
  lcdSegment20_23 = (1 << 5),
  lcdSegment24_27 = (1 << 6),
  lcdSegment28_31 = (1 << 7),
  lcdSegment32_35 = (1 << 8),
  lcdSegment36_39 = (1 << 9),
  lcdSegmentAll = (0x03ff)
}
 
enum  LCD_UpdateCtrl_TypeDef {
  lcdUpdateCtrlRegular = LCD_CTRL_UDCTRL_REGULAR,
  lcdUpdateCtrlFCEvent = LCD_CTRL_UDCTRL_FCEVENT,
  lcdUpdateCtrlFrameStart = LCD_CTRL_UDCTRL_FRAMESTART
}
 
enum  LCD_VBoostLevel_TypeDef {
  lcdVBoostLevel0 = LCD_DISPCTRL_VBLEV_LEVEL0,
  lcdVBoostLevel1 = LCD_DISPCTRL_VBLEV_LEVEL1,
  lcdVBoostLevel2 = LCD_DISPCTRL_VBLEV_LEVEL2,
  lcdVBoostLevel3 = LCD_DISPCTRL_VBLEV_LEVEL3,
  lcdVBoostLevel4 = LCD_DISPCTRL_VBLEV_LEVEL4,
  lcdVBoostLevel5 = LCD_DISPCTRL_VBLEV_LEVEL5,
  lcdVBoostLevel6 = LCD_DISPCTRL_VBLEV_LEVEL6,
  lcdVBoostLevel7 = LCD_DISPCTRL_VBLEV_LEVEL7
}
 
enum  LCD_VLCDSel_TypeDef {
  lcdVLCDSelVDD = LCD_DISPCTRL_VLCDSEL_VDD,
  lcdVLCDSelVExtBoost = LCD_DISPCTRL_VLCDSEL_VEXTBOOST
}
 
enum  LCD_Wave_TypeDef {
  lcdWaveLowPower = LCD_DISPCTRL_WAVE_LOWPOWER,
  lcdWaveNormal = LCD_DISPCTRL_WAVE_NORMAL
}
 

Functions

__STATIC_INLINE void LCD_AnimEnable (bool enable)
 Enables or disables LCD Animation feature. More...
 
void LCD_AnimInit (const LCD_AnimInit_TypeDef *animInit)
 Configures LCD controller Animation feature. More...
 
__STATIC_INLINE int LCD_AnimState (void)
 Returns current animation state. More...
 
__STATIC_INLINE void LCD_BlankEnable (bool enable)
 Disables all segments, while keeping segment state. More...
 
__STATIC_INLINE void LCD_BlinkEnable (bool enable)
 Enables or disables LCD blink. More...
 
__STATIC_INLINE int LCD_BlinkState (void)
 Returns current blink state. More...
 
void LCD_ContrastSet (int level)
 Configure contrast level on LCD panel. More...
 
__STATIC_INLINE void LCD_Enable (bool enable)
 Enable or disable LCD controller. More...
 
__STATIC_INLINE void LCD_FrameCountEnable (bool enable)
 Enables or disables LCD Frame Control. More...
 
void LCD_FrameCountInit (const LCD_FrameCountInit_TypeDef *fcInit)
 Initialize LCD Frame Counter. More...
 
__STATIC_INLINE void LCD_FreezeEnable (bool enable)
 When set, LCD registers will not be updated until cleared,. More...
 
void LCD_Init (const LCD_Init_TypeDef *lcdInit)
 Initalize Liquid Crystal Display (LCD) controller. More...
 
__STATIC_INLINE void LCD_IntClear (uint32_t flags)
 Clear one or more interrupt flags. More...
 
__STATIC_INLINE void LCD_IntDisable (uint32_t flags)
 Disable LCD interrupts. More...
 
__STATIC_INLINE void LCD_IntEnable (uint32_t flags)
 Enable LCD interrupts. More...
 
__STATIC_INLINE uint32_t LCD_IntGet (void)
 Get pending LCD interrupt flags. More...
 
__STATIC_INLINE uint32_t LCD_IntGetEnabled (void)
 Get enabled and pending LCD interrupt flags. More...
 
__STATIC_INLINE void LCD_IntSet (uint32_t flags)
 Set one or more pending LCD interrupts from SW. More...
 
void LCD_SegmentRangeEnable (LCD_SegmentRange_TypeDef segmentRange, bool enable)
 Enables update of this range of LCD segment lines. More...
 
void LCD_SegmentSet (int com, int bit, bool enable)
 Turn on or clear a segment. More...
 
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. More...
 
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. More...
 
__STATIC_INLINE void LCD_SyncBusyDelay (uint32_t flags)
 Polls LCD SYNCBUSY flags, until flag has been cleared. More...
 
__STATIC_INLINE uint32_t LCD_SyncBusyGet (void)
 Returns SYNCBUSY bits, indicating which registers have pending updates. More...
 
void LCD_UpdateCtrl (LCD_UpdateCtrl_TypeDef ud)
 Configure Update Control. More...
 
void LCD_VBoostSet (LCD_VBoostLevel_TypeDef vboost)
 Configure voltage booster. More...
 
void LCD_VLCDSelect (LCD_VLCDSel_TypeDef vlcd)
 Select source for VLCD. More...