RA Flexible Software Package Documentation  Release v5.7.0

 
SLCDC Interface

Detailed Description

Interface for Segment LCD controllers.

Data Structures

struct  slcdc_cfg_t
 
struct  slcdc_api_t
 
struct  slcdc_instance_t
 

Typedefs

typedef void slcdc_ctrl_t
 

Enumerations

enum  slcdc_bias_method_t
 
enum  slcdc_time_slice_t
 
enum  slcdc_waveform_t
 
enum  slcdc_drive_volt_gen_t
 
enum  slcdc_ref_volt_sel_t
 
enum  slcdc_display_area_control_blink_t
 
enum  slcdc_display_area_t
 
enum  slcdc_contrast_t
 
enum  slcdc_display_on_off_t
 
enum  slcdc_display_enable_disable_t
 
enum  slcdc_display_clock_t
 
enum  slcdc_clk_div_t
 

Data Structure Documentation

◆ slcdc_cfg_t

struct slcdc_cfg_t

SLCDC configuration block

Data Fields
slcdc_display_clock_t slcdc_clock LCD clock source (LCDSCKSEL)
slcdc_clk_div_t slcdc_clock_setting LCD clock setting (LCDC0)
slcdc_bias_method_t bias_method LCD display bias method select (LBAS bit)
slcdc_time_slice_t time_slice Time slice of LCD display select (LDTY bit)
slcdc_waveform_t waveform LCD display waveform select (LWAVE bit)
slcdc_drive_volt_gen_t drive_volt_gen LCD Drive Voltage Generator Select (MDSET bit)
slcdc_contrast_t contrast LCD Boost Level (contrast setting)
slcdc_ref_volt_sel_t ref_volt_sel LCD reference voltage selection (MDSET2 bit)

◆ slcdc_api_t

struct slcdc_api_t

SLCDC functions implemented at the HAL layer will follow this API.

Data Fields

fsp_err_t(* open )(slcdc_ctrl_t *const p_ctrl, slcdc_cfg_t const *const p_cfg)
 
fsp_err_t(* write )(slcdc_ctrl_t *const p_ctrl, uint8_t const start_segment, uint8_t const *p_data, uint8_t const segment_count)
 
fsp_err_t(* modify )(slcdc_ctrl_t *const p_ctrl, uint8_t const segment, uint8_t const data_mask, uint8_t const data)
 
fsp_err_t(* start )(slcdc_ctrl_t *const p_ctrl)
 
fsp_err_t(* stop )(slcdc_ctrl_t *const p_ctrl)
 
fsp_err_t(* setContrast )(slcdc_ctrl_t *const p_ctrl, slcdc_contrast_t const contrast)
 
fsp_err_t(* setDisplayArea )(slcdc_ctrl_t *const p_ctrl, slcdc_display_area_t const display_area)
 
fsp_err_t(* close )(slcdc_ctrl_t *const p_ctrl)
 

Field Documentation

◆ open

fsp_err_t(* slcdc_api_t::open) (slcdc_ctrl_t *const p_ctrl, slcdc_cfg_t const *const p_cfg)

Open SLCDC.

Parameters
[in,out]p_ctrlPointer to display interface control block. Must be declared by user.
[in]p_cfgPointer to display configuration structure. All elements of this structure must be set by the user.

◆ write

fsp_err_t(* slcdc_api_t::write) (slcdc_ctrl_t *const p_ctrl, uint8_t const start_segment, uint8_t const *p_data, uint8_t const segment_count)

Write data to the SLCDC segment data array. Specifies the initial display data. Except when using 8-time slice mode, store values in the lower 4 bits when writing to the A-pattern area and in the upper 4 bits when writing to the B-pattern area.

Parameters
[in]p_ctrlPointer to display interface control block.
[in]start_segmentSpecify the start segment number to be written.
[in]p_dataPointer to the display data to be written to the specified segments.
[in]segment_countNumber of segments to be written.

◆ modify

fsp_err_t(* slcdc_api_t::modify) (slcdc_ctrl_t *const p_ctrl, uint8_t const segment, uint8_t const data_mask, uint8_t const data)

Rewrite data in the SLCDC segment data array. Rewrites the LCD display data in 1-bit units. If a bit is not specified for rewriting, the value stored in the bit is held as it is.

Parameters
[in]p_ctrlPointer to display interface control block.
[in]segmentThe segment to be written.
[in]data_maskMask the data being displayed. Set 0 to the bit to be rewritten and set 1 to the other bits. Multiple bits can be rewritten.
[in]dataSpecify display data to rewrite to the specified segment.

