35 #ifndef _SSD1306_ADAFRUIT_H_ 36 #define _SSD1306_ADAFRUIT_H_ 40 #if defined(CONFIG_ADAFRUIT_GFX_ENABLE) 47 #ifndef DOXYGEN_SHOULD_SKIP_THIS 52 #include "Adafruit_GFX.h" 55 #include "Adafruit_GFX.h" 58 #endif // DOXYGEN_SHOULD_SKIP_THIS 66 template <u
int8_t BPP>
99 void drawPixel(int16_t x, int16_t y, uint16_t color)
override;
107 inline void rotatePosition(int16_t &x, int16_t &y)
109 switch (getRotation()) {
130 template <u
int8_t BPP>
141 virtual void blt(lcdint_t x, lcdint_t y) = 0;
146 virtual void blt() = 0;
163 using AdafruitCanvasBase::AdafruitCanvasBase;
170 void blt(lcdint_t x, lcdint_t y)
override 184 #ifndef DOXYGEN_SHOULD_SKIP_THIS 190 if ((x < 0) || (x >= width()) || (y < 0) || (y >= height()))
194 rotatePosition(x, y);
198 case 1:
m_buffer[x+ (y/8)*WIDTH] |= (1 << (y&7));
break;
199 case 0:
m_buffer[x+ (y/8)*WIDTH] &= ~(1 << (y&7));
break;
200 case 2:
m_buffer[x+ (y/8)*WIDTH] ^= (1 << (y&7));
break;
203 #endif // DOXYGEN_SHOULD_SKIP_THIS 219 using AdafruitCanvasBase::AdafruitCanvasBase;
226 void blt(lcdint_t x, lcdint_t y)
override 240 #ifndef DOXYGEN_SHOULD_SKIP_THIS 246 if ((x < 0) || (x >= width()) || (y < 0) || (y >= height()))
250 rotatePosition(x, y);
254 #endif // DOXYGEN_SHOULD_SKIP_THIS 271 using AdafruitCanvasBase::AdafruitCanvasBase;
278 void blt(lcdint_t x, lcdint_t y)
override 292 #ifndef DOXYGEN_SHOULD_SKIP_THIS 298 if ((x < 0) || (x >= width()) || (y < 0) || (y >= height()))
302 rotatePosition(x, y);
304 m_buffer[(x+y*WIDTH) * 2 + 0] = color;
305 m_buffer[(x+y*WIDTH) * 2 + 1] = color >> 8;
307 #endif // DOXYGEN_SHOULD_SKIP_THIS 309 #endif // CONFIG_ADAFRUIT_GFX_ENABLE AdafruitCanvasOps(lcduint_t w, lcduint_t h, uint8_t *buffer)
#define ssd1306_swap_data(a, b, type)
void ssd1331_drawBufferFast16(lcdint_t x, lcdint_t y, lcduint_t w, lcduint_t h, const uint8_t *data)
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 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 drawPixel(int16_t x, int16_t y, uint16_t color) override