Class Ssd1306

Class Documentation

class Ssd1306

Public Functions

Ssd1306(std::shared_ptr<I2cInterface> i2c_interface, uint8_t device_id)
void Init(void)
void Fill(SSD1306_COLOR color)
void UpdateScreen(void)
void DrawPixel(uint8_t x, uint8_t y, SSD1306_COLOR color)
char WriteChar(char ch, FontDef Font, SSD1306_COLOR color)
bool WriteString(std::string str, FontDef Font, SSD1306_COLOR color)
void SetCursor(uint8_t x, uint8_t y)
SSD1306_t GetCursor()
void DrawBattery(uint8_t x1, uint8_t y1, SSD1306_COLOR color)
void Line(uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2, SSD1306_COLOR color)
void DrawArc(uint8_t x, uint8_t y, uint8_t radius, uint16_t start_angle, uint16_t sweep, SSD1306_COLOR color)
void DrawCircle(uint8_t par_x, uint8_t par_y, uint8_t par_r, SSD1306_COLOR color)
void Polyline(const SSD1306_VERTEX *par_vertex, uint16_t par_size, SSD1306_COLOR color)
void DrawRectangle(uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2, SSD1306_COLOR color)
void SetContrast(const uint8_t value)

Sets the contrast of the display.

Note

Contrast increases as the value increases.

Note

RESET = 7Fh.

Parameters:

value[in] contrast to set.

void SetDisplayOn(const uint8_t on)

Set Display ON/OFF.

Parameters:

on[in] 0 for OFF, any for ON.

uint8_t GetDisplayOn()

Reads DisplayOn state.

Returns:

0: OFF. 1: ON.

void Reset(void)
void WriteCommand(uint8_t byte)
void WriteData(uint8_t *buffer, size_t buff_size)
void WritePage(uint8_t page)
SSD1306_Error_t FillBuffer(uint8_t *buf, uint32_t len)
float DegToRad(float par_deg)
uint16_t NormalizeTo0_360(uint16_t par_deg)