Added compile time default for 4LD usermod.

This commit is contained in:
Blaž Kristan 2021-12-10 16:59:56 +01:00
parent d6cff870e5
commit 2f411dfc9c

View File

@ -78,6 +78,14 @@
#endif
#endif
#ifndef FLD_TYPE
#ifndef FLD_SPI_DEFAULT
#define FLD_TYPE SSD1306
#else
#define FLD_TYPE SSD1306_SPI
#endif
#endif
// When to time out to the clock or blank the screen
// if SLEEP_MODE_ENABLED.
#define SCREEN_TIMEOUT_MS 60*1000 // 1 min
@ -123,10 +131,10 @@ class FourLineDisplayUsermod : public Usermod {
#ifndef FLD_SPI_DEFAULT
int8_t ioPin[5] = {FLD_PIN_SCL, FLD_PIN_SDA, -1, -1, -1}; // I2C pins: SCL, SDA
uint32_t ioFrequency = 400000; // in Hz (minimum is 100000, baseline is 400000 and maximum should be 3400000)
DisplayType type = SSD1306; // display type
DisplayType type = FLD_TYPE; // display type
#else
int8_t ioPin[5] = {FLD_PIN_CLOCKSPI, FLD_PIN_DATASPI, FLD_PIN_CS, FLD_PIN_DC, FLD_PIN_RESET}; // SPI pins: CLK, MOSI, CS, DC, RST
DisplayType type = SSD1306_SPI; // display type
DisplayType type = FLD_TYPE; // display type
#endif
bool flip = false; // flip display 180°
uint8_t contrast = 10; // screen contrast