summaryrefslogtreecommitdiff
path: root/src/tusb_option.h
diff options
context:
space:
mode:
authorCédric Berger <[email protected]>2026-02-01 21:08:03 +0100
committerCédric Berger <[email protected]>2026-02-01 21:08:03 +0100
commitb73df6c22e4743f9232f7922fe2cf0fbd05a3a2e (patch)
treecbc738198112e8563fe85e7b78dfdd48c095a01d /src/tusb_option.h
parentdc00f3536f7f636ffea639430faa2d828317137c (diff)
Limit events processed by tud_task_ext() / tuh_task_ext()
Diffstat (limited to 'src/tusb_option.h')
-rw-r--r--src/tusb_option.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/tusb_option.h b/src/tusb_option.h
index abf5e0608..d34f2b710 100644
--- a/src/tusb_option.h
+++ b/src/tusb_option.h
@@ -560,6 +560,11 @@
#define CFG_TUD_INTERFACE_MAX 16
#endif
+// max events processed in one tud_task_ext() call, 0 for unlimited
+#ifndef CFG_TUD_TASK_EVENTS_PER_RUN
+ #define CFG_TUD_TASK_EVENTS_PER_RUN 16
+#endif
+
// default to max hardware endpoint, but can be smaller to save RAM
#ifndef CFG_TUD_ENDPPOINT_MAX
#define CFG_TUD_ENDPPOINT_MAX TUP_DCD_ENDPOINT_MAX
@@ -679,6 +684,11 @@
#define CFG_TUH_MEM_DCACHE_LINE_SIZE CFG_TUSB_MEM_DCACHE_LINE_SIZE
#endif
+// max events processed in one tuh_task_ext() call, 0 for unlimited
+#ifndef CFG_TUH_TASK_EVENTS_PER_RUN
+ #define CFG_TUH_TASK_EVENTS_PER_RUN 16
+#endif
+
//------------- CLASS -------------//
#ifndef CFG_TUH_HUB