Graphic Display v1.0.0
Control any mochrome display, with any microcontroller, in any amount.
Loading...
Searching...
No Matches
ssd1306.c File Reference
#include "ssd1306.h"

Macros

#define _PIN_HIGH   1
 
#define _PIN_LOW   0
 
#define _SUCCESS   0
 
#define _SSD_ERROR_CHECK(x)   if (x != _SUCCESS) { return SSD1306_FAIL; }
 

Functions

static void _delay_ms (ssd1306_t *ssd1306, uint32_t ms)
 
static void _pin_reset (ssd1306_t *ssd1306, uint8_t Signal)
 
static void _pin_dc (ssd1306_t *ssd1306, uint8_t Signal)
 
static void _pin_cs (ssd1306_t *ssd1306, uint8_t Signal)
 
static uint8_t _spi_write (ssd1306_t *ssd1306, uint8_t *data, uint32_t len)
 
static uint8_t _i2c_write (ssd1306_t *ssd1306, uint8_t reg, uint8_t *data, uint32_t len)
 
static uint8_t _write_data (ssd1306_t *ssd1306, uint8_t *data, uint32_t len)
 
static uint8_t _write_command (ssd1306_t *ssd1306, uint8_t cmd)
 
static void _reset (ssd1306_t *ssd1306)
 
static void _mtx_lock (ssd1306_t *ssd1306)
 
static void _mtx_unlock (ssd1306_t *ssd1306)
 
uint8_t SSD1306_Init (ssd1306_t *ssd1306, ssd1306_params_t *params)
 
uint8_t SSD1306_SetFrameBuffer (ssd1306_t *ssd1306, uint8_t *pu8FrameBuffer)
 
uint8_t SSD1306_SetContrast (ssd1306_t *ssd1306, uint8_t level)
 
uint8_t SSD1306_SetDisplayOn (ssd1306_t *ssd1306, bool on)
 
uint8_t SSD1306_Refresh (ssd1306_t *ssd1306)
 
uint8_t SSD1306_Write (ssd1306_t *ssd1306, uint32_t x, uint32_t y, bool color)
 
uint8_t SSD1306_Fill (ssd1306_t *ssd1306, uint8_t color)
 

Macro Definition Documentation

◆ _PIN_HIGH

#define _PIN_HIGH   1

◆ _PIN_LOW

#define _PIN_LOW   0

◆ _SSD_ERROR_CHECK

#define _SSD_ERROR_CHECK ( x)    if (x != _SUCCESS) { return SSD1306_FAIL; }

◆ _SUCCESS

#define _SUCCESS   0

Function Documentation

◆ _delay_ms()

static void _delay_ms ( ssd1306_t * ssd1306,
uint32_t ms )
static

◆ _i2c_write()

static uint8_t _i2c_write ( ssd1306_t * ssd1306,
uint8_t reg,
uint8_t * data,
uint32_t len )
static

◆ _mtx_lock()

static void _mtx_lock ( ssd1306_t * ssd1306)
static

◆ _mtx_unlock()

static void _mtx_unlock ( ssd1306_t * ssd1306)
static

◆ _pin_cs()

static void _pin_cs ( ssd1306_t * ssd1306,
uint8_t Signal )
static

◆ _pin_dc()

static void _pin_dc ( ssd1306_t * ssd1306,
uint8_t Signal )
static

◆ _pin_reset()

static void _pin_reset ( ssd1306_t * ssd1306,
uint8_t Signal )
static

◆ _reset()

static void _reset ( ssd1306_t * ssd1306)
static

◆ _spi_write()

static uint8_t _spi_write ( ssd1306_t * ssd1306,
uint8_t * data,
uint32_t len )
static

◆ _write_command()

static uint8_t _write_command ( ssd1306_t * ssd1306,
uint8_t cmd )
static

◆ _write_data()

static uint8_t _write_data ( ssd1306_t * ssd1306,
uint8_t * data,
uint32_t len )
static

◆ SSD1306_Fill()

uint8_t SSD1306_Fill ( ssd1306_t * ssd1306,
uint8_t color )

◆ SSD1306_Init()

uint8_t SSD1306_Init ( ssd1306_t * ssd1306,
ssd1306_params_t * params )

◆ SSD1306_Refresh()

uint8_t SSD1306_Refresh ( ssd1306_t * ssd1306)

◆ SSD1306_SetContrast()

uint8_t SSD1306_SetContrast ( ssd1306_t * ssd1306,
uint8_t level )

◆ SSD1306_SetDisplayOn()

uint8_t SSD1306_SetDisplayOn ( ssd1306_t * ssd1306,
bool on )

◆ SSD1306_SetFrameBuffer()

uint8_t SSD1306_SetFrameBuffer ( ssd1306_t * ssd1306,
uint8_t * pu8FrameBuffer )

◆ SSD1306_Write()

uint8_t SSD1306_Write ( ssd1306_t * ssd1306,
uint32_t x,
uint32_t y,
bool color )