esp32-warm-water
esp32 based project for the control of a heating element based on temperature
Macros | Functions
ssd1306_i2c.c File Reference

implementations of functions for setting up, interacting with and sending commands to an ssd1306 driven screen via i2c More...

#include <string.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "driver/i2c.h"
#include "esp_log.h"
#include "ssd1306.h"
Include dependency graph for ssd1306_i2c.c:

Go to the source code of this file.

Macros

#define tag   CONFIG_SSD1306_I2C_TAG
 tag for logging library More...
 

Functions

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)
 

Detailed Description

implementations of functions for setting up, interacting with and sending commands to an ssd1306 driven screen via i2c

Definition in file ssd1306_i2c.c.

Macro Definition Documentation

◆ tag

#define tag   CONFIG_SSD1306_I2C_TAG

tag for logging library

Definition at line 41 of file ssd1306_i2c.c.

Function Documentation

◆ i2c_contrast()

void i2c_contrast ( SSD1306_t dev,
int  contrast 
)

set the contrast of the screen

Parameters
devthe screen device to interact with
contrastthe level of contrast

Definition at line 211 of file ssd1306_i2c.c.

Here is the caller graph for this function:

◆ i2c_display_image()

void i2c_display_image ( SSD1306_t dev,
int  page,
int  seg,
uint8_t *  images,
int  width 
)

display an image on the screen

Parameters
devthe screen device to interact with
pagethe line to display the image on
segthe segment of the image
imagesthe image data to display
widththe width of the image

Definition at line 159 of file ssd1306_i2c.c.

Here is the caller graph for this function:

◆ i2c_hardware_scroll()

void i2c_hardware_scroll ( SSD1306_t dev,
ssd1306_scroll_type_t  scroll 
)

send the command for a continues scroll via hardware

Parameters
devthe screen device to interact with
scrollthe direction of the scroll

Definition at line 236 of file ssd1306_i2c.c.

Here is the caller graph for this function:

◆ i2c_hardware_scroll_line()

void i2c_hardware_scroll_line ( SSD1306_t dev,
int  page,
ssd1306_scroll_type_t  scroll 
)

send the command for a continues scroll via hardware

Parameters
devthe screen device to interact with
pagethe specific page to scroll
scrollthe direction of the scroll

Definition at line 335 of file ssd1306_i2c.c.

Here is the caller graph for this function:

◆ i2c_init()

void i2c_init ( SSD1306_t dev,
int  width,
int  height 
)

initialise the screen i2c session

Parameters
devthe screen device to interact with
widththe width of the screen
heightthe height of the screen

Definition at line 80 of file ssd1306_i2c.c.

Here is the caller graph for this function:

◆ i2c_master_init()

void i2c_master_init ( SSD1306_t dev,
int16_t  sda,
int16_t  scl,
int16_t  reset 
)

initialise an i2c device

Parameters
devthe device to interact with
sdathe pin to use for SDA
sclthe pin to use for SCL
resetthe reset pin to use

Definition at line 50 of file ssd1306_i2c.c.

Here is the caller graph for this function: