LPC4078 Initial Commit

Co-Authored-By: Chris Pepper <24342+p3p@users.noreply.github.com>
This commit is contained in:
InsanityAutomation
2024-01-14 15:35:57 -05:00
parent d494a0f54e
commit ed59dc76c4
7 changed files with 650 additions and 33 deletions
+32 -32
View File
@@ -61,14 +61,14 @@
// @section info
// Author info of this build printed to the host during boot and M115
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
#define STRING_CONFIG_H_AUTHOR "InsanityAutomation" // Who made the changes.
//#define CUSTOM_VERSION_FILE Version.h // Path from the root directory (no quotes)
// @section machine
// Choose the name from boards.h that matches your setup
#ifndef MOTHERBOARD
#define MOTHERBOARD BOARD_RAMPS_14_EFB
#define MOTHERBOARD BOARD_EBAB
#endif
/**
@@ -79,7 +79,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
#define SERIAL_PORT 0
#define SERIAL_PORT -1
/**
* Serial Port Baud Rate
@@ -101,7 +101,7 @@
* Currently Ethernet (-2) is only supported on Teensy 4.1 boards.
* :[-2, -1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
//#define SERIAL_PORT_2 -1
#define SERIAL_PORT_2 0
//#define BAUDRATE_2 250000 // :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000] Enable to override BAUDRATE
/**
@@ -116,7 +116,7 @@
//#define BLUETOOTH
// Name displayed in the LCD "Ready" message and Info menu
//#define CUSTOM_MACHINE_NAME "3D Printer"
#define CUSTOM_MACHINE_NAME "FatBoy"
// Printer's unique ID, used by some programs to differentiate between machines.
// Choose your own or use a service like https://www.uuidgenerator.net/version4
@@ -142,7 +142,7 @@
#define X_DRIVER_TYPE TB6560
#define Y_DRIVER_TYPE TB6560
#define Z_DRIVER_TYPE TB6560
#define X2_DRIVER_TYPE TB6560
//#define X2_DRIVER_TYPE A4988
#define Y2_DRIVER_TYPE TB6560
#define Z2_DRIVER_TYPE TB6560
#define Z3_DRIVER_TYPE TB6560
@@ -154,7 +154,7 @@
//#define V_DRIVER_TYPE A4988
//#define W_DRIVER_TYPE A4988
#define E0_DRIVER_TYPE TMC2209
#define E1_DRIVER_TYPE TMC2209
//#define E1_DRIVER_TYPE A4988
//#define E2_DRIVER_TYPE A4988
//#define E3_DRIVER_TYPE A4988
//#define E4_DRIVER_TYPE A4988
@@ -654,7 +654,7 @@
* (especially before PID tuning). Setting the target temperature too close to MAXTEMP guarantees
* a MAXTEMP shutdown! Use these values to forbid temperatures being set too close to MAXTEMP.
*/
#define HOTEND_OVERSHOOT 15 // (°C) Forbid temperatures over MAXTEMP - OVERSHOOT
#define HOTEND_OVERSHOOT 10 // (°C) Forbid temperatures over MAXTEMP - OVERSHOOT
#define BED_OVERSHOOT 10 // (°C) Forbid temperatures over MAXTEMP - OVERSHOOT
#define COOLER_OVERSHOOT 2 // (°C) Forbid temperatures closer than OVERSHOOT
@@ -757,7 +757,7 @@
* When set to any value below 255, enables a form of PWM to the bed that acts like a divider
* so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED)
*/
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
#define MAX_BED_POWER 180 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
@@ -771,7 +771,7 @@
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
//#define PIDTEMPBED
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0
@@ -842,8 +842,8 @@
#define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
// is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
//#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of flash)
//#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of flash)
#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of flash)
#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of flash)
#endif
// @section safety
@@ -1236,7 +1236,7 @@
* Override with M92 (when enabled below)
* X, Y, Z [, I [, J [, K...]]], E0 [, E1[, E2...]]
*/
#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 400, 500 }
#define DEFAULT_AXIS_STEPS_PER_UNIT { 40, 40, 200, 425 }
/**
* Enable support for M92. Disable to save at least ~530 bytes of flash.
@@ -1261,7 +1261,7 @@
* Override with M201
* X, Y, Z [, I [, J [, K...]]], E0 [, E1[, E2...]]
*/
#define DEFAULT_MAX_ACCELERATION { 3000, 3000, 100, 10000 }
#define DEFAULT_MAX_ACCELERATION { 12000, 12000, 500, 10000 }
//#define LIMITED_MAX_ACCEL_EDITING // Limit edit via M201 or LCD to DEFAULT_MAX_ACCELERATION * 2
#if ENABLED(LIMITED_MAX_ACCEL_EDITING)
@@ -1276,9 +1276,9 @@
* M204 R Retract Acceleration
* M204 T Travel Acceleration
*/
#define DEFAULT_ACCELERATION 3000 // X, Y, Z and E acceleration for printing moves
#define DEFAULT_ACCELERATION 7000 // X, Y, Z and E acceleration for printing moves
#define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration for retracts
#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration for travel (non printing) moves
#define DEFAULT_TRAVEL_ACCELERATION 7000 // X, Y, Z acceleration for travel (non printing) moves
/**
* Default Jerk limits (mm/s)
@@ -1346,10 +1346,10 @@
* The probe replaces the Z-MIN endstop and is used for Z homing.
* (Automatically enables USE_PROBE_FOR_Z_HOMING.)
*/
#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
//#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
// Force the use of the probe for Z-axis homing
//#define USE_PROBE_FOR_Z_HOMING
#define USE_PROBE_FOR_Z_HOMING
/**
* Z_MIN_PROBE_PIN
@@ -1670,7 +1670,7 @@
#define Z_PROBE_ERROR_TOLERANCE 3 // (mm) Tolerance for early trigger (<= -probe.offset.z + ZPET)
//#define Z_AFTER_PROBING 5 // (mm) Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // (mm) Farthest distance below the trigger-point to go before stopping
#define Z_PROBE_LOW_POINT -5 // (mm) Farthest distance below the trigger-point to go before stopping
// For M851 provide ranges for adjusting the X, Y, and Z probe offsets
//#define PROBE_OFFSET_XMIN -50 // (mm)
@@ -1749,9 +1749,9 @@
// @section motion
// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
#define INVERT_X_DIR false
#define INVERT_Y_DIR true
#define INVERT_Z_DIR false
#define INVERT_X_DIR true
#define INVERT_Y_DIR false
#define INVERT_Z_DIR true
//#define INVERT_I_DIR false
//#define INVERT_J_DIR false
//#define INVERT_K_DIR false
@@ -1882,7 +1882,7 @@
#endif
#if ANY(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS)
//#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
#endif
/**
@@ -2049,14 +2049,14 @@
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
*/
//#define EVENT_GCODE_AFTER_G29 "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10"
//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10"
/**
* Normally G28 leaves leveling disabled on completion. Enable one of
* these options to restore the prior leveling state or to always enable
* leveling immediately after G28.
*/
//#define RESTORE_LEVELING_AFTER_G28
#define RESTORE_LEVELING_AFTER_G28
//#define ENABLE_LEVELING_AFTER_G28
/**
@@ -2071,7 +2071,7 @@
/**
* Enable detailed logging of G28, G29, M48, etc.
* Turn on with the command 'M111 S32'.
* NOTE: Requires a lot of flash!
* NOTE: Requires a lot of PROGMEM!
*/
//#define DEBUG_LEVELING_FEATURE
@@ -2118,7 +2118,7 @@
#if ANY(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR)
// Set the number of grid points per dimension.
#define GRID_MAX_POINTS_X 3
#define GRID_MAX_POINTS_X 15
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
// Probe along the Y axis, advancing X after each column
@@ -2128,7 +2128,7 @@
// Beyond the probed grid, continue the implied tilt?
// Default is to maintain the height of the nearest edge.
//#define EXTRAPOLATE_BEYOND_GRID
#define EXTRAPOLATE_BEYOND_GRID
//
// Subdivision of the grid by Catmull-Rom method.
@@ -2360,7 +2360,7 @@
*/
#define EEPROM_SETTINGS // Persistent storage with M500 and M501
//#define DISABLE_M503 // Saves ~2700 bytes of flash. Disable for release!
#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save flash.
#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM.
#define EEPROM_BOOT_SILENT // Keep M503 quiet and only give errors during first load
#if ENABLED(EEPROM_SETTINGS)
#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors.
@@ -2425,7 +2425,7 @@
#if ENABLED(NOZZLE_PARK_FEATURE)
// Specify a park position as { X, Y, Z_raise }
#define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 }
#define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MIN_POS + 10), 5 }
#define NOZZLE_PARK_MOVE 0 // Park motion: 0 = XY Move, 1 = X Only, 2 = Y Only, 3 = X before Y, 4 = Y before X
#define NOZZLE_PARK_Z_RAISE_MIN 2 // (mm) Always raise Z by at least this distance
#define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis)
@@ -2728,7 +2728,7 @@
//
// Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu.
//
//#define INDIVIDUAL_AXIS_HOMING_MENU
#define INDIVIDUAL_AXIS_HOMING_MENU
//#define INDIVIDUAL_AXIS_HOMING_SUBMENU
//
@@ -2737,7 +2737,7 @@
// If you have a speaker that can produce tones, enable it here.
// By default Marlin assumes you have a buzzer with a fixed frequency.
//
//#define SPEAKER
#define SPEAKER
//
// The duration and frequency for the UI feedback sound.
+2
View File
@@ -37,6 +37,8 @@
#define HAL_PATH(PATH, NAME) XSTR(PATH/HAL/LPC1768/NAME)
#elif defined(ARDUINO_ARCH_HC32)
#define HAL_PATH(PATH, NAME) XSTR(PATH/HAL/HC32/NAME)
#elif defined(TARGET_LPC4078)
#define HAL_PATH(PATH, NAME) XSTR(PATH/HAL/LPC4078/NAME)
#elif defined(__STM32F1__) || defined(TARGET_STM32F1)
#define HAL_PATH(PATH, NAME) XSTR(PATH/HAL/STM32F1/NAME)
#elif defined(ARDUINO_ARCH_STM32)
+2
View File
@@ -76,6 +76,8 @@
#include "../LPC1768/Servo.h"
#elif defined(ARDUINO_ARCH_HC32)
#include "../HC32/Servo.h"
#elif defined(TARGET_LPC4078)
#include "../LPC4078/Servo.h"
#elif defined(__STM32F1__) || defined(TARGET_STM32F1)
#include "../STM32F1/Servo.h"
#elif defined(ARDUINO_ARCH_STM32)
+1
View File
@@ -410,6 +410,7 @@
#define BOARD_TEENSY31_32 5100 // Teensy3.1 and Teensy3.2
#define BOARD_TEENSY35_36 5101 // Teensy3.5 and Teensy3.6
#define BOARD_EBAB 5102
//
// STM32 ARM Cortex-M4F
+605
View File
@@ -0,0 +1,605 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* 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 <https://www.gnu.org/licenses/>.
*
*/
#pragma once
#ifndef BOARD_INFO_NAME
#define BOARD_INFO_NAME "Extra Big Ass Board"
#endif
#ifndef DEFAULT_MACHINE_NAME
#define DEFAULT_MACHINE_NAME "XtraBigAssBoard"
#endif
#define LED_PIN P3_18 // PWM0_3
// EXTRA PINS
#define FIL_RUNOUT_PIN P1_12
#define PS_ON_PIN P3_15
// DRIVERS EXTRA PINS
#define DRIVERS_SCK P1_20
#define DRIVERS_MISO P1_23
#define DRIVERS_MOSI P1_24
//
// Servos
//
#define SERVO0_PIN P2_05 // PWM1_6
#define SERVO1_PIN P2_04 // PWM1_5
#define SERVO2_PIN P2_03 // PWM1_4
#define SERVO3_PIN P2_02 // PWM1_3
//
// Limit Switches
//
#define X_MIN_PIN P0_19
#define X_MAX_PIN P0_18
#define Y_MIN_PIN P0_20
#define Y_MAX_PIN P0_17
#define Z_MIN_PIN P0_21
#define Z_MAX_PIN P0_15
//
// Z Probe (when not Z_MIN_PIN)
//
#ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN P0_21
#endif
//
// Steppers
//
#define X_STEP_PIN P0_10
#define X_DIR_PIN P4_03
#define X_ENABLE_PIN P0_01
#define X_CS_PIN P0_00
#define X_DIAG_PIN P2_17
#define Y_STEP_PIN P1_29
#define Y_DIR_PIN P2_14
#define Y_ENABLE_PIN P1_28
#define Y_CS_PIN P2_22
#define Y_DIAG_PIN P2_16
#define Z_STEP_PIN P4_02
#define Z_DIR_PIN P1_26
#define Z_ENABLE_PIN P1_25
#define Z_CS_PIN P4_01
#define Z_DIAG_PIN P2_21
#define E0_STEP_PIN P1_19
#define E0_DIR_PIN P0_14
#define E0_ENABLE_PIN P1_22
#define E0_CS_PIN P4_00
#define E0_DIAG_PIN P2_20
#define E1_STEP_PIN P2_23
#define E1_DIR_PIN P2_18
#define E1_ENABLE_PIN P3_23
#define E1_CS_PIN P1_18
#define E1_DIAG_PIN P2_19
#define E2_STEP_PIN P3_26
#define E2_DIR_PIN P2_25
#define E2_ENABLE_PIN P3_25
#define E2_CS_PIN P3_24
#define E2_DIAG_PIN P2_26
#define E3_STEP_PIN P4_19
#define E3_DIR_PIN P4_20
#define E3_ENABLE_PIN P4_26
#define E3_CS_PIN P4_21
#define E3_DIAG_PIN P0_22
#define E4_STEP_PIN P4_17
#define E4_DIR_PIN P4_18
#define E4_ENABLE_PIN P4_05
#define E4_CS_PIN P2_12
#define E4_DIAG_PIN P2_11
#define E5_STEP_PIN P0_11
#define E5_DIR_PIN P2_15
#define E5_ENABLE_PIN P4_04
#define E5_CS_PIN P4_16
#define E5_DIAG_PIN P2_13
#define E6_STEP_PIN P2_28
#define E6_DIR_PIN P0_28
#define E6_ENABLE_PIN P0_31
#define E6_CS_PIN P0_27
#define E6_DIAG_PIN P2_24
#define E7_STEP_PIN P1_30
#define E7_DIR_PIN P0_12
#define E7_ENABLE_PIN P0_13
#define E7_CS_PIN P2_29
#define E7_DIAG_PIN P2_27
#define E8_STEP_PIN P3_15
#define E8_DIR_PIN P3_07
#define E8_ENABLE_PIN P2_30
#define E8_CS_PIN P5_01
#define E8_DIAG_PIN P2_31
#if HAS_TMC_UART
#define X_SERIAL_TX_PIN P0_00
#define X_SERIAL_RX_PIN P0_00
#define Y_SERIAL_TX_PIN P2_22
#define Y_SERIAL_RX_PIN P2_22
#define Z_SERIAL_TX_PIN P4_01
#define Z_SERIAL_RX_PIN P4_01
#define E0_SERIAL_TX_PIN P4_00
#define E0_SERIAL_RX_PIN P4_00
#define E1_SERIAL_TX_PIN P1_18
#define E1_SERIAL_RX_PIN P1_18
#define E2_SERIAL_TX_PIN P3_24
#define E2_SERIAL_RX_PIN P3_24
#define E3_SERIAL_TX_PIN P4_21
#define E3_SERIAL_RX_PIN P4_21
#define E4_SERIAL_TX_PIN P2_12
#define E4_SERIAL_RX_PIN P2_12
#define E5_SERIAL_TX_PIN P4_16
#define E5_SERIAL_RX_PIN P4_16
#define E6_SERIAL_TX_PIN P0_27
#define E6_SERIAL_RX_PIN P0_27
#define E7_SERIAL_TX_PIN P2_29
#define E7_SERIAL_RX_PIN P2_29
#define E8_SERIAL_TX_PIN P5_01
#define E8_SERIAL_RX_PIN P5_01
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#endif // HAS_TMC_UART
//
// Temperature Sensors
//
#define TEMP_0_PIN P0_23
#define TEMP_1_PIN P0_24
#define TEMP_2_PIN P0_25
#define TEMP_3_PIN P0_26
#define TEMP_BED_PIN P1_31
//
// Heaters / Fans
//
#define HEATER_0_PIN P1_02
#define HEATER_1_PIN P1_10
#define HEATER_2_PIN P4_30
#define HEATER_3_PIN P1_09
#define HEATER_BED_PIN P4_23
#define FAN0_PIN P3_08
#define FAN1_PIN P3_00
#define FAN2_PIN P3_27 //PWM1_4
#define FAN3_PIN P5_04
#define EFAN0_PIN P1_08
#define EFAN1_PIN P4_31
#define EFAN2_PIN P3_01
#define EFAN3_PIN P3_10
//
// Misc. Functions
//
#if SD_CONNECTION_IS(LCD)
#define SD_DETECT_PIN P3_02
#define SD_SCK_PIN P1_00
#define SD_MISO_PIN P1_04
#define SD_MOSI_PIN P1_01
#define SD_SS_PIN P3_03
#define SDSS SD_SS_PIN
#elif SD_CONNECTION_IS(ONBOARD)
#define SD_DETECT_PIN P_NC
#define SD_SCK_PIN P0_07
#define SD_MISO_PIN P0_08
#define SD_MOSI_PIN P0_09
#define ONBOARD_SD_CS_PIN P0_06
#define SD_SS_PIN ONBOARD_SD_CS_PIN
#define SDSS SD_SS_PIN
#endif
#ifndef NEOPIXEL_PIN
#define NEOPIXEL_PIN P_NC
#endif
#ifndef FILWIDTH_PIN
#define FILWIDTH_PIN P_NC
#endif
#ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN P_NC
#endif
#ifndef PS_ON_PIN
#define PS_ON_PIN P_NC
#endif
//
// Průša i3 MK2 Multiplexer Support
//
#if HAS_PRUSA_MMU1
#ifndef E_MUX0_PIN
#define E_MUX0_PIN P_NC
#endif
#ifndef E_MUX1_PIN
#define E_MUX1_PIN P_NC
#endif
#ifndef E_MUX2_PIN
#define E_MUX2_PIN P_NC
#endif
#endif
/**
* Default pins for TMC software SPI
*/
#if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI
#define TMC_SW_MOSI P1_24
#endif
#ifndef TMC_SW_MISO
#define TMC_SW_MISO P1_23
#endif
#ifndef TMC_SW_SCK
#define TMC_SW_SCK P1_20
#endif
#endif
//////////////////////////
// LCDs and Controllers //
//////////////////////////
#if ANY(TFT_COLOR_UI, TFT_CLASSIC_UI, TFT_LVGL_UI)
#define TFT_A0_PIN 43
#define TFT_CS_PIN 49
#define TFT_DC_PIN 43
#define TFT_SCK_PIN SD_SCK_PIN
#define TFT_MOSI_PIN SD_MOSI_PIN
#define TFT_MISO_PIN SD_MISO_PIN
#define LCD_USE_DMA_SPI
#define BTN_EN1 40
#define BTN_EN2 63
#define BTN_ENC 59
#define BEEPER_PIN 42
#define TOUCH_CS_PIN 33
#define SD_DETECT_PIN 41
#define SPI_FLASH
#if ENABLED(SPI_FLASH)
#define SPI_DEVICE 1
#define SPI_FLASH_SIZE 0x1000000 // 16MB
#define SPI_FLASH_CS_PIN 31
#define SPI_FLASH_MOSI_PIN SD_MOSI_PIN
#define SPI_FLASH_MISO_PIN SD_MISO_PIN
#define SPI_FLASH_SCK_PIN SD_SCK_PIN
#endif
#define TFT_BUFFER_SIZE 0xFFFF
#ifndef TFT_DRIVER
#define TFT_DRIVER ST7796
#endif
#ifndef TOUCH_SCREEN_CALIBRATION
#if ENABLED(TFT_RES_320x240)
#ifndef TOUCH_CALIBRATION_X
#define TOUCH_CALIBRATION_X 20525
#endif
#ifndef TOUCH_CALIBRATION_Y
#define TOUCH_CALIBRATION_Y 15335
#endif
#ifndef TOUCH_OFFSET_X
#define TOUCH_OFFSET_X -1
#endif
#ifndef TOUCH_OFFSET_Y
#define TOUCH_OFFSET_Y 0
#endif
#elif ENABLED(TFT_RES_480x272)
#ifndef TOUCH_CALIBRATION_X
#define TOUCH_CALIBRATION_X 30715
#endif
#ifndef TOUCH_CALIBRATION_Y
#define TOUCH_CALIBRATION_Y 17415
#endif
#ifndef TOUCH_OFFSET_X
#define TOUCH_OFFSET_X 0
#endif
#ifndef TOUCH_OFFSET_Y
#define TOUCH_OFFSET_Y -1
#endif
#elif ENABLED(TFT_RES_480x320)
#ifndef TOUCH_CALIBRATION_X
#define TOUCH_CALIBRATION_X 30595
#endif
#ifndef TOUCH_CALIBRATION_Y
#define TOUCH_CALIBRATION_Y 20415
#endif
#ifndef TOUCH_OFFSET_X
#define TOUCH_OFFSET_X 2
#endif
#ifndef TOUCH_OFFSET_Y
#define TOUCH_OFFSET_Y 1
#endif
#elif ENABLED(TFT_RES_1024x600)
#ifndef TOUCH_CALIBRATION_X
#define TOUCH_CALIBRATION_X 65533
#endif
#ifndef TOUCH_CALIBRATION_Y
#define TOUCH_CALIBRATION_Y 38399
#endif
#ifndef TOUCH_OFFSET_X
#define TOUCH_OFFSET_X 2
#endif
#ifndef TOUCH_OFFSET_Y
#define TOUCH_OFFSET_Y 1
#endif
#endif
#endif
#define BTN_BACK 70
#elif HAS_WIRED_LCD
//
// LCD Display output pins
//
#if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
#define LCD_PINS_RS P3_06 // CS chip select /SS chip slave select
#define LCD_PINS_EN P3_14 // SID (MOSI)
#define LCD_PINS_D4 P3_30 // SCK (CLK) clock
#elif ALL(IS_NEWPANEL, PANEL_ONE)
#define LCD_PINS_RS 40
#define LCD_PINS_EN 42
#define LCD_PINS_D4 65
#define LCD_PINS_D5 66
#define LCD_PINS_D6 44
#define LCD_PINS_D7 64
#else
#if ENABLED(CR10_STOCKDISPLAY)
#define LCD_PINS_RS 27
#define LCD_PINS_EN 29
#define LCD_PINS_D4 25
#if !IS_NEWPANEL
#define BEEPER_PIN 37
#endif
#elif ENABLED(ZONESTAR_LCD)
#define LCD_PINS_RS 64
#define LCD_PINS_EN 44
#define LCD_PINS_D4 63
#define LCD_PINS_D5 40
#define LCD_PINS_D6 42
#define LCD_PINS_D7 65
#else
#if ANY(MKS_12864OLED, MKS_12864OLED_SSD1306)
#define LCD_PINS_DC 25 // Set as output on init
#define LCD_PINS_RS 27 // Pull low for 1s to init
// DOGM SPI LCD Support
#define DOGLCD_CS 16
#define DOGLCD_MOSI 17
#define DOGLCD_SCK 23
#define DOGLCD_A0 LCD_PINS_DC
#else
#define LCD_PINS_RS P3_06
#define LCD_PINS_EN P3_14
#define LCD_PINS_D4 P3_30
#define LCD_PINS_D5 P3_05
#define LCD_PINS_D6 P3_29
#endif
#define LCD_PINS_D7 P5_00
#if !IS_NEWPANEL
#define BEEPER_PIN 33
#endif
#endif
#if !IS_NEWPANEL
// Buttons attached to a shift register
// Not wired yet
//#define SHIFT_CLK_PIN 38
//#define SHIFT_LD_PIN 42
//#define SHIFT_OUT_PIN 40
//#define SHIFT_EN_PIN 17
#endif
#endif
//
// LCD Display input pins
//
#if IS_NEWPANEL
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#define BEEPER_PIN P3_31
#if ENABLED(CR10_STOCKDISPLAY)
#define BTN_EN1 17
#define BTN_EN2 23
#else
#define BTN_EN1 P3_11
#define BTN_EN2 P3_12
#endif
#define BTN_ENC P3_28
#define SD_DETECT_PIN P3_02
//#define KILL_PIN P_NC
#if ENABLED(BQ_LCD_SMART_CONTROLLER)
#define LCD_BACKLIGHT_PIN 39
#endif
#elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
#define BTN_EN1 64
#define BTN_EN2 59
#define BTN_ENC 63
#define SD_DETECT_PIN 42
#elif ENABLED(LCD_I2C_PANELOLU2)
#define BTN_EN1 47
#define BTN_EN2 43
#define BTN_ENC 32
#define LCD_SDSS SDSS
#define KILL_PIN 41
#elif ENABLED(LCD_I2C_VIKI)
#define BTN_EN1 22 // https://files.panucatt.com/datasheets/viki_wiring_diagram.pdf explains 40/42.
#define BTN_EN2 7 // 22/7 are unused on RAMPS_14. 22 is unused and 7 the SERVO0_PIN on RAMPS_13.
#define BTN_ENC -1
#define LCD_SDSS SDSS
#define SD_DETECT_PIN 49
#elif ANY(VIKI2, miniVIKI)
#define DOGLCD_CS 45
#define DOGLCD_A0 44
#define BEEPER_PIN 33
#define STAT_LED_RED_PIN 32
#define STAT_LED_BLUE_PIN 35
#define BTN_EN1 22
#define BTN_EN2 7
#define BTN_ENC 39
#define SD_DETECT_PIN -1 // Pin 49 for display sd interface, 72 for easy adapter board
#define KILL_PIN 31
#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270
#elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
#define DOGLCD_CS 29
#define DOGLCD_A0 27
#define BEEPER_PIN 23
#define LCD_BACKLIGHT_PIN 33
#define BTN_EN1 35
#define BTN_EN2 37
#define BTN_ENC 31
#define LCD_SDSS SDSS
#define SD_DETECT_PIN 49
#define KILL_PIN 41
#elif ENABLED(MKS_MINI_12864)
#define DOGLCD_A0 27
#define DOGLCD_CS 25
#define BEEPER_PIN 37
// not connected to a pin
#define LCD_BACKLIGHT_PIN 65 // backlight LED on A11/D65
#define BTN_EN1 31
#define BTN_EN2 33
#define BTN_ENC 35
#define SD_DETECT_PIN 49
#define KILL_PIN 64
//#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270
#elif ENABLED(MINIPANEL)
#define BEEPER_PIN 42
// not connected to a pin
#define LCD_BACKLIGHT_PIN 65 // backlight LED on A11/D65
#define DOGLCD_A0 44
#define DOGLCD_CS 66
#define BTN_EN1 40
#define BTN_EN2 63
#define BTN_ENC 59
#define SD_DETECT_PIN 49
#define KILL_PIN 64
//#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270
#elif ENABLED(ZONESTAR_LCD)
#define ADC_KEYPAD_PIN 12
#elif ENABLED(AZSMZ_12864)
// Pins only defined for RAMPS_SMART currently
#else
// Beeper on AUX-4
#define BEEPER_PIN P3_31
// Buttons are directly attached to AUX-2
#if IS_RRW_KEYPAD
#define SHIFT_OUT_PIN 40
#define SHIFT_CLK_PIN 44
#define SHIFT_LD_PIN 42
#define BTN_EN1 64
#define BTN_EN2 59
#define BTN_ENC 63
#elif ENABLED(PANEL_ONE)
#define BTN_EN1 59 // AUX2 PIN 3
#define BTN_EN2 63 // AUX2 PIN 4
#define BTN_ENC 49 // AUX3 PIN 7
#else
#define BTN_EN1 P3_11
#define BTN_EN2 P3_12
#define BTN_ENC P3_28
#endif
#if ENABLED(G3D_PANEL)
#define SD_DETECT_PIN 49
#define KILL_PIN 41
#endif
#endif
// CUSTOM SIMULATOR INPUTS
#define BTN_BACK 70
#endif // IS_NEWPANEL
#endif // HAS_WIRED_LCD
+7
View File
@@ -504,6 +504,13 @@
#include "lpc1769/pins_BTT_SKR_E3_TURBO.h" // LPC1769 env:LPC1769
#elif MB(FLY_CDY)
#include "lpc1769/pins_FLY_CDY.h" // LPC1769 env:LPC1769
//
// LPC4078 ARM Cortex M4
//
#elif MB(EBAB)
#include "lpc4078/pins_EBAB.h" // LPC4078 env:LPC4078
//
// Due (ATSAM) boards
+1 -1
View File
@@ -65,4 +65,4 @@ lib_deps = ${common.lib_deps}
Servo
SoftwareSerial
custom_marlin.USES_LIQUIDCRYSTAL = arduino-libraries/LiquidCrystal@~1.0.7
custom_marlin.NEOPIXEL_LED = Adafruit NeoPixel=https://github.com/p3p/Adafruit_NeoPixel/archive/1.5.0.zip
custom_marlin.NEOPIXEL_LED = Adafruit NeoPixel=https://github.com/p3p/Adafruit_NeoPixel/archive/1.5.0.zip