SSD1306 OLED display driver
1.4.4
This library is developed to control SSD1306/SSD1331 RGB i2c/spi OLED displays and spi PCD8544 LED 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 41 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 112 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 107 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 124 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 77 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 88 of file ssd1306_menu.c.