Skip to content

Commit 431de5a

Browse files
thisiskeithbAndy-Big
authored andcommitted
✨ Panowin Cutlass / Bardo (F1 / Trinus) (MarlinFirmware#25663)
1 parent 4f3e2f9 commit 431de5a

File tree

10 files changed

+183
-6
lines changed

10 files changed

+183
-6
lines changed

Marlin/src/HAL/AVR/pinsDebug.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ void PRINT_ARRAY_NAME(uint8_t x) {
9090

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

93-
9493
#if defined(__AVR_ATmega1284P__) // 1284 IDE extensions set this to the number of
9594
#undef NUM_DIGITAL_PINS // digital only pins while all other CPUs have it
9695
#define NUM_DIGITAL_PINS 32 // set to digital only + digital/analog

Marlin/src/HAL/AVR/pinsDebug_plus_70.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,6 @@ const uint8_t PROGMEM digital_pin_to_bit_mask_PGM_plus_70[] = {
231231

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

234-
235234
const uint8_t PROGMEM digital_pin_to_timer_PGM_plus_70[] = {
236235
// TIMERS
237236
// ------------------------

Marlin/src/HAL/TEENSY35_36/pinsDebug.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ void HAL_analog_pin_state(char buffer[], int8_t pin) {
7777
* Print a pin's PWM status.
7878
* Return true if it's currently a PWM pin.
7979
*/
80-
bool HAL_pwm_status(int8_t pin) {
80+
bool HAL_pwm_status(const int8_t pin) {
8181
char buffer[20]; // for the sprintf statements
8282
switch (pin) {
8383
FTM_CASE(0,0);

Marlin/src/HAL/TEENSY40_41/pinsDebug.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ void HAL_analog_pin_state(char buffer[], int8_t pin) {
136136
* Print a pin's PWM status.
137137
* Return true if it's currently a PWM pin.
138138
*/
139-
bool HAL_pwm_status(int8_t pin) {
139+
bool HAL_pwm_status(const int8_t pin) {
140140
char buffer[20]; // for the sprintf statements
141141
const struct pwm_pin_info_struct *info;
142142

Marlin/src/core/boards.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@
118118
#define BOARD_LONGER3D_LKx_PRO 1162 // Longer LKx PRO / Alfawise Uxx Pro (PRO version)
119119
#define BOARD_ZRIB_V53 1163 // Zonestar zrib V5.3 (Chinese RAMPS replica)
120120
#define BOARD_PXMALION_CORE_I3 1164 // Pxmalion Core I3
121+
#define BOARD_PANOWIN_CUTLASS 1165 // Panowin Cutlass (as found in the Panowin F1)
122+
#define BOARD_KODAMA_BARDO 1166 // Kodama Bardo V1.x (as found in the Kodama Trinus)
121123

122124
//
123125
// RAMBo and derivatives

Marlin/src/gcode/control/M42.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ void protected_pin_err() {
5353
* I Flag to ignore Marlin's pin protection
5454
*
5555
* T<mode> Pin mode: 0=INPUT 1=OUTPUT 2=INPUT_PULLUP 3=INPUT_PULLDOWN
56+
* 4=INPUT_ANALOG 5=OUTPUT_OPEN_DRAIN
5657
*/
5758
void GcodeSuite::M42() {
5859
const int pin_index = PARSED_PIN_INDEX('P', GET_PIN_MAP_INDEX(LED_PIN));
@@ -119,7 +120,7 @@ void GcodeSuite::M42() {
119120
}
120121

121122
// An OUTPUT_OPEN_DRAIN should not be changed to normal OUTPUT (STM32)
122-
// Use M42 Px M1/5 S0/1 to set the output type and then set value
123+
// Use M42 Px T1/5 S0/1 to set the output type and then set value
123124
#ifndef OUTPUT_OPEN_DRAIN
124125
pinMode(pin, OUTPUT);
125126
#endif

Marlin/src/inc/Conditionals_LCD.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,8 +484,13 @@
484484
#endif
485485
#endif
486486

487+
// Serial Controllers require LCD_SERIAL_PORT
488+
#if ANY(HAS_DGUS_LCD, MALYAN_LCD, ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON, NEXTION_TFT)
489+
#define LCD_NEEDS_SERIAL_PORT 1
490+
#endif
491+
487492
// Extensible UI serial touch screens. (See src/lcd/extui)
488-
#if ANY(HAS_DGUS_LCD, MALYAN_LCD, TOUCH_UI_FTDI_EVE, ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON, ANYCUBIC_LCD_VYPER, NEXTION_TFT)
493+
#if EITHER(LCD_NEEDS_SERIAL_PORT, TOUCH_UI_FTDI_EVE)
489494
#define IS_EXTUI 1
490495
#define EXTENSIBLE_UI
491496
#endif

Marlin/src/pins/pins.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,10 @@
201201
#include "ramps/pins_LONGER3D_LKx_PRO.h" // ATmega2560 env:mega2560
202202
#elif MB(PXMALION_CORE_I3)
203203
#include "ramps/pins_PXMALION_CORE_I3.h" // ATmega2560 env:mega2560
204+
#elif MB(PANOWIN_CUTLASS)
205+
#include "ramps/pins_PANOWIN_CUTLASS.h" // ATmega2560 env:mega2560ext
206+
#elif MB(KODAMA_BARDO)
207+
#include "ramps/pins_KODAMA_BARDO.h" // ATmega2560 env:mega2560ext
204208

205209
//
206210
// RAMBo and derivatives
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/**
2+
* Marlin 3D Printer Firmware
3+
* Copyright (c) 2023 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+
/**
25+
* Kodama Bardo V1.x as found in the Kodama Trinus (MEGA2560) board pin assignments
26+
*
27+
* Ported from https://github.com/sambuls/MarlinOnTrinus
28+
* Board photo https://imgur.com/a/JbQH5SI
29+
*/
30+
31+
#define BOARD_NAME "Kodama Bardo V1.x"
32+
#define DEFAULT_MACHINE_NAME "Kodama Trinus"
33+
34+
#include "pins_PANOWIN_CUTLASS.h"
Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
/**
2+
* Marlin 3D Printer Firmware
3+
* Copyright (c) 2023 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+
/**
25+
* Panowin V?.? as found in the Panowin F1 (MEGA2560) board pin assignments
26+
*
27+
* Ported from https://github.com/sambuls/MarlinOnTrinus
28+
* Board photo https://imgur.com/a/xvol1Bo
29+
*/
30+
31+
#include "env_validate.h"
32+
33+
#ifndef BOARD_NAME
34+
#define BOARD_NAME "Panowin Cutlass"
35+
#endif
36+
37+
#ifndef DEFAULT_MACHINE_NAME
38+
#define DEFAULT_MACHINE_NAME "Panowin F1"
39+
#endif
40+
41+
//
42+
// Limit Switches
43+
//
44+
#define X_STOP_PIN 71 // G3
45+
#define Y_STOP_PIN 85 // H7
46+
#define Z_STOP_PIN 13 // B7
47+
48+
//
49+
// Steppers
50+
//
51+
#define X_STEP_PIN 38 // D7
52+
#define X_DIR_PIN 83
53+
#define X_ENABLE_PIN 82
54+
55+
#define Y_STEP_PIN 37
56+
#define Y_DIR_PIN 40
57+
#define Y_ENABLE_PIN 41
58+
59+
#define Z_STEP_PIN 30 // C7
60+
#define Z_DIR_PIN 32 // C5
61+
#define Z_ENABLE_PIN 34 // C3
62+
63+
#define E0_STEP_PIN 42
64+
#define E0_DIR_PIN 43
65+
#define E0_ENABLE_PIN 44
66+
67+
// Microstepping mode pins
68+
#define X_MS1_PIN 19 // D2
69+
#define X_MS2_PIN 18 // D3
70+
#define X_MS3_PIN 81 // D4
71+
72+
#define Y_MS1_PIN 19 // D2
73+
#define Y_MS2_PIN 18 // D3
74+
#define Y_MS3_PIN 81 // D4
75+
76+
#define Z_MS1_PIN 73 // J3
77+
#define Z_MS2_PIN 75 // J4
78+
#define Z_MS3_PIN 76 // J5
79+
80+
#define E0_MS1_PIN 46 // L3
81+
#define E0_MS2_PIN 47 // L2
82+
#define E0_MS3_PIN 45 // L4
83+
84+
//
85+
// Temperature Sensors
86+
//
87+
#define TEMP_0_PIN 12 // Analog Input
88+
#define TEMP_BED_PIN 14 // Analog Input
89+
90+
//
91+
// Heaters / Fans
92+
//
93+
#define HEATER_0_PIN 9 // H6
94+
#define HEATER_BED_PIN 8
95+
#define FAN0_PIN 62 // K0
96+
#define FAN_SOFT_PWM_REQUIRED
97+
98+
//
99+
// M3/M4/M5 - Spindle/Laser Control
100+
//
101+
#if HAS_CUTTER
102+
#define SPINDLE_LASER_ENA_PIN 74 // J7
103+
#endif
104+
105+
//
106+
// Serial LCD
107+
//
108+
#if LCD_NEEDS_SERIAL_PORT && !defined(LCD_SERIAL_PORT)
109+
#define LCD_SERIAL_PORT 2 // D16 H1 (TX2), D17 H0 (RX2)
110+
#endif
111+
112+
//
113+
// SD Card
114+
//
115+
#define SD_DETECT_PIN 28 // A6 Onboard SD
116+
117+
//
118+
// Misc. Functions
119+
//
120+
#define BEEPER_PIN 24 // A2
121+
122+
//
123+
// Onboard (bright!) RGB LED
124+
//
125+
#ifndef RGB_LED_R_PIN
126+
#define RGB_LED_R_PIN 64 // K2
127+
#endif
128+
#ifndef RGB_LED_G_PIN
129+
#define RGB_LED_G_PIN 65 // K3
130+
#endif
131+
#ifndef RGB_LED_B_PIN
132+
#define RGB_LED_B_PIN 63 // K1
133+
#endif

0 commit comments

Comments
 (0)