SparkFun SSD168x Library  v1.0.2
Library for SSD1680 / SSD1681 e-paper displays on SPI
Loading...
Searching...
No Matches
qwiic_ssd1680_184x88.h
Go to the documentation of this file.
1
21#pragma once
22
23#include "spi_ssd1680.h"
24
26// Set the defaults for a generic 184x88 SSD1680 display
27
28#define kSpiSsd1680184x88Width 88
29#define kSpiSsd1680184x88Height 184
30
31#define kSpiSsd1680184x88XOffset 0
32#define kSpiSsd1680184x88YOffset 0
33
35
36public:
42 {
43 };
44
49 {
50 if (m_graphicsBuffer != nullptr)
51 {
52 delete[] m_graphicsBuffer;
53 m_graphicsBuffer = nullptr;
54 }
55 };
56
62 bool init(void)
63 {
64 if (m_graphicsBuffer != nullptr)
65 delete[] m_graphicsBuffer;
66 m_graphicsBuffer = new uint8_t[(uint16_t)kSpiSsd1680184x88Width * (uint16_t)kSpiSsd1680184x88Height / 8];
67 this->SpiSsd1680::setBuffer(m_graphicsBuffer); // The buffer to use
68
69 // Call the super class to do all the work
70 return this->SpiSsd1680::init();
71 };
72
73private:
74 // Graphics buffer for this device.
75 uint8_t *m_graphicsBuffer = nullptr;
76};
Definition: qwiic_ssd1680_184x88.h:34
bool init(void)
Set up the specific device settings: allocate the graphics buffer, then initialize the device.
Definition: qwiic_ssd1680_184x88.h:62
SpiSsd1680_184x88()
Construct the device - setup the viewport for this device.
Definition: qwiic_ssd1680_184x88.h:40
~SpiSsd1680_184x88()
Destroy the device - free the graphics buffer.
Definition: qwiic_ssd1680_184x88.h:48
Definition: spi_ssd1680.h:97
virtual bool init(void)
Initialize the device: reset it, send the initialization sequence, clear it and perform a full update...
Definition: spi_ssd1680.cpp:105
void setBuffer(uint8_t *pBuffer)
Definition: spi_ssd1680.cpp:287
#define kSpiSsd1680184x88XOffset
Definition: qwiic_ssd1680_184x88.h:31
#define kSpiSsd1680184x88YOffset
Definition: qwiic_ssd1680_184x88.h:32
#define kSpiSsd1680184x88Height
Definition: qwiic_ssd1680_184x88.h:29
#define kSpiSsd1680184x88Width
Definition: qwiic_ssd1680_184x88.h:28