44#include "freertos/FreeRTOS.h"
112 void begin(
I2C * i2c,
int address = 0x3C, gpio_num_t resetGPIO = GPIO_UNUSED);
137 void setResolution(
char const * modeline,
int viewPortWidth = -1,
int viewPortHeight = -1,
bool doubleBuffered =
false);
189 void readScreen(
Rect const & rect,
RGB888 * destBuf);
214 int getBitmapSavePixelSize() {
return 1; }
217 bool SSD1306_sendData(uint8_t * buf,
int count, uint8_t ctrl);
218 bool SSD1306_sendCmd(uint8_t c);
219 bool SSD1306_sendCmd(uint8_t c1, uint8_t c2);
220 bool SSD1306_sendCmd(uint8_t c1, uint8_t c2, uint8_t c3);
222 void SSD1306_hardReset();
223 bool SSD1306_softReset();
225 void SSD1306_sendScreenBuffer(Rect updateRect);
229 void setupOrientation();
231 void allocScreenBuffer();
233 static void updateTaskFunc(
void * pvParameters);
236 void setPixelAt(PixelDesc
const & pixelDesc, Rect & updateRect);
239 void clear(Rect & updateRect);
242 void drawEllipse(Size
const & size, Rect & updateRect);
244 void VScroll(
int scroll, Rect & updateRect);
246 void HScroll(
int scroll, Rect & updateRect);
249 void drawGlyph(Glyph
const & glyph, GlyphOptions glyphOptions, RGB888 penColor, RGB888 brushColor, Rect & updateRect);
255 void invertRect(Rect
const & rect, Rect & updateRect);
258 void copyRect(Rect
const & source, Rect & updateRect);
261 void swapFGBG(Rect
const & rect, Rect & updateRect);
264 void absDrawLine(
int X1,
int Y1,
int X2,
int Y2, RGB888 color);
267 void rawFillRow(
int y,
int x1,
int x2, RGB888 color);
269 void rawFillRow(
int y,
int x1,
int x2, uint8_t pattern);
271 void rawInvertRow(
int y,
int x1,
int x2);
274 void rawDrawBitmap_Native(
int destX,
int destY, Bitmap
const * bitmap,
int X1,
int Y1,
int XCount,
int YCount);
277 void rawDrawBitmap_Mask(
int destX,
int destY, Bitmap
const * bitmap,
void * saveBackground,
int X1,
int Y1,
int XCount,
int YCount);
280 void rawDrawBitmap_RGBA2222(
int destX,
int destY, Bitmap
const * bitmap,
void * saveBackground,
int X1,
int Y1,
int XCount,
int YCount);
283 void rawDrawBitmap_RGBA8888(
int destX,
int destY, Bitmap
const * bitmap,
void * saveBackground,
int X1,
int Y1,
int XCount,
int YCount);
285 void rawCopyRow(
int x1,
int x2,
int srcY,
int dstY);
289 uint8_t m_i2cAddress;
290 gpio_num_t m_resetGPIO;
292 uint8_t * m_screenBuffer;
294 int16_t m_screenWidth;
295 int16_t m_screenHeight;
299 TaskHandle_t m_updateTaskHandle;
301 volatile int m_updateTaskFuncSuspended;
302 volatile bool m_updateTaskRunning;
I2C class allows multiple tasks to communicate with I2C devices, serializing read/write jobs.
void setScreenCol(int value)
Set initial left column of the viewport.
void suspendBackgroundPrimitiveExecution()
Suspends drawings.
void invert(bool value)
Inverts display colors.
void setResolution(char const *modeline, int viewPortWidth=-1, int viewPortHeight=-1, bool doubleBuffered=false)
Sets SSD1306 resolution and viewport size.
void resumeBackgroundPrimitiveExecution()
Resumes drawings after suspendBackgroundPrimitiveExecution().
bool available()
Checks the SSD1306 device availability.
NativePixelFormat nativePixelFormat()
Represents the native pixel format used by this display.
int screenRow()
Gets initial top row of the viewport.
virtual int colorsCount()
Determines number of colors this display can provide.
void setOrientation(SSD1306Orientation value)
Set display orientation and rotation.
int screenCol()
Gets initial left column of the viewport.
void begin()
Initializes SSD1306.
void setScreenRow(int value)
Set initial top row of the viewport.
Display driver for SSD1306 based OLED display, with I2C connection.
This file contains fabgl::BitmappedDisplayController definition.
This file contains FabGL library configuration settings, like number of supported colors,...
This file contains some utility classes and functions.
NativePixelFormat
This enum defines the display controller native pixel format.
SSD1306Orientation
This enum defines SSD1306 orientation.
Represents a 24 bit RGB color.
This file contains fabgl::I2C definition.