mirror of
https://github.com/usetrmnl/bb_epaper.git
synced 2026-04-29 13:43:26 -07:00
changed class constructor for simpler operation
This commit is contained in:
+8
-4
@@ -47,14 +47,18 @@ void delay(int);
|
||||
// return _bbep.iTimeout;
|
||||
//}
|
||||
|
||||
BBEPAPER::BBEPAPER(int iPanel)
|
||||
{
|
||||
memset(&_bbep, 0, sizeof(_bbep));
|
||||
_bbep.iFG = BBEP_BLACK;
|
||||
bbepSetPanelType(&_bbep, iPanel);
|
||||
}
|
||||
|
||||
void BBEPAPER::setAddrWindow(int x, int y, int w, int h)
|
||||
{
|
||||
bbepSetAddrWindow(&_bbep, x, y, w, h);
|
||||
}
|
||||
int BBEPAPER::setPanelType(int iPanel)
|
||||
{
|
||||
return bbepSetPanelType(&_bbep, iPanel);
|
||||
}
|
||||
|
||||
void BBEPAPER::initIO(int iDC, int iReset, int iBusy, int iCS, int iMOSI, int iSCLK, uint32_t u32Speed)
|
||||
{
|
||||
_bbep.iCSPin = iCS;
|
||||
|
||||
+1
-2
@@ -278,9 +278,8 @@ class BBEPAPER
|
||||
#endif // _LINUX_
|
||||
{
|
||||
public:
|
||||
BBEPAPER() { memset(&_bbep, 0, sizeof(_bbep)); _bbep.iFG = BBEP_BLACK; _bbep.type = EPD_PANEL_UNDEFINED;}
|
||||
BBEPAPER(int iPanel);
|
||||
void setAddrWindow(int x, int y, int w, int h);
|
||||
int setPanelType(int iPanel);
|
||||
void initIO(int iDC, int iReset, int iBusy, int iCS = SS, int iMOSI = MOSI, int iSCLK = SCK, uint32_t u32Speed = 8000000);
|
||||
int writePlane(int iPlane = PLANE_DUPLICATE);
|
||||
void startWrite(int iPlane);
|
||||
|
||||
Reference in New Issue
Block a user