LCD - Liquid Crystal Display#
Liquid Crystal Display (LCD) Peripheral API.
This module contains functions to control the LCD 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.
Example#
This example demonstrates initialization, basic configuration, and usage of the LCD peripheral. It shows how to:
Initialize the LCD with default settings
Show a blink animation of segment 0-7 of com line 0.
#include "sl_hal_lcd.h"
#include "sl_clock_manager.h"
void lcd_example(void)
{
// Enable clock to LCD module.
sl_clock_manager_enable_bus_clock(SL_BUS_CLOCK_LCD);
// Disable interrupts.
sl_hal_lcd_disable_interrupts(_LCD_IF_MASK);
// Initialize lcd configuration structure.
sl_hal_lcd_init_t init = {
.mux = SL_HAL_LCD_MUX_QUADRUPLEX,
.bias = SL_HAL_LCD_BIAS_ONE_THIRD,
.wave = SL_HAL_LCD_WAVE_LOW_POWER,
.mode = SL_HAL_LCD_MODE_CHARGE_PUMP,
.charge_redistribution = SL_HAL_LCD_CHARGE_REDISTRIBUTION_THREE_CYCLE,
.frame_rate_divider = 8,
.contrast_level = 25,
.clock_prescaler = 128
};
sl_hal_lcd_frame_counter_init_t fc_init = {
.top = 48,
.prescale = SL_HAL_LCD_FRAME_COUNTER_PRESCALE_DIV1
};
// Disable LCD before config.
sl_hal_lcd_disable();
sl_hal_lcd_wait_ready();
// Initialize LCD.
sl_hal_lcd_init(&init);
// Initialize frame counter.
sl_hal_lcd_init_frame_counter(&fc_init);
// Enable the LCD.
sl_hal_lcd_enable();
// Enable frame counter.
sl_hal_lcd_enable_frame_counter();
// Enable display segment.
sl_hal_lcd_enable_com_line(0);
for(uint8_t segment_num = 0; segment_num < 8; segment_num++) {
sl_hal_lcd_segment_enable(segment_num);
}
// Initialize lcd blink animation configuration structure.
sl_hal_lcd_animation_init_t animation_init = {
.A_reg = 0x80,
.A_shift = SL_HAL_LCD_ANIMATION_SHIFT_LEFT,
.B_reg = 0x00,
.B_shift = SL_HAL_LCD_ANIMATION_SHIFT_NONE,
.animation_logic = SL_HAL_LCD_ANIMATION_LOGIC_OR,
.start_segment = SL_HAL_LCD_ANIMATION_LOCATION_SEG0_TO_7
};
sl_hal_lcd_init_animation(&animation_init);
sl_hal_lcd_animation_enable();
}
Modules#
sl_hal_lcd_frame_counter_init_t
Enumerations#
MUX setting.
Wave type.
Bias setting.
Mode of operation.
Frame Counter Clock Prescaler, FC-CLK = FrameRate (Hz) / this factor.
Update Data Control.
Auto Load address which will start the synchronization from CLK_BUS to CLK_PER.
Animation Shift operation; none, left or right.
Animation Logic Control, how AReg and BReg should be combined.
Animation Location, set the LCD segments which animation applies to.
Charge redistribution control.
DMA mode of operation.
Functions#
Initialize the Liquid Crystal Display (LCD) controller.
Initialize the LCD Frame Counter.
Configure the LCD controller Animation feature.
Configure Update Control.
Enables a given LCD segment line.
Disable a given LCD segment line.
Turn on or clear a segment.
Update 0-31 lowest segments on a given COM-line in one operation according to the bit mask.
Enables a given LCD COM line.
Disable a given LCD COM line.
Configure the bias level for a specific segment line for Direct Segment Control.
Configure the bias level for a specific segment line.
Wait for load synchronization completion.
Wait for the LCD to complete resetting or disabling procedure.
Enable LCD controller with current configuration.
Disable LCD controller.
Reset the LCD.
Enable LCD Animation feature.
Disable LCD Animation feature.
Return the current animation state.
Enable the LCD blink.
Disable the LCD blink.
Return the current blink state.
Clears all segments while keeping segment state.
Restores all segment lines.
Enable or disable LCD Frame counter.
Disable LCD Frame counter.
Enable the LCD Display counter.
Disable the LCD Display counter.
Start the synchronization process.
Stop the synchronization process.
Get pending LCD interrupt flags.
Get enabled and pending LCD interrupt flags.
Set one or more pending LCD interrupts from SW.
Enable LCD interrupts.
Disable LCD interrupts.
Clear one or more interrupt flags.
Enable LCD Direct Segment Control.
Disable LCD Direct Segment Control.
Set a given DMA mode operation.
Configure the bias level on the LCD panel.
Configure the contrast level on the LCD panel.
Configure the charge redistribution cycles for the LCD panel.
Configure the mode for the LCD panel.
Macros#
Default Clock Prescaler.
Default LCD Frame Rate Divisor.
Default LCD Contrast.
Maximum common lines of LCD.
Maximum segment lines of LCD.
Default configuration for LCD initialization structure, enables 160 segments.
Default configuration for LCD Animation initialization structure.
Default configuration for LCD Frame Counter initialization structure.
Enumeration Documentation#
sl_hal_lcd_multiplexer_t#
sl_hal_lcd_multiplexer_t
MUX setting.
| Enumerator | |
|---|---|
| SL_HAL_LCD_MUX_STATIC | Static (segments can be multiplexed with LCD_COM[0]). |
| SL_HAL_LCD_MUX_DUPLEX | Duplex: 1/2 Duty cycle (segments can be multiplexed with LCD_COM[0:1]). |
| SL_HAL_LCD_MUX_TRIPLEX | Triplex: 1/3 Duty cycle (segments can be multiplexed with LCD_COM[0:2]). |
| SL_HAL_LCD_MUX_QUADRUPLEX | Quadruplex: 1/4 Duty cycle (segments can be multiplexed with LCD_COM[0:3]). |
sl_hal_lcd_wave_t#
sl_hal_lcd_wave_t
Wave type.
| Enumerator | |
|---|---|
| SL_HAL_LCD_WAVE_LOW_POWER | Low power optimized waveform output. |
| SL_HAL_LCD_WAVE_NORMAL | Regular waveform output. |
sl_hal_lcd_bias_t#
sl_hal_lcd_bias_t
Bias setting.
| Enumerator | |
|---|---|
| SL_HAL_LCD_BIAS_STATIC | Static (2 levels). |
| SL_HAL_LCD_BIAS_ONE_HALF | 1/2 Bias (3 levels). |
| SL_HAL_LCD_BIAS_ONE_THIRD | 1/3 Bias (4 levels). |
| SL_HAL_LCD_BIAS_ONE_FOURTH | 1/4 Bias (5 levels). |
sl_hal_lcd_mode_t#
sl_hal_lcd_mode_t
Mode of operation.
| Enumerator | |
|---|---|
| SL_HAL_LCD_MODE_STEP_DOWN | External cap with resistor string. |
| SL_HAL_LCD_MODE_CHARGE_PUMP | External cap and internal oscillator. |
sl_hal_lcd_frame_counter_prescale_t#
sl_hal_lcd_frame_counter_prescale_t
Frame Counter Clock Prescaler, FC-CLK = FrameRate (Hz) / this factor.
| Enumerator | |
|---|---|
| SL_HAL_LCD_FRAME_COUNTER_PRESCALE_DIV1 | Prescale Div 1. |
| SL_HAL_LCD_FRAME_COUNTER_PRESCALE_DIV2 | Prescale Div 2. |
| SL_HAL_LCD_FRAME_COUNTER_PRESCALE_DIV4 | Prescale Div 4. |
| SL_HAL_LCD_FRAME_COUNTER_PRESCALE_DIV8 | Prescale Div 8. |
sl_hal_lcd_update_data_control_t#
sl_hal_lcd_update_data_control_t
Update Data Control.
| Enumerator | |
|---|---|
| SL_HAL_LCD_UPDATE_CONTROL_REGULAR | Regular update, data transfer done immediately. |
| SL_HAL_LCD_UPDATE_CONTROL_FRAME_COUNTER_EVENT | Data transfer done at Frame Counter event. |
| SL_HAL_LCD_UPDATE_CONTROL_FRAME_START | Data transfer done at Frame Start. |
| SL_HAL_LCD_UPDATE_CONTROL_DISPLAY_EVENT | Data transfer done at Display Counter event. |
sl_hal_lcd_load_address_t#
sl_hal_lcd_load_address_t
Auto Load address which will start the synchronization from CLK_BUS to CLK_PER.
| Enumerator | |
|---|---|
| SL_HAL_LCD_LOAD_ADDRESS_NONE | Starts synchronizing registers after a write to BACTRL. |
| SL_HAL_LCD_LOAD_ADDRESS_BACTRL | Starts synchronizing registers after a write to BACTRL. |
| SL_HAL_LCD_LOAD_ADDRESS_AREGA | Starts synchronizing registers after a write to AREGA. |
| SL_HAL_LCD_LOAD_ADDRESS_AREGB | Starts synchronizing registers after a write to AREGB. |
| SL_HAL_LCD_LOAD_ADDRESS_SEGD0 | Starts synchronizing registers after a write to SEGD0. |
| SL_HAL_LCD_LOAD_ADDRESS_SEGD1 | Starts synchronizing registers after a write to SEGD1. |
| SL_HAL_LCD_LOAD_ADDRESS_SEGD2 | Starts synchronizing registers after a write to SEGD2. |
| SL_HAL_LCD_LOAD_ADDRESS_SEGD3 | Starts synchronizing registers after a write to SEGD3. |
sl_hal_lcd_animation_shift_t#
sl_hal_lcd_animation_shift_t
Animation Shift operation; none, left or right.
| Enumerator | |
|---|---|
| SL_HAL_LCD_ANIMATION_SHIFT_NONE | No shift. |
| SL_HAL_LCD_ANIMATION_SHIFT_LEFT | Shift segment bits left. |
| SL_HAL_LCD_ANIMATION_SHIFT_RIGHT | Shift segment bits right. |
sl_hal_lcd_animation_logic_t#
sl_hal_lcd_animation_logic_t
Animation Logic Control, how AReg and BReg should be combined.
| Enumerator | |
|---|---|
| SL_HAL_LCD_ANIMATION_LOGIC_AND | Use bitwise logic AND to mix animation register A (AREGA) and B (AREGB). |
| SL_HAL_LCD_ANIMATION_LOGIC_OR | Use bitwise logic OR to mix animation register A (AREGA) and B (AREGB). |
sl_hal_lcd_animation_location_t#
sl_hal_lcd_animation_location_t
Animation Location, set the LCD segments which animation applies to.
| Enumerator | |
|---|---|
| SL_HAL_LCD_ANIMATION_LOCATION_SEG0_TO_7 | Animation appears on segments 0 to 7. |
| SL_HAL_LCD_ANIMATION_LOCATION_SEG8_TO_15 | Animation appears on segments 8 to 15. |
sl_hal_lcd_charge_redistribution_t#
sl_hal_lcd_charge_redistribution_t
Charge redistribution control.
| Enumerator | |
|---|---|
| SL_HAL_LCD_CHARGE_REDISTRIBUTION_DISABLE | Disable charge redistribution. |
| SL_HAL_LCD_CHARGE_REDISTRIBUTION_ENABLE | Use 1 prescaled low frequency clock cycle for charge redistribution. |
| SL_HAL_LCD_CHARGE_REDISTRIBUTION_TWO_CYCLE | Use 2 prescaled low frequency clock cycle for charge redistribution. |
| SL_HAL_LCD_CHARGE_REDISTRIBUTION_THREE_CYCLE | Use 3 prescaled low frequency clock cycle for charge redistribution. |
| SL_HAL_LCD_CHARGE_REDISTRIBUTION_FOUR_CYCLE | Use 4 prescaled low frequency clock cycle for charge redistribution. |
sl_hal_lcd_dma_mode_t#
sl_hal_lcd_dma_mode_t
DMA mode of operation.
| Enumerator | |
|---|---|
| SL_HAL_LCD_DMA_MODE_DISABLE | No DMA requests are generated. |
| SL_HAL_LCD_DMA_MODE_FRAME_COUNTER_EVENT | DMA request on frame counter event. |
| SL_HAL_LCD_DMA_MODE_DISPLAY_EVENT | DMA request on display counter event. |
Function Documentation#
sl_hal_lcd_init#
void sl_hal_lcd_init (const sl_hal_lcd_init_t * init)
Initialize the Liquid Crystal Display (LCD) controller.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| const sl_hal_lcd_init_t * | [in] | init | 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.
sl_hal_lcd_init_frame_counter#
void sl_hal_lcd_init_frame_counter (const sl_hal_lcd_frame_counter_init_t * init)
Initialize the LCD Frame Counter.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| const sl_hal_lcd_frame_counter_init_t * | [in] | init | A pointer to the Frame Counter initialization structure. |
Note
The LCD controller need to be disabled before running this function.
sl_hal_lcd_init_animation#
void sl_hal_lcd_init_animation (const sl_hal_lcd_animation_init_t * init)
Configure the LCD controller Animation feature.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| const sl_hal_lcd_animation_init_t * | [in] | init | A pointer to the LCD Animation initialization structure. |
sl_hal_lcd_update_control#
void sl_hal_lcd_update_control (sl_hal_lcd_update_data_control_t method)
Configure Update Control.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| sl_hal_lcd_update_data_control_t | [in] | method | Configures the LCD update method. |
Note
The LCD controller need to be disabled before running this function.
sl_hal_lcd_segment_enable#
void sl_hal_lcd_segment_enable (uint32_t segment_number)
Enables a given LCD segment line.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| uint32_t | [in] | segment_number | Segment line number. |
sl_hal_lcd_segment_disable#
void sl_hal_lcd_segment_disable (uint32_t segment_number)
Disable a given LCD segment line.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| uint32_t | [in] | segment_number | Segment line number. |
sl_hal_lcd_segment_set#
void sl_hal_lcd_segment_set (uint8_t com, int bit, bool enable)
Turn on or clear a segment.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| uint8_t | [in] | com | A COM line to change. |
| int | [in] | bit | A bit index indicating which field to change. |
| bool | [in] | enable | A boolean indicating whether to set or clear the segment. |
Note
For the Series 2 Family, the maximum configuration is 4x20. For the Series 2 xG28, the maximum configuration is 8x24 or 4x28.
sl_hal_lcd_segment_set_low#
void sl_hal_lcd_segment_set_low (uint8_t 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.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| uint8_t | [in] | com | Indicates a COM line to update. |
| uint32_t | [in] | mask | A bit mask for segments 0-31. |
| uint32_t | [in] | bits | A bit pattern for segments 0-31. |
sl_hal_lcd_enable_com_line#
void sl_hal_lcd_enable_com_line (uint8_t com)
Enables a given LCD COM line.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| uint8_t | [in] | com | COM line number. |
sl_hal_lcd_disable_com_line#
void sl_hal_lcd_disable_com_line (uint8_t com)
Disable a given LCD COM line.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| uint8_t | [in] | com | COM line number. |
sl_hal_lcd_bias_set_segment#
void sl_hal_lcd_bias_set_segment (uint8_t segment_line, uint32_t bias_level)
Configure the bias level for a specific segment line for Direct Segment Control.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| uint8_t | [in] | segment_line | A segment line number. |
| uint32_t | [in] | bias_level | 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 (SEGDx/SEGDxH) 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.
sl_hal_lcd_bias_set_com#
void sl_hal_lcd_bias_set_com (uint8_t com_line, uint32_t bias_level)
Configure the bias level for a specific segment line.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| uint8_t | [in] | com_line | Max is LCD_COM_NUM, defined in device-specific headers. |
| uint32_t | [in] | bias_level | 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 (AREGA/AREGB) 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.
sl_hal_lcd_wait_load_busy#
void sl_hal_lcd_wait_load_busy (void )
Wait for load synchronization completion.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| void | N/A |
Note
Doing any writes to HV registers will not go through and will cause a bus fault.
sl_hal_lcd_wait_ready#
void sl_hal_lcd_wait_ready (void )
Wait for the LCD to complete resetting or disabling procedure.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| void | N/A |
sl_hal_lcd_enable#
void sl_hal_lcd_enable (void )
Enable LCD controller with current configuration.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| void | N/A |
sl_hal_lcd_disable#
void sl_hal_lcd_disable (void )
Disable LCD controller.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| void | N/A |
Note
This function will disables LCD controller. Remember to enable CMU clock for LCD for correct operation.
sl_hal_lcd_reset#
void sl_hal_lcd_reset (void )
Reset the LCD.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| void | N/A |
sl_hal_lcd_animation_enable#
void sl_hal_lcd_animation_enable (void )
Enable LCD Animation feature.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| void | N/A |
sl_hal_lcd_animation_disable#
void sl_hal_lcd_animation_disable (void )
Disable LCD Animation feature.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| void | N/A |
sl_hal_lcd_animation_get_state#
uint32_t sl_hal_lcd_animation_get_state (void )
Return the current animation state.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| void | N/A |
Returns
Animation state, in range 0-15.
sl_hal_lcd_blink_enable#
void sl_hal_lcd_blink_enable (void )
Enable the LCD blink.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| void | N/A |
sl_hal_lcd_blink_disable#
void sl_hal_lcd_blink_disable (void )
Disable the LCD blink.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| void | N/A |
sl_hal_lcd_blink_get_state#
uint32_t sl_hal_lcd_blink_get_state (void )
Return the current blink state.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| void | N/A |
Returns
Return value is 1 if segments are enabled, 0 if disabled.
sl_hal_lcd_enable_blank#
void sl_hal_lcd_enable_blank (void )
Clears all segments while keeping segment state.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| void | N/A |
sl_hal_lcd_disable_blank#
void sl_hal_lcd_disable_blank (void )
Restores all segment lines.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| void | N/A |
sl_hal_lcd_enable_frame_counter#
void sl_hal_lcd_enable_frame_counter (void )
Enable or disable LCD Frame counter.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| void | N/A |
sl_hal_lcd_disable_frame_counter#
void sl_hal_lcd_disable_frame_counter (void )
Disable LCD Frame counter.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| void | N/A |
sl_hal_lcd_enable_display_counter#
void sl_hal_lcd_enable_display_counter (void )
Enable the LCD Display counter.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| void | N/A |
sl_hal_lcd_disable_display_counter#
void sl_hal_lcd_disable_display_counter (void )
Disable the LCD Display counter.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| void | N/A |
sl_hal_lcd_start_sync#
void sl_hal_lcd_start_sync (bool auto_load, sl_hal_lcd_load_address_t load_addr)
Start the synchronization process.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| bool | [in] | auto_load | Flag indicating if the synchronization is started manually with CMD.LOAD (false) or if the synchronization is managed automatically by Auto Load (true). |
| sl_hal_lcd_load_address_t | [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. |
Note
This function will disables LCD controller.
sl_hal_lcd_stop_sync#
void sl_hal_lcd_stop_sync (bool auto_load)
Stop the synchronization process.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| bool | [in] | auto_load | Flag indicating if the synchronization is stopped manually with CMD.CLEAR (false) or if the synchronization managed by Auto Load is disabled (true). |
sl_hal_lcd_get_pending_interrupts#
uint32_t sl_hal_lcd_get_pending_interrupts (void )
Get pending LCD interrupt flags.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| void | 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).
sl_hal_lcd_get_enabled_pending_interrupts#
uint32_t sl_hal_lcd_get_enabled_pending_interrupts (void )
Get enabled and pending LCD interrupt flags.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| void | 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).
sl_hal_lcd_set_interrupts#
void sl_hal_lcd_set_interrupts (uint32_t flags)
Set one or more pending LCD interrupts from SW.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| uint32_t | [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). |
sl_hal_lcd_enable_interrupts#
void sl_hal_lcd_enable_interrupts (uint32_t flags)
Enable LCD interrupts.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| uint32_t | [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). |
sl_hal_lcd_disable_interrupts#
void sl_hal_lcd_disable_interrupts (uint32_t flags)
Disable LCD interrupts.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| uint32_t | [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). |
sl_hal_lcd_clear_interrupts#
void sl_hal_lcd_clear_interrupts (uint32_t flags)
Clear one or more interrupt flags.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| uint32_t | [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). |
sl_hal_lcd_enable_dsc#
void sl_hal_lcd_enable_dsc (void )
Enable LCD Direct Segment Control.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| void | N/A |
Note
This function will disable the LCD controller before writing to register.
LCD controller Direct Segment Control Segment and COM line bias levels need to be set explicitly with sl_hal_lcd_set_bias_segment() and sl_hal_lcd_set_bias_com() function calls respectively.
sl_hal_lcd_disable_dsc#
void sl_hal_lcd_disable_dsc (void )
Disable LCD Direct Segment Control.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| void | N/A |
Note
This function will disable the LCD controller before writing to register.
sl_hal_lcd_set_dma_mode#
void sl_hal_lcd_set_dma_mode (sl_hal_lcd_dma_mode_t mode)
Set a given DMA mode operation.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| sl_hal_lcd_dma_mode_t | [in] | mode | DMA mode. |
sl_hal_lcd_bias_set#
void sl_hal_lcd_bias_set (sl_hal_lcd_bias_t bias)
Configure the bias level on the LCD panel.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| sl_hal_lcd_bias_t | [in] | bias | The bias level. |
sl_hal_lcd_set_contrast#
void sl_hal_lcd_set_contrast (uint8_t level)
Configure the contrast level on the LCD panel.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| uint8_t | [in] | level | The contrast level in range 0-31. |
sl_hal_lcd_set_charge_redistribution_cycle#
void sl_hal_lcd_set_charge_redistribution_cycle (uint8_t cycles)
Configure the charge redistribution cycles for the LCD panel.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| uint8_t | [in] | cycles | Charge redistribution cycles, range 0-4. |
Note
The LCD controller need to be disabled before running this function.
sl_hal_lcd_set_mode#
void sl_hal_lcd_set_mode (sl_hal_lcd_mode_t mode)
Configure the mode for the LCD panel.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| sl_hal_lcd_mode_t | [in] | mode | A mode. |