Prusa MINI Firmware overview
drivers.h File Reference

Go to the source code of this file.

Macros

#define _A4988   0x001
 
#define _A5984   0x002
 
#define _DRV8825   0x003
 
#define _LV8729   0x004
 
#define _L6470   0x105
 
#define _TB6560   0x006
 
#define _TB6600   0x007
 
#define _TMC2100   0x008
 
#define _TMC2130   2130
 
#define _TMC2130_STANDALONE   0x009
 
#define _TMC2160   2160
 
#define _TMC2160_STANDALONE   2161
 
#define _TMC2208   2208
 
#define _TMC2208_STANDALONE   0x00A
 
#define _TMC2209   2209
 
#define _TMC2209_STANDALONE   0x00D
 
#define _TMC26X   0x10B
 
#define _TMC26X_STANDALONE   0x00B
 
#define _TMC2660   2660
 
#define _TMC2660_STANDALONE   0x00C
 
#define _TMC5130   5130
 
#define _TMC5130_STANDALONE   5131
 
#define _TMC5160   5160
 
#define _TMC5160_STANDALONE   5161
 
#define _DRIVER_ID(V)   _CAT(_, V)
 
#define _AXIS_DRIVER_TYPE(A, T)   (_DRIVER_ID(A##_DRIVER_TYPE) == _CAT(_, T))
 
#define AXIS_DRIVER_TYPE_X(T)   _AXIS_DRIVER_TYPE(X,T)
 
#define AXIS_DRIVER_TYPE_Y(T)   _AXIS_DRIVER_TYPE(Y,T)
 
#define AXIS_DRIVER_TYPE_Z(T)   _AXIS_DRIVER_TYPE(Z,T)
 
#define AXIS_DRIVER_TYPE_X2(T)   (EITHER(X_DUAL_STEPPER_DRIVERS, DUAL_X_CARRIAGE) && _AXIS_DRIVER_TYPE(X2,T))
 
#define AXIS_DRIVER_TYPE_Y2(T)   (ENABLED(Y_DUAL_STEPPER_DRIVERS) && _AXIS_DRIVER_TYPE(Y2,T))
 
#define AXIS_DRIVER_TYPE_Z2(T)   (Z_MULTI_STEPPER_DRIVERS && _AXIS_DRIVER_TYPE(Z2,T))
 
#define AXIS_DRIVER_TYPE_Z3(T)   (ENABLED(Z_TRIPLE_STEPPER_DRIVERS) && _AXIS_DRIVER_TYPE(Z3,T))
 
#define AXIS_DRIVER_TYPE_E0(T)   (E_STEPPERS > 0 && _AXIS_DRIVER_TYPE(E0,T))
 
#define AXIS_DRIVER_TYPE_E1(T)   (E_STEPPERS > 1 && _AXIS_DRIVER_TYPE(E1,T))
 
#define AXIS_DRIVER_TYPE_E2(T)   (E_STEPPERS > 2 && _AXIS_DRIVER_TYPE(E2,T))
 
#define AXIS_DRIVER_TYPE_E3(T)   (E_STEPPERS > 3 && _AXIS_DRIVER_TYPE(E3,T))
 
#define AXIS_DRIVER_TYPE_E4(T)   (E_STEPPERS > 4 && _AXIS_DRIVER_TYPE(E4,T))
 
#define AXIS_DRIVER_TYPE_E5(T)   (E_STEPPERS > 5 && _AXIS_DRIVER_TYPE(E5,T))
 
#define AXIS_DRIVER_TYPE(A, T)   AXIS_DRIVER_TYPE_##A(T)
 
#define HAS_E_DRIVER(T)
 
#define HAS_DRIVER(T)
 
#define HAS_TRINAMIC
 
#define HAS_TMC220x   (HAS_DRIVER(TMC2208) || HAS_DRIVER(TMC2209))
 
#define AXIS_IS_TMC(A)
 
#define AXIS_HAS_SPI(A)
 
#define AXIS_HAS_UART(A)
 
#define AXIS_HAS_STALLGUARD(A)
 
#define AXIS_HAS_STEALTHCHOP(A)
 
#define _SDCARD_LCD   1
 
#define _SDCARD_ONBOARD   2
 
#define _SDCARD_CUSTOM_CABLE   3
 
#define _SDCARD_ID(V)   _CAT(_SDCARD_, V)
 
#define SD_CONNECTION_IS(V)   (_SDCARD_ID(SDCARD_CONNECTION) == _SDCARD_ID(V))
 

Macro Definition Documentation

◆ _A4988

#define _A4988   0x001

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/.

◆ _A5984

#define _A5984   0x002

◆ _DRV8825

#define _DRV8825   0x003

◆ _LV8729

#define _LV8729   0x004

◆ _L6470

#define _L6470   0x105

◆ _TB6560

#define _TB6560   0x006

◆ _TB6600

#define _TB6600   0x007

◆ _TMC2100

#define _TMC2100   0x008

◆ _TMC2130

#define _TMC2130   2130

◆ _TMC2130_STANDALONE

#define _TMC2130_STANDALONE   0x009

