summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2023-06-26 23:50:38 +0700
committerGitHub <[email protected]>2023-06-26 23:50:38 +0700
commitbc0d6c7e92f15ba696c795f9f50b308a2281a468 (patch)
tree866dd6c838e63e1d68904a6ab1e1fed36df204a1 /src
parent7454e45796b1bf2f3d467694289ef1535f82dab5 (diff)
parenta61d0f074fbca389ff5e8744dfcb610aafd8ae1e (diff)
Merge pull request #2127 from hathach/rp2040-cmake-cleanup
Rp2040 cmake cleanup
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt7
-rw-r--r--src/portable/raspberrypi/rp2040/dcd_rp2040.c2
-rw-r--r--src/portable/raspberrypi/rp2040/rp2040_usb.c2
3 files changed, 7 insertions, 4 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index b99c7be6e..8f7f38589 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -75,8 +75,11 @@ endfunction()
#------------------------------------
# TinyUSB as library target
#------------------------------------
-set(TINYUSB_TARGET "tinyusb")
-set(TINYUSB_CONFIG_TARGET "tinyusb_config")
+if (NOT DEFINED TINYUSB_TARGET)
+ set(TINYUSB_TARGET "tinyusb")
+endif ()
+
+set(TINYUSB_CONFIG_TARGET "${TINYUSB_TARGET}_config")
if (DEFINED TINYUSB_TARGET_PREFIX)
set(TINYUSB_TARGET "${TINYUSB_TARGET_PREFIX}${TINYUSB_TARGET}")
diff --git a/src/portable/raspberrypi/rp2040/dcd_rp2040.c b/src/portable/raspberrypi/rp2040/dcd_rp2040.c
index 500a5373f..479b17b67 100644
--- a/src/portable/raspberrypi/rp2040/dcd_rp2040.c
+++ b/src/portable/raspberrypi/rp2040/dcd_rp2040.c
@@ -189,7 +189,7 @@ static void hw_endpoint_xfer(uint8_t ep_addr, uint8_t *buffer, uint16_t total_by
static void __tusb_irq_path_func(hw_handle_buff_status)(void)
{
uint32_t remaining_buffers = usb_hw->buf_status;
- pico_trace("buf_status = 0x%08x\n", remaining_buffers);
+ pico_trace("buf_status = 0x%08lx\n", remaining_buffers);
uint bit = 1u;
for (uint8_t i = 0; remaining_buffers && i < USB_MAX_ENDPOINTS * 2; i++)
{
diff --git a/src/portable/raspberrypi/rp2040/rp2040_usb.c b/src/portable/raspberrypi/rp2040/rp2040_usb.c
index cf37cba07..1f49665ff 100644
--- a/src/portable/raspberrypi/rp2040/rp2040_usb.c
+++ b/src/portable/raspberrypi/rp2040/rp2040_usb.c
@@ -419,7 +419,7 @@ static bool __tusb_irq_path_func(e15_is_critical_frame_period) (struct hw_endpoi
if (delta < 800 || delta > 998) {
return false;
}
- TU_LOG(3, "Avoiding sof %u now %lu last %lu\n", (usb_hw->sof_rd + 1) & USB_SOF_RD_BITS, time_us_32(), e15_last_sof);
+ TU_LOG(3, "Avoiding sof %lu now %lu last %lu\n", (usb_hw->sof_rd + 1) & USB_SOF_RD_BITS, time_us_32(), e15_last_sof);
return true;
}