summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhathach <[email protected]>2024-04-17 20:06:13 +0700
committerhathach <[email protected]>2024-04-19 23:16:57 +0700
commit3442a87d5b52112a8bc4672322d488703e4ee23e (patch)
tree05cc69e08bfbda4d4114842304ab4fe67c7df466 /src
parent96f7ca02bff64021b14ed84544df873a0d694a79 (diff)
- clang h743 build and run cdc_msc ok
- switch unit test back to gcc, since path to clang conflict on local setup (x86 and arm)
Diffstat (limited to 'src')
-rw-r--r--src/common/tusb_common.h1
-rw-r--r--src/portable/synopsys/dwc2/dcd_dwc2.c6
2 files changed, 4 insertions, 3 deletions
diff --git a/src/common/tusb_common.h b/src/common/tusb_common.h
index 1f08ce4ed..0d4082c03 100644
--- a/src/common/tusb_common.h
+++ b/src/common/tusb_common.h
@@ -65,6 +65,7 @@
// Standard Headers
#include <stdbool.h>
#include <stdint.h>
+#include <inttypes.h>
#include <stddef.h>
#include <string.h>
#include <stdio.h>
diff --git a/src/portable/synopsys/dwc2/dcd_dwc2.c b/src/portable/synopsys/dwc2/dcd_dwc2.c
index a824226c7..f17d30f06 100644
--- a/src/portable/synopsys/dwc2/dcd_dwc2.c
+++ b/src/portable/synopsys/dwc2/dcd_dwc2.c
@@ -174,7 +174,7 @@ static bool fifo_alloc(uint8_t rhport, uint8_t ep_addr, uint16_t packet_size) {
// Check if free space is available
TU_ASSERT(_allocated_fifo_words_tx + fifo_size + dwc2->grxfsiz <= _dwc2_controller[rhport].ep_fifo_size / 4);
_allocated_fifo_words_tx += fifo_size;
- TU_LOG(DWC2_DEBUG, " Allocated %u bytes at offset %lu", fifo_size * 4,
+ TU_LOG(DWC2_DEBUG, " Allocated %u bytes at offset %" PRIu32, fifo_size * 4,
_dwc2_controller[rhport].ep_fifo_size - _allocated_fifo_words_tx * 4);
// DIEPTXF starts at FIFO #1.
@@ -419,9 +419,9 @@ void print_dwc2_info(dwc2_regs_t* dwc2) {
volatile uint32_t const* p = (volatile uint32_t const*) &dwc2->guid;
TU_LOG(DWC2_DEBUG, "guid, gsnpsid, ghwcfg1, ghwcfg2, ghwcfg3, ghwcfg4\r\n");
for (size_t i = 0; i < 5; i++) {
- TU_LOG(DWC2_DEBUG, "0x%08lX, ", p[i]);
+ TU_LOG(DWC2_DEBUG, "0x%08" PRIX32 ", ", p[i]);
}
- TU_LOG(DWC2_DEBUG, "0x%08lX\r\n", p[5]);
+ TU_LOG(DWC2_DEBUG, "0x%08" PRIX32 "\r\n", p[5]);
}
#endif