|
@@ -20,12 +20,12 @@
|
20
|
20
|
*
|
21
|
21
|
*/
|
22
|
22
|
|
23
|
|
-#include "../inc/MarlinConfig.h"
|
24
|
|
-#include "../gcode/parser.h"
|
|
23
|
+#include "../inc/MarlinConfigPre.h"
|
25
|
24
|
|
26
|
25
|
#if NEED_HEX_PRINT
|
27
|
26
|
|
28
|
27
|
#include "hex_print.h"
|
|
28
|
+#include "../core/serial.h"
|
29
|
29
|
|
30
|
30
|
#ifdef CPU_32_BIT
|
31
|
31
|
constexpr int byte_start = 4;
|
|
@@ -54,7 +54,7 @@ char* hex_word(const uint16_t w) {
|
54
|
54
|
}
|
55
|
55
|
|
56
|
56
|
#ifdef CPU_32_BIT
|
57
|
|
- char* hex_long(const uint32_t l) {
|
|
57
|
+ char* hex_long(const uintptr_t l) {
|
58
|
58
|
_hex[2] = hex_nybble(l >> 28);
|
59
|
59
|
_hex[3] = hex_nybble(l >> 24);
|
60
|
60
|
_hex[4] = hex_nybble(l >> 20);
|
|
@@ -66,9 +66,9 @@ char* hex_word(const uint16_t w) {
|
66
|
66
|
|
67
|
67
|
char* hex_address(const void * const w) {
|
68
|
68
|
#ifdef CPU_32_BIT
|
69
|
|
- (void)hex_long((ptr_int_t)w);
|
|
69
|
+ (void)hex_long((uintptr_t)w);
|
70
|
70
|
#else
|
71
|
|
- (void)hex_word((ptr_int_t)w);
|
|
71
|
+ (void)hex_word((uintptr_t)w);
|
72
|
72
|
#endif
|
73
|
73
|
return _hex;
|
74
|
74
|
}
|
|
@@ -78,7 +78,7 @@ void print_hex_byte(const uint8_t b) { SERIAL_ECHO(hex_byte(b)); }
|
78
|
78
|
void print_hex_word(const uint16_t w) { SERIAL_ECHO(hex_word(w)); }
|
79
|
79
|
void print_hex_address(const void * const w) { SERIAL_ECHO(hex_address(w)); }
|
80
|
80
|
|
81
|
|
-void print_hex_long(const uint32_t w, const char delimiter) {
|
|
81
|
+void print_hex_long(const uintptr_t w, const char delimiter) {
|
82
|
82
|
SERIAL_ECHOPGM("0x");
|
83
|
83
|
for (int B = 24; B >= 8; B -= 8){
|
84
|
84
|
print_hex_byte(w >> B);
|