|
| 1 | +/** |
| 2 | + * Marlin 3D Printer Firmware |
| 3 | + * Copyright (c) 2020 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 BOARD_INFO_NAME "FLY_MINI" |
| 29 | +#define BOARD_WEBSITE_URL "github.com/FLYmaker" |
| 30 | +#define DISABLE_JTAG |
| 31 | + |
| 32 | +// |
| 33 | +// Flash EEPROM Emulation |
| 34 | +// |
| 35 | +#define FLASH_EEPROM_EMULATION |
| 36 | +#define EEPROM_PAGE_SIZE 0x800 // 2KB |
| 37 | +#define EEPROM_START_ADDRESS (0x8000000 + 256 * 1024 - 2 * EEPROM_PAGE_SIZE) // 256K firmware space |
| 38 | +#define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE |
| 39 | + |
| 40 | +// |
| 41 | +// Servos |
| 42 | +// |
| 43 | +#define SERVO0_PIN PA8 |
| 44 | + |
| 45 | +// |
| 46 | +// Limit Switches |
| 47 | +// |
| 48 | +#define X_MIN_PIN PC12 |
| 49 | +#define X_MAX_PIN PC11 |
| 50 | +#define Y_MIN_PIN PC10 |
| 51 | +#define Y_MAX_PIN PA15 |
| 52 | +#define Z_MIN_PIN PA14 |
| 53 | +#define Z_MAX_PIN PA13 |
| 54 | + |
| 55 | +// |
| 56 | +// Steppers |
| 57 | +// |
| 58 | +#define X_STEP_PIN PB1 |
| 59 | +#define X_DIR_PIN PB2 |
| 60 | +#define X_ENABLE_PIN PB10 |
| 61 | +#ifndef X_CS_PIN |
| 62 | + #define X_CS_PIN PB0 |
| 63 | +#endif |
| 64 | + |
| 65 | +#define Y_STEP_PIN PA2 |
| 66 | +#define Y_DIR_PIN PC4 |
| 67 | +#define Y_ENABLE_PIN PC5 |
| 68 | +#ifndef Y_CS_PIN |
| 69 | + #define Y_CS_PIN PA7 |
| 70 | +#endif |
| 71 | + |
| 72 | +#define Z_STEP_PIN PA3 |
| 73 | +#define Z_DIR_PIN PA5 |
| 74 | +#define Z_ENABLE_PIN PA6 |
| 75 | +#ifndef Z_CS_PIN |
| 76 | + #define Z_CS_PIN PA4 |
| 77 | +#endif |
| 78 | + |
| 79 | +#define E0_STEP_PIN PA1 |
| 80 | +#define E0_DIR_PIN PC3 |
| 81 | +#define E0_ENABLE_PIN PA0 |
| 82 | +#ifndef E0_CS_PIN |
| 83 | + #define E0_CS_PIN PC2 |
| 84 | +#endif |
| 85 | + |
| 86 | +#if ENABLED(TMC_USE_SW_SPI) |
| 87 | + #ifndef TMC_SW_MOSI |
| 88 | + #define TMC_SW_MOSI PB15 |
| 89 | + #endif |
| 90 | + #ifndef TMC_SW_MISO |
| 91 | + #define TMC_SW_MISO PB14 |
| 92 | + #endif |
| 93 | + #ifndef TMC_SW_SCK |
| 94 | + #define TMC_SW_SCK PB13 |
| 95 | + #endif |
| 96 | +#endif |
| 97 | + |
| 98 | +#if HAS_TMC_UART |
| 99 | + // |
| 100 | + // Software serial |
| 101 | + // |
| 102 | + #define X_SERIAL_TX_PIN PB0 |
| 103 | + #define X_SERIAL_RX_PIN PB0 |
| 104 | + #define Y_SERIAL_TX_PIN PA7 |
| 105 | + #define Y_SERIAL_RX_PIN PA7 |
| 106 | + #define Z_SERIAL_TX_PIN PA4 |
| 107 | + #define Z_SERIAL_RX_PIN PA4 |
| 108 | + #define E0_SERIAL_TX_PIN PC2 |
| 109 | + #define E0_SERIAL_RX_PIN PC2 |
| 110 | +#endif |
| 111 | + |
| 112 | +// |
| 113 | +// Heaters / Fans |
| 114 | +// |
| 115 | +#define HEATER_0_PIN PC6 |
| 116 | +#define HEATER_BED_PIN PC7 |
| 117 | +#ifndef FAN_PIN |
| 118 | + #define FAN_PIN PC8 |
| 119 | +#endif |
| 120 | +#define FAN1_PIN PC9 |
| 121 | + |
| 122 | +// |
| 123 | +// Temperature Sensors |
| 124 | +// |
| 125 | +#define TEMP_BED_PIN PC0 // Analog Input |
| 126 | +#define TEMP_0_PIN PC1 // Analog Input |
| 127 | + |
| 128 | +// |
| 129 | +// LCD Pins |
| 130 | +// |
| 131 | + |
| 132 | +// |
| 133 | +// LCD / Controller |
| 134 | +// |
| 135 | +#define ENABLE_SPI2 |
| 136 | +#define SS_PIN PB12 |
| 137 | +#define SCK_PIN PB13 |
| 138 | +#define MISO_PIN PB14 |
| 139 | +#define MOSI_PIN PB15 |
| 140 | + |
| 141 | +#define SDSS SS_PIN |
| 142 | +#define SD_DETECT_PIN PB11 |
| 143 | + |
| 144 | +#define BEEPER_PIN PC14 |
| 145 | + |
| 146 | +#define LCD_PINS_RS PB8 |
| 147 | +#define LCD_PINS_ENABLE PB9 |
| 148 | +#define LCD_PINS_D4 PB7 |
| 149 | +#define LCD_PINS_D5 PB6 |
| 150 | +#define LCD_PINS_D6 PB5 |
| 151 | +#define LCD_PINS_D7 PB4 |
| 152 | + |
| 153 | +#define BTN_EN1 PD2 |
| 154 | +#define BTN_EN2 PB3 |
| 155 | +#define BTN_ENC PC13 |
| 156 | + |
| 157 | +// |
| 158 | +// Filament runout |
| 159 | +// |
| 160 | + |
| 161 | +// |
| 162 | +// ST7920 Delays |
| 163 | +// |
| 164 | +#ifndef ST7920_DELAY_1 |
| 165 | + #define ST7920_DELAY_1 DELAY_NS(96) |
| 166 | +#endif |
| 167 | +#ifndef ST7920_DELAY_2 |
| 168 | + #define ST7920_DELAY_2 DELAY_NS(48) |
| 169 | +#endif |
| 170 | +#ifndef ST7920_DELAY_3 |
| 171 | + #define ST7920_DELAY_3 DELAY_NS(715) |
| 172 | +#endif |
0 commit comments