Prusa MINI Firmware overview
pins_FYSETC_CHEETAH.h
Go to the documentation of this file.
1 /**
2  * Marlin 3D Printer Firmware
3  * Copyright (c) 2019 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 <http://www.gnu.org/licenses/>.
20  *
21  */
22 #pragma once
23 
24 #ifndef __STM32F1__
25  #error "Oops! Select an STM32F1 board in 'Tools > Board.'"
26 #endif
27 
28 #define DEFAULT_MACHINE_NAME "3D Printer"
29 
30 #define BOARD_INFO_NAME "FYSETC Cheetah"
31 #define BOARD_WEBSITE_URL "fysetc.com"
32 
33 // Ignore temp readings during development.
34 //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
35 
36 #define DISABLE_JTAG
37 
38 #define FLASH_EEPROM_EMULATION
39 #define EEPROM_PAGE_SIZE uint16(0x800) // 2KB
40 #define EEPROM_START_ADDRESS uint32(0x8000000 + 256 * 1024 - 2 * EEPROM_PAGE_SIZE)
41 #undef E2END
42 #define E2END (EEPROM_PAGE_SIZE - 1) // 2KB
43 
44 //
45 // Servos
46 //
47 #define SERVO0_PIN PA0
48 
49 //
50 // Limit Switches
51 //
52 #define X_STOP_PIN PA1
53 #define Y_STOP_PIN PB4
54 #define Z_STOP_PIN PA15
55 
56 //
57 // Filament runout
58 //
59 #define FIL_RUNOUT_PIN PB5
60 
61 //
62 // Steppers
63 //
64 #define X_STEP_PIN PB8
65 #define X_DIR_PIN PB9
66 #define X_ENABLE_PIN PA8
67 
68 #define Y_STEP_PIN PB2
69 #define Y_DIR_PIN PB3
70 #define Y_ENABLE_PIN PB1
71 
72 #define Z_STEP_PIN PC0
73 #define Z_DIR_PIN PC1
74 #define Z_ENABLE_PIN PC2
75 
76 #define E0_STEP_PIN PC15
77 #define E0_DIR_PIN PC14
78 #define E0_ENABLE_PIN PC13
79 
80 #define X_HARDWARE_SERIAL MSerial2
81 #define Y_HARDWARE_SERIAL MSerial2
82 #define Z_HARDWARE_SERIAL MSerial2
83 #define E0_HARDWARE_SERIAL MSerial2
84 
85 //
86 // Heaters / Fans
87 //
88 #define HEATER_0_PIN PC6
89 #define HEATER_BED_PIN PC7
90 #ifndef FAN_PIN
91  #define FAN_PIN PC8
92 #endif
93 
94 //
95 // Temperature Sensors
96 //
97 #define TEMP_BED_PIN PC5 // Analog Input
98 #define TEMP_0_PIN PC4 // Analog Input
99 
100 //
101 // Misc. Functions
102 //
103 #define SDSS PA4
104 
105 //
106 // LCD Pins
107 //
108 #if HAS_SPI_LCD
109 
110  #define BEEPER_PIN PC9
111 
112  #if HAS_GRAPHICAL_LCD
113  #define DOGLCD_A0 PB14
114  #define DOGLCD_CS PB12
115  #define DOGLCD_SCK PB13
116  #define DOGLCD_MOSI PB15
117  //#define LCD_SCREEN_ROT_90
118  //#define LCD_SCREEN_ROT_180
119  //#define LCD_SCREEN_ROT_270
120 
121  #if EITHER(FYSETC_MINI_12864, U8GLIB_ST7920)
122  #define FORCE_SOFT_SPI
123  #endif
124  #endif
125 
126  #define LCD_PINS_RS PB12 // CS -- SOFT SPI for ENDER3 LCD
127  #define LCD_PINS_D4 PB13 // SCLK
128  #define LCD_PINS_ENABLE PB15 // DATA MOSI
129 
130  // not connected to a pin
131  #define SD_DETECT_PIN PC3
132 
133  #ifndef RGB_LED_R_PIN
134  #define RGB_LED_R_PIN PB0
135  #endif
136  #ifndef RGB_LED_G_PIN
137  #define RGB_LED_G_PIN PB7
138  #endif
139  #ifndef RGB_LED_B_PIN
140  #define RGB_LED_B_PIN PB6
141  #endif
142 
143  //#define LCD_CONTRAST_INIT 190
144 
145  #if ENABLED(NEWPANEL)
146  #define BTN_EN1 PC11
147  #define BTN_EN2 PC10
148  #define BTN_ENC PC12
149  #endif
150 
151 #endif