Skip to content

Commit ee1d1fa

Browse files
ellenspthinkyhead
authored andcommitted
🔨 Sim pins / INI cleanup
1 parent dbd3e10 commit ee1d1fa

File tree

4 files changed

+88
-91
lines changed

4 files changed

+88
-91
lines changed

Marlin/src/pins/linux/pins_RAMPS_LINUX.h renamed to Marlin/src/pins/native/pins_RAMPS_NATIVE.h

Lines changed: 82 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -22,31 +22,11 @@
2222
#pragma once
2323

2424
/**
25-
* Arduino Mega with RAMPS v1.4 (or v1.3) pin assignments
26-
*
27-
* Applies to the following boards:
28-
*
29-
* RAMPS_14_EFB (Hotend, Fan, Bed)
30-
* RAMPS_14_EEB (Hotend0, Hotend1, Bed)
31-
* RAMPS_14_EFF (Hotend, Fan0, Fan1)
32-
* RAMPS_14_EEF (Hotend0, Hotend1, Fan)
33-
* RAMPS_14_SF (Spindle, Controller Fan)
34-
*
35-
* RAMPS_13_EFB (Hotend, Fan, Bed)
36-
* RAMPS_13_EEB (Hotend0, Hotend1, Bed)
37-
* RAMPS_13_EFF (Hotend, Fan0, Fan1)
38-
* RAMPS_13_EEF (Hotend0, Hotend1, Fan)
39-
* RAMPS_13_SF (Spindle, Controller Fan)
40-
*
41-
* Other pins_MYBOARD.h files may override these defaults
42-
*
43-
* Differences between
44-
* RAMPS_13 | RAMPS_14
45-
* 7 | 11
25+
* Native with a RAMPS like board with additional pins
4626
*/
4727

4828
#ifndef BOARD_INFO_NAME
49-
#define BOARD_INFO_NAME "RAMPS 1.4"
29+
#define BOARD_INFO_NAME "RAMPS Native"
5030
#endif
5131

5232
#ifndef DEFAULT_MACHINE_NAME
@@ -60,28 +40,24 @@
6040
//
6141
// Servos
6242
//
63-
#ifdef IS_RAMPS_13
64-
#define SERVO0_PIN 7 // RAMPS_13 // Will conflict with BTN_EN2 on LCD_I2C_VIKI
65-
#else
66-
#define SERVO0_PIN 11
67-
#endif
68-
#define SERVO1_PIN 6
69-
#define SERVO2_PIN 5
43+
#define SERVO0_PIN 151
44+
#define SERVO1_PIN 152
45+
#define SERVO2_PIN 153
7046
#ifndef SERVO3_PIN
71-
#define SERVO3_PIN 4
47+
#define SERVO3_PIN 154
7248
#endif
7349

7450
//
7551
// Limit Switches
7652
//
77-
#define X_MIN_PIN 3
53+
#define X_MIN_PIN 155
7854
#ifndef X_MAX_PIN
79-
#define X_MAX_PIN 2
55+
#define X_MAX_PIN 156
8056
#endif
81-
#define Y_MIN_PIN 14
82-
#define Y_MAX_PIN 15
83-
#define Z_MIN_PIN 18
84-
#define Z_MAX_PIN 19
57+
#define Y_MIN_PIN 157
58+
#define Y_MAX_PIN 158
59+
#define Z_MIN_PIN 159
60+
#define Z_MAX_PIN 160
8561

8662
//
8763
// Z Probe (when not Z_MIN_PIN)
@@ -128,12 +104,60 @@
128104
#define E1_CS_PIN 44
129105
#endif
130106

