LCD - Liquid Crystal Display#

Liquid Crystal Display (LCD) Peripheral API.

This module contains functions to control the LDC peripheral of Silicon Labs 32-bit MCUs and SoCs. The LCD driver can drive up to 8x36 segmented LCD directly. The animation feature makes it possible to have active animations without the CPU intervention.

Modules#

LCD_AnimInit_TypeDef

LCD_FrameCountInit_TypeDef

LCD_Init_TypeDef

Enumerations#

enum
lcdMuxStatic = LCD_DISPCTRL_MUX_STATIC
lcdMuxDuplex = LCD_DISPCTRL_MUX_DUPLEX
lcdMuxTriplex = LCD_DISPCTRL_MUX_TRIPLEX
lcdMuxQuadruplex = LCD_DISPCTRL_MUX_QUADRUPLEX
lcdMuxSextaplex = LCD_DISPCTRL_MUX_SEXTAPLEX
lcdMuxOctaplex = LCD_DISPCTRL_MUX_OCTAPLEX
}

MUX setting.

enum
lcdWaveLowPower = LCD_DISPCTRL_WAVE_TYPEB
lcdWaveNormal = LCD_DISPCTRL_WAVE_TYPEA
}

Wave type.

enum
lcdBiasStatic = LCD_DISPCTRL_BIAS_STATIC
lcdBiasOneHalf = LCD_DISPCTRL_BIAS_ONEHALF
lcdBiasOneThird = LCD_DISPCTRL_BIAS_ONETHIRD
lcdBiasOneFourth = LCD_DISPCTRL_BIAS_ONEFOURTH
}

Bias setting.

enum
lcdModeStepDown = LCD_BIASCTRL_MODE_STEPDOWN
lcdModeChargePump = LCD_BIASCTRL_MODE_CHARGEPUMP
}

Contrast Configuration.

enum
lcdFCPrescDiv1 = LCD_BACFG_FCPRESC_DIV1
lcdFCPrescDiv2 = LCD_BACFG_FCPRESC_DIV2
lcdFCPrescDiv4 = LCD_BACFG_FCPRESC_DIV4
lcdFCPrescDiv8 = LCD_BACFG_FCPRESC_DIV8
}

Frame Counter Clock Prescaler, FC-CLK = FrameRate (Hz) / this factor.

enum
lcdUpdateCtrlRegular = LCD_CTRL_UDCTRL_REGULAR
lcdUpdateCtrlFCEvent = LCD_CTRL_UDCTRL_FCEVENT
lcdUpdateCtrlFrameStart = LCD_CTRL_UDCTRL_FRAMESTART
lcdUpdateCtrlDisplayEvent = LCD_CTRL_UDCTRL_DISPLAYEVENT
}

Update Data Control.

enum
lcdLoadAddrNone = 0
lcdLoadAddrBactrl = LCD_UPDATECTRL_LOADADDR_BACTRLWR
lcdLoadAddrAregA = LCD_UPDATECTRL_LOADADDR_AREGAWR
lcdLoadAddrAregB = LCD_UPDATECTRL_LOADADDR_AREGBWR
lcdLoadAddrSegd0 = LCD_UPDATECTRL_LOADADDR_SEGD0WR
lcdLoadAddrSegd1 = LCD_UPDATECTRL_LOADADDR_SEGD1WR
lcdLoadAddrSegd2 = LCD_UPDATECTRL_LOADADDR_SEGD2WR
lcdLoadAddrSegd3 = LCD_UPDATECTRL_LOADADDR_SEGD3WR
lcdLoadAddrSegd4 = LCD_UPDATECTRL_LOADADDR_SEGD4WR
lcdLoadAddrSegd5 = LCD_UPDATECTRL_LOADADDR_SEGD5WR
lcdLoadAddrSegd6 = LCD_UPDATECTRL_LOADADDR_SEGD6WR
lcdLoadAddrSegd7 = LCD_UPDATECTRL_LOADADDR_SEGD7WR
}

Auto Load address which will start the synchronization from CLK_BUS to CLK_PER.

enum
lcdAnimShiftNone = _LCD_BACTRL_AREGASC_NOSHIFT
lcdAnimShiftLeft = _LCD_BACTRL_AREGASC_SHIFTLEFT
lcdAnimShiftRight = _LCD_BACTRL_AREGASC_SHIFTRIGHT
}

Animation Shift operation; none, left or right.

