WSTK LCD Driver#
The WSTK LCD Driver is an application-level software module which implements an interface for WSTK board's LCD screen usage, ensuring the uniform display of BT Mesh specific values. The interface contains an initialization and a write function. The LCD initialization is executed automatically at startup. The write interface is used to write one specified line of text to the LCD. This component is prepared for integration into SOC applications. This is a No-code component (The LCD can be enabled/disabled in the Platform/Board Control software component).
Enumerations#
Enumeration of possible arrows to be drawn.
Functions#
Initialize graphics stack.
Display a string on the LCD center aligned.
Enumeration Documentation#
sl_btmesh_LCD_arrow#
sl_btmesh_LCD_arrow
Enumeration of possible arrows to be drawn.
Enumerator | |
---|---|
SL_BTMESH_LCD_LEFT_ARROW | Left arrow. |
SL_BTMESH_LCD_RIGHT_ARROW | Right arrow. |
SL_BTMESH_LCD_LEFT_RIGHT_ARROW | Left arrow and right arrow. |
Function Documentation#
graphInit#
void graphInit (char * header)
Initialize graphics stack.
Type | Direction | Argument Name | Description |
---|---|---|---|
char * | [in] | header | Header Text on display |
graphWriteString#
sl_status_t graphWriteString (char * string)
Display a string on the LCD center aligned.
Type | Direction | Argument Name | Description |
---|---|---|---|
char * | [in] | string | String to be displayed |
Returns
Status of the command.
Return values
SL_STATUS_OK: In case of success
SL_STATUS_FAIL: In case of failure
graphDrawArrow#
sl_status_t graphDrawArrow (sl_btmesh_LCD_arrow arrow)
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_btmesh_LCD_arrow | [in] | arrow | Arrow to be drawn |
Draw arrows on the page.
Returns
Status code
Return values
SL_STATUS_OK: In case of success
SL_STATUS_FAIL: In case of failure
sl_btmesh_LCD_init#
sl_status_t sl_btmesh_LCD_init (void )
Type | Direction | Argument Name | Description |
---|---|---|---|
void | N/A |
Initialize LCD.
Called once at startup.
Returns
Status code
Return values
SL_STATUS_OK: In case of success
SL_STATUS_FAIL: If writing header failed
sl_btmesh_LCD_write#
sl_status_t sl_btmesh_LCD_write (const char * str, uint8_t row)
Type | Direction | Argument Name | Description |
---|---|---|---|
const char * | [in] | str | Pointer to string which is displayed in the specified row. |
uint8_t | [in] | row | Selects which line of LCD display is written, possible values are defined as LCD_ROW_xxx. |
This function is used to write one line on the LCD.
Note
This uses sl_btmesh_LCD_write_paged to write onto page 0.
Returns
Status code
Return values
SL_STATUS_OK: In case of success
SL_STATUS_INVALID_PARAMETER: If row is invalid
SL_STATUS_FAIL: If writing failed
sl_btmesh_LCD_write_paged#
sl_status_t sl_btmesh_LCD_write_paged (const char * str, uint8_t row, uint8_t page)
Type | Direction | Argument Name | Description |
---|---|---|---|
const char * | [in] | str | Pointer to string which is displayed in the specified row. |
uint8_t | [in] | row | Selects which line of LCD display is written, possible values are defined as LCD_ROW_xxx. |
uint8_t | [in] | page | Page identifier. Zero-based. |
This function is used to write one line on the LCD onto the given page.
Pages are handled dynamically
Returns
Status code
Return values
SL_STATUS_OK: In case of success
SL_STATUS_INVALID_PARAMETER: If row is invalid
SL_STATUS_FAIL: If writing failed
sl_btmesh_LCD_select_page#
sl_status_t sl_btmesh_LCD_select_page (uint8_t page)
Type | Direction | Argument Name | Description |
---|---|---|---|
uint8_t | [in] | page | Page index to display. Zero-based. |
Select page to be displayed and display it.
Returns
Status code
Return values
SL_STATUS_OK: In case of success
SL_STATUS_FAIL: If page refresh failed
SL_STATUS_INVALID_INDEX: If page index is out of range
sl_btmesh_LCD_next_page#
sl_status_t sl_btmesh_LCD_next_page (void )
Type | Direction | Argument Name | Description |
---|---|---|---|
void | N/A |
Select next page to be displayed and display it.
Returns
Status code
Return values
SL_STATUS_OK: In case of success, or last page is displayed
SL_STATUS_FAIL: If page refresh failed
sl_btmesh_LCD_prev_page#
sl_status_t sl_btmesh_LCD_prev_page (void )
Type | Direction | Argument Name | Description |
---|---|---|---|
void | N/A |
Select previous page to be displayed and display it.
Returns
Status code
Return values
SL_STATUS_OK: In case of success, or last page is displayed
SL_STATUS_FAIL: If page refresh failed
sl_btmesh_LCD_remove_page#
sl_status_t sl_btmesh_LCD_remove_page (uint8_t page)
Type | Direction | Argument Name | Description |
---|---|---|---|
uint8_t | [in] | page | Page index to remove. Zero-based. |
Remove page.
If currently displayed page is removed, display a valid one. If last page is removed, display the first one. If page is removed from before the currently displayed page refresh page so consistency is upheld.
Page 0 can't be removed.
Returns
Status code
Return values
SL_STATUS_OK: In case of success
SL_STATUS_INVALID_INDEX: If page is out of range or 0.
SL_STATUS_FAIL: If page needed to be refreshed and was unsuccessful
sl_btmesh_LCD_clear_pages#
sl_status_t sl_btmesh_LCD_clear_pages (void )
Type | Direction | Argument Name | Description |
---|---|---|---|
void | N/A |
Remove every page except the first.
Refreshes page.
Returns
Status code
Return values
SL_STATUS_OK: In case of success
SL_STATUS_FAIL: If page refresh is unsuccessful