|
esp32-ssd1306
ssd1306 interface component for esp-idf
|
implementations of functions for setting up, interacting with and sending commands to an ssd1306 driven screen via spi or i2c More...
#include <string.h>#include "freertos/FreeRTOS.h"#include "freertos/task.h"#include "esp_log.h"#include "ssd1306.h"#include "font8x8_basic.h"#include "font8x8_readable.h"#include "font8x8_space.h"Macros | |
| #define | tag CONFIG_SSD1306_TAG |
| tag for logging library | |
Functions | |
| void | ssd1306_init (SSD1306_t *dev) |
| void | ssd1306_deinit (SSD1306_t *dev) |
| void | ssd1306_display_text (SSD1306_t *dev, int page, char *text, int text_len, bool invert) |
| void | ssd1306_wrapped_display_text (SSD1306_t *dev, int line, char *text) |
| void | ssd1306_display_image (SSD1306_t *dev, int page, int seg, uint8_t *images, int width) |
| void | ssd1306_clear_screen (SSD1306_t *dev, bool invert) |
| void | ssd1306_clear_line (SSD1306_t *dev, int page, bool invert) |
| void | ssd1306_contrast (SSD1306_t *dev, int contrast) |
| void | ssd1306_software_scroll (SSD1306_t *dev, int start, int end) |
| void | ssd1306_scroll_text (SSD1306_t *dev, char *text, int text_len, bool invert) |
| void | ssd1306_scroll_clear (SSD1306_t *dev) |
| void | ssd1306_hardware_scroll (SSD1306_t *dev, ssd1306_scroll_type_t scroll) |
| void | ssd1306_invert (uint8_t *buf, size_t blen) |
| void | ssd1306_flip (uint8_t *buf, size_t blen) |
| uint8_t | ssd1306_rotate (uint8_t ch1) |
| void | ssd1306_fadeout (SSD1306_t *dev) |
| void | ssd1306_dump (SSD1306_t dev) |
Variables | |
| int | center |
| int | top |
| int | bottom |
| positions for oled | |
implementations of functions for setting up, interacting with and sending commands to an ssd1306 driven screen via spi or i2c
| void ssd1306_init | ( | SSD1306_t * | dev | ) |
initialise the screen device
| void ssd1306_deinit | ( | SSD1306_t * | dev | ) |
| void ssd1306_display_text | ( | SSD1306_t * | dev, |
| int | page, | ||
| char * | text, | ||
| int | text_len, | ||
| bool | invert | ||
| ) |
display some text on the screen
| dev | the screen device to interact with |
| page | the line to display the text on |
| text | the text data |
| text_len | the text length |
| invert | whether or not to invert the text and background colours |
| void ssd1306_wrapped_display_text | ( | SSD1306_t * | dev, |
| int | line, | ||
| char * | text | ||
| ) |
display some text on the screen
| dev | the screen device to interact with |
| line | the line to display the text on |
| text | the text data |
| void ssd1306_display_image | ( | SSD1306_t * | dev, |
| int | page, | ||
| int | seg, | ||
| uint8_t * | images, | ||
| int | width | ||
| ) |
display an image on the screen
| dev | the screen device to interact with |
| page | the line to display the image on |
| seg | the segment of the image |
| images | the image data to display |
| width | the width of the image |
| void ssd1306_clear_screen | ( | SSD1306_t * | dev, |
| bool | invert | ||
| ) |
clear the screen (fills the screen with spaces)
| dev | the screen device to interact with |
| invert | whether or not the cleared screen should be inverted |
| void ssd1306_clear_line | ( | SSD1306_t * | dev, |
| int | page, | ||
| bool | invert | ||
| ) |
clear a specific line (fills the line with spaces)
| dev | the screen device to interact with |
| page | the line to clear |
| invert | whether or not the cleared line should be inverted |
| void ssd1306_contrast | ( | SSD1306_t * | dev, |
| int | contrast | ||
| ) |
set the contrast of the screen
| dev | the screen device to interact with |
| contrast | the level of contrast |
| void ssd1306_software_scroll | ( | SSD1306_t * | dev, |
| int | start, | ||
| int | end | ||
| ) |
start scrolling the screen via software
| dev | the screen device to interact with |
| start | the start of the scroll |
| end | the end of the scroll |
| void ssd1306_scroll_text | ( | SSD1306_t * | dev, |
| char * | text, | ||
| int | text_len, | ||
| bool | invert | ||
| ) |
display some scrolling text on the screen
| dev | the screen device to interact with |
| text | the text data |
| text_len | the text length |
| invert | whether or not the scrolling text should be inverted |
| void ssd1306_scroll_clear | ( | SSD1306_t * | dev | ) |
stop scrolling the screen via software
| dev | the screen device to interact with |
| void ssd1306_hardware_scroll | ( | SSD1306_t * | dev, |
| ssd1306_scroll_type_t | scroll | ||
| ) |
start scrolling the screen via hardware
| dev | the screen device to interact with |
| scroll | the direction of the scroll |
| void ssd1306_invert | ( | uint8_t * | buf, |
| size_t | blen | ||
| ) |
invert a buffer of data
| buf | buffer to invert |
| blen | the length of the buffer |
| void ssd1306_flip | ( | uint8_t * | buf, |
| size_t | blen | ||
| ) |
flip a buffer of data
| buf | buffer to flip |
| blen | the length of the buffer |
| uint8_t ssd1306_rotate | ( | uint8_t | ch1 | ) |
rotate a buffer of data
| buf | buffer to rotate |
| blen | the length of the buffer |
| void ssd1306_fadeout | ( | SSD1306_t * | dev | ) |
fadeout the screen
| dev | the screen device to interact with |
| void ssd1306_dump | ( | SSD1306_t | dev | ) |
dump the screen data
| dev | the screen device to interact with |