enum
lcdAnimLogicAnd = LCD_BACTRL_ALOGSEL_AND
lcdAnimLogicOr = LCD_BACTRL_ALOGSEL_OR
}

Animation Logic Control, how AReg and BReg should be combined.

enum
lcdAnimLocSeg0To7 = LCD_BACTRL_ALOC_SEG0TO7
lcdAnimLocSeg8To15 = LCD_BACTRL_ALOC_SEG8TO15
}

Animation Location, set the LCD segments which animation applies to.

enum
lcdChargeRedistributionDisable = LCD_DISPCTRL_CHGRDST_DISABLE
lcdChargeRedistributionEnable = LCD_DISPCTRL_CHGRDST_ONE
lcdChargeRedistributionTwoCycle = LCD_DISPCTRL_CHGRDST_TWO
lcdChargeRedistributionThreeCycle = LCD_DISPCTRL_CHGRDST_THREE
lcdChargeRedistributionFourCycle = LCD_DISPCTRL_CHGRDST_FOUR
}

Charge redistribution control.

enum
lcdDmaModeDisable = LCD_BIASCTRL_DMAMODE_DMADISABLE
lcdDmaModeFrameCounterEvent = LCD_BIASCTRL_DMAMODE_DMAFC
lcdDmaModeDisplayEvent = LCD_BIASCTRL_DMAMODE_DMADISPLAY
}

DMA mode of operation.

Functions#

void
LCD_Init(const LCD_Init_TypeDef *lcdInit)

Initialize the Liquid Crystal Display (LCD) controller.

void
LCD_UpdateCtrl(LCD_UpdateCtrl_TypeDef ud)

Configure Update Control.

void
LCD_FrameCountInit(const LCD_FrameCountInit_TypeDef *fcInit)

Initialize the LCD Frame Counter.

void
LCD_AnimInit(const LCD_AnimInit_TypeDef *animInit)

Configure the LCD controller Animation feature.

void
LCD_SegmentEnable(uint32_t seg_nbr, bool enable)

Enables a given LCD segment line.

void
LCD_ComEnable(uint8_t com, bool enable)

Enables a given LCD COM line.

void
LCD_DmaModeSet(LCD_DmaMode_Typedef mode)

Set a given DMA mode operation.

void
LCD_SegmentSet(int com, int bit, bool enable)

Turn on or clear a segment.

void
LCD_SegmentSetLow(int com, uint32_t mask, uint32_t bits)

Update 0-31 lowest segments on a given COM-line in one operation according to the bit mask.

void
LCD_ContrastSet(int level)

Configure the contrast level on the LCD panel.

void
LCD_BiasSet(LCD_Bias_TypeDef bias)

Configure the bias level on the LCD panel.

void
LCD_BiasSegmentSet(int segmentLine, int biasLevel)

Configure the bias level for a specific segment line for Direct Segment Control.

void
LCD_BiasComSet(int comLine, int biasLevel)

Configure the bias level for a specific segment line.

void
LCD_ModeSet(LCD_Mode_Typedef mode)

Configure the mode for the LCD panel.

void

Configure the charge redistribution cycles for the LCD panel.

void

Wait for load synchronization completion.

void

Wait for the LCD to complete resetting or disabling procedure.

void
LCD_Enable(bool enable)

Enable or disable LCD controller.

void
LCD_Reset(void)

Reset the LCD.

void
LCD_AnimEnable(bool enable)

Enable or disable LCD Animation feature.

void
LCD_BlinkEnable(bool enable)

Enable or disable the LCD blink.

void
LCD_BlankEnable(bool enable)

Disable all segments while keeping segment state.

void

Enable or disable LCD Frame counter.

void

Enable or disable the LCD Display counter.

int

Return the current animation state.

int

Return the current blink state.

void
LCD_SyncStart(bool autoload, LCD_LoadAddr_TypeDef load_addr)

Start the synchronization process.

void
LCD_SyncStop(bool autoload)

Stop the synchronization process.

uint32_t

Get pending LCD interrupt flags.

uint32_t

Get enabled and pending LCD interrupt flags.

void
LCD_IntSet(uint32_t flags)

Set one or more pending LCD interrupts from SW.

void
LCD_IntEnable(uint32_t flags)

Enable LCD interrupts.

void
LCD_IntDisable(uint32_t flags)

Disable LCD interrupts.

void
LCD_IntClear(uint32_t flags)

Clear one or more interrupt flags.

