mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-29 18:27:20 +02:00
fix(usb/hcd): Use PRIu32 in FIFO config log for portability
The ESP_LOGD message that prints FIFO line sizes used %u for uint32_t, which may cause incorrect output on some architectures (e.g., ESP32-P4 where uint32_t maps to unsigned long). To ensure portable and correct logging across all supported platforms, this patch replaces %u with %" PRIu32 ", defined in <inttypes.h>. No functional behavior is affected — this is a formatting correction for debug output only.
This commit is contained in:
@ -1421,7 +1421,7 @@ esp_err_t hcd_port_init(int port_number, const hcd_port_config_t *port_config, h
|
||||
esp_intr_enable(port_obj->isr_hdl);
|
||||
*port_hdl = (hcd_port_handle_t)port_obj;
|
||||
HCD_EXIT_CRITICAL();
|
||||
ESP_LOGD(HCD_DWC_TAG, "FIFO config lines: RX=%u, PTX=%u, NPTX=%u",
|
||||
ESP_LOGD(HCD_DWC_TAG, "FIFO config lines: RX=%" PRIu32 ", PTX=%" PRIu32 ", NPTX=%" PRIu32,
|
||||
port_obj->fifo_config.rx_fifo_lines,
|
||||
port_obj->fifo_config.ptx_fifo_lines,
|
||||
port_obj->fifo_config.nptx_fifo_lines);
|
||||
|
Reference in New Issue
Block a user