◆ start

fsp_err_t(* slcdc_api_t::start) (slcdc_ctrl_t *const p_ctrl)

Enable display signal output. Displays the segment data on the LCD.

Parameters
[in]p_ctrlPointer to display interface control block.

◆ stop

fsp_err_t(* slcdc_api_t::stop) (slcdc_ctrl_t *const p_ctrl)

Disable display signal output. Stops displaying data on the LCD.

Parameters
[in]p_ctrlPointer to display interface control block.

◆ setContrast

fsp_err_t(* slcdc_api_t::setContrast) (slcdc_ctrl_t *const p_ctrl, slcdc_contrast_t const contrast)

Set the display contrast. This function can be used only when the internal voltage boosting method is used for drive voltage generation.

Parameters
[in]p_ctrlPointer to display interface control block.

◆ setDisplayArea

fsp_err_t(* slcdc_api_t::setDisplayArea) (slcdc_ctrl_t *const p_ctrl, slcdc_display_area_t const display_area)

Set LCD display area. This function sets a specified display area, A-pattern or B-pattern. This function can be used to 'blink' the display between A-pattern and B-pattern area data.

When using blinking, the RTC is required to operate before this function is executed. To configure the RTC, follow the steps below. 1) Open RTC 2) Set Periodic IRQ 3) Start RTC counter 4) Enable IRQ, RTC_EVENT_PERIODIC_IRQ Refer to the User's Manual for the detailed procedure.

Parameters
[in]p_ctrlPointer to display interface control block.
[in]display_areaDisplay area to be used, A-pattern or B-pattern area.

◆ close

fsp_err_t(* slcdc_api_t::close) (slcdc_ctrl_t *const p_ctrl)

Close SLCDC.

Parameters
[in]p_ctrlPointer to display interface control block.

◆ slcdc_instance_t

struct slcdc_instance_t

This structure encompasses everything that is needed to use an instance of this interface.

Data Fields
slcdc_ctrl_t * p_ctrl Pointer to the control structure for this instance.
slcdc_cfg_t const * p_cfg Pointer to the configuration structure for this instance.
slcdc_api_t const * p_api Pointer to the API structure for this instance.

Typedef Documentation

◆ slcdc_ctrl_t

typedef void slcdc_ctrl_t

SLCDC control block. Allocate an instance specific control block to pass into the SLCDC API calls.SLCDC control block

Enumeration Type Documentation

◆ slcdc_bias_method_t

LCD display bias method.

Enumerator
SLCDC_BIAS_2 

1/2 bias method

SLCDC_BIAS_3 

1/3 bias method

SLCDC_BIAS_4 

1/4 bias method

◆ slcdc_time_slice_t

Time slice of LCD display.

Enumerator
SLCDC_STATIC 

Static.

SLCDC_SLICE_2 

2-time slice

SLCDC_SLICE_3 

3-time slice

SLCDC_SLICE_4 

4-time slice

SLCDC_SLICE_6 

6-time slice

SLCDC_SLICE_8 

8-time slice

◆ slcdc_waveform_t

LCD display waveform select.

Enumerator
SLCDC_WAVE_A 

Waveform A.

SLCDC_WAVE_B 

Waveform B.

◆ slcdc_drive_volt_gen_t

LCD Drive Voltage Generator Select.

Enumerator
SLCDC_VOLT_EXTERNAL 

External resistance division method.

SLCDC_VOLT_INTERNAL 

Internal voltage boosting method.

SLCDC_VOLT_CAPACITOR 

Capacitor split method.

◆ slcdc_ref_volt_sel_t

LCD Reference Voltage Selection.

Enumerator
SLCDC_REF_INTERNAL_VL1_CAPACITOR_VCC_EXTERNAL 

Select VL1 reference for internal voltage or VCC reference for capacitor split or external division.

Select VL2 reference for internal voltage or VL4 reference for capacitor split

◆ slcdc_display_area_control_blink_t

Display Data Area Control

Enumerator
SLCDC_NOT_BLINKING 

Display either A-pattern or B-pattern data.

SLCDC_BLINKING 

Alternately display A-pattern and B-pattern data.

◆ slcdc_display_area_t

Display Area data

Enumerator
SLCDC_DISP_A 

Display A-pattern data.

SLCDC_DISP_B 

Display B-pattern data.

SLCDC_DISP_BLINK 

Blink between A- and B-pattern.

◆ slcdc_contrast_t