void
LCD_DSCEnable(bool enable)

Enable or disable LCD Direct Segment Control.

Macros#

#define

Default Clock Prescaler.

#define

Default LCD Frame Rate Divisor.

#define

Default LCD Contrast.

#define
LCD_COM_LINES_MAX (LCD_COM_NUM + LCD_SEGASCOM_NUM)

Maximum common lines of LCD.

#define

Maximum segment lines of LCD.

#define

Default configuration for LCD initialization structure, enables 160 segments.

#define

Frame counter uses a maximum of 5 bits (FCTOP[5:0]).

Enumeration Documentation#

LCD_Mux_TypeDef#

LCD_Mux_TypeDef

MUX setting.

Enumerator
lcdMuxStatic

Static (segments can be multiplexed with LCD_COM[0]).

lcdMuxDuplex

Duplex / 1/2 Duty cycle (segments can be multiplexed with LCD_COM[0:1]).

lcdMuxTriplex

Triplex / 1/3 Duty cycle (segments can be multiplexed with LCD_COM[0:2]).

lcdMuxQuadruplex

Quadruplex / 1/4 Duty cycle (segments can be multiplexed with LCD_COM[0:3]).

lcdMuxSextaplex

Sextaplex / 1/6 Duty cycle (segments can be multiplexed with LCD_COM[0:5]).

lcdMuxOctaplex

Octaplex / 1/8 Duty cycle (segments can be multiplexed with LCD_COM[0:7]).


Definition at line 76 of file platform/emlib/inc/em_lcd.h

LCD_Wave_TypeDef#

LCD_Wave_TypeDef

Wave type.

Enumerator
lcdWaveLowPower

Low power optimized waveform output.

lcdWaveNormal

Regular waveform output.


Definition at line 99 of file platform/emlib/inc/em_lcd.h

LCD_Bias_TypeDef#

LCD_Bias_TypeDef

Bias setting.

Enumerator
lcdBiasStatic

Static (2 levels).

lcdBiasOneHalf

1/2 Bias (3 levels).

lcdBiasOneThird

1/3 Bias (4 levels).

lcdBiasOneFourth

1/4 Bias (5 levels).


Definition at line 114 of file platform/emlib/inc/em_lcd.h

LCD_Mode_Typedef#

LCD_Mode_Typedef

Contrast Configuration.

Mode of operation.

Enumerator
lcdModeStepDown

External cap with resistor string.

lcdModeChargePump

External cap and internal oscillator.


Definition at line 163 of file platform/emlib/inc/em_lcd.h

LCD_FCPreScale_TypeDef#

LCD_FCPreScale_TypeDef

Frame Counter Clock Prescaler, FC-CLK = FrameRate (Hz) / this factor.

Enumerator
lcdFCPrescDiv1

Prescale Div 1.

lcdFCPrescDiv2

Prescale Div 2.

lcdFCPrescDiv4

Prescale Div 4.

lcdFCPrescDiv8

Prescale Div 8.


Definition at line 176 of file platform/emlib/inc/em_lcd.h

LCD_UpdateCtrl_TypeDef#

LCD_UpdateCtrl_TypeDef

Update Data Control.

Enumerator
lcdUpdateCtrlRegular

Regular update, data transfer done immediately.

lcdUpdateCtrlFCEvent

Data transfer done at Frame Counter event.

lcdUpdateCtrlFrameStart

Data transfer done at Frame Start.

lcdUpdateCtrlDisplayEvent

Data transfer done at Display Counter event.


Definition at line 232 of file platform/emlib/inc/em_lcd.h

LCD_LoadAddr_TypeDef#

LCD_LoadAddr_TypeDef

Auto Load address which will start the synchronization from CLK_BUS to CLK_PER.

Enumerator
lcdLoadAddrNone

Starts synchronizing registers after a write to BACTRL.

lcdLoadAddrBactrl

Starts synchronizing registers after a write to BACTRL.

lcdLoadAddrAregA

Starts synchronizing registers after a write to AREGA.

lcdLoadAddrAregB

Starts synchronizing registers after a write to AREGB.

lcdLoadAddrSegd0

Starts synchronizing registers after a write to SEGD0.

lcdLoadAddrSegd1

Starts synchronizing registers after a write to SEGD1.

lcdLoadAddrSegd2

Starts synchronizing registers after a write to SEGD2.

lcdLoadAddrSegd3

