|
esp32-warm-water
esp32 based project for the control of a heating element based on temperature
|
implementations of functions for setting up, interacting with and sending commands to an ssd1306 driven screen via spi More...
#include <string.h>#include "freertos/FreeRTOS.h"#include "freertos/task.h"#include "driver/spi_master.h"#include "driver/gpio.h"#include "esp_log.h"#include "ssd1306.h"
Go to the source code of this file.
Macros | |
| #define | tag CONFIG_SSD1306_SPI_TAG |
| tag for logging library More... | |
Functions | |
| 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) |
implementations of functions for setting up, interacting with and sending commands to an ssd1306 driven screen via spi
Definition in file ssd1306_spi.c.
| #define tag CONFIG_SSD1306_SPI_TAG |
tag for logging library
Definition at line 42 of file ssd1306_spi.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.
