SSD1306 I2C Display Driver
1.2.1
This library is developed to control SSD1306 I2C OLED Display
|
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) |
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.
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 28 of file ssd1306_menu.c.
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.
menu | - Pointer to SAppMenu structure |
Definition at line 99 of file ssd1306_menu.c.
uint8_t ssd1306_menuSelection | ( | SAppMenu * | menu | ) |
Returns currently selected menu item. First item has zero-index.
menu | - Pointer to SAppMenu structure |
Definition at line 94 of file ssd1306_menu.c.
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.
menu | - Pointer to SAppMenu structure |
Definition at line 111 of file ssd1306_menu.c.
void ssd1306_showMenu | ( | SAppMenu * | menu | ) |
Shows menu items on the display. If menu items cannot fit the display, the function provides scrolling.
menu | - Pointer to SAppMenu structure |
Definition at line 64 of file ssd1306_menu.c.
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.
menu | - Pointer to SAppMenu structure |
Definition at line 75 of file ssd1306_menu.c.