Starts synchronizing registers after a write to SEGD3.

lcdLoadAddrSegd4

Starts synchronizing registers after a write to SEGD4.

lcdLoadAddrSegd5

Starts synchronizing registers after a write to SEGD5.

lcdLoadAddrSegd6

Starts synchronizing registers after a write to SEGD6.

lcdLoadAddrSegd7

Starts synchronizing registers after a write to SEGD7.


Definition at line 247 of file platform/emlib/inc/em_lcd.h

LCD_AnimShift_TypeDef#

LCD_AnimShift_TypeDef

Animation Shift operation; none, left or right.

Enumerator
lcdAnimShiftNone

No shift.

lcdAnimShiftLeft

Shift segment bits left.

lcdAnimShiftRight

Shift segment bits right.


Definition at line 284 of file platform/emlib/inc/em_lcd.h

LCD_AnimLogic_TypeDef#

LCD_AnimLogic_TypeDef

Animation Logic Control, how AReg and BReg should be combined.

Enumerator
lcdAnimLogicAnd

Use bitwise logic AND to mix animation register A (AREGA) and B (AREGB).

lcdAnimLogicOr

Use bitwise logic OR to mix animation register A (AREGA) and B (AREGB).


Definition at line 294 of file platform/emlib/inc/em_lcd.h

LCD_AnimLoc_TypeDef#

LCD_AnimLoc_TypeDef

Animation Location, set the LCD segments which animation applies to.

Enumerator
lcdAnimLocSeg0To7

Animation appears on segments 0 to 7.

lcdAnimLocSeg8To15

Animation appears on segments 8 to 15.


Definition at line 303 of file platform/emlib/inc/em_lcd.h

LCD_ChargeRedistribution_TypeDef#

LCD_ChargeRedistribution_TypeDef

Charge redistribution control.

Enumerator
lcdChargeRedistributionDisable

Disable charge redistribution.

lcdChargeRedistributionEnable

Use 1 prescaled low frequency clock cycle for charge redistribution.

lcdChargeRedistributionTwoCycle

Use 2 prescaled low frequency clock cycle for charge redistribution.

lcdChargeRedistributionThreeCycle

Use 3 prescaled low frequency clock cycle for charge redistribution.

lcdChargeRedistributionFourCycle

Use 4 prescaled low frequency clock cycle for charge redistribution.


Definition at line 313 of file platform/emlib/inc/em_lcd.h

LCD_DmaMode_Typedef#

LCD_DmaMode_Typedef

DMA mode of operation.

Enumerator
lcdDmaModeDisable

No DMA requests are generated.

lcdDmaModeFrameCounterEvent

DMA request on frame counter event.

lcdDmaModeDisplayEvent

DMA request on display counter event.


Definition at line 329 of file platform/emlib/inc/em_lcd.h

Function Documentation#

LCD_Init#

void LCD_Init (const LCD_Init_TypeDef * lcdInit)

Initialize the Liquid Crystal Display (LCD) controller.

Parameters
[in]lcdInit

A pointer to the initialization structure which configures the LCD controller.

Configures the LCD controller. You must enable it afterwards, potentially configuring Frame Control and interrupts first according to requirements.


Definition at line 66 of file platform/emlib/src/em_lcd.c

LCD_UpdateCtrl#

void LCD_UpdateCtrl (LCD_UpdateCtrl_TypeDef ud)

Configure Update Control.

Parameters
[in]ud

Configures the LCD update method.


Definition at line 172 of file platform/emlib/src/em_lcd.c

LCD_FrameCountInit#

void LCD_FrameCountInit (const LCD_FrameCountInit_TypeDef * fcInit)

Initialize the LCD Frame Counter.

Parameters
[in]fcInit

A pointer to the Frame Counter initialization structure.


Definition at line 191 of file platform/emlib/src/em_lcd.c

LCD_AnimInit#

void LCD_AnimInit (const LCD_AnimInit_TypeDef * animInit)

Configure the LCD controller Animation feature.

Parameters
[in]animInit

A pointer to the LCD Animation initialization structure.


Definition at line 235 of file platform/emlib/src/em_lcd.c

LCD_SegmentEnable#

void LCD_SegmentEnable (uint32_t seg_nbr, bool enable)

Enables a given LCD segment line.

Parameters
[in]seg_nbr

Segment line number.

[in]enable

Boolean true to enable a segment, false to disable.


Definition at line 301 of file platform/emlib/src/em_lcd.c

