2018-04-13 01:14:01 +00:00
|
|
|
/**
|
|
|
|
* Marlin 3D Printer Firmware
|
2020-02-03 14:00:57 +00:00
|
|
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
2018-04-13 01:14:01 +00:00
|
|
|
*
|
|
|
|
* Based on Sprinter and grbl.
|
2019-06-28 04:57:50 +00:00
|
|
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
2018-04-13 01:14:01 +00:00
|
|
|
*
|
|
|
|
* This program 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.
|
|
|
|
*
|
|
|
|
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
*/
|
2018-10-23 21:00:34 +00:00
|
|
|
#pragma once
|
2018-04-13 01:14:01 +00:00
|
|
|
|
|
|
|
/**
|
2020-07-21 09:00:39 +00:00
|
|
|
* Hitachi HD44780 display defines and headers
|
2018-04-13 01:14:01 +00:00
|
|
|
*/
|
|
|
|
|
2018-10-23 21:00:34 +00:00
|
|
|
#include "../../inc/MarlinConfig.h"
|
2018-04-13 01:14:01 +00:00
|
|
|
|
|
|
|
#if ENABLED(LCD_I2C_TYPE_PCF8575)
|
2020-07-21 09:00:39 +00:00
|
|
|
|
2018-05-20 01:37:45 +00:00
|
|
|
// NOTE: These are register-mapped pins on the PCF8575 controller, not Arduino pins.
|
2018-04-13 01:14:01 +00:00
|
|
|
#define LCD_I2C_PIN_BL 3
|
|
|
|
#define LCD_I2C_PIN_EN 2
|
|
|
|
#define LCD_I2C_PIN_RW 1
|
|
|
|
#define LCD_I2C_PIN_RS 0
|
|
|
|
#define LCD_I2C_PIN_D4 4
|
|
|
|
#define LCD_I2C_PIN_D5 5
|
|
|
|
#define LCD_I2C_PIN_D6 6
|
|
|
|
#define LCD_I2C_PIN_D7 7
|
|
|
|
|
|
|
|
#include <Wire.h>
|
|
|
|
#include <LCD.h>
|
|
|
|
#include <LiquidCrystal_I2C.h>
|
|
|
|
#define LCD_CLASS LiquidCrystal_I2C
|
|
|
|
|
|
|
|
#elif ENABLED(LCD_I2C_TYPE_MCP23017)
|
2020-07-21 09:00:39 +00:00
|
|
|
|
2018-11-11 18:16:24 +00:00
|
|
|
// For the LED indicators (which may be mapped to different events in update_indicators())
|
2018-10-30 21:34:45 +00:00
|
|
|
#define LCD_HAS_STATUS_INDICATORS
|
2018-04-13 01:14:01 +00:00
|
|
|
#define LED_A 0x04 //100
|
|
|
|
#define LED_B 0x02 //010
|
|
|
|
#define LED_C 0x01 //001
|
|
|
|
|
|
|
|
#include <Wire.h>
|
|
|
|
#include <LiquidTWI2.h>
|
|
|
|
#define LCD_CLASS LiquidTWI2
|
|
|
|
|
|
|
|
#elif ENABLED(LCD_I2C_TYPE_MCP23008)
|
2020-07-21 09:00:39 +00:00
|
|
|
|
2018-04-13 01:14:01 +00:00
|
|
|
#include <Wire.h>
|
|
|
|
#include <LiquidTWI2.h>
|
|
|
|
#define LCD_CLASS LiquidTWI2
|
|
|
|
|
|
|
|
#elif ENABLED(LCD_I2C_TYPE_PCA8574)
|
2020-07-21 09:00:39 +00:00
|
|
|
|
2018-04-13 01:14:01 +00:00
|
|
|
#include <LiquidCrystal_I2C.h>
|
|
|
|
#define LCD_CLASS LiquidCrystal_I2C
|
|
|
|
|
|
|
|
#elif ENABLED(SR_LCD_2W_NL)
|
2020-07-21 09:00:39 +00:00
|
|
|
|
2018-10-30 21:34:45 +00:00
|
|
|
// 2 wire Non-latching LCD SR from:
|
|
|
|
// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
|
2018-04-13 01:14:01 +00:00
|
|
|
#include <LCD.h>
|
|
|
|
#include <LiquidCrystal_SR.h>
|
|
|
|
#define LCD_CLASS LiquidCrystal_SR
|
2020-07-21 09:00:39 +00:00
|
|
|
|
2019-01-14 20:29:55 +00:00
|
|
|
#elif ENABLED(SR_LCD_3W_NL)
|
|
|
|
|
2020-07-21 09:00:39 +00:00
|
|
|
// NewLiquidCrystal didn't work, so this uses
|
|
|
|
// https://github.com/mikeshub/SailfishLCD
|
2019-01-14 20:29:55 +00:00
|
|
|
|
|
|
|
#include <SailfishLCD.h>
|
|
|
|
#define LCD_CLASS LiquidCrystalSerial
|
2018-04-13 01:14:01 +00:00
|
|
|
|
|
|
|
#elif ENABLED(LCM1602)
|
2020-07-21 09:00:39 +00:00
|
|
|
|
2018-04-13 01:14:01 +00:00
|
|
|
#include <Wire.h>
|
|
|
|
#include <LCD.h>
|
|
|
|
#include <LiquidCrystal_I2C.h>
|
|
|
|
#define LCD_CLASS LiquidCrystal_I2C
|
|
|
|
|
|
|
|
#else
|
2020-07-21 09:00:39 +00:00
|
|
|
|
2018-04-13 01:14:01 +00:00
|
|
|
// Standard directly connected LCD implementations
|
|
|
|
#include <LiquidCrystal.h>
|
|
|
|
#define LCD_CLASS LiquidCrystal
|
2020-07-21 09:00:39 +00:00
|
|
|
|
2018-04-13 01:14:01 +00:00
|
|
|
#endif
|
|
|
|
|
2018-10-23 21:00:34 +00:00
|
|
|
#include "../fontutils.h"
|
|
|
|
#include "../lcdprint.h"
|