C++ DevKit
C++ set of OOP library
Loading...
Searching...
No Matches
SSD1306 Class Reference

SSD1306 128x64 pixel OLED display device driver with I2C interface. More...

#include <ssd1306.h>

Inheritance diagram for SSD1306:
Inheritance graph
Collaboration diagram for SSD1306:
Collaboration graph

Public Member Functions

void check_display_device_compatibility (struct_ConfigGraphicWidget framebuffer_cfg)
 A pure virtual member function. Each device must implement this method and check the compatibility of the widget parameter with the its physical limitations.
 
 SSD1306 (HW_I2C_Master *master, struct_ConfigSSD1306 device_config)
 
void show (Canvas *canvas, const uint8_t anchor_x, const uint8_t anchor_y)
 
void show_render_area (uint8_t *data_buffer, struct_RenderArea screen_area, uint8_t addressing_mode=0)
 when we need to show a render area with a given framebuffer
 
void fill_pattern_and_show_GDDRAM (uint8_t pattern, struct_RenderArea area)
 fill a pattern in the device framebuffer. this make it visible as soon as the device transfer the framebuffer to the pixels. The pattern is a vertical byte representing 8 vertical pixels (refer to MONO_VLSB framebuffer format)
 
void clear_device_screen_buffer ()
 write 0x00 directly into the device framebuffer. Uses fill_pattern_and_show_GDDRAM command.
 
void set_contrast (uint8_t value)
 Set the contrast object. refer to datasheet of SSD1306 device.
 
void set_display_from_RAM ()
 Set the display from RAM object.
 
void set_all_pixel_ON ()
 Set the all pixel ON.
 
void set_inverse_color (bool inverse)
 Set the inverse color object.
 
void set_display_OFF ()
 Set the display OFF object.
 
void set_display_ON ()
 Set the display ON object.
 
void horizontal_scroll (bool on, struct_ConfigScrollSSD1306 scroll_data)
 
void vertical_scroll (bool on, struct_ConfigScrollSSD1306 scroll_data)
 
- Public Member Functions inherited from GraphicDisplayDevice
 GraphicDisplayDevice (size_t screen_width, size_t screen_height)
 Construct a new Display Device object.
 
virtual ~GraphicDisplayDevice ()
 Destroy the Display Device object.
 

Static Public Member Functions

static struct_RenderArea compute_render_area (uint8_t start_col, uint8_t end_col, uint8_t start_line, uint8_t end_line)
 A static member function that converts the area we want to display into device specific parameters.
 

Additional Inherited Members

- Public Attributes inherited from GraphicDisplayDevice
size_t TFT_panel_width_in_pixel
 the physical width of the screen (in pixel)
 
size_t TFT_panel_height_in_pixel
 the physical height of the screen (in pixel)
 

Detailed Description

SSD1306 128x64 pixel OLED display device driver with I2C interface.

Constructor & Destructor Documentation

◆ SSD1306()

SSD1306::SSD1306 ( HW_I2C_Master * master,
struct_ConfigSSD1306 device_config )
Parameters
masterthe I2C master interface driver HW_I2C_Master
device_configthe configuration according to struct_ConfigSSD1306
Here is the call graph for this function:

Member Function Documentation

◆ check_display_device_compatibility()

void SSD1306::check_display_device_compatibility ( struct_ConfigGraphicWidget framebuffer_cfg)
virtual

A pure virtual member function. Each device must implement this method and check the compatibility of the widget parameter with the its physical limitations.

Parameters
framebuffer_cfgthe widget configuration data

Implements GraphicDisplayDevice.

◆ compute_render_area()

struct_RenderArea SSD1306::compute_render_area ( uint8_t start_col,
uint8_t end_col,
uint8_t start_line,
uint8_t end_line )
static

A static member function that converts the area we want to display into device specific parameters.

Parameters
start_col
end_col
start_line
end_line
Returns
struct_RenderArea
Here is the caller graph for this function:

◆ fill_pattern_and_show_GDDRAM()

void SSD1306::fill_pattern_and_show_GDDRAM ( uint8_t pattern,
struct_RenderArea area )

fill a pattern in the device framebuffer. this make it visible as soon as the device transfer the framebuffer to the pixels. The pattern is a vertical byte representing 8 vertical pixels (refer to MONO_VLSB framebuffer format)

Bug
// FIXME : PAGE_ADDRESSING_MODE seems misbehave depending on what was executed before
Parameters
pattern
area
Here is the call graph for this function:
Here is the caller graph for this function:

◆ horizontal_scroll()

void SSD1306::horizontal_scroll ( bool on,
struct_ConfigScrollSSD1306 scroll_data )
Parameters
on
scroll_data

◆ set_contrast()

void SSD1306::set_contrast ( uint8_t value)

Set the contrast object. refer to datasheet of SSD1306 device.

Parameters
value

◆ set_inverse_color()

void SSD1306::set_inverse_color ( bool inverse)

Set the inverse color object.

Parameters
inverse

◆ show()

void SSD1306::show ( Canvas * canvas,
const uint8_t anchor_x,
const uint8_t anchor_y )
virtual
Parameters
canvasa pointer to the Canvas that contains the buffer to be displayed
anchor_xwhere we want to position (x) the frambuffer
anchor_ywhere we want to position (y) the frambuffer

Implements GraphicDisplayDevice.

Here is the call graph for this function:

◆ show_render_area()

void SSD1306::show_render_area ( uint8_t * data_buffer,
struct_RenderArea screen_area,
uint8_t addressing_mode = 0 )

when we need to show a render area with a given framebuffer

Parameters
data_buffer
screen_area
addressing_mode
Here is the caller graph for this function:

◆ vertical_scroll()

void SSD1306::vertical_scroll ( bool on,
struct_ConfigScrollSSD1306 scroll_data )
Parameters
on
scroll_data

The documentation for this class was generated from the following files: