Add heltec-rc52 board
This commit is contained in:
1 parent
79e06eaf99
commit
e8ace69fc0
12 files changed
+830
-15
No files matched your search
@@ -20,12 +20,14 @@
|
||||
#define NV3001B_PANEL_HEIGHT 220
|
||||
#endif
|
||||
|
||||
class NV3001BDisplay : public DisplayDriver {
|
||||
#if defined(ESP_PLATFORM) || defined(ESP32_PLATFORM)
|
||||
#ifndef NV3001B_SPI_HOST
|
||||
#define NV3001B_SPI_HOST HSPI
|
||||
#endif
|
||||
|
||||
class NV3001BDisplay : public DisplayDriver {
|
||||
SPIClass spi;
|
||||
SPIClass owned_spi;
|
||||
#endif
|
||||
SPIClass* spi;
|
||||
RefCountedDigitalPin* periph_power;
|
||||
bool is_on = false;
|
||||
uint16_t color = 0xffff;
|
||||
@@ -43,8 +45,18 @@ class NV3001BDisplay : public DisplayDriver {
|
||||
void drawChar(int x, int y, char ch);
|
||||
|
||||
public:
|
||||
#if defined(ESP_PLATFORM) || defined(ESP32_PLATFORM)
|
||||
NV3001BDisplay(RefCountedDigitalPin* power = nullptr) :
|
||||
DisplayDriver(NV3001B_LOGICAL_WIDTH, NV3001B_LOGICAL_HEIGHT), spi(NV3001B_SPI_HOST), periph_power(power) { }
|
||||
DisplayDriver(NV3001B_LOGICAL_WIDTH, NV3001B_LOGICAL_HEIGHT),
|
||||
owned_spi(NV3001B_SPI_HOST), spi(&owned_spi), periph_power(power) { }
|
||||
|
||||
NV3001BDisplay(SPIClass* displaySpi, RefCountedDigitalPin* power = nullptr) :
|
||||
DisplayDriver(NV3001B_LOGICAL_WIDTH, NV3001B_LOGICAL_HEIGHT),
|
||||
owned_spi(NV3001B_SPI_HOST), spi(displaySpi ? displaySpi : &owned_spi), periph_power(power) { }
|
||||
#else
|
||||
NV3001BDisplay(SPIClass* displaySpi = &SPI, RefCountedDigitalPin* power = nullptr) :
|
||||
DisplayDriver(NV3001B_LOGICAL_WIDTH, NV3001B_LOGICAL_HEIGHT), spi(displaySpi), periph_power(power) { }
|
||||
#endif
|
||||
|
||||
bool begin();
|
||||
static const char* driverName() { return "NV3001B"; }
|
||||
|
||||
Reference in new issue
Block a user