2019-12-13 19:23:10 +01:00
|
|
|
#ifndef PANEL_HPP
|
|
|
|
#define PANEL_HPP
|
|
|
|
|
|
|
|
#include "image.hpp"
|
|
|
|
|
2019-12-14 00:40:23 +01:00
|
|
|
|
2019-12-13 19:23:10 +01:00
|
|
|
class Panel
|
|
|
|
{
|
|
|
|
public:
|
2019-12-14 00:40:23 +01:00
|
|
|
Panel(uint8_t pData, uint8_t pClock, uint8_t pLoad, int x, int y);
|
2019-12-13 19:23:10 +01:00
|
|
|
void init();
|
|
|
|
void send_image(Image* img);
|
|
|
|
|
|
|
|
private:
|
|
|
|
void clock();
|
|
|
|
void load();
|
|
|
|
void send_block(Image* p, int x, int y);
|
2019-12-14 00:40:23 +01:00
|
|
|
|
2019-12-13 23:10:20 +01:00
|
|
|
uint8_t pinData;
|
|
|
|
uint8_t pinClock;
|
|
|
|
uint8_t pinLoad;
|
2019-12-14 00:40:23 +01:00
|
|
|
|
|
|
|
// position of panel in image
|
|
|
|
int posX;
|
|
|
|
int posY;
|
2019-12-13 19:23:10 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|