diff options
| author | Martino Facchin <[email protected]> | 2023-05-03 10:06:13 +0200 |
|---|---|---|
| committer | Martino Facchin <[email protected]> | 2023-05-03 10:06:13 +0200 |
| commit | 5f7e7b4b0a9f65a401c679d5045b96b4b56755df (patch) | |
| tree | 5b47eb1c03388ab0fe9071145e89eb11d5461aa7 /src | |
| parent | 4afed62646d18dd96eef619d7d21b47a2422672f (diff) | |
renesas_ra: support RA2A1 (FS only)
Diffstat (limited to 'src')
| -rw-r--r-- | src/portable/renesas/rusb2/dcd_rusb2.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/portable/renesas/rusb2/dcd_rusb2.c b/src/portable/renesas/rusb2/dcd_rusb2.c index 9ae36e253..f3bda5205 100644 --- a/src/portable/renesas/rusb2/dcd_rusb2.c +++ b/src/portable/renesas/rusb2/dcd_rusb2.c @@ -41,6 +41,15 @@ #include "rusb2_rx.h" #elif TU_CHECK_MCU(OPT_MCU_RAXXX) #include "rusb2_ra.h" + #if defined(RENESAS_CORTEX_M23) + #define D0FIFO CFIFO + #define D0FIFOSEL CFIFOSEL + #define D0FIFOSEL_b CFIFOSEL_b + #define D1FIFOSEL CFIFOSEL + #define D1FIFOSEL_b CFIFOSEL_b + #define D0FIFOCTR CFIFOCTR + #define D0FIFOCTR_b CFIFOCTR_b + #endif #else #error "Unsupported MCU" #endif @@ -121,6 +130,10 @@ typedef struct //--------------------------------------------------------------------+ static dcd_data_t _dcd; +#ifndef FIRST_BULK_PIPE +#define FIRST_BULK_PIPE 3 +#endif + static unsigned find_pipe(unsigned xfer) { switch (xfer) { @@ -130,7 +143,7 @@ static unsigned find_pipe(unsigned xfer) } break; case TUSB_XFER_BULK: - for (int i = 3; i <= 5; ++i) { + for (int i = FIRST_BULK_PIPE; i <= 5; ++i) { if (0 == _dcd.pipe[i].ep) return i; } for (int i = 1; i <= 1; ++i) { |
