Memory LCD#

The memory liquid crystal display (LCD) driver provides the ability to render characters or monochrome pictures onto the display of the LCD peripheral on the SiWx91x™ device.

Sample APIs for using the memory LCD.

The memory LCD interface is built to use SPI communication either with usart or eusart. Configurations for three standard display are already supported (lpm013m126a, ls013b7dh03 and ls013b7dh06), but the sl_memlcd_t structure can also be configured with a custom LCD's specifications. To implement a fully custom memory LCD interface, see Custom-Memory-LCD.


Custom-Memory-LCD#

The custom memory LCD is a module allowing the implementation of an LCD driver that can't use the already designed interface. To achieve this, the following conditions must be met.

The LCD driver and the communication needs to be implemented manually. However, some APIs must be implemented and the sl_memlcd_t structure must be initialized for the GLIB library to work properly. The APIs to implement are sl_memlcd_init, sl_memlcd_power_on, sl_memlcd_draw and sl_memlcd_get and they must follow the same declaration as shown in the documentation.

In the sl_memlcd_init API, it is important to initialize a sl_memlcd_t type variable and fill in the "height" and "width" fields with the real specifications of the LCD display. This same variable must be accessible from the sl_memlcd_get API as the GLIB library will fetch the height and width of the display.

The sl_memlcd_t structure contains a "custom_data" field to store any custom structure needed for the implementation of the driver.

Modules#

sl_memlcd_t

Typedefs#

typedef struct sl_memlcd_t

General memory LCD data structure.

Functions#

sl_status_t
sl_memlcd_configure(struct sl_memlcd_t *device)

Enumeration to represent ulp-timer instances.

void

Enable the memory LCD display.

sl_status_t
sl_memlcd_power_on(const struct sl_memlcd_t *device, bool on)

Enable or disable the display.

sl_status_t

PI to handle MEMLCD initialization after wakeup.

sl_status_t
sl_memlcd_clear(const struct sl_memlcd_t *device)

Clear the display.

sl_status_t
sl_memlcd_draw(const struct sl_memlcd_t *device, const void *data, unsigned int row_start, unsigned int row_count)

Draw a number of rows to the memory LCD display.

sl_status_t
sl_memlcd_refresh(const struct sl_memlcd_t *device)

Refresh the display device.

const sl_memlcd_t *

Get a handle to the memory LCD.

Typedef Documentation#

sl_memlcd_t#

typedef struct sl_memlcd_t sl_memlcd_t

General memory LCD data structure.


Definition at line 61 of file components/device/silabs/si91x/mcu/drivers/hardware_drivers/memlcd/inc/sl_memlcd.h

Function Documentation#

sl_memlcd_configure#

sl_status_t sl_memlcd_configure (struct sl_memlcd_t * device)

Enumeration to represent ulp-timer instances.

Parameters
[in]device

Display device pointer.

Configure the memory LCD device.

This API must be called to configure the memory LCD device before starting to use the memory LCD.

Returns

  • status code of the operation.


Definition at line 76 of file components/device/silabs/si91x/mcu/drivers/hardware_drivers/memlcd/inc/sl_memlcd.h

sl_memlcd_display_enable#

void sl_memlcd_display_enable (void )

Enable the memory LCD display.

Parameters
N/A

This API must be called to enable MEMLCD display.

Returns

  • none.


Definition at line 88 of file components/device/silabs/si91x/mcu/drivers/hardware_drivers/memlcd/inc/sl_memlcd.h

sl_memlcd_power_on#

sl_status_t sl_memlcd_power_on (const struct sl_memlcd_t * device, bool on)

Enable or disable the display.

Parameters
[in]device

Display device pointer.

[in]on

Set this parameter to 'true' to enable the display. Set to 'false' in order to disable the display.

This API enables or disables the display. Disabling the display does not result in data loss. Note that this API does not control the DISP pin on the display. This pin is managed by board-specific code.

Returns

  • status code of the operation.


Definition at line 104 of file components/device/silabs/si91x/mcu/drivers/hardware_drivers/memlcd/inc/sl_memlcd.h

sl_memlcd_post_wakeup_init#

sl_status_t sl_memlcd_post_wakeup_init (void )

PI to handle MEMLCD initialization after wakeup.

Parameters
N/A

This API handles the MEMLCD initialization after wakeup.

Returns

  • status code of the operation.


Definition at line 115 of file components/device/silabs/si91x/mcu/drivers/hardware_drivers/memlcd/inc/sl_memlcd.h

sl_memlcd_clear#

sl_status_t sl_memlcd_clear (const struct sl_memlcd_t * device)

Clear the display.

Parameters
[in]device

Memory LCD display device.

Returns

  • SL_STATUS_OK if there are no errors.


Definition at line 124 of file components/device/silabs/si91x/mcu/drivers/hardware_drivers/memlcd/inc/sl_memlcd.h

sl_memlcd_draw#

sl_status_t sl_memlcd_draw (const struct sl_memlcd_t * device, const void * data, unsigned int row_start, unsigned int row_count)

Draw a number of rows to the memory LCD display.

Parameters
[in]device

Memory LCD display device.

[in]data

Pointer to the pixel matrix buffer to draw. The format of the buffer depends on the color mode of the memory LCD display.

[in]row_start

Start row on the display where to start drawing. First row is 0.

[in]row_count

Number of rows to draw.

Returns

  • SL_STATUS_OK if there are no errors.


Definition at line 140 of file components/device/silabs/si91x/mcu/drivers/hardware_drivers/memlcd/inc/sl_memlcd.h

sl_memlcd_refresh#

sl_status_t sl_memlcd_refresh (const struct sl_memlcd_t * device)

Refresh the display device.

Parameters
[in]device

Display device pointer.

This API can be used when, for instance, the clock configuration was changed to re-initialize the SPI clock rate.

Returns

  • status code of the operation.


Definition at line 155 of file components/device/silabs/si91x/mcu/drivers/hardware_drivers/memlcd/inc/sl_memlcd.h

sl_memlcd_get#

const sl_memlcd_t * sl_memlcd_get (void )

Get a handle to the memory LCD.

Parameters
N/A

Returns

  • Pointer to a memory LCD structure or NULL if no memory LCD is initialized yet.


Definition at line 163 of file components/device/silabs/si91x/mcu/drivers/hardware_drivers/memlcd/inc/sl_memlcd.h