L6470 SPI daisy chain support (#12895)

This commit is contained in:
Bob Kuhn
2019-01-23 19:06:54 -06:00
committed by Scott Lahteine
parent 6453b82a5e
commit 2f35747f29
95 changed files with 7844 additions and 1429 deletions

View File

@ -43,6 +43,10 @@ enum AxisEnum : unsigned char {
NO_AXIS = 0xFF
};
#if HAS_DRIVER(L6470)
enum L6470_driver_enum : unsigned char { X, Y, Z, X2, Y2, Z2, Z3, E0, E1, E2, E3, E4, E5 };
#endif
#define LOOP_S_LE_N(VAR, S, N) for (uint8_t VAR=(S); VAR<=(N); VAR++)
#define LOOP_S_L_N(VAR, S, N) for (uint8_t VAR=(S); VAR<(N); VAR++)
#define LOOP_LE_N(VAR, N) LOOP_S_LE_N(VAR, 0, N)

View File

@ -441,3 +441,10 @@ void safe_delay(millis_t ms) {
}
#endif // DEBUG_LEVELING_FEATURE
void print_bin(const uint16_t val) {
for (uint8_t i = 16; i--;) {
SERIAL_ECHO(TEST(val, i));
if (!(i & 0x3)) SERIAL_CHAR(' ');
}
}

View File

@ -119,3 +119,5 @@ inline void serial_delay(const millis_t ms) {
#if ENABLED(DEBUG_LEVELING_FEATURE)
void log_machine_info();
#endif
void print_bin(const uint16_t val);