SSD1306 OLED display driver  1.4.6
This library is developed to control SSD1306/SSD1331 RGB i2c/spi OLED displays and spi PCD8544 LED display
Functions
LCD Display control functions

Functions

void pcd8544_84x48_init ()
 Inits 84x48 LED display (based on PCD8544 controller). More...
 
void pcd8544_84x48_spi_init (int8_t rstPin, int8_t cesPin, int8_t dcPin)
 
void sh1106_128x64_init ()
 Inits 128x64 OLED display (based on SH1106 controller). More...
 
void sh1106_128x64_i2c_init ()
 Inits 128x64 OLED display over i2c (based on SH1106 controller). More...
 
void sh1106_128x64_spi_init (int8_t rstPin, int8_t cesPin, int8_t dcPin)
 Inits 128x64 OLED display over spi (based on SH1106 controller). More...
 
void ssd1306_128x32_i2c_init ()
 Inits 128x32 OLED display over i2c (based on SSD1306 controller). More...
 
void ssd1306_128x32_init ()
 Inits 128x32 OLED display (based on ssd1306 controller). More...
 
void ssd1306_128x64_init ()
 Inits 128x64 OLED display (based on SSD1306 controller). More...
 
void ssd1306_128x64_i2c_init ()
 Inits 128x64 OLED display over i2c (based on SSD1306 controller). More...
 
void ssd1306_128x64_spi_init (int8_t rstPin, int8_t cesPin, int8_t dcPin)
 Inits 128x64 OLED display over spi (based on SSD1306 controller). More...
 
void ssd1306_init () __attribute__((deprecated))
 Inits 128x64 OLED display over i2c (based on SSD1306 controller). More...
 
void ssd1331_96x64_init ()
 Inits 96x64 RGB OLED display (based on SSD1331 controller). More...
 
void ssd1331_96x64_spi_init (int8_t rstPin, int8_t cesPin, int8_t dcPin)
 Inits 96x64 RGB OLED display over spi (based on SSD1331 controller). More...
 
void ssd1306_displayOff ()
 
void ssd1306_displayOn ()
 
void ssd1306_setContrast (uint8_t contrast)
 
void ssd1306_invertMode ()
 
void ssd1306_normalMode ()
 
uint8_t ssd1306_displayHeight ()
 
uint8_t ssd1306_displayWidth ()
 

Detailed Description

Function Documentation

◆ pcd8544_84x48_init()

void pcd8544_84x48_init ( )

Inits 84x48 LED display (based on PCD8544 controller).

Inits 84x48 LED display (based on PCD8544 controller). User must init communication interface (i2c, spi) prior to calling this function.

See also
ssd1306_i2cInit()
ssd1306_spiInit()

Definition at line 71 of file pcd8544_84x48.c.

◆ pcd8544_84x48_spi_init()

void pcd8544_84x48_spi_init ( int8_t  rstPin,
int8_t  cesPin,
int8_t  dcPin 
)

Inits 84x48 LED display over spi (based on PCD8544 controller)

Parameters
rstPin- pin controlling LCD reset (-1 if not used)
cesPin- chip enable pin to LCD slave (-1 if not used)
dcPin- data/command pin to control LCD dc (required)

Definition at line 87 of file pcd8544_84x48.c.

◆ sh1106_128x64_i2c_init()

void sh1106_128x64_i2c_init ( )

Inits 128x64 OLED display over i2c (based on SH1106 controller).

Inits 128x64 OLED display over i2c (based on SH1106 controller) This function uses hardcoded pins for i2c communication, depending on your hardware. If you use non-standard pins in your project, please perform call ssd1306_i2cInitEx() and sh1106_128x64_init().

Definition at line 88 of file sh1106_128x64.c.

◆ sh1106_128x64_init()

void sh1106_128x64_init ( )

Inits 128x64 OLED display (based on SH1106 controller).

Inits 128x64 OLED display (based on SH1106 controller). User must init communication interface (i2c or spi) prior to calling this function.

Definition at line 74 of file sh1106_128x64.c.

◆ sh1106_128x64_spi_init()

void sh1106_128x64_spi_init ( int8_t  rstPin,
int8_t  cesPin,
int8_t  dcPin 
)

Inits 128x64 OLED display over spi (based on SH1106 controller).

Inits 128x64 OLED display over spi (based on SH1106 controller)

Parameters
rstPin- pin controlling LCD reset (-1 if not used)
cesPin- chip enable pin to LCD slave (-1 if not used)
dcPin- data/command pin to control LCD dc (required)

Definition at line 94 of file sh1106_128x64.c.

◆ ssd1306_128x32_i2c_init()

void ssd1306_128x32_i2c_init ( )

Inits 128x32 OLED display over i2c (based on SSD1306 controller).

