![]() |
SparkFun SSD168x Library
v1.0.2
Library for SSD1680 / SSD1681 e-paper displays on SPI
|
#include <qwiic_ssd1680_184x88.h>
Public Member Functions | |
| SpiSsd1680_184x88 () | |
| Construct the device - setup the viewport for this device. More... | |
| ~SpiSsd1680_184x88 () | |
| Destroy the device - free the graphics buffer. More... | |
| bool | init (void) |
| Set up the specific device settings: allocate the graphics buffer, then initialize the device. More... | |
| void | display (bool partial=false, bool dirtyOnly=true) |
| Send the changes in the graphics buffer to the device and perform a full or partial update. More... | |
| void | erase (void) |
| Erase the graphics buffer. The erase is not sent to the device until the next display(). More... | |
| bool | isInitialized (void) |
| Check if init() has been called successfully. More... | |
| bool | reset (void) |
| Wake and reset the device: clear the graphics and screen buffers and perform a full update. More... | |
| void | setCommBus (SparkFun_SSD168x::SSD168xDeviceBus &theBus, int resetPin, int busyPin) |
| Set the communication bus this object should use, plus the RES# and BUSY pins. More... | |
| void | setColor (uint8_t color) |
| void | setRasterOp (grEpRasterOp_t rop) |
| Set the current raster operation (draw mode). More... | |
| grEpRasterOp_t | rasterOp (void) |
| Get the current raster operation (draw mode). More... | |
| void | deepSleep (bool mode2) |
| Put the SSD168x into deep sleep. Only a hardware reset can wake it again (display() does this). More... | |
| bool | isBusy (void) |
| Read the state of the BUSY pin. More... | |
| bool | waitWhileBusy (unsigned long pollInterval_ms=10, unsigned long timeout_ms=kSsd168xBusyTimeout_ms) |
| Wait until the SSD168x BUSY pin goes low. More... | |
| void | setViewport (uint8_t x0, uint8_t y0, uint8_t width, uint8_t height) |
| QwEpRect | viewport (void) |
| uint16_t | originX (void) |
| uint16_t | originY (void) |
| uint16_t | width (void) |
| uint16_t | height (void) |
| void | initFont (void) |
| void | setFont (QwEpFont &font) |
| void | setFont (const QwEpFont *font) |
| QwEpFont * | font (void) |
| bool | getStringSize (const char *text, uint16_t &width, uint16_t &height) |
| void | line (uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1, uint8_t clr=COLOR_ON) |
| void | circle (uint8_t x0, uint8_t y0, uint8_t radius, uint8_t clr=COLOR_ON) |
| void | circleFill (uint8_t x0, uint8_t y0, uint8_t radius, uint8_t clr=COLOR_ON) |
| void | pixel (uint8_t x, uint8_t y, uint8_t clr=COLOR_ON) |
| void | rectangle (uint8_t x0, uint8_t y0, uint8_t width, uint8_t height, uint8_t clr=COLOR_ON) |
| void | rectangleFill (uint8_t x0, uint8_t y0, uint8_t width, uint8_t height, uint8_t clr=COLOR_ON) |
| void | bitmap (uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1, uint8_t *pBitmap, uint8_t bmp_width, uint8_t bmp_height) |
| void | bitmap (uint8_t x0, uint8_t y0, uint8_t *pBitmap, uint8_t bmp_width, uint8_t bmp_height) |
| void | bitmap (uint8_t x0, uint8_t y0, QwEpBitmap &bitmap) |
| void | text (uint8_t x0, uint8_t y0, const char *text, uint8_t clr=COLOR_ON) |
| void | enableDebugging (sfe_print_t &debugPort, bool printLimitedDebug=false) |
| Enable debug messages, sent to the given port. More... | |
| void | disableDebugging (void) |
| Turn off debug message printing. More... | |
| void | debugPrint (const char *message, bool important=false) |
| Print a debug message (no trailing newline), if debugging is enabled. More... | |
| void | debugPrint (uint32_t value, bool important=false) |
| Print a debug value in decimal (no trailing newline), if debugging is enabled. More... | |
| void | debugPrint (uint32_t value, int printBase, bool important=false) |
| Print a debug value in a given base (no trailing newline), if debugging is enabled. More... | |
| void | debugPrintln (const char *message, bool important=false) |
| Print a debug message followed by a newline, if debugging is enabled. More... | |
| void | debugPrintln (uint32_t value, bool important=false) |
| Print a debug value in decimal followed by a newline, if debugging is enabled. More... | |
| void | debugPrintln (uint32_t value, int printBase, bool important=false) |
| Print a debug value in a given base followed by a newline, if debugging is enabled. More... | |
| void | debugPrintln (void) |
| Print a blank debug line, if debugging is enabled and not in limited-debug mode. More... | |
| void | copyDebugStateFrom (const SfeDebugPrint &other) |
| Copy debug state (output stream and enabled flags) from another SfeDebugPrint. More... | |
Protected Member Functions | |
| void | setBuffer (uint8_t *pBuffer) |
| void | drawPixel (uint8_t x, uint8_t y, uint8_t clr) |
| void | drawLineHorz (uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1, uint8_t clr) |
| void | drawLineVert (uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1, uint8_t clr) |
| void | drawRectFilled (uint8_t x0, uint8_t y0, uint8_t width, uint8_t height, uint8_t clr) |
| void | drawBitmap (uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1, uint8_t *pBitmap, uint8_t bmp_width, uint8_t bmp_height) |
| virtual void | drawLine (uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1, uint8_t clr) |
| virtual void | drawRect (uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1, uint8_t clr) |
| virtual void | drawCircle (uint8_t x0, uint8_t y0, uint8_t radius, uint8_t clr) |
| virtual void | drawCircleFilled (uint8_t x0, uint8_t y0, uint8_t radius, uint8_t clr) |
| virtual void | drawText (uint8_t x0, uint8_t y0, const char *text, uint8_t clr) |
| bool | pageIsClean (pageStateEp_t &_page_) |
| void | pageSetClean (pageStateEp_t &_page_) |
| void | pageCheckBounds (pageStateEp_t &_page_, uint8_t _c_) |
| void | pageCheckBoundsDesc (pageStateEp_t &_page_, pageStateEp_t &_page2_) |
| void | pageCheckBoundsRange (pageStateEp_t &_page_, uint8_t _c0_, uint8_t _c1_) |
Protected Attributes | |
| QwEpRect | m_viewport |
| _QwEpIDraw_vtable | m_idraw |
| QwEpFont * | m_currentFont |
| SfePrint | _debugSerial |
| bool | _printDebug = false |
| bool | _printLimitedDebug = false |
|
inline |
Construct the device - setup the viewport for this device.
|
inline |
Destroy the device - free the graphics buffer.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inlineinherited |
Copy debug state (output stream and enabled flags) from another SfeDebugPrint.
| other | The SfeDebugPrint object whose debug state to copy. |
|
inherited |
Print a debug message (no trailing newline), if debugging is enabled.
A no-op unless _printDebug is true; further suppressed if _printLimitedDebug is true and 'important' is false - see enableDebugging().
| message | Null-terminated string to print. |
| important | If true, print even when limited debugging is active. Defaults to false. |
|
inherited |
Print a debug value in decimal (no trailing newline), if debugging is enabled.
| value | The value to print. |
| important | If true, print even when limited debugging is active. Defaults to false. |
|
inherited |
Print a debug value in a given base (no trailing newline), if debugging is enabled.
| value | The value to print. |
| printBase | Number base to print in (e.g. HEX, DEC). |
| important | If true, print even when limited debugging is active. Defaults to false. |
|
inherited |
Print a debug message followed by a newline, if debugging is enabled.
| message | Null-terminated string to print. |
| important | If true, print even when limited debugging is active. Defaults to false. |
|
inherited |
Print a debug value in decimal followed by a newline, if debugging is enabled.
| value | The value to print. |
| important | If true, print even when limited debugging is active. Defaults to false. |
|
inherited |
Print a debug value in a given base followed by a newline, if debugging is enabled.
| value | The value to print. |
| printBase | Number base to print in (e.g. HEX, DEC). |
| important | If true, print even when limited debugging is active. Defaults to false. |
|
inherited |
Print a blank debug line, if debugging is enabled and not in limited-debug mode.
|
inherited |
Put the SSD168x into deep sleep. Only a hardware reset can wake it again (display() does this).
| mode2 | false : Deep Sleep Mode 1 (RAM retained), true : Deep Sleep Mode 2 (RAM not retained). |
|
inlineinherited |
Turn off debug message printing.
|
virtualinherited |
Send the changes in the graphics buffer to the device and perform a full or partial update.
| partial | false (default) : full update, true : partial update |
| dirtyOnly | true (default) : send only the dirty pixels, false : send all pixels |
Implements QwEpGrBufferDevice.
|
protectedvirtualinherited |
Reimplemented from _QwEpIDraw.
|
protectedvirtualinherited |
Reimplemented from _QwEpIDraw.
|
protectedvirtualinherited |
Reimplemented from _QwEpIDraw.
|
protectedvirtualinherited |
Reimplemented from _QwEpIDraw.
|
protectedvirtualinherited |
Reimplemented from _QwEpIDraw.
|
protectedvirtualinherited |
Reimplemented from _QwEpIDraw.
|
protectedvirtualinherited |
Implements QwEpGrBufferDevice.
|
protectedvirtualinherited |
Reimplemented from _QwEpIDraw.
|
protectedvirtualinherited |
Reimplemented from QwEpGrBufferDevice.
|
protectedvirtualinherited |
Reimplemented from _QwEpIDraw.
|
inlineinherited |
Enable debug messages, sent to the given port.
| debugPort | The port to print debug messages to (Arduino: a Print, e.g. Serial. ESP-IDF: an SfeOutput, e.g. SparkFun_SSD168x::sfeStdout). |
| printLimitedDebug | If true, only print messages flagged as "important". Defaults to false (print everything). |
|
virtualinherited |
Erase the graphics buffer. The erase is not sent to the device until the next display().
Implements QwEpGrBufferDevice.
|
inherited |
|
inherited |
|
inlineinherited |
|
inlinevirtual |
Set up the specific device settings: allocate the graphics buffer, then initialize the device.
Reimplemented from SpiSsd1680.
|
inherited |
|
inherited |
Read the state of the BUSY pin.
|
inlineinherited |
Check if init() has been called successfully.
|
inherited |
|
inlineinherited |
|
inlineinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
inherited |
|
inlineinherited |
Get the current raster operation (draw mode).
|
inherited |
|
inherited |
|
inherited |
Wake and reset the device: clear the graphics and screen buffers and perform a full update.
|
protectedinherited |
|
inherited |
|
inherited |
Set the communication bus this object should use, plus the RES# and BUSY pins.
| theBus | The SPI bus object (SparkFun_SSD168x::SfeSPI), already initialized with the CS# and D/C# pins. |
| resetPin | The RES# (reset) pin. Can be -1 if not connected: a software reset is used instead. |
| busyPin | The BUSY pin (required). |
|
inherited |
|
inherited |
|
inlineinherited |
Set the current raster operation (draw mode).
| rop | The raster operation. |
|
inlineinherited |
|
inherited |
|
inlineinherited |
|
inherited |
Wait until the SSD168x BUSY pin goes low.
| pollInterval_ms | How often to check the BUSY pin (ms). Defaults to 10ms. |
| timeout_ms | The maximum time to wait (ms). Defaults to kSsd168xBusyTimeout_ms. |
|
inlineinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |