SSD1306 OLED display driver 1.7.8 This library is developed to control SSD1306/SSD1331/SSD1351/IL9163/PCD8554 RGB i2c/spi LED displays

Public Attributes | List of all members
ssd1306_lcd_t Struct Reference
OLEDs: initialization and service functions

`#include <lcd_common.h>`

## Public Attributes
lcd_type_t | type
lcduint_t | width
lcduint_t | height
void(* | set_block )(lcduint_t x, lcduint_t y, lcduint_t w)
| Sets block in RAM of lcd display controller to write data to. More...
void(* | next_page )(void)
void(* | send_pixels1 )(uint8_t data)
void(* | send_pixels_buffer1 )(const uint8_t *buffer, uint16_t len)
void(* | send_pixels8 )(uint8_t data)
| Sends RGB pixel encoded in 3-3-2 format to OLED driver. Sends RGB pixel encoded in 3-3-2 format to OLED driver. More...
void(* | set_mode )(lcd_mode_t mode)
| Sets library display mode for direct draw functions. More...

## Detailed Description

Structure, describing display driver configuration

Definition at line 88 of file lcd_common.h.

## Member Data Documentation

## ◆ height

lcduint_t ssd1306_lcd_t::height

Current display height

Definition at line 97 of file lcd_common.h.

## ◆ next_page

void(* ssd1306_lcd_t::next_page) (void)

Switches to the start of next RAM page for the block, specified by set_block(). For ssd1306 it does nothing, while for sh1106 the function moves cursor to next page.

Definition at line 122 of file lcd_common.h.

## ◆ send_pixels1

void(* ssd1306_lcd_t::send_pixels1) (uint8_t data)

Sends 8 monochrome vertical pixels to OLED driver.

Parameters

  data | - byte, representing 8 pixels.

Definition at line 128 of file lcd_common.h.

## ◆ send_pixels8

void(* ssd1306_lcd_t::send_pixels8) (uint8_t data)

Sends RGB pixel encoded in 3-3-2 format to OLED driver. Sends RGB pixel encoded in 3-3-2 format to OLED driver.

Parameters

  data | - byte, representing RGB8 pixel.

Definition at line 142 of file lcd_common.h.

## ◆ send_pixels_buffer1

void(* ssd1306_lcd_t::send_pixels_buffer1) (const uint8_t *buffer, uint16_t len)

Sends buffer containing 8 monochrome vertical pixels, encoded in each byte.

Parameters

  buffer | - buffer containing monochrome pixels.
  len | - length of buffer in bytes.

Definition at line 135 of file lcd_common.h.

## ◆ set_block

void(* ssd1306_lcd_t::set_block) (lcduint_t x, lcduint_t y, lcduint_t w)

Sets block in RAM of lcd display controller to write data to.

Sets block in RAM of lcd display controller to write data to. For ssd1306 it uses horizontal addressing mode, while for sh1106 the function uses page addressing mode. Width can be specified as 0, thus the library will set the right boundary to region of RAM block to the right column of the display.

Parameters

  x | - column (left region)
  y | - page (top page of the block)
  w | - width of the block in pixels to control

Warning
  - this function initiates session (i2c or spi) and do not close it. To close session, please, use ssd1306_intf.stop().

Definition at line 114 of file lcd_common.h.

## ◆ set_mode

void(* ssd1306_lcd_t::set_mode) (lcd_mode_t mode)

Sets library display mode for direct draw functions.

Sets library display mode for direct draw functions. There are currently 2 modes supported: LCD_MODE_SSD1306_COMPAT and LCD_MODE_NORMAL. In general, ssd1306 compatible mode uses different GDRAM addressing mode, than normal mode, intended for using with RBG full-color functions.

Parameters

  mode | lcd mode to activate.

See also
  LCD_MODE_SSD1306_COMPAT
  LCD_MODE_NORMAL
  lcd_mode_t

Definition at line 157 of file lcd_common.h.

## ◆ type

lcd_type_t ssd1306_lcd_t::type

Current selected lcd display type

Definition at line 91 of file lcd_common.h.

## ◆ width

lcduint_t ssd1306_lcd_t::width

Current display width

Definition at line 94 of file lcd_common.h.

The documentation for this struct was generated from the following file:

- src/lcd/lcd_common.h