◆ _TMC2160

#define _TMC2160   2160

◆ _TMC2160_STANDALONE

#define _TMC2160_STANDALONE   2161

◆ _TMC2208

#define _TMC2208   2208

◆ _TMC2208_STANDALONE

#define _TMC2208_STANDALONE   0x00A

◆ _TMC2209

#define _TMC2209   2209

◆ _TMC2209_STANDALONE

#define _TMC2209_STANDALONE   0x00D

◆ _TMC26X

#define _TMC26X   0x10B

◆ _TMC26X_STANDALONE

#define _TMC26X_STANDALONE   0x00B

◆ _TMC2660

#define _TMC2660   2660

◆ _TMC2660_STANDALONE

#define _TMC2660_STANDALONE   0x00C

◆ _TMC5130

#define _TMC5130   5130

◆ _TMC5130_STANDALONE

#define _TMC5130_STANDALONE   5131

◆ _TMC5160

#define _TMC5160   5160

◆ _TMC5160_STANDALONE

#define _TMC5160_STANDALONE   5161

◆ _DRIVER_ID

#define _DRIVER_ID (   V)    _CAT(_, V)

◆ _AXIS_DRIVER_TYPE

#define _AXIS_DRIVER_TYPE (   A,
 
)    (_DRIVER_ID(A##_DRIVER_TYPE) == _CAT(_, T))

◆ AXIS_DRIVER_TYPE_X

#define AXIS_DRIVER_TYPE_X (   T)    _AXIS_DRIVER_TYPE(X,T)

◆ AXIS_DRIVER_TYPE_Y

#define AXIS_DRIVER_TYPE_Y (   T)    _AXIS_DRIVER_TYPE(Y,T)

◆ AXIS_DRIVER_TYPE_Z

#define AXIS_DRIVER_TYPE_Z (   T)    _AXIS_DRIVER_TYPE(Z,T)

◆ AXIS_DRIVER_TYPE_X2

#define AXIS_DRIVER_TYPE_X2 (   T)    (EITHER(X_DUAL_STEPPER_DRIVERS, DUAL_X_CARRIAGE) && _AXIS_DRIVER_TYPE(X2,T))

◆ AXIS_DRIVER_TYPE_Y2

#define AXIS_DRIVER_TYPE_Y2 (   T)    (ENABLED(Y_DUAL_STEPPER_DRIVERS) && _AXIS_DRIVER_TYPE(Y2,T))

◆ AXIS_DRIVER_TYPE_Z2

#define AXIS_DRIVER_TYPE_Z2 (   T)    (Z_MULTI_STEPPER_DRIVERS && _AXIS_DRIVER_TYPE(Z2,T))

◆ AXIS_DRIVER_TYPE_Z3

#define AXIS_DRIVER_TYPE_Z3 (   T)    (ENABLED(Z_TRIPLE_STEPPER_DRIVERS) && _AXIS_DRIVER_TYPE(Z3,T))

◆ AXIS_DRIVER_TYPE_E0

#define AXIS_DRIVER_TYPE_E0 (   T)    (E_STEPPERS > 0 && _AXIS_DRIVER_TYPE(E0,T))

◆ AXIS_DRIVER_TYPE_E1

#define AXIS_DRIVER_TYPE_E1 (   T)    (E_STEPPERS > 1 && _AXIS_DRIVER_TYPE(E1,T))

◆ AXIS_DRIVER_TYPE_E2

#define AXIS_DRIVER_TYPE_E2 (   T)    (E_STEPPERS > 2 && _AXIS_DRIVER_TYPE(E2,T))

◆ AXIS_DRIVER_TYPE_E3

#define AXIS_DRIVER_TYPE_E3 (   T)    (E_STEPPERS > 3 && _AXIS_DRIVER_TYPE(E3,T))

◆ AXIS_DRIVER_TYPE_E4

#define AXIS_DRIVER_TYPE_E4 (   T)    (E_STEPPERS > 4 && _AXIS_DRIVER_TYPE(E4,T))

◆ AXIS_DRIVER_TYPE_E5

#define AXIS_DRIVER_TYPE_E5 (   T)    (E_STEPPERS > 5 && _AXIS_DRIVER_TYPE(E5,T))

◆ AXIS_DRIVER_TYPE

#define AXIS_DRIVER_TYPE (   A,
 
)    AXIS_DRIVER_TYPE_##A(T)

◆ HAS_E_DRIVER

#define HAS_E_DRIVER (   T)

◆ HAS_DRIVER

#define HAS_DRIVER (   T)

◆ HAS_TRINAMIC

#define HAS_TRINAMIC
Value:
( HAS_DRIVER(TMC2130) \
|| HAS_DRIVER(TMC2160) \
|| HAS_DRIVER(TMC2208) \
|| HAS_DRIVER(TMC2209) \
|| HAS_DRIVER(TMC2660) \
|| HAS_DRIVER(TMC5130) \
|| HAS_DRIVER(TMC5160) )

◆ HAS_TMC220x

#define HAS_TMC220x   (HAS_DRIVER(TMC2208) || HAS_DRIVER(TMC2209))

◆ AXIS_IS_TMC

#define AXIS_IS_TMC (   A)
Value:
( AXIS_DRIVER_TYPE(A,TMC2130) \
|| AXIS_DRIVER_TYPE(A,TMC2160) \
|| AXIS_DRIVER_TYPE(A,TMC2208) \
|| AXIS_DRIVER_TYPE(A,TMC2209) \
|| AXIS_DRIVER_TYPE(A,TMC2660) \
|| AXIS_DRIVER_TYPE(A,TMC5130) \
|| AXIS_DRIVER_TYPE(A,TMC5160) )

◆ AXIS_HAS_SPI

#define AXIS_HAS_SPI (   A)
Value:
( AXIS_DRIVER_TYPE(A,TMC2130) \
|| AXIS_DRIVER_TYPE(A,TMC2160) \
|| AXIS_DRIVER_TYPE(A,TMC2660) \
|| AXIS_DRIVER_TYPE(A,TMC5130) \
|| AXIS_DRIVER_TYPE(A,TMC5160) )

◆ AXIS_HAS_UART

#define AXIS_HAS_UART (   A)
Value:
( AXIS_DRIVER_TYPE(A,TMC2208) \
|| AXIS_DRIVER_TYPE(A,TMC2209) )

◆ AXIS_HAS_STALLGUARD

#define AXIS_HAS_STALLGUARD (   A)
Value:
( AXIS_DRIVER_TYPE(A,TMC2130) \
|| AXIS_DRIVER_TYPE(A,TMC2160) \
|| AXIS_DRIVER_TYPE(A,TMC2209) \
|| AXIS_DRIVER_TYPE(A,TMC2660) \
|| AXIS_DRIVER_TYPE(A,TMC5130) \
|| AXIS_DRIVER_TYPE(A,TMC5160) )

◆ AXIS_HAS_STEALTHCHOP

#define AXIS_HAS_STEALTHCHOP (   A)
Value:
( AXIS_DRIVER_TYPE(A,TMC2130) \
|| AXIS_DRIVER_TYPE(A,TMC2160) \
|| AXIS_DRIVER_TYPE(A,TMC2208) \
|| AXIS_DRIVER_TYPE(A,TMC2209) \
|| AXIS_DRIVER_TYPE(A,TMC5130) \
|| AXIS_DRIVER_TYPE(A,TMC5160) )

◆ _SDCARD_LCD

#define _SDCARD_LCD   1

◆ _SDCARD_ONBOARD

#define _SDCARD_ONBOARD   2

◆ _SDCARD_CUSTOM_CABLE

#define _SDCARD_CUSTOM_CABLE   3

◆ _SDCARD_ID

#define _SDCARD_ID (   V)    _CAT(_SDCARD_, V)

◆ SD_CONNECTION_IS

#define SD_CONNECTION_IS (   V)    (_SDCARD_ID(SDCARD_CONNECTION) == _SDCARD_ID(V))
AXIS_DRIVER_TYPE_Z3
#define AXIS_DRIVER_TYPE_Z3(T)
Definition: drivers.h:60
AXIS_DRIVER_TYPE_E3
#define AXIS_DRIVER_TYPE_E3(T)
Definition: drivers.h:64
AXIS_DRIVER_TYPE_Z
#define AXIS_DRIVER_TYPE_Z(T)
Definition: drivers.h:56
AXIS_DRIVER_TYPE_Y2
#define AXIS_DRIVER_TYPE_Y2(T)
Definition: drivers.h:58
AXIS_DRIVER_TYPE_E1
#define AXIS_DRIVER_TYPE_E1(T)
Definition: drivers.h:62
AXIS_DRIVER_TYPE_X
#define AXIS_DRIVER_TYPE_X(T)
Definition: drivers.h:54
A
#define A(CODE)
Definition: macros.h:75
AXIS_DRIVER_TYPE_Z2
#define AXIS_DRIVER_TYPE_Z2(T)
Definition: drivers.h:59
AXIS_DRIVER_TYPE_E0
#define AXIS_DRIVER_TYPE_E0(T)
Definition: drivers.h:61
AXIS_DRIVER_TYPE_Y
#define AXIS_DRIVER_TYPE_Y(T)
Definition: drivers.h:55
AXIS_DRIVER_TYPE_X2
#define AXIS_DRIVER_TYPE_X2(T)
Definition: drivers.h:57
HAS_E_DRIVER
#define HAS_E_DRIVER(T)
Definition: drivers.h:70
AXIS_DRIVER_TYPE_E4
#define AXIS_DRIVER_TYPE_E4(T)
Definition: drivers.h:65
AXIS_DRIVER_TYPE
#define AXIS_DRIVER_TYPE(A, T)
Definition: drivers.h:68
AXIS_DRIVER_TYPE_E5
#define AXIS_DRIVER_TYPE_E5(T)
Definition: drivers.h:66
HAS_DRIVER
#define HAS_DRIVER(T)
Definition: drivers.h:74
AXIS_DRIVER_TYPE_E2
#define AXIS_DRIVER_TYPE_E2(T)
Definition: drivers.h:63