summaryrefslogtreecommitdiff
path: root/src/tusb_option.h
diff options
context:
space:
mode:
authorhathach <[email protected]>2025-11-21 12:58:28 +0700
committerhathach <[email protected]>2025-11-21 12:58:28 +0700
commitd4cdc096caa9c662f77f5633a792335f74fdad97 (patch)
tree1a0a53871738c45d47822d778e94057bac47731d /src/tusb_option.h
parent30198b2ab9e69c120e5b49c063dad3d2d3889d79 (diff)
add more unit tests for tu_fifo
Diffstat (limited to 'src/tusb_option.h')
-rw-r--r--src/tusb_option.h26
1 files changed, 16 insertions, 10 deletions
diff --git a/src/tusb_option.h b/src/tusb_option.h
index dd5f17dfc..e2eaecd2d 100644
--- a/src/tusb_option.h
+++ b/src/tusb_option.h
@@ -24,8 +24,7 @@
* This file is part of the TinyUSB stack.
*/
-#ifndef TUSB_OPTION_H_
-#define TUSB_OPTION_H_
+#pragma once
#include "common/tusb_compiler.h"
@@ -305,15 +304,26 @@
#define CFG_TUH_DWC2_DMA_ENABLE CFG_TUH_DWC2_DMA_ENABLE_DEFAULT
#endif
-#if defined(TUP_USBIP_DWC2) && CFG_TUD_DWC2_SLAVE_ENABLE == 1
-#define TUP_DCD_EDPT_DEDICATED_FIFO
+#if defined(TUP_USBIP_DWC2)
+ #if CFG_TUD_DWC2_SLAVE_ENABLE
+ #define CFG_TUD_EDPT_DEDICATED_FIFO
+ #endif
+
+ #if CFG_TUD_DWC2_SLAVE_ENABLE
+ #define CFG_TUH_EDPT_DEDICATED_FIFO
+ #endif
+#endif
+
+#if defined(CFG_TUD_EDPT_DEDICATED_FIFO) || defined(CFG_TUH_EDPT_DEDICATED_FIFO)
+ #define CFG_TUSB_FIFO_ACCESS_FIXED_ADDR_RW32
#endif
//------------- ChipIdea -------------//
-// Enable CI_HS VBUS Charge. Set this to 1 if the USB_VBUS pin is not connected to 5V VBUS (note: 3.3V is insufficient).
+// Enable CI_HS VBUS Charge. Set this to 1 if the USB_VBUS pin is not connected to 5V VBUS (note: 3.3V is
+// insufficient).
#ifndef CFG_TUD_CI_HS_VBUS_CHARGE
#ifndef CFG_TUD_CI_HS_VBUS_CHARGE_DEFAULT
- #define CFG_TUD_CI_HS_VBUS_CHARGE_DEFAULT 0
+ #define CFG_TUD_CI_HS_VBUS_CHARGE_DEFAULT 0
#endif
#define CFG_TUD_CI_HS_VBUS_CHARGE CFG_TUD_CI_HS_VBUS_CHARGE_DEFAULT
@@ -738,7 +748,3 @@
// To avoid GCC compiler warnings when -pedantic option is used (strict ISO C)
typedef int make_iso_compilers_happy;
-
-#endif /* TUSB_OPTION_H_ */
-
-/** @} */