Prusa MINI Firmware overview
|
#include "endstops.h"
#include "stepper.h"
#include "../Marlin.h"
#include "../sd/cardreader.h"
#include "temperature.h"
#include "../lcd/ultralcd.h"
Macros | |
#define | _SET_STOP_CHAR(A, C) ; |
#define | _ENDSTOP_HIT_ECHO(A, C) |
#define | _ENDSTOP_HIT_TEST(A, C) |
#define | ENDSTOP_HIT_TEST_X() _ENDSTOP_HIT_TEST(X,'X') |
#define | ENDSTOP_HIT_TEST_Y() _ENDSTOP_HIT_TEST(Y,'Y') |
#define | ENDSTOP_HIT_TEST_Z() _ENDSTOP_HIT_TEST(Z,'Z') |
#define | ES_REPORT(S) print_es_state(READ(S##_PIN) != S##_ENDSTOP_INVERTING, PSTR(MSG_##S)) |
#define | _ENDSTOP(AXIS, MINMAX) AXIS ##_## MINMAX |
#define | _ENDSTOP_PIN(AXIS, MINMAX) AXIS ##_## MINMAX ##_PIN |
#define | _ENDSTOP_INVERTING(AXIS, MINMAX) AXIS ##_## MINMAX ##_ENDSTOP_INVERTING |
#define | UPDATE_ENDSTOP_BIT(AXIS, MINMAX) SET_BIT_TO(live_state, _ENDSTOP(AXIS, MINMAX), (READ(_ENDSTOP_PIN(AXIS, MINMAX)) != _ENDSTOP_INVERTING(AXIS, MINMAX))) |
#define | COPY_LIVE_STATE(SRC_BIT, DST_BIT) SET_BIT_TO(live_state, DST_BIT, TEST(live_state, SRC_BIT)) |
#define | X_MIN_TEST true |
#define | X_MAX_TEST true |
#define | X_AXIS_HEAD X_HEAD |
#define | Y_AXIS_HEAD Y_HEAD |
#define | Z_AXIS_HEAD Z_HEAD |
#define | TEST_ENDSTOP(ENDSTOP) (TEST(state(), ENDSTOP)) |
#define | _ENDSTOP_HIT(AXIS, MINMAX) SBI(hit_state, _ENDSTOP(AXIS, MINMAX)) |
#define | PROCESS_ENDSTOP(AXIS, MINMAX) |
#define | PROCESS_DUAL_ENDSTOP(AXIS1, AXIS2, MINMAX) |
#define | PROCESS_TRIPLE_ENDSTOP(AXIS1, AXIS2, AXIS3, MINMAX) |
Functions | |
static void | print_es_state (const bool is_hit, PGM_P const label=nullptr) |
Variables | |
Endstops | endstops |
#define _SET_STOP_CHAR | ( | A, | |
C | |||
) | ; |
#define _ENDSTOP_HIT_ECHO | ( | A, | |
C | |||
) |
#define _ENDSTOP_HIT_TEST | ( | A, | |
C | |||
) |
#define ENDSTOP_HIT_TEST_X | ( | ) | _ENDSTOP_HIT_TEST(X,'X') |
#define ENDSTOP_HIT_TEST_Y | ( | ) | _ENDSTOP_HIT_TEST(Y,'Y') |
#define ENDSTOP_HIT_TEST_Z | ( | ) | _ENDSTOP_HIT_TEST(Z,'Z') |
#define ES_REPORT | ( | S | ) | print_es_state(READ(S##_PIN) != S##_ENDSTOP_INVERTING, PSTR(MSG_##S)) |
#define _ENDSTOP | ( | AXIS, | |
MINMAX | |||
) | AXIS ##_## MINMAX |
#define _ENDSTOP_PIN | ( | AXIS, | |
MINMAX | |||
) | AXIS ##_## MINMAX ##_PIN |
#define _ENDSTOP_INVERTING | ( | AXIS, | |
MINMAX | |||
) | AXIS ##_## MINMAX ##_ENDSTOP_INVERTING |
#define UPDATE_ENDSTOP_BIT | ( | AXIS, | |
MINMAX | |||
) | SET_BIT_TO(live_state, _ENDSTOP(AXIS, MINMAX), (READ(_ENDSTOP_PIN(AXIS, MINMAX)) != _ENDSTOP_INVERTING(AXIS, MINMAX))) |
#define COPY_LIVE_STATE | ( | SRC_BIT, | |
DST_BIT | |||
) | SET_BIT_TO(live_state, DST_BIT, TEST(live_state, SRC_BIT)) |
#define X_MIN_TEST true |
#define X_MAX_TEST true |
#define X_AXIS_HEAD X_HEAD |
#define Y_AXIS_HEAD Y_HEAD |
#define Z_AXIS_HEAD Z_HEAD |
#define PROCESS_ENDSTOP | ( | AXIS, | |
MINMAX | |||
) |
#define PROCESS_DUAL_ENDSTOP | ( | AXIS1, | |
AXIS2, | |||
MINMAX | |||
) |
#define PROCESS_TRIPLE_ENDSTOP | ( | AXIS1, | |
AXIS2, | |||
AXIS3, | |||
MINMAX | |||
) |
Endstops endstops |
Marlin 3D Printer Firmware Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
Based on Sprinter and grbl. Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/. endstops.cpp - A singleton object to manage endstops