LCD Boost Level (contrast) settings

Enumerator
SLCDC_CONTRAST_0 

Contrast level 0.

SLCDC_CONTRAST_1 

Contrast level 1.

SLCDC_CONTRAST_2 

Contrast level 2.

SLCDC_CONTRAST_3 

Contrast level 3.

SLCDC_CONTRAST_4 

Contrast level 4.

SLCDC_CONTRAST_5 

Contrast level 5.

SLCDC_CONTRAST_6 

Contrast level 6.

SLCDC_CONTRAST_7 

Contrast level 7.

SLCDC_CONTRAST_8 

Contrast level 8.

SLCDC_CONTRAST_9 

Contrast level 9.

SLCDC_CONTRAST_10 

Contrast level 10.

SLCDC_CONTRAST_11 

Contrast level 11.

SLCDC_CONTRAST_12 

Contrast level 12.

SLCDC_CONTRAST_13 

Contrast level 13.

SLCDC_CONTRAST_14 

Contrast level 14.

SLCDC_CONTRAST_15 

Contrast level 15.

SLCDC_CONTRAST_16 

Contrast level 16.

SLCDC_CONTRAST_17 

Contrast level 17.

SLCDC_CONTRAST_18 

Contrast level 18.

SLCDC_CONTRAST_19 

Contrast level 19.

SLCDC_CONTRAST_20 

Contrast level 20.

SLCDC_CONTRAST_21 

Contrast level 21.

SLCDC_CONTRAST_22 

Contrast level 22.

◆ slcdc_display_on_off_t

LCD Display Enable/Disable

Enumerator
SLCDC_DISP_OFF 

Display off.

SLCDC_DISP_ON 

Display on.

◆ slcdc_display_enable_disable_t

LCD Display output enable

Enumerator
SLCDC_DISP_DISABLE 

Output ground level to segment/common pins.

SLCDC_DISP_ENABLE 

Output enable.

◆ slcdc_display_clock_t

LCD Display clock selection

Enumerator
SLCDC_CLOCK_LOCO 

Display clock source LOCO.

SLCDC_CLOCK_SOSC 

Display clock source SOSC.

SLCDC_CLOCK_MOSC 

Display clock source MOSC.

SLCDC_CLOCK_MOCO 

Display clock source MOCO.

SLCDC_CLOCK_HOCO 

Display clock source HOCO.

◆ slcdc_clk_div_t

LCD clock settings

Enumerator
SLCDC_CLK_DIVISOR_LOCO_4 

LOCO Clock/4.

SLCDC_CLK_DIVISOR_LOCO_8 

LOCO Clock/8.

SLCDC_CLK_DIVISOR_LOCO_16 

LOCO Clock/16.

SLCDC_CLK_DIVISOR_LOCO_32 

LOCO Clock/32.

SLCDC_CLK_DIVISOR_LOCO_64 

LOCO Clock/64.

SLCDC_CLK_DIVISOR_LOCO_128 

LOCO Clock/128.

SLCDC_CLK_DIVISOR_LOCO_256 

LOCO Clock/256.

SLCDC_CLK_DIVISOR_LOCO_512 

LOCO Clock/512.

SLCDC_CLK_DIVISOR_LOCO_1024 

LOCO Clock/1024.

SLCDC_CLK_DIVISOR_HOCO_256 

HOCO Clock/256.

SLCDC_CLK_DIVISOR_HOCO_512 

HOCO Clock/512.

SLCDC_CLK_DIVISOR_HOCO_1024 

HOCO Clock/1024.

SLCDC_CLK_DIVISOR_HOCO_2048 

HOCO Clock/2048.

SLCDC_CLK_DIVISOR_HOCO_4096 

HOCO Clock/4096.

SLCDC_CLK_DIVISOR_HOCO_8192 

HOCO Clock/8192.

SLCDC_CLK_DIVISOR_HOCO_16384 

HOCO Clock/16384.

SLCDC_CLK_DIVISOR_HOCO_32768 

HOCO Clock/32768.

SLCDC_CLK_DIVISOR_HOCO_65536 

HOCO Clock/65536.

SLCDC_CLK_DIVISOR_HOCO_131072 

HOCO Clock/131072.

SLCDC_CLK_DIVISOR_HOCO_262144 

HOCO Clock/262144.

SLCDC_CLK_DIVISOR_HOCO_524288 

HOCO Clock/524288.

SLCDC_CLK_DIVISOR_HOCO_1048576 

HOCO Clock/1048576.