Skip to content

Commit 1a7bbcc

Browse files
committed
add macro for socfpga in tinyusb
Signed-off-by: souravr <sourav.raj@ignitarium.com>
1 parent e321a02 commit 1a7bbcc

3 files changed

Lines changed: 8 additions & 1 deletion

File tree

src/common/tusb_mcu.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -621,6 +621,11 @@
621621
#define TUP_USBIP_DWC2_AT32
622622
#define TUP_DCD_ENDPOINT_MAX 8
623623

624+
#elif TU_CHECK_MCU(OPT_MCU_SOCFPGA)
625+
#define TUP_USBIP_DWC2
626+
#define CFG_TUSB_MEM_DCACHE_LINE_SIZE_DEFAULT 64
627+
#endif
628+
624629
#endif
625630

626631
//--------------------------------------------------------------------+

src/osal/osal_freertos.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ typedef struct {
8383
//--------------------------------------------------------------------+
8484
// TASK API
8585
//--------------------------------------------------------------------+
86-
TU_ATTR_ALWAYS_INLINE static inline uint32_t _osal_ms2tick(uint32_t msec) {
86+
TU_ATTR_ALWAYS_INLINE static inline uint64_t _osal_ms2tick(uint32_t msec) {
8787
if (msec == OSAL_TIMEOUT_WAIT_FOREVER) { return portMAX_DELAY; }
8888
if (msec == 0) { return 0; }
8989

src/tusb_option.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,8 @@
214214
#define OPT_MCU_AT32F425 2505 ///< ArteryTek AT32F425
215215
#define OPT_MCU_AT32F413 2506 ///< ArteryTek AT32F413
216216

217+
#define OPT_MCU_SOCFPGA 2600 ///< Altera Agilex5 SoC FPGA
218+
217219
// Check if configured MCU is one of listed
218220
// Apply _TU_CHECK_MCU with || as separator to list of input
219221
#define _TU_CHECK_MCU(_m) (CFG_TUSB_MCU == _m)

0 commit comments

Comments
 (0)