|
esp32-warm-water
esp32 based project for the control of a heating element based on temperature
|
defininitions for setting up, interacting with and sending commands to an ssd1306 driven screen via i2c or spi More...
#include "driver/spi_master.h"

Go to the source code of this file.
Data Structures | |
| struct | PAGE_t |
| struct | SSD1306_t |
Enumerations | |
| enum | ssd1306_scroll_type_t { SCROLL_RIGHT = 1 , SCROLL_LEFT = 2 , SCROLL_DOWN = 3 , SCROLL_UP = 4 , SCROLL_STOP = 5 } |
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_hardware_scroll_line (SSD1306_t *dev, int page, 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) |
| void | i2c_master_init (SSD1306_t *dev, int16_t sda, int16_t scl, int16_t reset) |
| void | i2c_init (SSD1306_t *dev, int width, int height) |
| void | i2c_display_image (SSD1306_t *dev, int page, int seg, uint8_t *images, int width) |
| void | i2c_contrast (SSD1306_t *dev, int contrast) |
| void | i2c_hardware_scroll (SSD1306_t *dev, ssd1306_scroll_type_t scroll) |
| void | i2c_hardware_scroll_line (SSD1306_t *dev, int page, ssd1306_scroll_type_t scroll) |
| void | spi_master_init (SSD1306_t *dev, int16_t GPIO_MOSI, int16_t GPIO_SCLK, int16_t GPIO_CS, int16_t GPIO_DC, int16_t GPIO_RESET) |
| bool | spi_master_write_byte (spi_device_handle_t SPIHandle, const uint8_t *Data, size_t DataLength) |
| bool | spi_master_write_command (SSD1306_t *dev, uint8_t Command) |
| bool | spi_master_write_data (SSD1306_t *dev, const uint8_t *Data, size_t DataLength) |
| void | spi_init (SSD1306_t *dev, int width, int height) |
| void | spi_display_image (SSD1306_t *dev, int page, int seg, uint8_t *images, int width) |
| void | spi_contrast (SSD1306_t *dev, int contrast) |
| void | spi_hardware_scroll (SSD1306_t *dev, ssd1306_scroll_type_t scroll) |
| void | spi_hardware_scroll_line (SSD1306_t *dev, int page, ssd1306_scroll_type_t scroll) |
defininitions for setting up, interacting with and sending commands to an ssd1306 driven screen via i2c or spi
Definition in file ssd1306.h.
| void i2c_contrast | ( | SSD1306_t * | dev, |
| int | contrast | ||
| ) |
set the contrast of the screen
| dev | the screen device to interact with |
| contrast | the level of contrast |
Definition at line 211 of file ssd1306_i2c.c.

| void i2c_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 |
Definition at line 159 of file ssd1306_i2c.c.

| void i2c_hardware_scroll | ( | SSD1306_t * | dev, |
| ssd1306_scroll_type_t | scroll | ||
| ) |
send the command for a continues scroll via hardware
| dev | the screen device to interact with |
| scroll | the direction of the scroll |
Definition at line 236 of file ssd1306_i2c.c.

| void i2c_hardware_scroll_line | ( | SSD1306_t * | dev, |
| int | page, | ||
| ssd1306_scroll_type_t | scroll | ||
| ) |
send the command for a continues scroll via hardware
| dev | the screen device to interact with |
| page | the specific page to scroll |
| scroll | the direction of the scroll |
Definition at line 335 of file ssd1306_i2c.c.

| void i2c_init | ( | SSD1306_t * | dev, |
| int | width, | ||
| int | height | ||
| ) |
initialise the screen i2c session
| dev | the screen device to interact with |
| width | the width of the screen |
| height | the height of the screen |
Definition at line 80 of file ssd1306_i2c.c.

| void i2c_master_init | ( | SSD1306_t * | dev, |
| int16_t | sda, | ||
| int16_t | scl, | ||
| int16_t | reset | ||
| ) |
initialise an i2c device
| dev | the device to interact with |
| sda | the pin to use for SDA |
| scl | the pin to use for SCL |
| reset | the reset pin to use |
Definition at line 50 of file ssd1306_i2c.c.

| void spi_contrast | ( | SSD1306_t * | dev, |
| int | contrast | ||
| ) |
set the contrast of the screen
| dev | the screen device to interact with |
| contrast | the level of contrast |
Definition at line 258 of file ssd1306_spi.c.


| void spi_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 |
Definition at line 226 of file ssd1306_spi.c.


