Optimize LCD, Wifi, etc. libraries (#18730)
This commit is contained in:
@ -115,8 +115,7 @@ void GcodeSuite::M360() {
|
||||
xyz_pos_t cmin = dmin, cmax = dmax;
|
||||
apply_motion_limits(cmin);
|
||||
apply_motion_limits(cmax);
|
||||
const xyz_pos_t lmin = dmin.asLogical(), lmax = dmax.asLogical(),
|
||||
wmin = cmin.asLogical(), wmax = cmax.asLogical();
|
||||
const xyz_pos_t wmin = cmin.asLogical(), wmax = cmax.asLogical();
|
||||
|
||||
PGMSTR(MIN_STR, "Min");
|
||||
PGMSTR(MAX_STR, "Max");
|
||||
|
@ -399,6 +399,14 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if ENABLED(SR_LCD_3W_NL)
|
||||
// Feature checks for SR_LCD_3W_NL
|
||||
#elif EITHER(LCD_I2C_TYPE_MCP23017, LCD_I2C_TYPE_MCP23008)
|
||||
#define USES_LIQUIDTWI2
|
||||
#elif ANY(HAS_CHARACTER_LCD, LCD_I2C_TYPE_PCF8575, LCD_I2C_TYPE_PCA8574, SR_LCD_2W_NL, LCM1602)
|
||||
#define USES_LIQUIDCRYSTAL
|
||||
#endif
|
||||
|
||||
#if ENABLED(ULTIPANEL) && DISABLED(NO_LCD_MENUS)
|
||||
#define HAS_LCD_MENU 1
|
||||
#endif
|
||||
|
@ -22,26 +22,13 @@
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Implementation of the LCD display routines for a Hitachi HD44780 display.
|
||||
* These are the most common LCD character displays.
|
||||
* Hitachi HD44780 display defines and headers
|
||||
*/
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
|
||||
#if LCD_HEIGHT > 3
|
||||
#include "../../libs/duration_t.h"
|
||||
#endif
|
||||
|
||||
////////////////////////////////////
|
||||
// Setup button and encode mappings for each panel (into 'buttons' variable
|
||||
//
|
||||
// This is just to map common functions (across different panels) onto the same
|
||||
// macro name. The mapping is independent of whether the button is directly connected or
|
||||
// via a shift/i2c register.
|
||||
|
||||
////////////////////////////////////
|
||||
// Create LCD class instance and chipset-specific information
|
||||
#if ENABLED(LCD_I2C_TYPE_PCF8575)
|
||||
|
||||
// NOTE: These are register-mapped pins on the PCF8575 controller, not Arduino pins.
|
||||
#define LCD_I2C_PIN_BL 3
|
||||
#define LCD_I2C_PIN_EN 2
|
||||
@ -58,6 +45,7 @@
|
||||
#define LCD_CLASS LiquidCrystal_I2C
|
||||
|
||||
#elif ENABLED(LCD_I2C_TYPE_MCP23017)
|
||||
|
||||
// For the LED indicators (which may be mapped to different events in update_indicators())
|
||||
#define LCD_HAS_STATUS_INDICATORS
|
||||
#define LED_A 0x04 //100
|
||||
@ -69,40 +57,45 @@
|
||||
#define LCD_CLASS LiquidTWI2
|
||||
|
||||
#elif ENABLED(LCD_I2C_TYPE_MCP23008)
|
||||
|
||||
#include <Wire.h>
|
||||
#include <LiquidTWI2.h>
|
||||
#define LCD_CLASS LiquidTWI2
|
||||
|
||||
#elif ENABLED(LCD_I2C_TYPE_PCA8574)
|
||||
|
||||
#include <LiquidCrystal_I2C.h>
|
||||
#define LCD_CLASS LiquidCrystal_I2C
|
||||
|
||||
#elif ENABLED(SR_LCD_2W_NL)
|
||||
|
||||
// 2 wire Non-latching LCD SR from:
|
||||
// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
|
||||
// extern "C" void __cxa_pure_virtual() { while (1); }
|
||||
#include <LCD.h>
|
||||
#include <LiquidCrystal_SR.h>
|
||||
#define LCD_CLASS LiquidCrystal_SR
|
||||
|
||||
#elif ENABLED(SR_LCD_3W_NL)
|
||||
|
||||
//NewLiquidCrystal was not working for me, but this worked first try
|
||||
//https://github.com/mikeshub/SailfishLCD
|
||||
//uses the code directly from Sailfish
|
||||
// NewLiquidCrystal didn't work, so this uses
|
||||
// https://github.com/mikeshub/SailfishLCD
|
||||
|
||||
#include <SailfishLCD.h>
|
||||
#define LCD_CLASS LiquidCrystalSerial
|
||||
|
||||
#elif ENABLED(LCM1602)
|
||||
|
||||
#include <Wire.h>
|
||||
#include <LCD.h>
|
||||
#include <LiquidCrystal_I2C.h>
|
||||
#define LCD_CLASS LiquidCrystal_I2C
|
||||
|
||||
#else
|
||||
|
||||
// Standard directly connected LCD implementations
|
||||
#include <LiquidCrystal.h>
|
||||
#define LCD_CLASS LiquidCrystal
|
||||
|
||||
#endif
|
||||
|
||||
#include "../fontutils.h"
|
||||
|
@ -615,7 +615,6 @@
|
||||
//
|
||||
|
||||
#elif MB(ESPRESSIF_ESP32)
|
||||
|
||||
#include "esp32/pins_ESP32.h" // ESP32 env:esp32
|
||||
#elif MB(MRR_ESPA)
|
||||
#include "esp32/pins_MRR_ESPA.h" // ESP32 env:esp32
|
||||
|
Reference in New Issue
Block a user