SparkFun SSD168x Library  v1.0.2
Library for SSD1680 / SSD1681 e-paper displays on SPI
Loading...
Searching...
No Matches
qwiic_ssd1680_184x88_rotated.h
Go to the documentation of this file.
1
21#pragma once
22
23#include "spi_ssd1680_rotated.h"
24
26// Set the defaults for a generic 184x88 SSD1680 display, rotated through 90 degrees
27
28#define kSpiSsd1680184x88RotatedWidth 184
29#define kSpiSsd1680184x88RotatedHeight 88
30
31#define kSpiSsd1680184x88RotatedXOffset 0
32#define kSpiSsd1680184x88RotatedYOffset 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)kSpiSsd1680184x88RotatedWidth * (uint16_t)kSpiSsd1680184x88RotatedHeight / 8];
67 this->SpiSsd1680Rotated::setBuffer(m_graphicsBuffer); // The buffer to use
68
69 // Call the super class to do all the work
70 return this->SpiSsd1680Rotated::init();
71 };
72
73private:
74 // Graphics buffer for this device.
75 uint8_t *m_graphicsBuffer = nullptr;
76};
Definition: qwiic_ssd1680_184x88_rotated.h:34
SpiSsd1680_184x88_Rotated()
Construct the device - setup the viewport for this device.
Definition: qwiic_ssd1680_184x88_rotated.h:40
~SpiSsd1680_184x88_Rotated()
Destroy the device - free the graphics buffer.
Definition: qwiic_ssd1680_184x88_rotated.h:48
bool init(void)
Set up the specific device settings: allocate the graphics buffer, then initialize the device.
Definition: qwiic_ssd1680_184x88_rotated.h:62
Definition: spi_ssd1680_rotated.h:100
virtual bool init(void)
Initialize the device: reset it, send the initialization sequence, clear it and perform a full update...
Definition: spi_ssd1680_rotated.cpp:105
void setBuffer(uint8_t *pBuffer)
Definition: spi_ssd1680_rotated.cpp:293
#define kSpiSsd1680184x88RotatedXOffset
Definition: qwiic_ssd1680_184x88_rotated.h:31
#define kSpiSsd1680184x88RotatedHeight
Definition: qwiic_ssd1680_184x88_rotated.h:29
#define kSpiSsd1680184x88RotatedYOffset
Definition: qwiic_ssd1680_184x88_rotated.h:32
#define kSpiSsd1680184x88RotatedWidth
Definition: qwiic_ssd1680_184x88_rotated.h:28