40 #include "freertos/FreeRTOS.h" 108 void begin(
I2C * i2c,
int address = 0x3C, gpio_num_t resetGPIO = GPIO_UNUSED);
133 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 int16_t m_viewPortWidth;
300 int16_t m_viewPortHeight;
302 TaskHandle_t m_updateTaskHandle;
304 volatile int m_updateTaskFuncSuspended;
305 volatile bool m_updateTaskRunning;
316 #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.