LCD_ComEnable#

void LCD_ComEnable (uint8_t com, bool enable)

Enables a given LCD COM line.

Parameters
[in]com

COM line number.

[in]enable

Boolean true to enable a COM , false to disable.


Definition at line 342 of file platform/emlib/src/em_lcd.c

LCD_DmaModeSet#

void LCD_DmaModeSet (LCD_DmaMode_Typedef mode)

Set a given DMA mode operation.

Parameters
[in]mode

DMA mode.


Definition at line 393 of file platform/emlib/src/em_lcd.c

LCD_SegmentSet#

void LCD_SegmentSet (int com, int bit, bool enable)

Turn on or clear a segment.

Parameters
[in]com

A COM line to change.

[in]bit

A bit index indicating which field to change.

[in]enable

True will set segment, false will clear segment.

Note

  • For the Gecko Family, the maximum configuration is (COM-lines x Segment-Lines) 4x40. For the Tiny Gecko Family, the maximum configuration is 8x20 or 4x24. For the Giant Gecko Family, the maximum configuration is 8x36 or 4x40. For the Series 2 Family, the maximum configuration is 4x20. For the Series 2 xG28, the maximum configuration is 8x24 or 4x28.


Definition at line 420 of file platform/emlib/src/em_lcd.c

LCD_SegmentSetLow#

void LCD_SegmentSetLow (int com, uint32_t mask, uint32_t bits)

Update 0-31 lowest segments on a given COM-line in one operation according to the bit mask.

Parameters
[in]com

Indicates a COM line to update.

[in]mask

A bit mask for segments 0-31.

[in]bits

A bit pattern for segments 0-31.


Definition at line 684 of file platform/emlib/src/em_lcd.c

LCD_ContrastSet#

void LCD_ContrastSet (int level)

Configure the contrast level on the LCD panel.

Parameters
[in]level

The contrast level in range 0-63.


Definition at line 936 of file platform/emlib/src/em_lcd.c

LCD_BiasSet#

void LCD_BiasSet (LCD_Bias_TypeDef bias)

Configure the bias level on the LCD panel.

Parameters
[in]bias

The bias level.


Definition at line 964 of file platform/emlib/src/em_lcd.c

LCD_BiasSegmentSet#

void LCD_BiasSegmentSet (int segmentLine, int biasLevel)

Configure the bias level for a specific segment line for Direct Segment Control.

Parameters
[in]segmentLine

A segment line number.

[in]biasLevel

The bias configuration level. This value must be within the constraints defined by the LCD_DISPCTRL bias settings. For more information, see the applicable Reference Manual and data sheet.

Note

  • When DSC is active, each configuration takes up 4 bits in the corresponding Segment Registers (SEGD0L/SEGD1H for Series 0 and 1, SEGDx/SEGDxH for Series 2) which defines the bias level. For optimal use of this feature, the entire SEGD-registers should be set at once in an optimized routine. Therefore, this function shows how to correctly configure the bias levels and should be used with care.


Definition at line 1016 of file platform/emlib/src/em_lcd.c

LCD_BiasComSet#

void LCD_BiasComSet (int comLine, int biasLevel)

Configure the bias level for a specific segment line.

Parameters
[in]comLine

A COM line number, between 0 and 7 for Series 0 and 1. For Series 2, max is LCD_COM_NUM, defined in device-specific headers.

[in]biasLevel

The bias configuration level. This value must be within the constraints defined by the LCD_DISPCTRL bias settings. For more information, see the appropriate Reference Manual and data sheet.

Note

  • When DSC is active, each configuration takes up 4 bits in the corresponding Segment Registers (SEGD4L/SEGD4H for Series 0 and 1, AREGA/AREGB for Series 2) which defines bias level. For optimal use of this feature, the entire register set should be set at once in a optimized routine. Therefore, this function shows how to correctly configure the bias levels and should be used with care.


Definition at line 1205 of file platform/emlib/src/em_lcd.c

LCD_ModeSet#

void LCD_ModeSet (LCD_Mode_Typedef mode)

Configure the mode for the LCD panel.

Parameters
[in]mode

A mode.


Definition at line 1252 of file platform/emlib/src/em_lcd.c

LCD_ChargeRedistributionCyclesSet#

void LCD_ChargeRedistributionCyclesSet (uint8_t cycles)

Configure the charge redistribution cycles for the LCD panel.

Parameters
[in]cycles

