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);
193 void readScreen(
Rect const & rect,
RGB888 * destBuf);
218 int getBitmapSavePixelSize() {
return 1; }
221 bool SSD1306_sendData(uint8_t * buf,
int count, uint8_t ctrl);
222 bool SSD1306_sendCmd(uint8_t c);
223 bool SSD1306_sendCmd(uint8_t c1, uint8_t c2);
224 bool SSD1306_sendCmd(uint8_t c1, uint8_t c2, uint8_t c3);
226 void SSD1306_hardReset();
227 bool SSD1306_softReset();
229 void SSD1306_sendScreenBuffer(Rect updateRect);
233 void setupOrientation();
235 void allocScreenBuffer();
237 static void updateTaskFunc(
void * pvParameters);
240 void setPixelAt(PixelDesc
const & pixelDesc, Rect & updateRect);
243 void clear(Rect & updateRect);
246 void drawEllipse(Size
const & size, Rect & updateRect);
248 void VScroll(
int scroll, Rect & updateRect);
250 void HScroll(
int scroll, Rect & updateRect);
253 void drawGlyph(Glyph
const & glyph, GlyphOptions glyphOptions, RGB888 penColor, RGB888 brushColor, Rect & updateRect);
259 void invertRect(Rect
const & rect, Rect & updateRect);
262 void copyRect(Rect
const & source, Rect & updateRect);
265 void swapFGBG(Rect
const & rect, Rect & updateRect);
268 void absDrawLine(
int X1,
int Y1,
int X2,
int Y2, RGB888 color);
271 void rawFillRow(
int y,
int x1,
int x2, RGB888 color);
273 void rawFillRow(
int y,
int x1,
int x2, uint8_t pattern);
275 void rawInvertRow(
int y,
int x1,
int x2);
278 void rawDrawBitmap_Native(
int destX,
int destY, Bitmap
const * bitmap,
int X1,
int Y1,
int XCount,
int YCount);
281 void rawDrawBitmap_Mask(
int destX,
int destY, Bitmap
const * bitmap,
void * saveBackground,
int X1,
int Y1,
int XCount,
int YCount);
284 void rawDrawBitmap_RGBA2222(
int destX,
int destY, Bitmap
const * bitmap,
void * saveBackground,
int X1,
int Y1,
int XCount,
int YCount);
287 void rawDrawBitmap_RGBA8888(
int destX,
int destY, Bitmap
const * bitmap,
void * saveBackground,
int X1,
int Y1,
int XCount,
int YCount);
289 void rawCopyRow(
int x1,
int x2,
int srcY,
int dstY);
293 uint8_t m_i2cAddress;
294 gpio_num_t m_resetGPIO;
296 uint8_t * m_screenBuffer;
298 int16_t m_screenWidth;
299 int16_t m_screenHeight;
303 int16_t m_viewPortWidth;
304 int16_t m_viewPortHeight;
306 TaskHandle_t m_updateTaskHandle;
308 volatile int m_updateTaskFuncSuspended;
309 volatile bool m_updateTaskRunning;
320 #endif // #ifdef ARDUINO
Represents a 24 bit RGB color.
void invert(bool value)
Inverts display colors.
void begin()
Initializes SSD1306.
void setOrientation(SSD1306Orientation value)
Set display orientation and rotation.
void setResolution(char const *modeline, int viewPortWidth=-1, int viewPortHeight=-1, bool doubleBuffered=false)
Sets SSD1306 resolution and viewport size.
int screenCol()
Gets initial left column of the viewport.
int getViewPortHeight()
Determines vertical size of the viewport.
void setScreenCol(int value)
Set initial left column of the viewport.
This file contains fabgl::BitmappedDisplayController definition.
I2C class allows multiple tasks to communicate with I2C devices, serializing read/write jobs...
NativePixelFormat nativePixelFormat()
Represents the native pixel format used by this display.
void resumeBackgroundPrimitiveExecution()
Resumes drawings after suspendBackgroundPrimitiveExecution().
This file contains some utility classes and functions.
SSD1306Orientation
This enum defines SSD1306 orientation.
NativePixelFormat
This enum defines the display controller native pixel format.
void setScreenRow(int value)
Set initial top row of the viewport.
int getViewPortWidth()
Determines horizontal size of the viewport.
This file contains fabgl::I2C definition.
bool available()
Checks the SSD1306 device availability.
This file contains FabGL library configuration settings, like number of supported colors...
void suspendBackgroundPrimitiveExecution()
Suspends drawings.
Display driver for SSD1306 based OLED display, with I2C connection.
int screenRow()
Gets initial top row of the viewport.