Inits 128x32 OLED display over i2c (based on SSD1306 controller) This function uses hardcoded pins for i2c communication, depending on your hardware. If you use non-standard pins in your project, please perform call ssd1306_i2cInitEx() and ssd1306_128x32_init().

Definition at line 99 of file ssd1306_128x32.c.

◆ ssd1306_128x32_init()

void ssd1306_128x32_init ( )

Inits 128x32 OLED display (based on ssd1306 controller).

Inits 128x32 OLED display (based on ssd1306 controller) spi or i2c bus must be initialized prior to calling this function.

See also
ssd1306_i2cInit()
ssd1306_spiInit()

Definition at line 84 of file ssd1306_128x32.c.

◆ ssd1306_128x64_i2c_init()

void ssd1306_128x64_i2c_init ( )

Inits 128x64 OLED display over i2c (based on SSD1306 controller).

Inits 128x64 OLED display over i2c (based on SSD1306 controller) This function uses hardcoded pins for i2c communication, depending on your hardware. If you use non-standard pins in your project, please perform call ssd1306_i2cInitEx() and ssd1306_128x64_init().

Definition at line 104 of file ssd1306_128x64.c.

◆ ssd1306_128x64_init()

void ssd1306_128x64_init ( )

Inits 128x64 OLED display (based on SSD1306 controller).

Inits 128x64 OLED display (based on SSD1306 controller). User must init communication interface (i2c, spi) prior to calling this function.

See also
ssd1306_i2cInit()
ssd1306_spiInit()

Definition at line 90 of file ssd1306_128x64.c.

◆ ssd1306_128x64_spi_init()

void ssd1306_128x64_spi_init ( int8_t  rstPin,
int8_t  cesPin,
int8_t  dcPin 
)

Inits 128x64 OLED display over spi (based on SSD1306 controller).

Inits 128x64 OLED display over spi (based on SSD1306 controller)

Parameters
rstPin- pin controlling LCD reset (-1 if not used)
cesPin- chip enable pin to LCD slave (-1 if not used)
dcPin- data/command pin to control LCD dc (required)

Definition at line 110 of file ssd1306_128x64.c.

◆ ssd1306_displayHeight()

uint8_t ssd1306_displayHeight ( )

Returns display height in pixels

Definition at line 45 of file ssd1306.c.

◆ ssd1306_displayOff()

void ssd1306_displayOff ( )

Turns off display

Definition at line 87 of file ssd1306.c.

◆ ssd1306_displayOn()

void ssd1306_displayOn ( )

Turns on display

Definition at line 93 of file ssd1306.c.

◆ ssd1306_displayWidth()

uint8_t ssd1306_displayWidth ( )

Returns display width in pixels

Definition at line 50 of file ssd1306.c.

◆ ssd1306_init()

void ssd1306_init ( )

Inits 128x64 OLED display over i2c (based on SSD1306 controller).

Inits 128x64 OLED display over i2c (based on SSD1306 controller) This function uses hardcoded pins for i2c communication, depending on your hardware. If you use non-standard pins in your project, please perform call ssd1306_i2cInitEx() and ssd1306_128x64_init().

Definition at line 84 of file ssd1306_128x64.c.

◆ ssd1306_invertMode()

void ssd1306_invertMode ( )

Switches display to inverse mode. LCD will display 0-pixels as white, and 1-pixels as black.

Note
Not supported for SSD1331

Definition at line 792 of file ssd1306.c.

◆ ssd1306_normalMode()

void ssd1306_normalMode ( )

Switches display to normal mode.

Note
Not supported for SSD1331

Definition at line 800 of file ssd1306.c.

◆ ssd1306_setContrast()

void ssd1306_setContrast ( uint8_t  contrast)

Set display contrast, ie light intensity

Parameters
contrast- contrast value to see, refer to ssd1306 datasheet

Definition at line 98 of file ssd1306.c.

◆ ssd1331_96x64_init()

void ssd1331_96x64_init ( )

Inits 96x64 RGB OLED display (based on SSD1331 controller).

Inits 96x64 RGB OLED display (based on SSD1331 controller). User must init communication interface (i2c, spi) prior to calling this function.

See also
ssd1306_i2cInit()
ssd1306_spiInit()

Definition at line 108 of file ssd1331_96x64.c.

◆ ssd1331_96x64_spi_init()

void ssd1331_96x64_spi_init ( int8_t  rstPin,
int8_t  cesPin,
int8_t  dcPin 
)

Inits 96x64 RGB OLED display over spi (based on SSD1331 controller).

Inits 96x64 RGB OLED display over spi (based on SSD1331 controller)

Parameters
rstPin- pin controlling LCD reset (-1 if not used)
cesPin- chip enable pin to LCD slave (-1 if not used)
dcPin- data/command pin to control LCD dc (required)

Definition at line 122 of file ssd1331_96x64.c.