Prusa MINI Firmware overview
|
Go to the documentation of this file.
28 #include "../inc/MarlinConfig.h"
42 #if HAS_EXTRA_ENDSTOPS
44 #if ENABLED(X_DUAL_ENDSTOPS)
45 static float x2_endstop_adj;
47 #if ENABLED(Y_DUAL_ENDSTOPS)
48 static float y2_endstop_adj;
53 #if ENABLED(Z_TRIPLE_ENDSTOPS)
54 static float z3_endstop_adj;
61 static bool enabled, enabled_globally;
63 static volatile uint8_t hit_state;
65 #if ENDSTOP_NOISE_THRESHOLD
66 static esbits_t validated_live_state;
67 static uint8_t endstop_poll_count;
113 #if ENDSTOP_NOISE_THRESHOLD
135 static void enable(
const bool onoff=
true);
140 #if ENABLED(VALIDATE_HOMING_ENDSTOPS)
152 static volatile bool z_probe_enabled;
153 static void enable_z_probe(
const bool onoff=
true);
159 #if ENABLED(PINS_DEBUGGING)
160 static bool monitor_flag;
161 static void monitor();
162 static void run_monitor();
165 #if ENABLED(SPI_ENDSTOPS)
169 struct {
bool x:1, y:1, z:1; };
172 static tmc_spi_homing_t tmc_spi_homing;
173 static void clear_endstop_state();
174 static bool tmc_spi_homing_check();
#define GET_TEXT(MSG)
Definition: multi_language.h:72
#define SERIAL_CHAR(x)
Definition: serial.h:69
Definition: endstops.h:36
static void resync()
Definition: endstops.cpp:318
#define _ENDSTOP(AXIS, MINMAX)
Definition: endstops.cpp:491
#define _O2
Definition: macros.h:45
#define PROCESS_ENDSTOP(AXIS, MINMAX)
#define _ENDSTOP_HIT_ECHO(A, C)
#define MSG_Z_PROBE
Definition: language.h:198
static FORCE_INLINE bool abort_enabled()
Definition: endstops.h:81
Endstops()
Definition: endstops.h:71
#define SET_INPUT_PULLDOWN(IO)
set pin as input with pulldown wrapper
Definition: fastio.h:95
static FORCE_INLINE bool axis_is_moving(const AxisEnum axis)
Definition: stepper.h:381
static FORCE_INLINE esbits_t state()
Definition: endstops.h:111
Stepper stepper
Definition: stepper.cpp:82
#define MIN(a, b)
Definition: usbd_def.h:265
Stopwatch print_job_timer
Definition: printcounter.cpp:63
Definition: endstops.h:36
#define MSG_ENDSTOPS_HIT
Definition: language.h:241
#define extDigitalRead(IO)
Definition: fastio.h:92
static FORCE_INLINE void validate_homing_move()
Definition: endstops.h:144
static FORCE_INLINE bool motor_direction(const AxisEnum axis)
Definition: stepper.h:378
#define PGM_P
Definition: pgmspace.h:30
Definition: endstops.h:32
Definition: endstops.h:33
uint8_t i
Definition: screen_test_graph.c:72
Definition: endstops.h:33
Definition: L6470_Marlin.h:30
#define FIL_RUNOUT2_PIN
Definition: pins_GT2560_V3.h:83
static void enable(const bool onoff=true)
Definition: endstops.cpp:291
Definition: endstops.h:35
void kill(PGM_P const lcd_error, PGM_P const lcd_component, const bool steppers_off)
Definition: Marlin.cpp:718
#define X_MIN_PIN
Definition: pins_ESP32.h:45
Definition: endstops.h:40
static FORCE_INLINE void _reset_SW_mode()
Definition: bltouch.h:82
#define PROCESS_TRIPLE_ENDSTOP(AXIS1, AXIS2, AXIS3, MINMAX)
#define SERIAL_ECHO_START()
Definition: serial.h:179
static bool stop()
Stop the stopwatch.
Definition: stopwatch.cpp:36
#define MSG_ENDSTOP_HIT
Definition: language.h:215
static void endstop_triggered(const AxisEnum axis)
Definition: planner.cpp:1508
Definition: L6470_Marlin.h:30
#define _ENDSTOP_HIT(AXIS, MINMAX)
static void poll()
Definition: endstops.cpp:272
#define MAX(a, b)
Definition: usbd_def.h:266
Definition: L6470_Marlin.h:30
static FORCE_INLINE void _set_SW_mode()
Definition: bltouch.h:81
#define SET_INPUT_PULLUP(IO)
Definition: fastio.h:100
Definition: endstops.h:35
int8_t pin_t
Definition: HAL.h:65
static void not_homing()
Definition: endstops.cpp:297
#define UPDATE_ENDSTOP_BIT(AXIS, MINMAX)
Definition: endstops.h:37
#define FORCE_INLINE
Definition: macros.h:40
#define PSTR(str)
Definition: pgmspace.h:31
#define SET_INPUT(IO)
Definition: fastio.h:99
Definition: endstops.h:32
Definition: L6470_Marlin.h:30
static void print_es_state(const bool is_hit, PGM_P const label=nullptr)
Definition: endstops.cpp:391
Definition: endstops.h:34
#define Y_MIN_PIN
Definition: pins_ESP32.h:46
static void M119()
Definition: endstops.cpp:398
#define Y_MAX_PIN
Definition: pins_RAMPS_LINUX.h:78
#define ENDSTOP_HIT_TEST_Y()
EndstopEnum
Definition: endstops.h:31
#define SERIAL_ECHOPGM(S)
Definition: serial.h:173
#define Z_MIN_PROBE_ENDSTOP_INVERTING
Definition: Configuration_A3ides_2209_MINI.h:611
static void event_handler()
Definition: endstops.cpp:341
static void init()
Definition: endstops.cpp:94
#define ENDSTOP_HIT_TEST_Z()
TemporaryGlobalEndstopsState(const bool enable)
Definition: endstops.h:188
#define LED_PIN
Definition: pins_RAMPS_LINUX.h:208
Definition: endstops.h:184
#define NUM_RUNOUT_SENSORS
Definition: pins_FORMBOT_TREX3.h:132
static void disable_all_heaters()
Definition: temperature.cpp:1926
static float z2_endstop_adj
Definition: endstops.h:51
const uint8_t[]
Definition: 404_html.c:3
#define _BV(bit)
Definition: wiring_constants.h:99
Definition: L6470_Marlin.h:30
#define MSG_FILAMENT_RUNOUT_SENSOR
Definition: language.h:199
#define FIL_RUNOUT_PIN
Definition: pins_RAMPS_LINUX.h:216
#define HAS_BED_PROBE
Definition: Conditionals_LCD.h:500
#define CBI(A, B)
Definition: macros.h:89
#define X_MAX_PIN
Definition: pins_RAMPS_LINUX.h:75
#define Z_MIN_PROBE_PIN
Definition: pins_RAMPS_LINUX.h:86
~TemporaryGlobalEndstopsState()
Definition: endstops.h:191
#define Z_MIN_PIN
Definition: pins_ESP32.h:47
Definition: endstops.h:32
#define MSG_ENDSTOP_OPEN
Definition: language.h:216
#define COPY_LIVE_STATE(SRC_BIT, DST_BIT)
static void enable_globally(const bool onoff=true)
Definition: endstops.cpp:285
#define SERIAL_EOL()
Definition: serial.h:181
#define ENDSTOP_HIT_TEST_X()
void quickstop_stepper()
Definition: Marlin.cpp:272
Definition: endstops.h:34
#define TEST(n, b)
Definition: macros.h:81
static bool global_enabled()
Definition: endstops.h:89
void safe_delay(millis_t ms)
Definition: utility.cpp:28
static void update()
Definition: endstops.cpp:496
#define PROCESS_DUAL_ENDSTOP(AXIS1, AXIS2, MINMAX)
Definition: endstops.h:33
Definition: endstops.h:37
void serialprintPGM(PGM_P str)
Definition: serial.cpp:35
#define SBI(A, B)
Definition: macros.h:85
#define S_FMT
Definition: macros.h:68
#define SERIAL_ECHOLNPGM(S)
Definition: serial.h:174
uint16_t esbits_t
Definition: endstops.h:43
Definition: L6470_Marlin.h:30
void analogWrite(uint32_t ulPin, uint32_t ulValue)
Definition: wiring_analog.c:12
#define TEST_ENDSTOP(ENDSTOP)
#define READ(IO)
Definition: fastio.h:95
Definition: L6470_Marlin.h:30
Endstops endstops
Definition: endstops.cpp:51
Definition: endstops.h:32
Temperature thermalManager
Definition: temperature.cpp:89
Endstops endstops
Definition: endstops.cpp:51
static FORCE_INLINE void hit_on_purpose()
Definition: endstops.h:148
uint32_t millis_t
Definition: millis_t.h:26
#define MSG_M119_REPORT
Definition: language.h:212
static FORCE_INLINE uint8_t trigger_state()
Definition: endstops.h:106
void setup_endstop_interrupts()
Definition: endstop_interrupts.h:105
#define ENABLED(V...)
Definition: macros.h:177
Planner planner
Definition: planner.cpp:111
#define Z_MAX_PIN
Definition: pins_RAMPS_LINUX.h:80