mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
add heltec meshpocket board.
This commit is contained in:
parent
88fbb41016
commit
c9671d7d8d
12 changed files with 560 additions and 19 deletions
|
|
@ -13,11 +13,8 @@
|
|||
#include <Fonts/FreeSansBold12pt7b.h>
|
||||
#include <Fonts/FreeSans18pt7b.h>
|
||||
|
||||
#define GxEPD2_DISPLAY_CLASS GxEPD2_BW
|
||||
#define GxEPD2_DRIVER_CLASS GxEPD2_150_BN // DEPG0150BN 200x200, SSD1681, (FPC8101), TTGO T5 V2.4.1
|
||||
|
||||
#include <epd/GxEPD2_150_BN.h> // 1.54" b/w
|
||||
|
||||
#include <epd/GxEPD2_213_B74.h> // 2.13" b/w
|
||||
#include "DisplayDriver.h"
|
||||
|
||||
//GxEPD2_BW<GxEPD2_150_BN, 200> display(GxEPD2_150_BN(DISP_CS, DISP_DC, DISP_RST, DISP_BUSY)); // DEPG0150BN 200x200, SSD1681, TTGO T5 V2.4.1
|
||||
|
|
@ -25,15 +22,30 @@
|
|||
|
||||
class GxEPDDisplay : public DisplayDriver {
|
||||
|
||||
#if defined(HELTEC_MESH_POCKET)
|
||||
GxEPD2_BW<EINK_DISPLAY_MODEL, EINK_DISPLAY_MODEL::HEIGHT> display;
|
||||
const float scale_x = EINK_SCALE_X;
|
||||
const float scale_y = EINK_SCALE_Y;
|
||||
const float offset_x = EINK_X_OFFSET;
|
||||
const float offset_y = EINK_Y_OFFSET;
|
||||
#else
|
||||
GxEPD2_BW<GxEPD2_150_BN, 200> display;
|
||||
const float scale_x = 1.5625f;
|
||||
const float scale_y = 1.5625f;
|
||||
const float offset_x = 0;
|
||||
const float offset_y = 10;
|
||||
#endif
|
||||
bool _init = false;
|
||||
bool _isOn = false;
|
||||
uint16_t _curr_color;
|
||||
|
||||
public:
|
||||
// there is a margin in y...
|
||||
GxEPDDisplay() : DisplayDriver(128, 128), display(GxEPD2_150_BN(DISP_CS, DISP_DC, DISP_RST, DISP_BUSY)) {
|
||||
}
|
||||
#if defined(HELTEC_MESH_POCKET)
|
||||
GxEPDDisplay() : DisplayDriver(128, 128), display(EINK_DISPLAY_MODEL(PIN_DISPLAY_CS, PIN_DISPLAY_DC, PIN_DISPLAY_RST, PIN_DISPLAY_BUSY)) {}
|
||||
#else
|
||||
GxEPDDisplay() : DisplayDriver(128, 128), display(GxEPD2_150_BN(DISP_CS, DISP_DC, DISP_RST, DISP_BUSY)) {}
|
||||
#endif
|
||||
|
||||
bool begin();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue