TMC connection test, spreadCycle parameters, improved debugging (#12616)

This commit is contained in:
teemuatlut
2018-12-10 04:54:48 +02:00
committed by Scott Lahteine
parent 97de9d54a5
commit 55144284c2
71 changed files with 917 additions and 452 deletions

View File

@ -23,7 +23,7 @@
#include "../inc/MarlinConfig.h"
#include "../gcode/parser.h"
#if ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(M100_FREE_MEMORY_WATCHER) || ENABLED(DEBUG_GCODE_PARSER)
#if ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(M100_FREE_MEMORY_WATCHER) || ENABLED(DEBUG_GCODE_PARSER) || ENABLED(TMC_DEBUG)
#include "hex_print_routines.h"
@ -78,4 +78,13 @@
void print_hex_word(const uint16_t w) { SERIAL_ECHO(hex_word(w)); }
void print_hex_address(const void * const w) { SERIAL_ECHO(hex_address(w)); }
void print_hex_long(const uint32_t w, const char delimiter) {
SERIAL_ECHOPGM("0x");
for (int B = 24; B >= 8; B -= 8){
print_hex_byte(w >> B);
SERIAL_CHAR(delimiter);
}
print_hex_byte(w);
}
#endif // AUTO_BED_LEVELING_UBL || M100_FREE_MEMORY_WATCHER || DEBUG_GCODE_PARSER

View File

@ -38,6 +38,7 @@ void print_hex_nybble(const uint8_t n);
void print_hex_byte(const uint8_t b);
void print_hex_word(const uint16_t w);
void print_hex_address(const void * const w);
void print_hex_long(const uint32_t w, const char delimiter);
#ifdef CPU_32_BIT
typedef uint32_t ptr_int_t;