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.

The memory LCD interface is built to use SPI communication either with USART or EUSART.

Custom-Memory-LCD#

The custom memory LCD module enables the implementation of an LCD driver that is incompatible with existing interfaces. To accomplish this, the following conditions must be fulfilled.

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 the ulp-timer instances.

void

To enable the memory LCD display.

void

To disable the memory LCD display.

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

To enable or disable the display.

sl_status_t

Handles MEMLCD initialization after wakeup.

sl_status_t
sl_memlcd_clear(const struct sl_memlcd_t *device)

Clears 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)

Draws a number of rows to the memory LCD display.

sl_status_t
sl_memlcd_refresh(const struct sl_memlcd_t *device)

Refreshes the display device.

const sl_memlcd_t *

Gets 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 the ulp-timer instances.

Parameters
[in]device

Memory LCD Display device pointer.

Configures the memory LCD device.

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

Returns

  • Status code of the operation:

    • SL_STATUS_OK (0x0000) - Success.

    • SL_STATUS_FAIL (0x0001) - Failure.


Definition at line 77 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 )

To enable the memory LCD display.

Parameters
N/A

This API must be called to enable MEMLCD display.


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

sl_memlcd_display_disable#

void sl_memlcd_display_disable (void )

To disable the memory LCD display.

Parameters
N/A

This API must be called to disable MEMLCD display.


Definition at line 92 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)

To 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 110 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 )

Handles MEMLCD initialization after wakeup.

Parameters
N/A

This API handles the initialization of the MEMLCD after the system wakes up from a low-power state.

Returns

  • Status code of the operation:

    • SL_STATUS_OK (0x0000) - Success.

    • SL_STATUS_FAIL (0x0001) - Failure.


Definition at line 123 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)

Clears the display.

Parameters
[in]device

Memory LCD Display device pointer.

This API will clear the display of memory LCD. Returns

  • Status code of the operation.


Definition at line 134 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)

Draws a number of rows to the memory LCD display.

Parameters
[in]device

Memory LCD Display device pointer.

[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. The first row is 0.

[in]row_count

Number of rows to draw.

This API will draw a specified number of rows to the memory LCD display. The data parameter points to the pixel matrix buffer to draw, and its format depends on the color mode of the memory LCD display.

Returns

  • SL_STATUS_OK if there are no errors.


Definition at line 152 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)

Refreshes the display device.

Parameters
[in]device

Memory LCD Display device pointer.

This API refreshes the memory LCD display. It is typically used to re-initialize the SPI clock rate after a clock configuration change.

Returns

  • Status code of the operation:

    • SL_STATUS_OK (0x0000) - Success.

    • SL_STATUS_FAIL (0x0001) - Failure.


Definition at line 170 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 )

Gets a handle to the memory LCD.

Parameters
N/A

This function returns a handle to the memory LCD structure. If no memory LCD is initialized yet, it returns NULL.

Returns

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


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