SparkFun SSD168x Library  v1.0.2
Library for SSD1680 / SSD1681 e-paper displays on SPI
Loading...
Searching...
No Matches
qwiic_ssd1681_200x200.h
Go to the documentation of this file.
1
21#pragma once
22
23#include "spi_ssd1681.h"
24
26// Set the defaults for a generic 200x200 SSD1681 display
27
28#define kSpiSsd1681200x200Width 200
29#define kSpiSsd1681200x200Height 200
30
31#define kSpiSsd1681200x200XOffset 0
32#define kSpiSsd1681200x200YOffset 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)kSpiSsd1681200x200Width * (uint16_t)kSpiSsd1681200x200Height / 8];
67 this->SpiSsd1681::setBuffer(m_graphicsBuffer); // The buffer to use
68
69 // Call the super class to do all the work
70 return this->SpiSsd1681::init();
71 };
72
73private:
74 // Graphics buffer for this device.
75 uint8_t *m_graphicsBuffer = nullptr;
76};
Definition: qwiic_ssd1681_200x200.h:34
SpiSsd1681_200x200()
Construct the device - setup the viewport for this device.
Definition: qwiic_ssd1681_200x200.h:40
bool init(void)
Set up the specific device settings: allocate the graphics buffer, then initialize the device.
Definition: qwiic_ssd1681_200x200.h:62
~SpiSsd1681_200x200()
Destroy the device - free the graphics buffer.
Definition: qwiic_ssd1681_200x200.h:48
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 kSpiSsd1681200x200Height
Definition: qwiic_ssd1681_200x200.h:29
#define kSpiSsd1681200x200XOffset
Definition: qwiic_ssd1681_200x200.h:31
#define kSpiSsd1681200x200YOffset
Definition: qwiic_ssd1681_200x200.h:32
#define kSpiSsd1681200x200Width
Definition: qwiic_ssd1681_200x200.h:28