-
Notifications
You must be signed in to change notification settings - Fork 1
/
ObegransadPanel.h
57 lines (43 loc) · 1.55 KB
/
ObegransadPanel.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#ifndef __OBEGRANSADPANEL_H
#define __OBEGRANSADPANEL_H
#include <Arduino.h>
#include <Adafruit_GFX.h>
class ObegransadPanel : public Adafruit_GFX
{
private:
unsigned short _numPanels : 4;
unsigned short _numPages : 4;
unsigned short _activePage : 4;
unsigned short _bitDepth : 4;
unsigned short _pLatch;
unsigned short _pClock;
unsigned short _pData;
unsigned short* buf;
unsigned short _pageMask;
unsigned short _addressMask;
unsigned short _numWords;
unsigned short _pageStride;
unsigned short _numPixels;
unsigned short _width;
unsigned short _height;
public:
ObegransadPanel(int p_latch, int p_clock, int p_data, int bitDepth,
int numPanels);
ObegransadPanel(int p_latch, int p_clock, int p_data);
void init(int p_latch, int p_clock, int p_data, int bitDepth, int numPanels);
void clear();
void scan();
//void writeDeepPixel(unsigned short x, unsigned short y, unsigned short value);
boolean getPixel(int16_t x, int16_t y);
boolean getRawPixel(int16_t x, int16_t y);
unsigned short width();
unsigned short height();
void drawPixel(int16_t x, int16_t y, uint16_t color) override;
void drawFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color) override;
void drawFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color) override;
void fillScreen(uint16_t color) override;
void printBits( uint8_t val);
void debugMatrix();
private:
};
#endif //__OBEGRANSADPANEL_H