107+
#define E2_STEP_PIN 100
108+
#define E2_DIR_PIN 101
109+
#define E2_ENABLE_PIN 102
110+
#ifndef E2_CS_PIN
111+
#define E2_CS_PIN 103
112+
#endif
113+
114+
#define E3_STEP_PIN 104
115+
#define E3_DIR_PIN 105
116+
#define E3_ENABLE_PIN 106
117+
#ifndef E3_CS_PIN
118+
#define E3_CS_PIN 107
119+
#endif
120+
121+
#define E4_STEP_PIN 108
122+
#define E4_DIR_PIN 109
123+
#define E4_ENABLE_PIN 110
124+
#ifndef E4_CS_PIN
125+
#define E4_CS_PIN 111
126+
#endif
127+
128+
#define E5_STEP_PIN 112
129+
#define E5_DIR_PIN 113
130+
#define E5_ENABLE_PIN 114
131+
#ifndef E5_CS_PIN
132+
#define E5_CS_PIN 115
133+
#endif
134+
135+
#define E6_STEP_PIN 116
136+
#define E6_DIR_PIN 117
137+
#define E6_ENABLE_PIN 118
138+
#ifndef E6_CS_PIN
139+
#define E6_CS_PIN 119
140+
#endif
141+
142+
#define E7_STEP_PIN 120
143+
#define E7_DIR_PIN 121
144+
#define E7_ENABLE_PIN 122
145+
#ifndef E7_CS_PIN
146+
#define E7_CS_PIN 123
147+
#endif
148+
131149
//
132150
// Temperature Sensors
133151
//
134152
#define TEMP_0_PIN 0 // Analog Input
135153
#define TEMP_1_PIN 1 // Analog Input
136-
#define TEMP_BED_PIN 2 // Analog Input
154+
#define TEMP_2_PIN 2 // Analog Input
155+
#define TEMP_3_PIN 3 // Analog Input
156+
#define TEMP_4_PIN 4 // Analog Input
157+
#define TEMP_5_PIN 5 // Analog Input
158+
#define TEMP_6_PIN 6 // Analog Input
159+
#define TEMP_7_PIN 7 // Analog Input
160+
#define TEMP_BED_PIN 8 // Analog Input
137161

138162
// SPI for MAX Thermocouple
139163
#if !HAS_MEDIA
@@ -145,48 +169,26 @@
145169
//
146170
// Heaters / Fans
147171
//
148-
#ifndef MOSFET_A_PIN
149-
#define MOSFET_A_PIN 10
150-
#endif
151-
#ifndef MOSFET_B_PIN
152-
#define MOSFET_B_PIN 9
153-
#endif
154-
#ifndef MOSFET_C_PIN
155-
#define MOSFET_C_PIN 8
156-
#endif
157-
#ifndef MOSFET_D_PIN
158-
#define MOSFET_D_PIN -1
159-
#endif
160-
161-
#define HEATER_0_PIN MOSFET_A_PIN
162-
163-
#if FET_ORDER_EFB // Hotend, Fan, Bed
164-
#define FAN0_PIN MOSFET_B_PIN
165-
#define HEATER_BED_PIN MOSFET_C_PIN
166-
#elif FET_ORDER_EEF // Hotend, Hotend, Fan
167-
#define HEATER_1_PIN MOSFET_B_PIN
168-
#define FAN0_PIN MOSFET_C_PIN
169-
#elif FET_ORDER_EEB // Hotend, Hotend, Bed
170-
#define HEATER_1_PIN MOSFET_B_PIN
171-
#define HEATER_BED_PIN MOSFET_C_PIN
172-
#elif FET_ORDER_EFF // Hotend, Fan, Fan
173-
#define FAN0_PIN MOSFET_B_PIN
174-
#define FAN1_PIN MOSFET_C_PIN
175-
#elif FET_ORDER_SF // Spindle, Fan
176-
#define FAN0_PIN MOSFET_C_PIN
177-
#else // Non-specific are "EFB" (i.e., "EFBF" or "EFBE")
178-
#define FAN0_PIN MOSFET_B_PIN
179-
#define HEATER_BED_PIN MOSFET_C_PIN
180-
#if HOTENDS == 1 && DISABLED(HEATERS_PARALLEL)
181-
#define FAN1_PIN MOSFET_D_PIN
182-
#else
183-
#define HEATER_1_PIN MOSFET_D_PIN
184-
#endif
185-
#endif
172+
#define HEATER_0_PIN 10
173+
#define HEATER_1_PIN 9
174+
#define HEATER_2_PIN 8
175+
#define HEATER_3_PIN 125
176+
#define HEATER_4_PIN 126
177+
#define HEATER_5_PIN 127
178+
#define HEATER_6_PIN 128
179+
#define HEATER_7_PIN 129
180+
#define HEATER_BED_PIN 108
186181

187182
#ifndef FAN0_PIN
188-
#define FAN0_PIN 4 // IO pin. Buffer needed
183+
#define FAN0_PIN 161 // IO pin. Buffer needed
189184
#endif
185+
#define FAN1_PIN 162 // IO pin. Buffer needed
186+
#define FAN2_PIN 163 // IO pin. Buffer needed
187+
#define FAN3_PIN 164 // IO pin. Buffer needed
188+
#define FAN4_PIN 165 // IO pin. Buffer needed
189+
#define FAN5_PIN 166 // IO pin. Buffer needed
190+
#define FAN6_PIN 167 // IO pin. Buffer needed
191+
#define FAN7_PIN 168 // IO pin. Buffer needed
190192

191193
//
192194
// Misc. Functions
@@ -725,3 +727,7 @@
725727
#endif // IS_NEWPANEL
726728

727729
#endif // HAS_WIRED_LCD
730+
731+
#ifndef KILL_PIN
732+
#define KILL_PIN EXP2_08_PIN
733+
#endif

Marlin/src/pins/pins.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -926,7 +926,7 @@
926926
//
927927

928928
#elif MB(SIMULATED)
929-
#include "linux/pins_RAMPS_LINUX.h" // Native or Simulation lin:linux_native mac:simulator_macos_debug mac:simulator_macos_release win:simulator_windows lin:simulator_linux_debug lin:simulator_linux_release
929+
#include "native/pins_RAMPS_NATIVE.h" // Native or Simulation lin:linux_native mac:simulator_macos_debug mac:simulator_macos_release win:simulator_windows lin:simulator_linux_debug lin:simulator_linux_release
930930

931931
#else
932932

ini/native.ini

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ debug_build_flags = -fstack-protector-strong -g -g3 -ggdb
5858
lib_compat_mode = off
5959
build_src_filter = ${common.default_src_filter} +<src/HAL/NATIVE_SIM>
6060
lib_deps = ${common.lib_deps}
61-
MarlinSimUI=https://github.com/p3p/MarlinSimUI/archive/66a2b82c8f.zip
62-
Adafruit NeoPixel=https://github.com/p3p/Adafruit_NeoPixel/archive/c6b319f447.zip
63-
LiquidCrystal=https://github.com/p3p/LiquidCrystal/archive/322fb5fc23.zip
64-
extra_scripts = ${common.extra_scripts}
65-
pre:buildroot/share/PlatformIO/scripts/simulator.py
61+
MarlinSimUI=https://github.com/p3p/MarlinSimUI/archive/66a2b82c8f.zip
62+
Adafruit NeoPixel=https://github.com/p3p/Adafruit_NeoPixel/archive/c6b319f447.zip
63+
LiquidCrystal=https://github.com/p3p/LiquidCrystal/archive/322fb5fc23.zip
64+
extra_scripts = ${common.extra_scripts}
65+
pre:buildroot/share/PlatformIO/scripts/simulator.py
6666

6767
[simulator_linux]
6868
extends = simulator_common

test/003-extruders_3_runout.ini

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,6 @@ motherboard = BOARD_SIMULATED
1212
extruders = 3
1313
temp_sensor_1 = 1
1414
temp_sensor_2 = 1
15-
temp_2_pin = 4 # dummy
16-
temp_3_pin = 4 # dummy
17-
heater_2_pin = 4 # dummy
18-
e2_step_pin = 4 # dummy
19-
e2_dir_pin = 4 # dummy
20-
e2_enable_pin = 4 # dummy
21-
e3_step_pin = 4 # dummy
22-
e3_dir_pin = 4 # dummy
23-
e3_enable_pin = 4 # dummy
2415
num_runout_sensors = 3
2516
filament_runout_sensor = on
2617
fil_runout_pin = 4 # dummy

0 commit comments

Comments
 (0)