| void spi_hardware_scroll | ( | SSD1306_t * | dev, |
| ssd1306_scroll_type_t | scroll | ||
| ) |
send the command for a continues scroll via hardware
| dev | the screen device to interact with |
| scroll | the direction of the scroll |
Definition at line 275 of file ssd1306_spi.c.


| void spi_hardware_scroll_line | ( | SSD1306_t * | dev, |
| int | page, | ||
| ssd1306_scroll_type_t | scroll | ||
| ) |
send the command for a continues scroll via hardware
| dev | the screen device to interact with |
| page | the specific page to scroll |
| scroll | the direction of the scroll |
Definition at line 352 of file ssd1306_spi.c.


| void spi_init | ( | SSD1306_t * | dev, |
| int | width, | ||
| int | height | ||
| ) |
initialise the screen spi session
| dev | the screen device to interact with |
| width | the width of the screen |
| height | the height of the screen |
Definition at line 165 of file ssd1306_spi.c.


| void spi_master_init | ( | SSD1306_t * | dev, |
| int16_t | GPIO_MOSI, | ||
| int16_t | GPIO_SCLK, | ||
| int16_t | GPIO_CS, | ||
| int16_t | GPIO_DC, | ||
| int16_t | GPIO_RESET | ||
| ) |
initialise an spi device
| dev | the device to interact with |
| GPIO_MOSI | the pin to use for GPIO_MOSI |
| GPIO_SCLK | the pin to use for GPIO_SCLK |
| GPIO_CS | the pin to use for GPIO_CS |
| GPIO_DC | the pin to use for GPIO_DC |
| GPIO_RESET | the pin to use for GPIO_RESET |
Definition at line 65 of file ssd1306_spi.c.

| bool spi_master_write_byte | ( | spi_device_handle_t | SPIHandle, |
| const uint8_t * | Data, | ||
| size_t | DataLength | ||
| ) |
write a byte to the spi device
| SPIHandle | the spi device to interact with |
| Data | the data being sent |
| DataLength | the length of the data being sent |
Definition at line 119 of file ssd1306_spi.c.
| bool spi_master_write_command | ( | SSD1306_t * | dev, |
| uint8_t | Command | ||
| ) |
write a command to the screen
| dev | the screen device to interact with |
| Command | the command being sent |
Definition at line 139 of file ssd1306_spi.c.

| bool spi_master_write_data | ( | SSD1306_t * | dev, |
| const uint8_t * | Data, | ||
| size_t | DataLength | ||
| ) |
write data to the screen
| dev | the screen device to interact with |
| Data | the data being sent |
| DataLength | the length of the data being sent |
Definition at line 153 of file ssd1306_spi.c.

| 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 |
Definition at line 190 of file ssd1306.c.


| void ssd1306_clear_screen | ( | SSD1306_t * | dev, |
| bool | invert | ||
| ) |
| void ssd1306_contrast | ( | SSD1306_t * | dev, |
| int | contrast | ||
| ) |
| void ssd1306_deinit | ( | SSD1306_t * | dev | ) |
| 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 |
Definition at line 159 of file ssd1306.c.


| 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 |
Definition at line 112 of file ssd1306.c.


| void ssd1306_dump | ( | SSD1306_t | dev | ) |
| void ssd1306_fadeout | ( | SSD1306_t * | dev | ) |
| void ssd1306_flip | ( | uint8_t * | buf, |
| size_t | blen | ||
| ) |
| void ssd1306_hardware_scroll | ( | SSD1306_t * | dev, |
| ssd1306_scroll_type_t | scroll | ||
| ) |
| void ssd1306_hardware_scroll_line | ( | SSD1306_t * | dev, |
| int | page, | ||
| ssd1306_scroll_type_t | scroll | ||
| ) |
| void ssd1306_init | ( | SSD1306_t * | dev | ) |
| void ssd1306_invert | ( | uint8_t * | buf, |
| size_t | blen | ||
| ) |
| uint8_t ssd1306_rotate | ( | uint8_t | ch1 | ) |
| void ssd1306_scroll_clear | ( | SSD1306_t * | dev | ) |
| void ssd1306_scroll_text | ( | SSD1306_t * | dev, |
| char * | text, | ||
| int | text_len, | ||
| bool | invert | ||
| ) |
| void ssd1306_software_scroll | ( | SSD1306_t * | dev, |
| int | start, | ||
| int | end | ||
| ) |
| void ssd1306_wrapped_display_text | ( | SSD1306_t * | dev, |
| int | line, | ||
| char * | text | ||
| ) |