summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorhathach <[email protected]>2022-04-27 17:57:52 +0700
committerhathach <[email protected]>2022-04-27 17:57:52 +0700
commit4a661dead0899cb154325a8257d19281f2536af3 (patch)
tree48850cad386aeba513798ca4907a132ca4bf7ade /src/common
parentfd827a80a9f3b1e482cc8b1609c055cbad252b37 (diff)
add TU_ATTR_FAST_FUNC for rp2040 __not_in_flash() section
Diffstat (limited to 'src/common')
-rw-r--r--src/common/tusb_mcu.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/common/tusb_mcu.h b/src/common/tusb_mcu.h
index 8eb4ad475..c1cf2a810 100644
--- a/src/common/tusb_mcu.h
+++ b/src/common/tusb_mcu.h
@@ -228,6 +228,8 @@
#elif TU_CHECK_MCU(OPT_MCU_RP2040)
#define TUP_DCD_ENDPOINT_MAX 16
+ #define TU_ATTR_FAST_FUNC __attribute__((section(".time_critical.tinyusb")))
+
//------------- Silabs -------------//
#elif TU_CHECK_MCU(OPT_MCU_EFM32GG)
#define TUP_USBIP_DWC2
@@ -282,4 +284,9 @@
#define TUP_RHPORT_HIGHSPEED 0x00
#endif
+// fast function, normally mean placing function in SRAM
+#ifndef TU_ATTR_FAST_FUNC
+ #define TU_ATTR_FAST_FUNC
+#endif
+
#endif