Skip to content

Commit

Permalink
✨ Panowin Cutlass / Bardo (F1 / Trinus) (#25663)
Browse files Browse the repository at this point in the history
  • Loading branch information
thisiskeithb authored Apr 20, 2023
1 parent de7726c commit 91cce2a
Show file tree
Hide file tree
Showing 10 changed files with 183 additions and 6 deletions.
1 change: 0 additions & 1 deletion Marlin/src/HAL/AVR/pinsDebug.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ void PRINT_ARRAY_NAME(uint8_t x) {

#define GET_ARRAY_IS_DIGITAL(x) pgm_read_byte(&pin_array[x].is_digital)


#if defined(__AVR_ATmega1284P__) // 1284 IDE extensions set this to the number of
#undef NUM_DIGITAL_PINS // digital only pins while all other CPUs have it
#define NUM_DIGITAL_PINS 32 // set to digital only + digital/analog
Expand Down
1 change: 0 additions & 1 deletion Marlin/src/HAL/AVR/pinsDebug_plus_70.h
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@ const uint8_t PROGMEM digital_pin_to_bit_mask_PGM_plus_70[] = {

#define digitalPinToBitMask_plus_70(P) ( pgm_read_byte( digital_pin_to_bit_mask_PGM_plus_70 + (P) ) )


const uint8_t PROGMEM digital_pin_to_timer_PGM_plus_70[] = {
// TIMERS
// ------------------------
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/TEENSY35_36/pinsDebug.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ void HAL_analog_pin_state(char buffer[], int8_t pin) {
* Print a pin's PWM status.
* Return true if it's currently a PWM pin.
*/
bool HAL_pwm_status(int8_t pin) {
bool HAL_pwm_status(const int8_t pin) {
char buffer[20]; // for the sprintf statements
switch (pin) {
FTM_CASE(0,0);
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/TEENSY40_41/pinsDebug.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ void HAL_analog_pin_state(char buffer[], int8_t pin) {
* Print a pin's PWM status.
* Return true if it's currently a PWM pin.
*/
bool HAL_pwm_status(int8_t pin) {
bool HAL_pwm_status(const int8_t pin) {
char buffer[20]; // for the sprintf statements
const struct pwm_pin_info_struct *info;

Expand Down
2 changes: 2 additions & 0 deletions Marlin/src/core/boards.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@
#define BOARD_LONGER3D_LKx_PRO 1162 // Longer LKx PRO / Alfawise Uxx Pro (PRO version)
#define BOARD_ZRIB_V53 1163 // Zonestar zrib V5.3 (Chinese RAMPS replica)
#define BOARD_PXMALION_CORE_I3 1164 // Pxmalion Core I3
#define BOARD_PANOWIN_CUTLASS 1165 // Panowin Cutlass (as found in the Panowin F1)
#define BOARD_KODAMA_BARDO 1166 // Kodama Bardo V1.x (as found in the Kodama Trinus)

//
// RAMBo and derivatives
Expand Down
3 changes: 2 additions & 1 deletion Marlin/src/gcode/control/M42.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ void protected_pin_err() {
* I Flag to ignore Marlin's pin protection
*
* T<mode> Pin mode: 0=INPUT 1=OUTPUT 2=INPUT_PULLUP 3=INPUT_PULLDOWN
* 4=INPUT_ANALOG 5=OUTPUT_OPEN_DRAIN
*/
void GcodeSuite::M42() {
const int pin_index = PARSED_PIN_INDEX('P', GET_PIN_MAP_INDEX(LED_PIN));
Expand Down Expand Up @@ -119,7 +120,7 @@ void GcodeSuite::M42() {
}

// An OUTPUT_OPEN_DRAIN should not be changed to normal OUTPUT (STM32)
// Use M42 Px M1/5 S0/1 to set the output type and then set value
// Use M42 Px T1/5 S0/1 to set the output type and then set value
#ifndef OUTPUT_OPEN_DRAIN
pinMode(pin, OUTPUT);
#endif
Expand Down
7 changes: 6 additions & 1 deletion Marlin/src/inc/Conditionals_LCD.h
Original file line number Diff line number Diff line change
Expand Up @@ -484,8 +484,13 @@
#endif
#endif

// Serial Controllers require LCD_SERIAL_PORT
#if ANY(HAS_DGUS_LCD, MALYAN_LCD, ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON, NEXTION_TFT)
#define LCD_NEEDS_SERIAL_PORT 1
#endif

// Extensible UI serial touch screens. (See src/lcd/extui)
#if ANY(HAS_DGUS_LCD, MALYAN_LCD, TOUCH_UI_FTDI_EVE, ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON, ANYCUBIC_LCD_VYPER, NEXTION_TFT)
#if EITHER(LCD_NEEDS_SERIAL_PORT, TOUCH_UI_FTDI_EVE)
#define IS_EXTUI 1
#define EXTENSIBLE_UI
#endif
Expand Down
4 changes: 4 additions & 0 deletions Marlin/src/pins/pins.h
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,10 @@
#include "ramps/pins_LONGER3D_LKx_PRO.h" // ATmega2560 env:mega2560
#elif MB(PXMALION_CORE_I3)
#include "ramps/pins_PXMALION_CORE_I3.h" // ATmega2560 env:mega2560
#elif MB(PANOWIN_CUTLASS)
#include "ramps/pins_PANOWIN_CUTLASS.h" // ATmega2560 env:mega2560ext
#elif MB(KODAMA_BARDO)
#include "ramps/pins_KODAMA_BARDO.h" // ATmega2560 env:mega2560ext

//
// RAMBo and derivatives
Expand Down
34 changes: 34 additions & 0 deletions Marlin/src/pins/ramps/pins_KODAMA_BARDO.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2023 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

/**
* Kodama Bardo V1.x as found in the Kodama Trinus (MEGA2560) board pin assignments
*
* Ported from https://github.com/sambuls/MarlinOnTrinus
* Board photo https://imgur.com/a/JbQH5SI
*/

#define BOARD_NAME "Kodama Bardo V1.x"
#define DEFAULT_MACHINE_NAME "Kodama Trinus"

#include "pins_PANOWIN_CUTLASS.h"
133 changes: 133 additions & 0 deletions Marlin/src/pins/ramps/pins_PANOWIN_CUTLASS.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2023 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

/**
* Panowin V?.? as found in the Panowin F1 (MEGA2560) board pin assignments
*
* Ported from https://github.com/sambuls/MarlinOnTrinus
* Board photo https://imgur.com/a/xvol1Bo
*/

#include "env_validate.h"

#ifndef BOARD_NAME
#define BOARD_NAME "Panowin Cutlass"
#endif

#ifndef DEFAULT_MACHINE_NAME
#define DEFAULT_MACHINE_NAME "Panowin F1"
#endif

//
// Limit Switches
//
#define X_STOP_PIN 71 // G3
#define Y_STOP_PIN 85 // H7
#define Z_STOP_PIN 13 // B7

//
// Steppers
//
#define X_STEP_PIN 38 // D7
#define X_DIR_PIN 83
#define X_ENABLE_PIN 82

#define Y_STEP_PIN 37
#define Y_DIR_PIN 40
#define Y_ENABLE_PIN 41

#define Z_STEP_PIN 30 // C7
#define Z_DIR_PIN 32 // C5
#define Z_ENABLE_PIN 34 // C3

#define E0_STEP_PIN 42
#define E0_DIR_PIN 43
#define E0_ENABLE_PIN 44

// Microstepping mode pins
#define X_MS1_PIN 19 // D2
#define X_MS2_PIN 18 // D3
#define X_MS3_PIN 81 // D4

#define Y_MS1_PIN 19 // D2
#define Y_MS2_PIN 18 // D3
#define Y_MS3_PIN 81 // D4

#define Z_MS1_PIN 73 // J3
#define Z_MS2_PIN 75 // J4
#define Z_MS3_PIN 76 // J5

#define E0_MS1_PIN 46 // L3
#define E0_MS2_PIN 47 // L2
#define E0_MS3_PIN 45 // L4

//
// Temperature Sensors
//
#define TEMP_0_PIN 12 // Analog Input
#define TEMP_BED_PIN 14 // Analog Input

//
// Heaters / Fans
//
#define HEATER_0_PIN 9 // H6
#define HEATER_BED_PIN 8
#define FAN0_PIN 62 // K0
#define FAN_SOFT_PWM_REQUIRED

//
// M3/M4/M5 - Spindle/Laser Control
//
#if HAS_CUTTER
#define SPINDLE_LASER_ENA_PIN 74 // J7
#endif

//
// Serial LCD
//
#if LCD_NEEDS_SERIAL_PORT && !defined(LCD_SERIAL_PORT)
#define LCD_SERIAL_PORT 2 // D16 H1 (TX2), D17 H0 (RX2)
#endif

//
// SD Card
//
#define SD_DETECT_PIN 28 // A6 Onboard SD

//
// Misc. Functions
//
#define BEEPER_PIN 24 // A2

//
// Onboard (bright!) RGB LED
//
#ifndef RGB_LED_R_PIN
#define RGB_LED_R_PIN 64 // K2
#endif
#ifndef RGB_LED_G_PIN
#define RGB_LED_G_PIN 65 // K3
#endif
#ifndef RGB_LED_B_PIN
#define RGB_LED_B_PIN 63 // K1
#endif

0 comments on commit 91cce2a

Please sign in to comment.