Define short pin names in fastio for STM32 (#10461)

2.0.x
Scott Lahteine 7 years ago committed by GitHub
parent 65a6a86d19
commit dea686cf55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -51,4 +51,97 @@
#define OUT_WRITE(IO, v) { _SET_OUTPUT(IO); WRITE(IO, v); }
#define PORTA 0
#define PORTB 1
#define PORTC 2
#define PORTD 3
#define PORTE 4
#define _STM32_PIN(_PORT,_PIN) ((PORT##_PORT * 16) + _PIN)
#define PA0 _STM32_PIN(A, 0)
#define PA1 _STM32_PIN(A, 1)
#define PA2 _STM32_PIN(A, 2)
#define PA3 _STM32_PIN(A, 3)
#define PA4 _STM32_PIN(A, 4)
#define PA5 _STM32_PIN(A, 5)
#define PA6 _STM32_PIN(A, 6)
#define PA7 _STM32_PIN(A, 7)
#define PA8 _STM32_PIN(A, 8)
#define PA9 _STM32_PIN(A, 9)
#define PA10 _STM32_PIN(A, 10)
#define PA11 _STM32_PIN(A, 11)
#define PA12 _STM32_PIN(A, 12)
#define PA13 _STM32_PIN(A, 13)
#define PA14 _STM32_PIN(A, 14)
#define PA15 _STM32_PIN(A, 15)
#define PB0 _STM32_PIN(B, 0)
#define PB1 _STM32_PIN(B, 1)
#define PB2 _STM32_PIN(B, 2)
#define PB3 _STM32_PIN(B, 3)
#define PB4 _STM32_PIN(B, 4)
#define PB5 _STM32_PIN(B, 5)
#define PB6 _STM32_PIN(B, 6)
#define PB7 _STM32_PIN(B, 7)
#define PB8 _STM32_PIN(B, 8)
#define PB9 _STM32_PIN(B, 9)
#define PB10 _STM32_PIN(B, 10)
#define PB11 _STM32_PIN(B, 11)
#define PB12 _STM32_PIN(B, 12)
#define PB13 _STM32_PIN(B, 13)
#define PB14 _STM32_PIN(B, 14)
#define PB15 _STM32_PIN(B, 15)
#define PC0 _STM32_PIN(C, 0)
#define PC1 _STM32_PIN(C, 1)
#define PC2 _STM32_PIN(C, 2)
#define PC3 _STM32_PIN(C, 3)
#define PC4 _STM32_PIN(C, 4)
#define PC5 _STM32_PIN(C, 5)
#define PC6 _STM32_PIN(C, 6)
#define PC7 _STM32_PIN(C, 7)
#define PC8 _STM32_PIN(C, 8)
#define PC9 _STM32_PIN(C, 9)
#define PC10 _STM32_PIN(C, 10)
#define PC11 _STM32_PIN(C, 11)
#define PC12 _STM32_PIN(C, 12)
#define PC13 _STM32_PIN(C, 13)
#define PC14 _STM32_PIN(C, 14)
#define PC15 _STM32_PIN(C, 15)
#define PD0 _STM32_PIN(D, 0)
#define PD1 _STM32_PIN(D, 1)
#define PD2 _STM32_PIN(D, 2)
#define PD3 _STM32_PIN(D, 3)
#define PD4 _STM32_PIN(D, 4)
#define PD5 _STM32_PIN(D, 5)
#define PD6 _STM32_PIN(D, 6)
#define PD7 _STM32_PIN(D, 7)
#define PD8 _STM32_PIN(D, 8)
#define PD9 _STM32_PIN(D, 9)
#define PD10 _STM32_PIN(D, 10)
#define PD11 _STM32_PIN(D, 11)
#define PD12 _STM32_PIN(D, 12)
#define PD13 _STM32_PIN(D, 13)
#define PD14 _STM32_PIN(D, 14)
#define PD15 _STM32_PIN(D, 15)
#define PE0 _STM32_PIN(E, 0)
#define PE1 _STM32_PIN(E, 1)
#define PE2 _STM32_PIN(E, 2)
#define PE3 _STM32_PIN(E, 3)
#define PE4 _STM32_PIN(E, 4)
#define PE5 _STM32_PIN(E, 5)
#define PE6 _STM32_PIN(E, 6)
#define PE7 _STM32_PIN(E, 7)
#define PE8 _STM32_PIN(E, 8)
#define PE9 _STM32_PIN(E, 9)
#define PE10 _STM32_PIN(E, 10)
#define PE11 _STM32_PIN(E, 11)
#define PE12 _STM32_PIN(E, 12)
#define PE13 _STM32_PIN(E, 13)
#define PE14 _STM32_PIN(E, 14)
#define PE15 _STM32_PIN(E, 15)
#endif // _FASTIO_STM32F4_H

@ -51,4 +51,133 @@
#define OUT_WRITE(IO, v) { _SET_OUTPUT(IO); WRITE(IO, v); }
#define PORTA 0
#define PORTB 1
#define PORTC 2
#define PORTD 3
#define PORTE 4
#define PORTF 5
#define PORTG 6
#define _STM32_PIN(_PORT,_PIN) ((PORT##_PORT * 16) + _PIN)
#define PA0 _STM32_PIN(A, 0)
#define PA1 _STM32_PIN(A, 1)
#define PA2 _STM32_PIN(A, 2)
#define PA3 _STM32_PIN(A, 3)
#define PA4 _STM32_PIN(A, 4)
#define PA5 _STM32_PIN(A, 5)
#define PA6 _STM32_PIN(A, 6)
#define PA7 _STM32_PIN(A, 7)
#define PA8 _STM32_PIN(A, 8)
#define PA9 _STM32_PIN(A, 9)
#define PA10 _STM32_PIN(A, 10)
#define PA11 _STM32_PIN(A, 11)
#define PA12 _STM32_PIN(A, 12)
#define PA13 _STM32_PIN(A, 13)
#define PA14 _STM32_PIN(A, 14)
#define PA15 _STM32_PIN(A, 15)
#define PB0 _STM32_PIN(B, 0)
#define PB1 _STM32_PIN(B, 1)
#define PB2 _STM32_PIN(B, 2)
#define PB3 _STM32_PIN(B, 3)
#define PB4 _STM32_PIN(B, 4)
#define PB5 _STM32_PIN(B, 5)
#define PB6 _STM32_PIN(B, 6)
#define PB7 _STM32_PIN(B, 7)
#define PB8 _STM32_PIN(B, 8)
#define PB9 _STM32_PIN(B, 9)
#define PB10 _STM32_PIN(B, 10)
#define PB11 _STM32_PIN(B, 11)
#define PB12 _STM32_PIN(B, 12)
#define PB13 _STM32_PIN(B, 13)
#define PB14 _STM32_PIN(B, 14)
#define PB15 _STM32_PIN(B, 15)
#define PC0 _STM32_PIN(C, 0)
#define PC1 _STM32_PIN(C, 1)
#define PC2 _STM32_PIN(C, 2)
#define PC3 _STM32_PIN(C, 3)
#define PC4 _STM32_PIN(C, 4)
#define PC5 _STM32_PIN(C, 5)
#define PC6 _STM32_PIN(C, 6)
#define PC7 _STM32_PIN(C, 7)
#define PC8 _STM32_PIN(C, 8)
#define PC9 _STM32_PIN(C, 9)
#define PC10 _STM32_PIN(C, 10)
#define PC11 _STM32_PIN(C, 11)
#define PC12 _STM32_PIN(C, 12)
#define PC13 _STM32_PIN(C, 13)
#define PC14 _STM32_PIN(C, 14)
#define PC15 _STM32_PIN(C, 15)
#define PD0 _STM32_PIN(D, 0)
#define PD1 _STM32_PIN(D, 1)
#define PD2 _STM32_PIN(D, 2)
#define PD3 _STM32_PIN(D, 3)
#define PD4 _STM32_PIN(D, 4)
#define PD5 _STM32_PIN(D, 5)
#define PD6 _STM32_PIN(D, 6)
#define PD7 _STM32_PIN(D, 7)
#define PD8 _STM32_PIN(D, 8)
#define PD9 _STM32_PIN(D, 9)
#define PD10 _STM32_PIN(D, 10)
#define PD11 _STM32_PIN(D, 11)
#define PD12 _STM32_PIN(D, 12)
#define PD13 _STM32_PIN(D, 13)
#define PD14 _STM32_PIN(D, 14)
#define PD15 _STM32_PIN(D, 15)
#define PE0 _STM32_PIN(E, 0)
#define PE1 _STM32_PIN(E, 1)
#define PE2 _STM32_PIN(E, 2)
#define PE3 _STM32_PIN(E, 3)
#define PE4 _STM32_PIN(E, 4)
#define PE5 _STM32_PIN(E, 5)
#define PE6 _STM32_PIN(E, 6)
#define PE7 _STM32_PIN(E, 7)
#define PE8 _STM32_PIN(E, 8)
#define PE9 _STM32_PIN(E, 9)
#define PE10 _STM32_PIN(E, 10)
#define PE11 _STM32_PIN(E, 11)
#define PE12 _STM32_PIN(E, 12)
#define PE13 _STM32_PIN(E, 13)
#define PE14 _STM32_PIN(E, 14)
#define PE15 _STM32_PIN(E, 15)
#define PF0 _STM32_PIN(F, 0)
#define PF1 _STM32_PIN(F, 1)
#define PF2 _STM32_PIN(F, 2)
#define PF3 _STM32_PIN(F, 3)
#define PF4 _STM32_PIN(F, 4)
#define PF5 _STM32_PIN(F, 5)
#define PF6 _STM32_PIN(F, 6)
#define PF7 _STM32_PIN(F, 7)
#define PF8 _STM32_PIN(F, 8)
#define PF9 _STM32_PIN(F, 9)
#define PF10 _STM32_PIN(F, 10)
#define PF11 _STM32_PIN(F, 11)
#define PF12 _STM32_PIN(F, 12)
#define PF13 _STM32_PIN(F, 13)
#define PF14 _STM32_PIN(F, 14)
#define PF15 _STM32_PIN(F, 15)
#define PG0 _STM32_PIN(G, 0)
#define PG1 _STM32_PIN(G, 1)
#define PG2 _STM32_PIN(G, 2)
#define PG3 _STM32_PIN(G, 3)
#define PG4 _STM32_PIN(G, 4)
#define PG5 _STM32_PIN(G, 5)
#define PG6 _STM32_PIN(G, 6)
#define PG7 _STM32_PIN(G, 7)
#define PG8 _STM32_PIN(G, 8)
#define PG9 _STM32_PIN(G, 9)
#define PG10 _STM32_PIN(G, 10)
#define PG11 _STM32_PIN(G, 11)
#define PG12 _STM32_PIN(G, 12)
#define PG13 _STM32_PIN(G, 13)
#define PG14 _STM32_PIN(G, 14)
#define PG15 _STM32_PIN(G, 15)
#endif // _FASTIO_STM32F7_H

@ -20,14 +20,13 @@
#ifndef SPI_PINS_H_
#define SPI_PINS_H_
/**
* Define SPI Pins: SCK, MISO, MOSI, SS
*
*/
#define SCK_PIN _STM32_PIN(PORTA, 5)
#define MISO_PIN _STM32_PIN(PORTA, 6)
#define MOSI_PIN _STM32_PIN(PORTA, 7)
#define SS_PIN _STM32_PIN(PORTA, 8)
#define SCK_PIN PA5
#define MISO_PIN PA6
#define MOSI_PIN PA7
#define SS_PIN PA8
#endif // SPI_PINS_H_

@ -25,12 +25,10 @@
#endif
#define DEFAULT_MACHINE_NAME "STM32F407VET6"
#define BOARD_NAME "Marlin for STM32"
#define BOARD_NAME "STM32F4 Board"
// #define I2C_EEPROM
// #define LARGE_FLASH true
#define E2END 0xFFF // EEPROM end address (4kB)
// Ignore temp readings during develpment.
@ -40,22 +38,14 @@
#error "STM32F4 supports up to 2 hotends / E-steppers."
#endif
#define PORTA 0
#define PORTB 1
#define PORTC 2
#define PORTD 3
#define PORTE 4
#define _STM32_PIN(_PORT,_PIN) ((_PORT * 16) + _PIN)
//
// Limit Switches
//
#define X_MIN_PIN _STM32_PIN(PORTE, 0)
#define X_MIN_PIN PE0
#define X_MAX_PIN -1
#define Y_MIN_PIN _STM32_PIN(PORTE, 1)
#define Y_MIN_PIN PE1
#define Y_MAX_PIN -1
#define Z_MIN_PIN _STM32_PIN(PORTE, 14)
#define Z_MIN_PIN PE14
#define Z_MAX_PIN -1
//
@ -63,71 +53,71 @@
//
// #ifndef Z_MIN_PROBE_PIN
// #define Z_MIN_PROBE_PIN _STM32_PIN(PORTA, 4)
// #define Z_MIN_PROBE_PIN PA4
// #endif
//
// Steppers
//
#define X_STEP_PIN _STM32_PIN(PORTD, 3)
#define X_DIR_PIN _STM32_PIN(PORTD, 2)
#define X_ENABLE_PIN _STM32_PIN(PORTD, 0)
#define X_STEP_PIN PD3
#define X_DIR_PIN PD2
#define X_ENABLE_PIN PD0
// #ifndef X_CS_PIN
// #define X_CS_PIN _STM32_PIN(PORTD, 1)
// #define X_CS_PIN PD1
// #endif
#define Y_STEP_PIN _STM32_PIN(PORTE, 11)
#define Y_DIR_PIN _STM32_PIN(PORTE, 10)
#define Y_ENABLE_PIN _STM32_PIN(PORTE, 13)
#define Y_STEP_PIN PE11
#define Y_DIR_PIN PE10
#define Y_ENABLE_PIN PE13
// #ifndef Y_CS_PIN
// #define Y_CS_PIN _STM32_PIN(PORTE, 12)
// #define Y_CS_PIN PE12
// #endif
#define Z_STEP_PIN _STM32_PIN(PORTD, 6)
#define Z_DIR_PIN _STM32_PIN(PORTD, 7)
#define Z_ENABLE_PIN _STM32_PIN(PORTD, 4)
#define Z_STEP_PIN PD6
#define Z_DIR_PIN PD7
#define Z_ENABLE_PIN PD4
// #ifndef Z_CS_PIN
// #define Z_CS_PIN _STM32_PIN(PORTD, 5)
// #define Z_CS_PIN PD5
// #endif
#define E0_STEP_PIN _STM32_PIN(PORTB, 5)
#define E0_DIR_PIN _STM32_PIN(PORTB, 6)
#define E0_ENABLE_PIN _STM32_PIN(PORTB, 3)
#define E0_STEP_PIN PB5
#define E0_DIR_PIN PB6
#define E0_ENABLE_PIN PB3
// #ifndef E0_CS_PIN
// #define E0_CS_PIN _STM32_PIN(PORTB, 4)
// #define E0_CS_PIN PB4
// #endif
#define E1_STEP_PIN _STM32_PIN(PORTE, 4)
#define E1_DIR_PIN _STM32_PIN(PORTE, 2)
#define E1_ENABLE_PIN _STM32_PIN(PORTE, 3)
#define E1_STEP_PIN PE4
#define E1_DIR_PIN PE2
#define E1_ENABLE_PIN PE3
// #ifndef E1_CS_PIN
// #define E1_CS_PIN _STM32_PIN(PORTE, 5)
// #define E1_CS_PIN PE5
// #endif
#define SCK_PIN _STM32_PIN(PORTA, 5)
#define MISO_PIN _STM32_PIN(PORTA, 6)
#define MOSI_PIN _STM32_PIN(PORTA, 7)
#define SCK_PIN PA5
#define MISO_PIN PA6
#define MOSI_PIN PA7
//
// Temperature Sensors
//
#define TEMP_0_PIN _STM32_PIN(PORTC, 0) // Analog Input
#define TEMP_1_PIN _STM32_PIN(PORTC, 1) // Analog Input
#define TEMP_BED_PIN _STM32_PIN(PORTC, 2) // Analog Input
#define TEMP_0_PIN PC0 // Analog Input
#define TEMP_1_PIN PC1 // Analog Input
#define TEMP_BED_PIN PC2 // Analog Input
//
// Heaters / Fans
//
#define HEATER_0_PIN _STM32_PIN(PORTA, 1)
#define HEATER_1_PIN _STM32_PIN(PORTA, 2)
#define HEATER_BED_PIN _STM32_PIN(PORTA, 0)
#define HEATER_0_PIN PA1
#define HEATER_1_PIN PA2
#define HEATER_BED_PIN PA0
#define FAN_PIN _STM32_PIN(PORTC, 6)
#define FAN1_PIN _STM32_PIN(PORTC, 7)
#define FAN2_PIN _STM32_PIN(PORTC, 8)
#define FAN_PIN PC6
#define FAN1_PIN PC7
#define FAN2_PIN PC8
#define ORIG_E0_AUTO_FAN_PIN FAN1_PIN // Use this by NOT overriding E0_AUTO_FAN_PIN
@ -135,53 +125,53 @@
// Misc. Functions
//
//#define CASE_LIGHT_PIN_CI _STM32_PIN(PORTF, 13)
//#define CASE_LIGHT_PIN_DO _STM32_PIN(PORTF, 14)
//#define NEOPIXEL_PIN _STM32_PIN(PORTF, 13)
//#define CASE_LIGHT_PIN_CI PF13
//#define CASE_LIGHT_PIN_DO PF14
//#define NEOPIXEL_PIN PF13
//
// Prusa i3 MK2 Multi Material Multiplexer Support
//
// #define E_MUX0_PIN _STM32_PIN(PORTG, 3)
// #define E_MUX1_PIN _STM32_PIN(PORTG, 4)
// #define E_MUX0_PIN PG3
// #define E_MUX1_PIN PG4
//
// Servos
//
// #define SERVO0_PIN _STM32_PIN(PORTE, 13)
// #define SERVO1_PIN _STM32_PIN(PORTE, 14)
// #define SERVO0_PIN PE13
// #define SERVO1_PIN PE14
#define SDSS _STM32_PIN(PORTE, 7)
#define SS_PIN _STM32_PIN(PORTE, 7)
#define LED_PIN _STM32_PIN(PORTB, 7) //Alive
#define PS_ON_PIN _STM32_PIN(PORTA, 10)
#define KILL_PIN _STM32_PIN(PORTA, 8)
#define PWR_LOSS _STM32_PIN(PORTA, 4) //Power loss / nAC_FAULT
#define SDSS PE7
#define SS_PIN PE7
#define LED_PIN PB7 //Alive
#define PS_ON_PIN PA10
#define KILL_PIN PA8
#define PWR_LOSS PA4 //Power loss / nAC_FAULT
//
// LCD / Controller
//
#define SD_DETECT_PIN _STM32_PIN(PORTA, 15)
#define BEEPER_PIN _STM32_PIN(PORTC, 9)
#define LCD_PINS_RS _STM32_PIN(PORTE, 9)
#define LCD_PINS_ENABLE _STM32_PIN(PORTE, 8)
#define LCD_PINS_D4 _STM32_PIN(PORTB, 12)
#define LCD_PINS_D5 _STM32_PIN(PORTB, 13)
#define LCD_PINS_D6 _STM32_PIN(PORTB, 14)
#define LCD_PINS_D7 _STM32_PIN(PORTB, 15)
#define BTN_EN1 _STM32_PIN(PORTC, 4)
#define BTN_EN2 _STM32_PIN(PORTC, 5)
#define BTN_ENC _STM32_PIN(PORTC, 3)
#define SD_DETECT_PIN PA15
#define BEEPER_PIN PC9
#define LCD_PINS_RS PE9
#define LCD_PINS_ENABLE PE8
#define LCD_PINS_D4 PB12
#define LCD_PINS_D5 PB13
#define LCD_PINS_D6 PB14
#define LCD_PINS_D7 PB15
#define BTN_EN1 PC4
#define BTN_EN2 PC5
#define BTN_ENC PC3
//
// Filament runout
//
#define FIL_RUNOUT_PIN _STM32_PIN(PORTA, 3)
#define FIL_RUNOUT_PIN PA3
//
// ST7920 Delays

@ -27,8 +27,6 @@
#define DEFAULT_MACHINE_NAME "The-Borge"
#define BOARD_NAME "The-Borge"
#define LARGE_FLASH true
#define E2END 0xFFF // EEPROM end address
// Ignore temp readings during develpment.
@ -38,159 +36,149 @@
#error "The-Borg supports up to 3 hotends / E-steppers."
#endif
#define PORTA 0
#define PORTB 1
#define PORTC 2
#define PORTD 3
#define PORTE 4
#define PORTF 5
#define PORTG 6
#define _STM32_PIN(_PORT,_PIN) ((_PORT * 16) + _PIN)
//
// Limit Switches
//
#define X_MIN_PIN _STM32_PIN(PORTE, 9)
#define X_MAX_PIN _STM32_PIN(PORTE, 10)
#define Y_MIN_PIN _STM32_PIN(PORTE, 7)
#define Y_MAX_PIN _STM32_PIN(PORTE, 8)
#define Z_MIN_PIN _STM32_PIN(PORTF, 15)
#define Z_MAX_PIN _STM32_PIN(PORTG, 0)
#define E_MIN_PIN _STM32_PIN(PORTE, 2)
#define E_MAX_PIN _STM32_PIN(PORTE, 3)
#define X_MIN_PIN PE9
#define X_MAX_PIN PE10
#define Y_MIN_PIN PE7
#define Y_MAX_PIN PE8
#define Z_MIN_PIN PF15
#define Z_MAX_PIN PG0
#define E_MIN_PIN PE2
#define E_MAX_PIN PE3
//
// Z Probe (when not Z_MIN_PIN)
//
#ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN _STM32_PIN(PORTA, 4)
#define Z_MIN_PROBE_PIN PA4
#endif
//
// Steppers
//
#define STEPPER_ENABLE_PIN _STM32_PIN(PORTE, 0)
#define STEPPER_ENABLE_PIN PE0
#define X_STEP_PIN _STM32_PIN(PORTC, 6) // 96, 39 in Arduino
#define X_DIR_PIN _STM32_PIN(PORTC, 7)
#define X_ENABLE_PIN _STM32_PIN(PORTC, 8)
#define X_STEP_PIN PC6 // 96, 39 in Arduino
#define X_DIR_PIN PC7
#define X_ENABLE_PIN PC8
#define Y_STEP_PIN _STM32_PIN(PORTD, 9)
#define Y_DIR_PIN _STM32_PIN(PORTD, 10)
#define Y_ENABLE_PIN _STM32_PIN(PORTD, 11)
#define Y_STEP_PIN PD9
#define Y_DIR_PIN PD10
#define Y_ENABLE_PIN PD11
#define Z_STEP_PIN _STM32_PIN(PORTE, 15)
#define Z_DIR_PIN _STM32_PIN(PORTG, 1)
#define Z_ENABLE_PIN _STM32_PIN(PORTD, 8)
#define Z_STEP_PIN PE15
#define Z_DIR_PIN PG1
#define Z_ENABLE_PIN PD8
#define E0_STEP_PIN _STM32_PIN(PORTB, 1)
#define E0_DIR_PIN _STM32_PIN(PORTB, 2)
#define E0_ENABLE_PIN _STM32_PIN(PORTE, 11)
#define E0_STEP_PIN PB1
#define E0_DIR_PIN PB2
#define E0_ENABLE_PIN PE11
#define E1_STEP_PIN _STM32_PIN(PORTC, 4)
#define E1_DIR_PIN _STM32_PIN(PORTC, 5)
#define E1_ENABLE_PIN _STM32_PIN(PORTB, 0)
#define E1_STEP_PIN PC4
#define E1_DIR_PIN PC5
#define E1_ENABLE_PIN PB0
#define E2_STEP_PIN _STM32_PIN(PORTC, 13)
#define E2_DIR_PIN _STM32_PIN(PORTC, 14)
#define E2_ENABLE_PIN _STM32_PIN(PORTC, 15)
#define E2_STEP_PIN PC13
#define E2_DIR_PIN PC14
#define E2_ENABLE_PIN PC15
#define Z2_STEP_PIN _STM32_PIN(PORTC, 13)
#define Z2_DIR_PIN _STM32_PIN(PORTC, 14)
#define Z2_ENABLE_PIN _STM32_PIN(PORTC, 15)
#define Z2_STEP_PIN PC13
#define Z2_DIR_PIN PC14
#define Z2_ENABLE_PIN PC15
#define SCK_PIN _STM32_PIN(PORTA, 5)
#define MISO_PIN _STM32_PIN(PORTA, 6)
#define MOSI_PIN _STM32_PIN(PORTA, 7)
#define SCK_PIN PA5
#define MISO_PIN PA6
#define MOSI_PIN PA7
#define SPI1_SCK_PIN _STM32_PIN(PORTA, 5)
#define SPI1_MISO_PIN _STM32_PIN(PORTA, 6)
#define SPI1_MOSI_PIN _STM32_PIN(PORTA, 7)
#define SPI1_SCK_PIN PA5
#define SPI1_MISO_PIN PA6
#define SPI1_MOSI_PIN PA7
#define SPI6_SCK_PIN _STM32_PIN(PORTG, 13)
#define SPI6_MISO_PIN _STM32_PIN(PORTG, 12)
#define SPI6_MOSI_PIN _STM32_PIN(PORTG, 14)
#define SPI6_SCK_PIN PG13
#define SPI6_MISO_PIN PG12
#define SPI6_MOSI_PIN PG14
//
// Temperature Sensors
//
#define TEMP_0_PIN _STM32_PIN(PORTC, 3) // Analog Input
#define TEMP_1_PIN _STM32_PIN(PORTC, 2) // Analog Input
#define TEMP_2_PIN _STM32_PIN(PORTC, 1) // Analog Input
#define TEMP_3_PIN _STM32_PIN(PORTC, 0) // Analog Input
#define TEMP_0_PIN PC3 // Analog Input
#define TEMP_1_PIN PC2 // Analog Input
#define TEMP_2_PIN PC1 // Analog Input
#define TEMP_3_PIN PC0 // Analog Input
#define TEMP_BED_PIN _STM32_PIN(PORTF, 10) // Analog Input
#define TEMP_BED_PIN PF10 // Analog Input
#define TEMP_5_PIN _STM32_PIN(PORTE, 12) // Analog Input, Probe temp
#define TEMP_5_PIN PE12 // Analog Input, Probe temp
//
// Heaters / Fans
//
#define HEATER_0_PIN _STM32_PIN(PORTD, 15)
#define HEATER_1_PIN _STM32_PIN(PORTD, 14)
#define HEATER_BED_PIN _STM32_PIN(PORTF, 6)
#define HEATER_0_PIN PD15
#define HEATER_1_PIN PD14
#define HEATER_BED_PIN PF6
#define FAN_PIN _STM32_PIN(PORTD, 13)
#define FAN1_PIN _STM32_PIN(PORTA, 0)
#define FAN2_PIN _STM32_PIN(PORTA, 1)
#define FAN_PIN PD13
#define FAN1_PIN PA0
#define FAN2_PIN PA1
#define ORIG_E0_AUTO_FAN_PIN _STM32_PIN(PORTA, 1) // Use this by NOT overriding E0_AUTO_FAN_PIN
#define ORIG_E0_AUTO_FAN_PIN PA1 // Use this by NOT overriding E0_AUTO_FAN_PIN
//
// Misc. Functions
//
//#define CASE_LIGHT_PIN_CI _STM32_PIN(PORTF, 13)
//#define CASE_LIGHT_PIN_DO _STM32_PIN(PORTF, 14)
//#define NEOPIXEL_PIN _STM32_PIN(PORTF, 13)
//#define CASE_LIGHT_PIN_CI PF13
//#define CASE_LIGHT_PIN_DO PF14
//#define NEOPIXEL_PIN PF13
//
// Prusa i3 MK2 Multi Material Multiplexer Support
//
#define E_MUX0_PIN _STM32_PIN(PORTG, 3)
#define E_MUX1_PIN _STM32_PIN(PORTG, 4)
#define E_MUX0_PIN PG3
#define E_MUX1_PIN PG4
//
// Servos
//
#define SERVO0_PIN _STM32_PIN(PORTE, 13)
#define SERVO1_PIN _STM32_PIN(PORTE, 14)
#define SERVO0_PIN PE13
#define SERVO1_PIN PE14
#define SDSS _STM32_PIN(PORTA, 8)
#define SS_PIN _STM32_PIN(PORTA, 8)
#define LED_PIN _STM32_PIN(PORTA, 2) // Alive
#define PS_ON_PIN _STM32_PIN(PORTA, 3)
#define KILL_PIN -1//_STM32_PIN(PORTD, 5) // EXP2-10
#define PWR_LOSS _STM32_PIN(PORTG, 5) // Power loss / nAC_FAULT
#define SDSS PA8
#define SS_PIN PA8
#define LED_PIN PA2 // Alive
#define PS_ON_PIN PA3
#define KILL_PIN -1 //PD5 // EXP2-10
#define PWR_LOSS PG5 // Power loss / nAC_FAULT
//
// MAX7219_DEBUG
//
#define MAX7219_CLK_PIN _STM32_PIN(PORTG, 10) // EXP1-1
#define MAX7219_DIN_PIN _STM32_PIN(PORTD, 7) // EXP1-3
#define MAX7219_LOAD_PIN _STM32_PIN(PORTD, 1) // EXP1-5
#define MAX7219_CLK_PIN PG10 // EXP1-1
#define MAX7219_DIN_PIN PD7 // EXP1-3
#define MAX7219_LOAD_PIN PD1 // EXP1-5
//
// LCD / Controller
//
//#define SD_DETECT_PIN -1 //_STM32_PIN(PORTB, 6)) // EXP2-4
#define BEEPER_PIN _STM32_PIN(PORTG, 10) // EXP1-1
#define LCD_PINS_RS _STM32_PIN(PORTG, 9) // EXP1-4
#define LCD_PINS_ENABLE _STM32_PIN(PORTD, 7) // EXP1-3
#define LCD_PINS_D4 _STM32_PIN(PORTD, 1) // EXP1-5
#define LCD_PINS_D5 _STM32_PIN(PORTF, 0) // EXP1-6
#define LCD_PINS_D6 _STM32_PIN(PORTD, 3) // EXP1-7
#define LCD_PINS_D7 _STM32_PIN(PORTD, 4) // EXP1-8
#define BTN_EN1 _STM32_PIN(PORTD, 6) // EXP2-5
#define BTN_EN2 _STM32_PIN(PORTD, 0) // EXP2-3
#define BTN_ENC _STM32_PIN(PORTG, 11) // EXP1-2
//#define SD_DETECT_PIN -1 //PB6) // EXP2-4
#define BEEPER_PIN PG10 // EXP1-1
#define LCD_PINS_RS PG9 // EXP1-4
#define LCD_PINS_ENABLE PD7 // EXP1-3
#define LCD_PINS_D4 PD1 // EXP1-5
#define LCD_PINS_D5 PF0 // EXP1-6
#define LCD_PINS_D6 PD3 // EXP1-7
#define LCD_PINS_D7 PD4 // EXP1-8
#define BTN_EN1 PD6 // EXP2-5
#define BTN_EN2 PD0 // EXP2-3
#define BTN_ENC PG11 // EXP1-2

Loading…
Cancel
Save