mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-27 01:56:14 +01:00
53 lines
1.7 KiB
C
53 lines
1.7 KiB
C
|
/*
|
||
|
* © 2024, Oskar Senft. All rights reserved.
|
||
|
*
|
||
|
* This file is part of CommandStation-EX
|
||
|
*
|
||
|
* This is free software: you can redistribute it and/or modify
|
||
|
* it under the terms of the GNU General Public License as published by
|
||
|
* the Free Software Foundation, either version 3 of the License, or
|
||
|
* (at your option) any later version.
|
||
|
*
|
||
|
* It is distributed in the hope that it will be useful,
|
||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
|
* GNU General Public License for more details.
|
||
|
*
|
||
|
* You should have received a copy of the GNU General Public License
|
||
|
* along with CommandStation. If not, see <https://www.gnu.org/licenses/>.
|
||
|
*/
|
||
|
|
||
|
#ifndef LiquidCrystal_Parallel_h
|
||
|
#define LiquidCrystal_Parallel_h
|
||
|
|
||
|
#include <Arduino.h>
|
||
|
#include <LiquidCrystal.h>
|
||
|
#include "Display.h"
|
||
|
|
||
|
// Support for an LCD based on the Hitachi HD44780 (or a compatible) chipset
|
||
|
// as supported by Arduino's LiquidCrystal library.
|
||
|
class LiquidCrystal_Parallel : public DisplayDevice
|
||
|
{
|
||
|
public:
|
||
|
// Specify the display's number of columns and rows as well
|
||
|
// as Arduino pins numbers for the display's pins (4-bit mode)
|
||
|
LiquidCrystal_Parallel(uint16_t cols, uint16_t rows,
|
||
|
uint8_t rs, uint8_t rw, uint8_t enable,
|
||
|
uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7);
|
||
|
bool begin() override;
|
||
|
void clearNative() override;
|
||
|
void setRowNative(byte line) override;
|
||
|
size_t writeNative(uint8_t c) override;
|
||
|
bool isBusy() override;
|
||
|
|
||
|
uint16_t getNumCols() override { return _cols; }
|
||
|
uint16_t getNumRows() override { return _rows; }
|
||
|
|
||
|
private:
|
||
|
LiquidCrystal lcd;
|
||
|
const uint16_t _cols;
|
||
|
const uint16_t _rows;
|
||
|
};
|
||
|
|
||
|
#endif
|