🎨 Combine serial echos
This commit is contained in:
committed by
Scott Lahteine
parent
ccf39b1c42
commit
800a936caa
@ -178,9 +178,9 @@ bool UIFlashStorage::is_present = false;
|
||||
|
||||
if (!is_known) {
|
||||
SERIAL_ECHO_MSG("Unable to locate supported SPI Flash Memory.");
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPGM(" Manufacturer ID, got: ", manufacturer_id);
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPGM(" Device Type , got: ", device_type);
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPGM(" Capacity , got: ", capacity);
|
||||
SERIAL_ECHO_MSG(" Manufacturer ID, got: ", manufacturer_id);
|
||||
SERIAL_ECHO_MSG(" Device Type , got: ", device_type);
|
||||
SERIAL_ECHO_MSG(" Capacity , got: ", capacity);
|
||||
}
|
||||
|
||||
return is_known;
|
||||
@ -247,7 +247,7 @@ bool UIFlashStorage::is_present = false;
|
||||
case 0xFFFFFFFFul: return read_offset;
|
||||
case delimiter: read_offset = offset; break;
|
||||
default:
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("Invalid delimiter in Flash: ", delim);
|
||||
SERIAL_ECHO_MSG("Invalid delimiter in Flash: ", delim);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@ -325,8 +325,7 @@ bool UIFlashStorage::is_present = false;
|
||||
}
|
||||
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPGM("Writing UI settings to SPI Flash (offset ", write_addr);
|
||||
SERIAL_ECHOPGM(")...");
|
||||
SERIAL_ECHOPGM("Writing UI settings to SPI Flash (offset ", write_addr, ")...");
|
||||
|
||||
const uint32_t delim = delimiter;
|
||||
write_addr = write(write_addr, &delim, sizeof(delim));
|
||||
@ -509,7 +508,7 @@ bool UIFlashStorage::is_present = false;
|
||||
|
||||
bytes_remaining = get_media_file_size(slot);
|
||||
if (bytes_remaining != 0xFFFFFFFFUL) {
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("Boot media file size:", bytes_remaining);
|
||||
SERIAL_ECHO_MSG("Boot media file size:", bytes_remaining);
|
||||
addr = get_media_file_start(slot);
|
||||
return true;
|
||||
}
|
||||
|
@ -1024,9 +1024,7 @@ template <class T> bool CLCD::CommandFifo::write(T data, uint16_t len) {
|
||||
uint16_t Command_Space = mem_read_32(REG::CMDB_SPACE) & 0x0FFF;
|
||||
if (Command_Space < (len + padding)) {
|
||||
#if ENABLED(TOUCH_UI_DEBUG)
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPGM("Waiting for ", len + padding);
|
||||
SERIAL_ECHOLNPGM(" bytes in command queue, now free: ", Command_Space);
|
||||
SERIAL_ECHO_MSG("Waiting for ", len + padding, " bytes in command queue, now free: ", Command_Space);
|
||||
#endif
|
||||
do {
|
||||
Command_Space = mem_read_32(REG::CMDB_SPACE) & 0x0FFF;
|
||||
|
@ -131,9 +131,7 @@ bool DLCache::store(uint32_t min_bytes /* = 0*/) {
|
||||
if (dl_size > dl_slot_size) {
|
||||
// Not enough memory to cache the display list.
|
||||
#if ENABLED(TOUCH_UI_DEBUG)
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPGM ("Not enough space in GRAM to cache display list, free space: ", dl_slot_size);
|
||||
SERIAL_ECHOLNPGM(" Required: ", dl_size);
|
||||
SERIAL_ECHO_MSG("Not enough space in GRAM to cache display list, free space: ", dl_slot_size, " Required: ", dl_size);
|
||||
#endif
|
||||
dl_slot_used = 0;
|
||||
save_slot();
|
||||
@ -141,9 +139,7 @@ bool DLCache::store(uint32_t min_bytes /* = 0*/) {
|
||||
}
|
||||
else {
|
||||
#if ENABLED(TOUCH_UI_DEBUG)
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPGM ("Saving DL to RAMG cache, bytes: ", dl_slot_used);
|
||||
SERIAL_ECHOLNPGM(" Free space: ", dl_slot_size);
|
||||
SERIAL_ECHO_MSG("Saving DL to RAMG cache, bytes: ", dl_slot_used, " Free space: ", dl_slot_size);
|
||||
#endif
|
||||
dl_slot_used = dl_size;
|
||||
save_slot();
|
||||
@ -160,9 +156,9 @@ void DLCache::save_slot(uint8_t indx, uint32_t addr, uint16_t size, uint16_t use
|
||||
}
|
||||
|
||||
void DLCache::load_slot(uint8_t indx, uint32_t &addr, uint16_t &size, uint16_t &used) {
|
||||
addr = CLCD::mem_read_32(DL_CACHE_START + indx * 12 + 0);
|
||||
size = CLCD::mem_read_32(DL_CACHE_START + indx * 12 + 4);
|
||||
used = CLCD::mem_read_32(DL_CACHE_START + indx * 12 + 8);
|
||||
addr = CLCD::mem_read_32(DL_CACHE_START + indx * 12 + 0);
|
||||
size = CLCD::mem_read_32(DL_CACHE_START + indx * 12 + 4);
|
||||
used = CLCD::mem_read_32(DL_CACHE_START + indx * 12 + 8);
|
||||
}
|
||||
|
||||
void DLCache::append() {
|
||||
@ -171,9 +167,7 @@ void DLCache::append() {
|
||||
#if ENABLED(TOUCH_UI_DEBUG)
|
||||
cmd.execute();
|
||||
wait_until_idle();
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPGM ("Appending to DL from RAMG cache, bytes: ", dl_slot_used);
|
||||
SERIAL_ECHOLNPGM(" REG_CMD_DL: ", CLCD::mem_read_32(REG::CMD_DL));
|
||||
SERIAL_ECHO_MSG("Appending to DL from RAMG cache, bytes: ", dl_slot_used, " REG_CMD_DL: ", CLCD::mem_read_32(REG::CMD_DL));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user