SSD1306 OLED display driver  1.3.5
This library is developed to control SSD1306 i2c/spi OLED display
Classes | Functions
LCD menu control functions

Classes

struct  SAppMenu
 

Functions

void ssd1306_createMenu (SAppMenu *menu, const char **items, uint8_t count)
 
void ssd1306_showMenu (SAppMenu *menu)
 
void ssd1306_updateMenu (SAppMenu *menu)
 
uint8_t ssd1306_menuSelection (SAppMenu *menu)
 
void ssd1306_menuDown (SAppMenu *menu)
 
void ssd1306_menuUp (SAppMenu *menu)
 

Detailed Description

Function Documentation

◆ ssd1306_createMenu()

void ssd1306_createMenu ( SAppMenu menu,
const char **  items,
uint8_t  count 
)

Creates menu object with the provided list of menu items. List of menu items (strings) must exist all until menu object is no longer needed. Selection is set to the first item by default.

Parameters
menu- Pointer to SAppMenu structure
items- array of null-termintated strings (located in SRAM)
count- count of menu items in the array

Definition at line 36 of file ssd1306_menu.cpp.

◆ ssd1306_menuDown()

void ssd1306_menuDown ( SAppMenu menu)

Moves selection pointer down by 1 item. If there are no items below, it will set selection pointer to the first item. Use ssd1306_updateMenu() to refresh menu state on the display.

Parameters
menu- Pointer to SAppMenu structure

Definition at line 107 of file ssd1306_menu.cpp.

◆ ssd1306_menuSelection()

uint8_t ssd1306_menuSelection ( SAppMenu menu)

Returns currently selected menu item. First item has zero-index.

Parameters
menu- Pointer to SAppMenu structure

Definition at line 102 of file ssd1306_menu.cpp.

◆ ssd1306_menuUp()

void ssd1306_menuUp ( SAppMenu menu)

Moves selection pointer up by 1 item. If selected item is the first one, then selection pointer will set to the last item in menu list. Use ssd1306_updateMenu() to refresh menu state on the display.

Parameters
menu- Pointer to SAppMenu structure

Definition at line 119 of file ssd1306_menu.cpp.

◆ ssd1306_showMenu()

void ssd1306_showMenu ( SAppMenu menu)

Shows menu items on the display. If menu items cannot fit the display, the function provides scrolling.

Parameters
menu- Pointer to SAppMenu structure

Definition at line 72 of file ssd1306_menu.cpp.

◆ ssd1306_updateMenu()

void ssd1306_updateMenu ( SAppMenu menu)

Updates menu items on the display. That is if selection is changed, the function will update only those areas, affected by the change.

Parameters
menu- Pointer to SAppMenu structure

Definition at line 83 of file ssd1306_menu.cpp.