Charge redistribution cycles, range 0-4.


Definition at line 1270 of file platform/emlib/src/em_lcd.c

LCD_LoadBusyWait#

void LCD_LoadBusyWait (void )

Wait for load synchronization completion.

Parameters
N/A

Note

  • Doing any writes to HV registers will not go through and will cause a bus fault.


Definition at line 492 of file platform/emlib/inc/em_lcd.h

LCD_ReadyWait#

void LCD_ReadyWait (void )

Wait for the LCD to complete resetting or disabling procedure.

Parameters
N/A

Definition at line 503 of file platform/emlib/inc/em_lcd.h

LCD_Enable#

void LCD_Enable (bool enable)

Enable or disable LCD controller.

Parameters
[in]enable

If true, enables LCD controller with current configuration. If false, disables LCD controller. Enable CMU clock for LCD for correct operation.


Definition at line 522 of file platform/emlib/inc/em_lcd.h

LCD_Reset#

void LCD_Reset (void )

Reset the LCD.

Parameters
N/A

Definition at line 559 of file platform/emlib/inc/em_lcd.h

LCD_AnimEnable#

void LCD_AnimEnable (bool enable)

Enable or disable LCD Animation feature.

Parameters
[in]enable

Boolean true enables animation, false disables animation.


Definition at line 576 of file platform/emlib/inc/em_lcd.h

LCD_BlinkEnable#

void LCD_BlinkEnable (bool enable)

Enable or disable the LCD blink.

Parameters
[in]enable

Boolean true enables blink, false disables blink.


Definition at line 600 of file platform/emlib/inc/em_lcd.h

LCD_BlankEnable#

void LCD_BlankEnable (bool enable)

Disable all segments while keeping segment state.

Parameters
[in]enable

Boolean true clears all segments, boolean false restores all segment lines.


Definition at line 624 of file platform/emlib/inc/em_lcd.h

LCD_FrameCountEnable#

void LCD_FrameCountEnable (bool enable)

Enable or disable LCD Frame counter.

Parameters
[in]enable

Boolean true enables frame counter, false disables frame counter.


Definition at line 648 of file platform/emlib/inc/em_lcd.h

LCD_DisplayCountEnable#

void LCD_DisplayCountEnable (bool enable)

Enable or disable the LCD Display counter.

Parameters
[in]enable

Boolean true enables display counter, false disables display counter.


Definition at line 678 of file platform/emlib/inc/em_lcd.h

LCD_AnimState#

int LCD_AnimState (void )

Return the current animation state.

Parameters
N/A

Returns

  • Animation state, in range 0-15.


Definition at line 698 of file platform/emlib/inc/em_lcd.h

LCD_BlinkState#

int LCD_BlinkState (void )

Return the current blink state.

Parameters
N/A

Returns

  • Return value is 1 if segments are enabled, 0 if disabled.


Definition at line 710 of file platform/emlib/inc/em_lcd.h

LCD_SyncStart#

void LCD_SyncStart (bool autoload, LCD_LoadAddr_TypeDef load_addr)

Start the synchronization process.

Parameters
[in]autoload

Flag indicating if the synchronization is started manually with CMD.LOAD (false) or if the synchronization is managed automatically by Auto Load (true).

[in]load_addr

Address which will start the synchronization from CLK_BUS to CLK_PER when Auto Load is selected. This argument has no effect if 'autoload' is false.


Definition at line 777 of file platform/emlib/inc/em_lcd.h

LCD_SyncStop#

void LCD_SyncStop (bool autoload)

Stop the synchronization process.

Parameters
[in]autoload

Flag indicating if the synchronization is stopped manually with CMD.CLEAR (false) or if the synchronization managed by Auto Load is disabled (true).


Definition at line 805 of file platform/emlib/inc/em_lcd.h

LCD_IntGet#

uint32_t LCD_IntGet (void )

Get pending LCD interrupt flags.

Parameters
N/A

Returns

  • Pending LCD interrupt sources. Returns a set of interrupt flags OR-ed together for multiple interrupt sources in the LCD module (LCD_IFS_nnn).


Definition at line 827 of file platform/emlib/inc/em_lcd.h

LCD_IntGetEnabled#

uint32_t LCD_IntGetEnabled (void )

Get enabled and pending LCD interrupt flags.

Parameters
N/A

Useful for handling more interrupt sources in the same interrupt handler.

Note

  • Event bits are not cleared by the use of this function.

