ESP32 Panda_ZHU and Panda_M4 (#22644)

This commit is contained in:
Mark
2021-10-05 12:23:02 +08:00
committed by Scott Lahteine
parent b8c32e24d8
commit 66048a5f27
21 changed files with 285 additions and 31 deletions

View File

@ -0,0 +1,38 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2021 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
/**
* Panda M4 pin assignments
*/
#define BOARD_INFO_NAME "Panda_M4"
#include "pins_PANDA_common.h"
//
// Steppers
//
#define X_ENABLE_PIN 115
#define Y_ENABLE_PIN 114
#define Z_ENABLE_PIN 113
#define E0_ENABLE_PIN 112

View File

@ -0,0 +1,61 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2021 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
/**
* Panda ZHU pin assignments
*/
#define BOARD_INFO_NAME "Panda_ZHU"
#include "pins_PANDA_common.h"
//
// Steppers
//
#define X_ENABLE_PIN 128 // Shared with all steppers
#define Y_ENABLE_PIN X_ENABLE_PIN
#define Z_ENABLE_PIN X_ENABLE_PIN
#define E0_ENABLE_PIN X_ENABLE_PIN
//#define X_CS_PIN 0
//#define Y_CS_PIN 13
//#define Z_CS_PIN 5 // SS_PIN
//#define E0_CS_PIN 21
#define E1_STEP_PIN 115
#define E1_DIR_PIN 114
#define E1_ENABLE_PIN X_ENABLE_PIN
#define E2_STEP_PIN 112
#define E2_DIR_PIN 113
#define E2_ENABLE_PIN X_ENABLE_PIN
#define E3_STEP_PIN 110
#define E3_DIR_PIN 111
#define E3_ENABLE_PIN X_ENABLE_PIN
#define E4_STEP_PIN 121
#define E4_DIR_PIN 122
#define E4_ENABLE_PIN X_ENABLE_PIN
#define HEATER_1_PIN 123

View File

@ -0,0 +1,98 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2021 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
/**
* Panda common pin assignments
*/
#include "env_validate.h"
#define DEFAULT_MACHINE_NAME BOARD_INFO_NAME
//
// Servos
//
#define SERVO0_PIN 0
//
// Limit Switches
//
#define X_STOP_PIN 4
#define Y_STOP_PIN 35
#define Z_STOP_PIN 21
//
// Steppers
//
#define X_STEP_PIN 101
#define X_DIR_PIN 100
#define Y_STEP_PIN 103
#define Y_DIR_PIN 102
#define Z_STEP_PIN 105
#define Z_DIR_PIN 104
#define E0_STEP_PIN 107
#define E0_DIR_PIN 106
//
// Temperature Sensors
//
#define TEMP_0_PIN 39 // Analog Input
#define TEMP_BED_PIN 36 // Analog Input
//
// Heaters / Fans
//
#define HEATER_0_PIN 108
#define HEATER_BED_PIN 109
#define FAN_PIN 118 // FAN0
#define FAN1_PIN 119 // FAN1
#ifndef E0_AUTO_FAN_PIN
#define E0_AUTO_FAN_PIN 120 // FAN2
#endif
//
// SD card
//
#if ENABLED(SDSUPPORT)
#define SD_MOSI_PIN 23
#define SD_MISO_PIN 19
#define SD_SCK_PIN 18
#define SDSS 5
#define SD_DETECT_PIN 2
#endif
#if HAS_WIRED_LCD
#define BEEPER_PIN 129
#define BTN_ENC 12
#define BTN_EN1 33
#define BTN_EN2 32
#define LCD_PINS_RS 27
#define LCD_PINS_ENABLE 26
#define LCD_PINS_D4 14
#endif

View File

@ -681,6 +681,10 @@
#include "esp32/pins_E4D.h" // ESP32 env:esp32
#elif MB(FYSETC_E4)
#include "esp32/pins_FYSETC_E4.h" // ESP32 env:FYSETC_E4
#elif MB(PANDA_ZHU)
#include "esp32/pins_PANDA_ZHU.h" // ESP32 env:PANDA
#elif MB(PANDA_M4)
#include "esp32/pins_PANDA_M4.h" // ESP32 env:PANDA
//
// Adafruit Grand Central M4 (SAMD51 ARM Cortex-M4)