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.
Refer to https://docs.silabs.com/gecko-platform/3.1/hardware-driver/api/group-memlcd for more information.
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#
Typedefs#
General memory LCD data structure.
Functions#
Enumeration to represent ulp-timer instances.
Enable the memory LCD display.
Enable or disable the display.
PI to handle MEMLCD initialization after wakeup.
Clear the display.
Draw a number of rows to the memory LCD display.
Refresh the display device.
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.
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.
[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.
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.
N/A |
This API must be called to enable MEMLCD display.
Returns
none.
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.
[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.
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.
N/A |
This API handles the MEMLCD initialization after wakeup.
Returns
status code of the operation.
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.
[in] | device | Memory LCD display device. |
Returns
SL_STATUS_OK if there are no errors.
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.
[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.
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.
[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.
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.
N/A |
Returns
Pointer to a memory LCD structure or NULL if no memory LCD is initialized yet.
163
of file components/device/silabs/si91x/mcu/drivers/hardware_drivers/memlcd/inc/sl_memlcd.h