35 #ifndef _SSD1306_ADAFRUIT_H_ 36 #define _SSD1306_ADAFRUIT_H_ 40 #if defined(CONFIG_ADAFRUIT_GFX_ENABLE) 43 #include "ssd1331_api.h" 47 #ifndef DOXYGEN_SHOULD_SKIP_THIS 52 #include "Adafruit_GFX.h" 55 #include "Adafruit_GFX.h" 58 #endif // DOXYGEN_SHOULD_SKIP_THIS 71 template <u
int8_t BPP>
104 void drawPixel(int16_t x, int16_t y, uint16_t color)
override;
113 #ifndef DOXYGEN_SHOULD_SKIP_THIS 116 void fillScreen(uint16_t color)
override 128 inline void rotatePosition(int16_t &x, int16_t &y)
130 switch (getRotation()) {
151 template <u
int8_t BPP>
162 virtual void blt(lcdint_t x, lcdint_t y) = 0;
167 virtual void blt() = 0;
184 using AdafruitCanvasBase::AdafruitCanvasBase;
191 void blt(lcdint_t x, lcdint_t y)
override 205 #ifndef DOXYGEN_SHOULD_SKIP_THIS 211 if ((x < 0) || (x >= width()) || (y < 0) || (y >= height()))
215 rotatePosition(x, y);
219 case 1: m_buffer[x+ (y/8)*WIDTH] |= (1 << (y&7));
break;
220 case 0: m_buffer[x+ (y/8)*WIDTH] &= ~(1 << (y&7));
break;
221 case 2: m_buffer[x+ (y/8)*WIDTH] ^= (1 << (y&7));
break;
224 #endif // DOXYGEN_SHOULD_SKIP_THIS 240 using AdafruitCanvasBase::AdafruitCanvasBase;
247 void blt(lcdint_t x, lcdint_t y)
override 261 #ifndef DOXYGEN_SHOULD_SKIP_THIS 267 if ((x < 0) || (x >= width()) || (y < 0) || (y >= height()))
271 rotatePosition(x, y);
273 m_buffer[x+y*WIDTH] = color;
275 #endif // DOXYGEN_SHOULD_SKIP_THIS 292 using AdafruitCanvasBase::AdafruitCanvasBase;
299 void blt(lcdint_t x, lcdint_t y)
override 313 #ifndef DOXYGEN_SHOULD_SKIP_THIS 319 if ((x < 0) || (x >= width()) || (y < 0) || (y >= height()))
323 rotatePosition(x, y);
325 m_buffer[(x+y*WIDTH) * 2 + 0] = color;
326 m_buffer[(x+y*WIDTH) * 2 + 1] = color >> 8;
328 #endif // DOXYGEN_SHOULD_SKIP_THIS 334 #endif // CONFIG_ADAFRUIT_GFX_ENABLE AdafruitCanvasOps(lcduint_t w, lcduint_t h, uint8_t *buffer)
void blt(lcdint_t x, lcdint_t y) override
void setOffset(lcdint_t ox, lcdint_t oy)
void ssd1331_drawBufferFast16(lcdint_t x, lcdint_t y, lcduint_t w, lcduint_t h, const uint8_t *data)
void ssd1331_drawBufferFast8(lcdint_t x, lcdint_t y, lcduint_t w, lcduint_t h, const uint8_t *data)
static const uint8_t BITS_PER_PIXEL
void blt(lcdint_t x, lcdint_t y) override
void blt(lcdint_t x, lcdint_t y) override
void ssd1306_drawBufferFast(lcdint_t x, lcdint_t y, lcduint_t w, lcduint_t h, const uint8_t *buf)
void drawPixel(int16_t x, int16_t y, uint16_t color) override
#define ssd1306_swap_data(a, b, type)