changed class constructor for simpler operation

This commit is contained in:
Laurence Bank
2024-09-22 20:15:43 +01:00
parent 2dcc6c67a4
commit 5d15ce188c
2 changed files with 9 additions and 6 deletions
+8 -4
View File
@@ -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
View File
@@ -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);