Improved STMicro L64XX stepper driver support (#16452)

This commit is contained in:
Bob Kuhn
2020-01-13 18:47:30 -06:00
committed by Scott Lahteine
parent 53f1e5ff5b
commit 1ad53cee1f
315 changed files with 8582 additions and 5343 deletions

View File

@ -28,6 +28,9 @@
#define _DRV8825 0x8825
#define _LV8729 0x8729
#define _L6470 0x6470
#define _L6474 0x6474
#define _L6480 0x6480
#define _POWERSTEP01 0xF00D
#define _TB6560 0x6560
#define _TB6600 0x6600
#define _TMC2100 0x2100
@ -156,3 +159,8 @@
#define _SDCARD_CUSTOM_CABLE 3
#define _SDCARD_ID(V) _CAT(_SDCARD_, V)
#define SD_CONNECTION_IS(V) (_SDCARD_ID(SDCARD_CONNECTION) == _SDCARD_ID(V))
#define HAS_L64XX (HAS_DRIVER(L6470) || HAS_DRIVER(L6474) || HAS_DRIVER(L6480) || HAS_DRIVER(POWERSTEP01))
#define HAS_L64XX_NOT_L6474 (HAS_L64XX && !HAS_DRIVER(L6474))
#define AXIS_IS_L64XX(A) (AXIS_DRIVER_TYPE_##A(L6470) || AXIS_DRIVER_TYPE_##A(L6474) || AXIS_DRIVER_TYPE_##A(L6480) || AXIS_DRIVER_TYPE_##A(POWERSTEP01))

View File

@ -58,12 +58,10 @@ void serialprint_onoff(const bool onoff) { serialprintPGM(onoff ? PSTR(MSG_ON) :
void serialprintln_onoff(const bool onoff) { serialprint_onoff(onoff); SERIAL_EOL(); }
void serialprint_truefalse(const bool tf) { serialprintPGM(tf ? PSTR("true") : PSTR("false")); }
void print_bin(const uint16_t val) {
uint16_t mask = 0x8000;
void print_bin(uint16_t val) {
for (uint8_t i = 16; i--;) {
if (i && !(i % 4)) SERIAL_CHAR(' ');
SERIAL_CHAR((val & mask) ? '1' : '0');
mask >>= 1;
SERIAL_CHAR('0' + TEST(val, i));
if (!(i & 0x3) && i) SERIAL_CHAR(' ');
}
}