29#define kSpiSsd1681CustomDefaultWidth 200
30#define kSpiSsd1681CustomDefaultHeight 200
32#define kSpiSsd1681CustomDefaultXOffset 0
33#define kSpiSsd1681CustomDefaultYOffset 0
51 if (m_graphicsBuffer !=
nullptr)
53 delete[] m_graphicsBuffer;
54 m_graphicsBuffer =
nullptr;
67 if (m_graphicsBuffer !=
nullptr)
68 delete[] m_graphicsBuffer;
69 m_graphicsBuffer =
new uint8_t[(uint16_t)m_displayWidth * (uint16_t)m_displayHeight / 8];
92 uint8_t *m_graphicsBuffer =
nullptr;
void setViewport(uint8_t x0, uint8_t y0, uint8_t width, uint8_t height)
Definition: qwiic_grbuffer.h:165
Definition: qwiic_ssd1681_custom.h:35
bool init(void)
Set up the specific device settings: set the viewport, allocate the graphics buffer,...
Definition: qwiic_ssd1681_custom.h:63
void setDisplayWidth(uint8_t displayWidth)
Set the display width. Call before init().
Definition: qwiic_ssd1681_custom.h:81
void setDisplayHeight(uint8_t displayHeight)
Set the display height. Call before init().
Definition: qwiic_ssd1681_custom.h:83
void setYOffset(uint8_t yOffset)
Set the Y offset. Call before init().
Definition: qwiic_ssd1681_custom.h:79
~SpiSsd1681_Custom()
Destroy the device - free the graphics buffer.
Definition: qwiic_ssd1681_custom.h:49
void setXOffset(uint8_t xOffset)
Set the X offset. Call before init().
Definition: qwiic_ssd1681_custom.h:77
SpiSsd1681_Custom()
Construct the device - setup the default viewport for this device.
Definition: qwiic_ssd1681_custom.h:41
Definition: spi_ssd1681.h:97
void setBuffer(uint8_t *pBuffer)
Definition: spi_ssd1681.cpp:280
virtual bool init(void)
Initialize the device: reset it, send the initialization sequence, clear it and perform a full update...
Definition: spi_ssd1681.cpp:105
#define kSpiSsd1681CustomDefaultWidth
Definition: qwiic_ssd1681_custom.h:29
#define kSpiSsd1681CustomDefaultHeight
Definition: qwiic_ssd1681_custom.h:30
#define kSpiSsd1681CustomDefaultXOffset
Definition: qwiic_ssd1681_custom.h:32
#define kSpiSsd1681CustomDefaultYOffset
Definition: qwiic_ssd1681_custom.h:33