#define CONFIGURATION_H_VERSION 02010300
#define STRING_CONFIG_H_AUTHOR "ElementW"

#define MOTHERBOARD BOARD_CREALITY_V427

#define BAUDRATE 115200
// PB10 is screen port USART3_TX
// PB11 is screen port USART3_RX
#define SERIAL_PORT 3
// PA9 is CH340 USART1_TX
// PA10 is CH340 USART1_RX
#define SERIAL_PORT_2 1

#define CUSTOM_MACHINE_NAME "Motorised stage"
#define MACHINE_UUID "4c3dfef7-26a8-4e68-afa2-6b74fdfd92f3"

#define EXTRUDERS 0

#define X_BED_SIZE 250
#define Y_BED_SIZE 232

#define X_DRIVER_TYPE  TMC2208_STANDALONE
#define X_ENABLE_ON LOW
#define INVERT_X_DIR true
#define X_MIN_POS -5
#define X_MAX_POS X_BED_SIZE
#define MIN_SOFTWARE_ENDSTOP_X
#define MAX_SOFTWARE_ENDSTOP_X
#define X_HOME_DIR -1
#define ENDSTOPPULLUP_XMIN
#define X_MIN_ENDSTOP_HIT_STATE HIGH

#define Y_DRIVER_TYPE  TMC2208_STANDALONE
#define Y_ENABLE_ON LOW
#define INVERT_Y_DIR false
#define Y_MIN_POS 0
#define Y_MAX_POS (Y_BED_SIZE+5)
#define MIN_SOFTWARE_ENDSTOP_Y
#define MAX_SOFTWARE_ENDSTOP_Y
#define Y_HOME_DIR 1
#define ENDSTOPPULLUP_YMIN
#define Y_MAX_ENDSTOP_HIT_STATE HIGH

#define DISABLE_REDUCED_ACCURACY_WARNING

//#define Z_DRIVER_TYPE  TMC2208_STANDALONE
//#define Z_ENABLE_ON LOW
//#define Z_MIN_POS 0
//#define Z_MAX_POS 0
//#define Z_CLEARANCE_FOR_HOMING 0
//#define MIN_SOFTWARE_ENDSTOP_Z
//#define MAX_SOFTWARE_ENDSTOP_Z
//#define Z_HOME_DIR -1
//#define DISABLE_Z false
//
//#define E0_DRIVER_TYPE TMC2208_STANDALONE
//#define E_ENABLE_ON LOW
//#define DISABLE_E false

#define VALIDATE_HOMING_ENDSTOPS

#define EDITABLE_STEPS_PER_UNIT
#define DEFAULT_AXIS_STEPS_PER_UNIT { 400,    400 } //,    10000 }
#define DEFAULT_MAX_FEEDRATE        { 10,     10 } //,      1 }
#define DEFAULT_MAX_ACCELERATION    { 50,     50 } //,    1 }
#define HOMING_FEEDRATE_MM_M        { (8*60), (8*60) } //, 1 }
#define AXIS_RELATIVE_MODES         { false,  false } //,  false }
#define DEFAULT_ACCELERATION           50    // X, Y, Z and E acceleration for printing moves
#define DEFAULT_RETRACT_ACCELERATION   500    // E acceleration for retracts
#define DEFAULT_TRAVEL_ACCELERATION    50    // X, Y, Z acceleration for travel (non printing) moves

#define QUICK_HOME
#define HOMING_BUMP_MM              { 4,      4 } // (linear=mm, rotational=°) Backoff from endstops after first bump
#define HOMING_BUMP_DIVISOR         { 2,      2 } // Re-Bump Speed Divisor (Divides the Homing Feedrate)
#define HOMING_BACKOFF_POST_MM      { 5,      5 } // (linear=mm, rotational=°) Backoff from endstops after homing

#define MIN_SOFTWARE_ENDSTOPS
#define MAX_SOFTWARE_ENDSTOPS

#define JUNCTION_DEVIATION_MM 0.08  // (mm) Distance from real junction edge
#define JD_HANDLE_SMALL_SEGMENTS    // Use curvature estimation instead of just the junction angle
                                    // for small segments (< 1mm) with large junction angles (> 135°).

#define HOST_KEEPALIVE_FEATURE        // Disable this if your host doesn't like keepalive messages
#define DEFAULT_KEEPALIVE_INTERVAL 2  // Number of seconds between "busy" messages. Set with M113.
#define BUSY_WHILE_HEATING            // Some hosts require "busy" messages even during heating

#define FAN_SOFT_PWM
#define SOFT_PWM_SCALE 0

#define EMERGENCY_PARSER
#define AUTO_REPORT_POSITION
