grblHAL core  20240704
Documentation of some common concepts used in config.h

axismask

Example axismasks, replace XXX with the symbol name you want to define sans _MASK:
No axes:
#define XXX_MASK 0
All axes:
#define XXX_MASK AXES_BITMASK
#define XXX_MASK -1 // the value may be used from the compiler command line.
Single axis:
#define XXX_MASK Z_AXIS
#define XXX_MASK 4 // same as above but as a bitfield value, the value may be used from the compiler command line.
Specific axes:
#define XXX_MASK (X_AXIS || Y_AXIS)
#define XXX_MASK 3 // same as above but as a bitfield value, the value may be used from the compiler command line.

axis

Bitfield values are the sum of the individual bit values for each axis, these are:
X_AXIS = 1
Y_AXIS = 2
Z_AXIS = 4
A_AXIS = 8
B_AXIS = 16
C_AXIS = 32
U_AXIS = 64
V_AXIS = 128

signalmask

Example signalmasks, replace XXX with the symbol name you want to define sans _MASK:
No signals:
#define XXX_MASK 0
All signals:
#define XXX_MASK SIGNALS_BITMASK
#define XXX_MASK -1 // the value may be used from the compiler command line.
Single axis:
#define XXX_MASK SIGNALS_ESTOP_BIT
#define XXX_MASK 64 // same as above but as a bitfield value, the value may be used from the compiler command line.
Specific axes:
#define XXX_MASK (SIGNALS_FEEDHOLD_BIT || SIGNALS_CYCLESTART_BIT)
#define XXX_MASK 6 // same as above but as a bitfield value, the value may be used from the compiler command line.

signal


SIGNALS_RESET_BIT = 1
SIGNALS_FEEDHOLD_BIT = 2
SIGNALS_CYCLESTART_BIT= 4
SIGNALS_SAFETYDOOR_BIT = 8
SIGNALS_BLOCKDELETE_BIT = 16
SIGNALS_STOPDISABLE_BIT = 32
SIGNALS_ESTOP_BIT = 64
SIGNALS_PROBE_CONNECTED_BIT = 128
SIGNALS_MOTOR_FAULT_BIT = 256
SIGNALS_BITMASK = 512