Skip to content

Commit e6787f7

Browse files
committedJun 16, 2024
🔧 Assume RAMPS_CREALITY is not CR2020

File tree

1 file changed

+46
-22
lines changed

1 file changed

+46
-22
lines changed
 

‎Marlin/src/pins/ramps/pins_RAMPS_CREALITY.h

+46-22
Original file line numberDiff line numberDiff line change
@@ -29,50 +29,74 @@
2929

3030
#define BOARD_INFO_NAME "Creality3D RAMPS"
3131

32+
//#define CR2020_INDUSTRIAL_SERIES // Use layout specific to CR2020
33+
34+
//
35+
// 4-pin expansion header
36+
//
37+
#define EXP1_PIN 65 // A11 - Used by CR2020 Industrial series for case
38+
#define EXP2_PIN 66 // A12
39+
#define EXP3_PIN 11 // RAMPS: SERVO0_PIN
40+
#define EXP4_PIN 12 // RAMPS: PS_ON_PIN
41+
42+
//
43+
// Servos
44+
//
45+
#define SERVO1_PIN 12
46+
3247
//
3348
// Heaters / Fans
3449
//
3550
#define MOSFET_B_PIN 7
3651
#define FAN0_PIN 9
3752

53+
//
54+
// Filament Runout Sensor
55+
//
3856
#define FIL_RUNOUT_PIN 2
3957
#if NUM_RUNOUT_SENSORS >= 2
4058
#define FIL_RUNOUT2_PIN 15 // Creality CR-X can use dual runout sensors
4159
#endif
4260

43-
#ifndef SD_DETECT_PIN
44-
#if SD_CONNECTION_IS(ONBOARD)
45-
//#define HAS_ONBOARD_SD_DETECT // If the SD_DETECT_PIN is wired up
61+
//
62+
// Misc. Functions
63+
//
64+
#ifdef CR2020_INDUSTRIAL_SERIES
65+
#if ENABLED(PSU_CONTROL) && !defined(PS_ON_PIN)
66+
#define PS_ON_PIN 40 // Used by CR2020 Industrial series
4667
#endif
47-
#if ENABLED(HAS_ONBOARD_SD_DETECT) || !SD_CONNECTION_IS(ONBOARD)
48-
#define SD_DETECT_PIN 49
68+
#ifndef SUICIDE_PIN
69+
#define SUICIDE_PIN 12 // Used by CR2020 Industrial series
70+
#endif
71+
#ifndef SUICIDE_PIN_STATE
72+
#define SUICIDE_PIN_STATE HIGH
4973
#endif
50-
#endif
51-
52-
#ifndef PS_ON_PIN
53-
#define PS_ON_PIN 40 // Used by CR2020 Industrial series
5474
#endif
5575

5676
#if ENABLED(CASE_LIGHT_ENABLE) && !defined(CASE_LIGHT_PIN)
5777
#define CASE_LIGHT_PIN 65
5878
#endif
5979

60-
#define SERVO1_PIN 12
80+
//
81+
// SD Card
82+
//
83+
#ifndef SD_DETECT_PIN
84+
#if SD_CONNECTION_IS(ONBOARD)
85+
//#define HAS_ONBOARD_SD_DETECT // If the SD_DETECT_PIN is wired up
86+
#endif
87+
#if ENABLED(HAS_ONBOARD_SD_DETECT) || !SD_CONNECTION_IS(ONBOARD)
88+
#define SD_DETECT_PIN 49
89+
#endif
90+
#endif
6191

92+
//
93+
// Based on RAMPS 1.4
94+
//
6295
#include "pins_RAMPS.h"
6396

97+
//
98+
// LCD / Controller
99+
//
64100
#ifndef BEEPER_PIN
65101
#define BEEPER_PIN 37 // Always define beeper pin so Play Tone works with ExtUI
66102
#endif
67-
68-
#define EXP1_PIN 65 // A11 - Used by CR2020 Industrial series for case
69-
#define EXP2_PIN 66 // A12
70-
#define EXP3_PIN 11 // SERVO0_PIN
71-
#define EXP4_PIN 12 // PS_ON_PIN
72-
73-
#ifndef SUICIDE_PIN
74-
#define SUICIDE_PIN 12 // Used by CR2020 Industrial series
75-
#ifndef SUICIDE_PIN_STATE
76-
#define SUICIDE_PIN_STATE HIGH
77-
#endif
78-
#endif

0 commit comments

Comments
 (0)
Please sign in to comment.