My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

marlinui_HD44780.h 2.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
  4. *
  5. * Based on Sprinter and grbl.
  6. * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
  7. *
  8. * This program is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation, either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  20. *
  21. */
  22. #pragma once
  23. /**
  24. * Hitachi HD44780 display defines and headers
  25. */
  26. #include "../../inc/MarlinConfig.h"
  27. #if ENABLED(LCD_I2C_TYPE_PCF8575)
  28. // NOTE: These are register-mapped pins on the PCF8575 controller, not Arduino pins.
  29. #define LCD_I2C_PIN_BL 3
  30. #define LCD_I2C_PIN_EN 2
  31. #define LCD_I2C_PIN_RW 1
  32. #define LCD_I2C_PIN_RS 0
  33. #define LCD_I2C_PIN_D4 4
  34. #define LCD_I2C_PIN_D5 5
  35. #define LCD_I2C_PIN_D6 6
  36. #define LCD_I2C_PIN_D7 7
  37. #include <Wire.h>
  38. #include <LCD.h>
  39. #include <LiquidCrystal_I2C.h>
  40. #define LCD_CLASS LiquidCrystal_I2C
  41. #elif ENABLED(LCD_I2C_TYPE_MCP23017)
  42. // For the LED indicators (which may be mapped to different events in update_indicators())
  43. #define LCD_HAS_STATUS_INDICATORS
  44. #define LED_A 0x04 //100
  45. #define LED_B 0x02 //010
  46. #define LED_C 0x01 //001
  47. #include <Wire.h>
  48. #include <LiquidTWI2.h>
  49. #define LCD_CLASS LiquidTWI2
  50. #elif ENABLED(LCD_I2C_TYPE_MCP23008)
  51. #include <Wire.h>
  52. #include <LiquidTWI2.h>
  53. #define LCD_CLASS LiquidTWI2
  54. #elif ENABLED(LCD_I2C_TYPE_PCA8574)
  55. #include <LiquidCrystal_I2C.h>
  56. #define LCD_CLASS LiquidCrystal_I2C
  57. #elif ENABLED(SR_LCD_2W_NL)
  58. // 2 wire Non-latching LCD SR from:
  59. // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
  60. #include <LCD.h>
  61. #include <LiquidCrystal_SR.h>
  62. #define LCD_CLASS LiquidCrystal_SR
  63. #elif ENABLED(SR_LCD_3W_NL)
  64. // NewLiquidCrystal didn't work, so this uses
  65. // https://github.com/mikeshub/SailfishLCD
  66. #include <SailfishLCD.h>
  67. #define LCD_CLASS LiquidCrystalSerial
  68. #elif ENABLED(LCM1602)
  69. #include <Wire.h>
  70. #include <LCD.h>
  71. #include <LiquidCrystal_I2C.h>
  72. #define LCD_CLASS LiquidCrystal_I2C
  73. #elif ENABLED(YHCB2004)
  74. #include <LiquidCrystal_AIP31068_SPI.h>
  75. #define LCD_CLASS LiquidCrystal_AIP31068_SPI
  76. #else
  77. // Standard directly connected LCD implementations
  78. #include <LiquidCrystal.h>
  79. #define LCD_CLASS LiquidCrystal
  80. #endif
  81. #include "../fontutils.h"
  82. #include "../lcdprint.h"