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);
195 void readScreen(
Rect const & rect,
RGB888 * destBuf);
220 int getBitmapSavePixelSize() {
return 1; }
223 bool SSD1306_sendData(uint8_t * buf,
int count, uint8_t ctrl);
224 bool SSD1306_sendCmd(uint8_t c);
225 bool SSD1306_sendCmd(uint8_t c1, uint8_t c2);
226 bool SSD1306_sendCmd(uint8_t c1, uint8_t c2, uint8_t c3);
228 void SSD1306_hardReset();
229 bool SSD1306_softReset();
231 void SSD1306_sendScreenBuffer(Rect updateRect);
235 void setupOrientation();
237 void allocScreenBuffer();
239 static void updateTaskFunc(
void * pvParameters);
242 void setPixelAt(PixelDesc
const & pixelDesc, Rect & updateRect);
245 void clear(Rect & updateRect);
248 void drawEllipse(Size
const & size, Rect & updateRect);
250 void VScroll(
int scroll, Rect & updateRect);
252 void HScroll(
int scroll, Rect & updateRect);
255 void drawGlyph(Glyph
const & glyph, GlyphOptions glyphOptions, RGB888 penColor, RGB888 brushColor, Rect & updateRect);
261 void invertRect(Rect
const & rect, Rect & updateRect);
264 void copyRect(Rect
const & source, Rect & updateRect);
267 void swapFGBG(Rect
const & rect, Rect & updateRect);
270 void absDrawLine(
int X1,
int Y1,
int X2,
int Y2, RGB888 color);
273 void rawFillRow(
int y,
int x1,
int x2, RGB888 color);
275 void rawFillRow(
int y,
int x1,
int x2, uint8_t pattern);
277 void rawInvertRow(
int y,
int x1,
int x2);
280 void rawDrawBitmap_Native(
int destX,
int destY, Bitmap
const * bitmap,
int X1,
int Y1,
int XCount,
int YCount);
283 void rawDrawBitmap_Mask(
int destX,
int destY, Bitmap
const * bitmap,
void * saveBackground,
int X1,
int Y1,
int XCount,
int YCount);
286 void rawDrawBitmap_RGBA2222(
int destX,
int destY, Bitmap
const * bitmap,
void * saveBackground,
int X1,
int Y1,
int XCount,
int YCount);
289 void rawDrawBitmap_RGBA8888(
int destX,
int destY, Bitmap
const * bitmap,
void * saveBackground,
int X1,
int Y1,
int XCount,
int YCount);
291 void rawCopyRow(
int x1,
int x2,
int srcY,
int dstY);
295 uint8_t m_i2cAddress;
296 gpio_num_t m_resetGPIO;
298 uint8_t * m_screenBuffer;
300 int16_t m_screenWidth;
301 int16_t m_screenHeight;
305 int16_t m_viewPortWidth;
306 int16_t m_viewPortHeight;
308 TaskHandle_t m_updateTaskHandle;
310 volatile int m_updateTaskFuncSuspended;
311 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.
int getViewPortHeight()
Determines vertical size of the viewport.
int getViewPortWidth()
Determines horizontal size 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.