28 lines
765 B
C++
28 lines
765 B
C++
#ifndef _CDISPLAY_H_
|
|
#define _CDISPLAY_H_
|
|
#include "pins.h"
|
|
|
|
class CDisplay
|
|
{
|
|
public:
|
|
CDisplay();
|
|
~CDisplay();
|
|
void initDisplay();
|
|
void setRow(uint8_t row, uint16_t val);
|
|
void setPixelAt(int col, int row, bool val);
|
|
void drawScreen(int rdelay=1);
|
|
void displayRow(uint8_t row);
|
|
void beep(uint16_t time_ms, uint8_t pitch, uint8_t row = 16, bool noise=false);
|
|
void clearScreen();
|
|
void flipScreen(bool orientation);
|
|
void invertScreen();
|
|
uint16_t getRowAt(uint8_t row);
|
|
|
|
protected:
|
|
uint16_t display[13];
|
|
void shiftBit(bool bit);
|
|
void shift16BITValue(uint16_t val);
|
|
bool ori = false;
|
|
uint16_t flipValue(uint16_t val);
|
|
};
|
|
#endif |