MEMLCD - Memory LCD

Description

Memory LCD interface.

Data Structures

struct  sl_memlcd_t
 General memory LCD data structure.
 

Functions

sl_status_t sl_memlcd_configure (struct sl_memlcd_t *device)
 Configure the memory LCD device.
 
sl_status_t sl_memlcd_power_on (const struct sl_memlcd_t *device, bool on)
 Enable or disable the display.
 
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_tsl_memlcd_get (void)
 Get a handle to the memory LCD.
 

Function Documentation

◆ sl_memlcd_configure()

sl_status_t sl_memlcd_configure ( struct sl_memlcd_t device)

Configure the memory LCD device.

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

Parameters
[in]deviceDisplay device pointer.
Returns
status code of the operation.

◆ sl_memlcd_power_on()

sl_status_t sl_memlcd_power_on ( const struct sl_memlcd_t device,
bool  on 
)

Enable or disable the display.

This function enables or disables the display. Disabling the display does not make it lose its data. Note that this function will not control the DISP pin on the display. This pin is usually controlled by board specific code.

Parameters
[in]deviceDisplay device pointer.
[in]onSet this parameter to 'true' to enable the display. Set to 'false' in order to disable the display.
Returns
status code of the operation.

◆ sl_memlcd_clear()

sl_status_t sl_memlcd_clear ( const struct sl_memlcd_t device)

Clear the display.

Parameters
[in]deviceMemory LCD display device.
Returns
SL_STATUS_OK if there are no errors.

◆ 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]deviceMemory LCD display device.
[in]dataPointer to the pixel matrix buffer to draw. The format of the buffer depends on the color mode of the memory LCD display.
[in]row_startStart row on the display where to start drawing. First row is 0.
[in]row_countNumber of rows to draw.
Returns
SL_STATUS_OK if there are no errors.

◆ sl_memlcd_refresh()

sl_status_t sl_memlcd_refresh ( const struct sl_memlcd_t device)

Refresh the display device.

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

Parameters
[in]deviceDisplay device pointer.
Returns
status code of the operation.

◆ sl_memlcd_get()

const sl_memlcd_t* sl_memlcd_get ( void  )

Get a handle to the memory LCD.

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