|
34 | 34 | // COMMON CONFIGURATION
|
35 | 35 | //--------------------------------------------------------------------
|
36 | 36 |
|
37 |
| -// defined by board.mk |
38 | 37 | #ifndef CFG_TUSB_MCU
|
39 |
| - #error CFG_TUSB_MCU must be defined |
| 38 | + #define CFG_TUSB_MCU OPT_MCU_RP2040 |
40 | 39 | #endif
|
41 | 40 |
|
42 |
| -// RHPort number used for device can be defined by board.mk, default to port 0 |
43 |
| -#ifndef BOARD_DEVICE_RHPORT_NUM |
44 |
| - #define BOARD_DEVICE_RHPORT_NUM 0 |
45 |
| -#endif |
46 |
| - |
47 |
| -// RHPort max operational speed can defined by board.mk |
48 |
| -// Default to Highspeed for MCU with internal HighSpeed PHY (can be port specific), otherwise FullSpeed |
49 |
| -#ifndef BOARD_DEVICE_RHPORT_SPEED |
50 |
| - #if (CFG_TUSB_MCU == OPT_MCU_LPC18XX || CFG_TUSB_MCU == OPT_MCU_LPC43XX || CFG_TUSB_MCU == OPT_MCU_MIMXRT10XX || \ |
51 |
| - CFG_TUSB_MCU == OPT_MCU_NUC505 || CFG_TUSB_MCU == OPT_MCU_CXD56) |
52 |
| - #define BOARD_DEVICE_RHPORT_SPEED OPT_MODE_HIGH_SPEED |
53 |
| - #else |
54 |
| - #define BOARD_DEVICE_RHPORT_SPEED OPT_MODE_FULL_SPEED |
55 |
| - #endif |
56 |
| -#endif |
57 |
| - |
58 |
| -// Device mode with rhport and speed defined by board.mk |
59 |
| -#if BOARD_DEVICE_RHPORT_NUM == 0 |
60 |
| - #define CFG_TUSB_RHPORT0_MODE (OPT_MODE_DEVICE | BOARD_DEVICE_RHPORT_SPEED) |
61 |
| -#elif BOARD_DEVICE_RHPORT_NUM == 1 |
62 |
| - #define CFG_TUSB_RHPORT1_MODE (OPT_MODE_DEVICE | BOARD_DEVICE_RHPORT_SPEED) |
63 |
| -#else |
64 |
| - #error "Incorrect RHPort configuration" |
65 |
| -#endif |
66 |
| - |
67 |
| -// This example doesn't use an RTOS |
68 |
| -//#define CFG_TUSB_OS OPT_OS_NONE |
| 41 | +#define CFG_TUSB_RHPORT0_MODE OPT_MODE_DEVICE |
| 42 | +#define CFG_TUSB_OS OPT_OS_PICO |
69 | 43 |
|
70 | 44 | // CFG_TUSB_DEBUG is defined by compiler in DEBUG build
|
71 |
| -// #define CFG_TUSB_DEBUG 0 |
| 45 | +#ifndef CFG_TUSB_DEBUG |
| 46 | +#define CFG_TUSB_DEBUG 0 |
| 47 | +#endif |
72 | 48 |
|
73 | 49 | /* USB DMA on some MCUs can only access a specific SRAM region with restriction on alignment.
|
74 | 50 | * Tinyusb use follows macros to declare transferring memory so that they can be put
|
|
0 commit comments