Graphic Display v1.0.0
Control any mochrome display, with any microcontroller, in any amount.
Loading...
Searching...
No Matches
ssd1306.h File Reference
#include <assert.h>
#include <malloc.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include <stdbool.h>
#include <string.h>
#include "ssd1306_defs.h"

Go to the source code of this file.

Data Structures

struct  ssd1306_t
 
struct  ssd1306_params_t
 

Macros

#define SSD1306_OK   0
 
#define SSD1306_FAIL   1
 
#define SSD1306_COLOR_BLACK   0
 
#define SSD1306_COLOR_WHITE   1
 

Typedefs

typedef void(* fxnDelay_ms) (uint32_t ms)
 
typedef void(* fxn1306_mtxLock) (void)
 
typedef void(* fxn1306_mtxunlock) (void)
 
typedef uint8_t(* fxn1306i2c_write) (uint8_t i2cAddr, uint8_t reg, uint8_t *buff, uint32_t len)
 
typedef void(* fxn1306spi_cs) (uint8_t Signal)
 
typedef void(* fxn1306spi_dc) (uint8_t Signal)
 
typedef void(* fxn1306spi_reset) (uint8_t Signal)
 
typedef uint8_t(* fxn1306spi_write) (uint8_t *buff, uint32_t len)
 

Enumerations

enum  ssd1306_mode_e { SSD1306_MODE_I2C , SSD1306_MODE_SPI }
 

Functions

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

◆ SSD1306_COLOR_BLACK

#define SSD1306_COLOR_BLACK   0

◆ SSD1306_COLOR_WHITE

#define SSD1306_COLOR_WHITE   1

◆ SSD1306_FAIL

#define SSD1306_FAIL   1

◆ SSD1306_OK

#define SSD1306_OK   0

Typedef Documentation

◆ fxn1306_mtxLock

typedef void(* fxn1306_mtxLock) (void)

◆ fxn1306_mtxunlock

typedef void(* fxn1306_mtxunlock) (void)

◆ fxn1306i2c_write

typedef uint8_t(* fxn1306i2c_write) (uint8_t i2cAddr, uint8_t reg, uint8_t *buff, uint32_t len)

◆ fxn1306spi_cs

typedef void(* fxn1306spi_cs) (uint8_t Signal)

◆ fxn1306spi_dc

typedef void(* fxn1306spi_dc) (uint8_t Signal)

◆ fxn1306spi_reset

typedef void(* fxn1306spi_reset) (uint8_t Signal)

◆ fxn1306spi_write

typedef uint8_t(* fxn1306spi_write) (uint8_t *buff, uint32_t len)

◆ fxnDelay_ms

typedef void(* fxnDelay_ms) (uint32_t ms)

Enumeration Type Documentation

◆ ssd1306_mode_e

Enumerator
SSD1306_MODE_I2C 
SSD1306_MODE_SPI 

Function Documentation

◆ 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 )