General cleanup ahead of L64XX

This commit is contained in:
Scott Lahteine
2019-03-01 19:29:48 -06:00
parent 2f1e1dcb42
commit fa236e9718
11 changed files with 25 additions and 41 deletions

View File

@ -52,6 +52,15 @@ void serial_spaces(uint8_t count) { count *= (PROPORTIONAL_FONT_RATIO); while (c
void serialprint_onoff(const bool onoff) { serialprintPGM(onoff ? PSTR(MSG_ON) : PSTR(MSG_OFF)); }
void serialprintln_onoff(const bool onoff) { serialprint_onoff(onoff); SERIAL_EOL(); }
void print_bin(const uint16_t val) {
uint16_t mask = 0x8000;
for (uint8_t i = 16; i--;) {
if (i && !(i % 4)) SERIAL_CHAR(' ');
SERIAL_CHAR((val & mask) ? '1' : '0');
mask >>= 1;
}
}
#if ENABLED(DEBUG_LEVELING_FEATURE)
#include "enum.h"

View File

@ -114,6 +114,8 @@ void serialprint_onoff(const bool onoff);
void serialprintln_onoff(const bool onoff);
void serial_spaces(uint8_t count);
void print_bin(const uint16_t val);
#if ENABLED(DEBUG_LEVELING_FEATURE)
void print_xyz(PGM_P const prefix, PGM_P const suffix, const float x, const float y, const float z);
void print_xyz(PGM_P const prefix, PGM_P const suffix, const float xyz[]);

View File

@ -441,10 +441,3 @@ 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

@ -120,8 +120,6 @@ inline void serial_delay(const millis_t ms) {
void log_machine_info();
#endif
void print_bin(const uint16_t val);
template<typename T>
class restorer {
T& ref_;