1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-22 23:56:13 +01:00

Compare commits

...

2 Commits

Author SHA1 Message Date
Oskar Senft
bf407ea5db
Merge b36fb352b6 into f39fd89fbd 2024-07-26 14:53:38 +00:00
Oskar Senft
b36fb352b6 Reference LiquidCrystal library only if driver is enabled 2024-07-26 10:53:27 -04:00

View File

@ -21,9 +21,26 @@
#define LiquidCrystal_Parallel_h #define LiquidCrystal_Parallel_h
#include <Arduino.h> #include <Arduino.h>
#include <LiquidCrystal.h>
#include "Display.h" #include "Display.h"
#ifdef PARALLEL_LCD_DRIVER
// Only use the Arduino library if the driver is actually enabled.
#include <LiquidCrystal.h>
#else
// If the driver is not enabled, use a dummy version instead.
class LiquidCrystal
{
public:
LiquidCrystal(uint8_t rs, uint8_t rw, uint8_t enable,
uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7) {};
void begin(uint16_t cols, uint16_t rows) {};
void noCursor() {};
void setCursor(uint16_t col, uint16_t row) {};
void clear() {};
size_t write(uint8_t val) { return 0; };
};
#endif
// Support for an LCD based on the Hitachi HD44780 (or a compatible) chipset // Support for an LCD based on the Hitachi HD44780 (or a compatible) chipset
// as supported by Arduino's LiquidCrystal library. // as supported by Arduino's LiquidCrystal library.
class LiquidCrystal_Parallel : public DisplayDevice class LiquidCrystal_Parallel : public DisplayDevice