Returns

  • Pending and enabled LCD interrupt sources. Return value is the bitwise AND combination of

    • the OR combination of enabled interrupt sources in LCD_IEN_nnn register (LCD_IEN_nnn) and

    • the bitwise OR combination of valid interrupt flags of LCD module (LCD_IF_nnn).


Definition at line 850 of file platform/emlib/inc/em_lcd.h

LCD_IntSet#

void LCD_IntSet (uint32_t flags)

Set one or more pending LCD interrupts from SW.

Parameters
[in]flags

LCD interrupt sources to set to pending. Use a set of interrupt flags OR-ed together to set multiple interrupt sources for the LCD module (LCD_IFS_nnn).


Definition at line 871 of file platform/emlib/inc/em_lcd.h

LCD_IntEnable#

void LCD_IntEnable (uint32_t flags)

Enable LCD interrupts.

Parameters
[in]flags

LCD interrupt sources to enable. Use a set of interrupt flags OR-ed together to set multiple interrupt sources for LCD module (LCD_IFS_nnn).


Definition at line 893 of file platform/emlib/inc/em_lcd.h

LCD_IntDisable#

void LCD_IntDisable (uint32_t flags)

Disable LCD interrupts.

Parameters
[in]flags

LCD interrupt sources to disable. Use a set of interrupt flags OR-ed together to disable multiple interrupt sources for LCD module (LCD_IFS_nnn).


Definition at line 911 of file platform/emlib/inc/em_lcd.h

LCD_IntClear#

void LCD_IntClear (uint32_t flags)

Clear one or more interrupt flags.

Parameters
[in]flags

LCD interrupt sources to clear. Use a set of interrupt flags OR-ed together to clear multiple interrupt sources for LCD module (LCD_IFS_nnn).


Definition at line 929 of file platform/emlib/inc/em_lcd.h

LCD_DSCEnable#

void LCD_DSCEnable (bool enable)

Enable or disable LCD Direct Segment Control.

Parameters
[in]enable

If true, enables LCD controller Direct Segment Control Segment and COM line bias levels need to be set explicitly with LCD_BiasSegmentSet() and LCD_BiasComSet() function calls respectively.


Definition at line 952 of file platform/emlib/inc/em_lcd.h

Macro Definition Documentation#

LCD_DEFAULT_CLOCK_PRESCALER#

#define LCD_DEFAULT_CLOCK_PRESCALER
Value:
64

Default Clock Prescaler.


Definition at line 54 of file platform/emlib/inc/em_lcd.h

LCD_DEFAULT_FRAME_RATE_DIV#

#define LCD_DEFAULT_FRAME_RATE_DIV
Value:
4

Default LCD Frame Rate Divisor.


Definition at line 56 of file platform/emlib/inc/em_lcd.h

LCD_DEFAULT_CONTRAST#

#define LCD_DEFAULT_CONTRAST
Value:
15

Default LCD Contrast.


Definition at line 58 of file platform/emlib/inc/em_lcd.h

LCD_COM_LINES_MAX#

#define LCD_COM_LINES_MAX
Value:
(LCD_COM_NUM + LCD_SEGASCOM_NUM)

Maximum common lines of LCD.


Definition at line 63 of file platform/emlib/inc/em_lcd.h

LCD_SEGMENT_LINES_MAX#

#define LCD_SEGMENT_LINES_MAX
Value:
LCD_SEG_NUM

Maximum segment lines of LCD.


Definition at line 68 of file platform/emlib/inc/em_lcd.h

LCD_INIT_DEFAULT#

#define LCD_INIT_DEFAULT
Value:
{ \
true, \
lcdMuxQuadruplex, \
lcdBiasOneFourth, \
lcdWaveLowPower, \
lcdModeStepDown, \
lcdChargeRedistributionEnable, \
LCD_DEFAULT_FRAME_RATE_DIV, \
LCD_DEFAULT_CONTRAST, \
LCD_DEFAULT_CLOCK_PRESCALER \
}

Default configuration for LCD initialization structure, enables 160 segments.



Definition at line 430 of file platform/emlib/inc/em_lcd.h

LCD_FRAME_COUNTER_VAL_MAX#

#define LCD_FRAME_COUNTER_VAL_MAX
Value:
64

Frame counter uses a maximum of 5 bits (FCTOP[5:0]).


Definition at line 51 of file platform/emlib/src/em_lcd.c