🧑‍💻 Replace %lu => %" PRIu32 "

Fixes #28325
This commit is contained in:
Scott Lahteine
2026-02-18 19:12:07 -06:00
parent f6eee956a5
commit 3ec17b3bdc
9 changed files with 15 additions and 15 deletions
+2 -2
View File
@@ -109,7 +109,7 @@ bool SDIO_ReadBlock(uint32_t block, uint8_t *dst) {
WITH_RETRY(SDIO_READ_RETRIES, {
en_result_t rc = SDCARD_ReadBlocks(handle, block, 1, dst, SDIO_READ_TIMEOUT);
if (rc == Ok) return true;
printf("SDIO_ReadBlock error (rc=%u; ErrorCode=%lu)\n", rc, handle->u32ErrorCode);
printf("SDIO_ReadBlock error (rc=%u; ErrorCode=%" PRIu32 ")\n", rc, handle->u32ErrorCode);
})
return false;
@@ -122,7 +122,7 @@ bool SDIO_WriteBlock(uint32_t block, const uint8_t *src) {
WITH_RETRY(SDIO_WRITE_RETRIES, {
en_result_t rc = SDCARD_WriteBlocks(handle, block, 1, (uint8_t *)src, SDIO_WRITE_TIMEOUT);
if (rc == Ok) return true;
printf("SDIO_WriteBlock error (rc=%u; ErrorCode=%lu)\n", rc, handle->u32ErrorCode);
printf("SDIO_WriteBlock error (rc=%u; ErrorCode=%" PRIu32 ")\n", rc, handle->u32ErrorCode);
})
return false;
+3 -3
View File
@@ -88,9 +88,9 @@ void USBHost::setUsbTaskState(uint8_t state) {
capacity = info.capacity.block_nbr / 2000;
block_size = info.capacity.block_size;
block_count = info.capacity.block_nbr;
//SERIAL_ECHOLNPGM("info.capacity.block_nbr : %ld\n", info.capacity.block_nbr);
//SERIAL_ECHOLNPGM("info.capacity.block_size: %d\n", info.capacity.block_size);
//SERIAL_ECHOLNPGM("capacity : %d MB\n", capacity);
//SERIAL_ECHOLNPGM("info.capacity.block_nbr : ", info.capacity.block_nbr);
//SERIAL_ECHOLNPGM("info.capacity.block_size: ", info.capacity.block_size);
//SERIAL_ECHOLNPGM("capacity : ", capacity, "MB");
}
};
+1 -1
View File
@@ -1078,7 +1078,7 @@ void MarlinUI::draw_status_screen() {
#if ENABLED(LCD_SHOW_E_TOTAL)
char tmp[20];
const uint8_t escale = motion.e_move_accumulator >= 100000.0f ? 10 : 1; // After 100m switch to cm
sprintf_P(tmp, PSTR("E %ld%cm "), uint32_t(_MAX(motion.e_move_accumulator, 0.0f)) / escale, escale == 10 ? 'c' : 'm'); // 1234567mm
sprintf_P(tmp, PSTR("E %" PRIu32 "%cm "), uint32_t(_MAX(motion.e_move_accumulator, 0.0f)) / escale, escale == 10 ? 'c' : 'm'); // 1234567mm
lcd_put_u8str(tmp);
#endif
}
+1 -1
View File
@@ -580,7 +580,7 @@ void MarlinUI::draw_status_screen() {
if (show_e_total) {
#if ENABLED(LCD_SHOW_E_TOTAL)
const uint8_t escale = motion.e_move_accumulator >= 100000.0f ? 10 : 1; // After 100m switch to cm
sprintf_P(xstring, PSTR("%ld%cm"), uint32_t(_MAX(motion.e_move_accumulator, 0.0f)) / escale, escale == 10 ? 'c' : 'm'); // 1234567mm
sprintf_P(xstring, PSTR("%" PRIu32 "%cm"), uint32_t(_MAX(motion.e_move_accumulator, 0.0f)) / escale, escale == 10 ? 'c' : 'm'); // 1234567mm
#endif
}
else {
@@ -615,7 +615,7 @@ void ST7920_Lite_Status_Screen::draw_position(const xyze_pos_t &pos, const bool
#if ENABLED(LCD_SHOW_E_TOTAL)
char tmp[15];
const uint8_t escale = motion.e_move_accumulator >= 100000.0f ? 10 : 1; // After 100m switch to cm
sprintf_P(tmp, PSTR("E%-7ld%cm "), uint32_t(_MAX(motion.e_move_accumulator, 0.0f)) / escale, escale == 10 ? 'c' : 'm'); // 1234567mm
sprintf_P(tmp, PSTR("E%-7" PRIu32 "%cm "), uint32_t(_MAX(motion.e_move_accumulator, 0.0f)) / escale, escale == 10 ? 'c' : 'm'); // 1234567mm
write_str(tmp);
#endif
}
+1 -1
View File
@@ -104,7 +104,7 @@ void MarlinGame::frame_end() {
char perf_str[32];
sprintf_P(
perf_str,
PSTR("d%04lu w%04lu c%04lu"),
PSTR("d%04" PRIu32 " w%04" PRIu32 " c%04" PRIu32),
frame_draw_millis,
frame_wait_millis,
dwin_game_perf.draw_calls
+1 -1
View File
@@ -209,7 +209,7 @@ void menu_mmu3_toolchange_stat_total() {
sprintf_P(buffer1, PSTR("%u"), MMU3::operation_statistics.tool_change_counter);
char buffer2[LCD_WIDTH];
sprintf_P(buffer2, PSTR("%lu"), MMU3::operation_statistics.tool_change_total_counter);
sprintf_P(buffer2, PSTR("%" PRIu32 ""), MMU3::operation_statistics.tool_change_total_counter);
START_SCREEN();
STATIC_ITEM(MSG_MMU_MATERIAL_CHANGES, SS_INVERT);
@@ -475,10 +475,10 @@ uint8_t UHS_NI UHS_Bulk_Storage::Start() {
if(!rcode) {
if(!UHS_SLEEP_MS(3)) goto FailUnPlug;
BS_HOST_DEBUG("CheckLUN...\r\n");
BS_HOST_DEBUG("%lu\r\n", millis()/1000);
BS_HOST_DEBUG("%" PRIu32 "\r\n", millis()/1000);
// Stalls on ***some*** devices, ***WHY***?! Device SAID it is READY!!
LUNOk[lun] = CheckLUN(lun);
BS_HOST_DEBUG("%lu\r\n", millis()/1000);
BS_HOST_DEBUG("%" PRIu32 "\r\n", millis()/1000);
if(!LUNOk[lun]) LUNOk[lun] = CheckLUN(lun);
if(!UHS_SLEEP_MS(1)) goto FailUnPlug;
BS_HOST_DEBUG("Checked LUN...\r\n");
@@ -331,7 +331,7 @@ int16_t UHS_NI MAX3421E_HOST::Init(int16_t mseconds) {
again:
MAX3421E_SPI_Settings = SPISettings(spd, MSBFIRST, SPI_MODE0);
if (reset() == 0) {
MAX_HOST_DEBUG(PSTR("Fail SPI speed %lu\r\n"), spd);
MAX_HOST_DEBUG(PSTR("Fail SPI speed %" PRIu32 "\r\n"), spd);
if (spd > 1999999) {
spd -= 1000000;
goto again;
@@ -346,7 +346,7 @@ int16_t UHS_NI MAX3421E_HOST::Init(int16_t mseconds) {
regWr(rGPINPOL, sample_wr);
sample_rd = regRd(rGPINPOL);
if (sample_rd != sample_wr) {
MAX_HOST_DEBUG(PSTR("Fail SPI speed %lu\r\n"), spd);
MAX_HOST_DEBUG(PSTR("Fail SPI speed %" PRIu32 "\r\n"), spd);
if (spd > 1999999) {
spd -= 1000000;
goto again;
@@ -358,7 +358,7 @@ int16_t UHS_NI MAX3421E_HOST::Init(int16_t mseconds) {
regWr(rGPINPOL, gpinpol_copy);
}
MAX_HOST_DEBUG(PSTR("Pass SPI speed %lu\r\n"), spd);
MAX_HOST_DEBUG(PSTR("Pass SPI speed %" PRIu32 "\r\n"), spd);
#endif
if (reset() == 0) { // OSCOKIRQ hasn't asserted in time