yarf 0.1
Yet Another RepRap Firmware
Defines | Functions
src/hardware/endstops.h File Reference

Implements checking the status of the endstop switches. More...

#include "yarf.h"
#include "fastio.h"
#include <stdbool.h>

Go to the source code of this file.

Defines

#define endstop_x_min()   (READ(X_MIN_PIN) != X_MIN_ENDSTOP_INVERTED)
 Returns whether the x min endstop is pressed.
#define endstop_y_min()   (READ(Y_MIN_PIN) != Y_MIN_ENDSTOP_INVERTED)
 Returns whether the y min endstop is pressed.
#define endstop_z_min()   (READ(Z_MIN_PIN) != Z_MIN_ENDSTOP_INVERTED)
 Returns whether the z min endstop is pressed.
#define endstop_x_max()   (READ(X_MAX_PIN) != X_MAX_ENDSTOP_INVERTED)
 Returns whether the x max endstop is pressed, if such an endstop is available.
#define endstop_y_max()   (READ(Y_MAX_PIN) != Y_MAX_ENDSTOP_INVERTED)
 Returns whether the y max endstop is pressed, if such an endstop is available.
#define endstop_z_max()   (READ(Z_MAX_PIN) != Z_MAX_ENDSTOP_INVERTED)
 Returns whether the z max endstop is pressed, if such an endstop is available.

Functions

static bool endstop_min (unsigned char axis)
 Returns whether a specific min endstop is pressed.
static bool endstop_max (unsigned char axis)
 Returns whether a specific max endstop is pressed.

Detailed Description

Implements checking the status of the endstop switches.

Author:
Pieter Agten (pieter.agten@gmail.com)
Date:
22 sep 2011

Definition in file endstops.h.


Define Documentation

#define endstop_x_max ( )    (READ(X_MAX_PIN) != X_MAX_ENDSTOP_INVERTED)

Returns whether the x max endstop is pressed, if such an endstop is available.

Returns false otherwise.

Definition at line 57 of file endstops.h.

#define endstop_y_max ( )    (READ(Y_MAX_PIN) != Y_MAX_ENDSTOP_INVERTED)

Returns whether the y max endstop is pressed, if such an endstop is available.

Returns false otherwise.

Definition at line 67 of file endstops.h.

#define endstop_z_max ( )    (READ(Z_MAX_PIN) != Z_MAX_ENDSTOP_INVERTED)

Returns whether the z max endstop is pressed, if such an endstop is available.

Returns false otherwise.

Definition at line 78 of file endstops.h.


Function Documentation

static bool endstop_max ( unsigned char  axis) [inline, static]

Returns whether a specific max endstop is pressed.

Parameters:
axisthe axis for which to check the max endstop
Returns:
whether the specified max endstop is pressed or false if the specified max endstop is not available.

Definition at line 112 of file endstops.h.

static bool endstop_min ( unsigned char  axis) [inline, static]

Returns whether a specific min endstop is pressed.

Parameters:
axisthe axis for which to check the min endstop
Returns:
whether the specified min endstop is pressed

Definition at line 89 of file endstops.h.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines