Skip to content

Commit c796dcf

Browse files
committed
Merge branch 'support_renesas_with_different_pipe_number' into wait_for_PR_on_master
2 parents 7ce4cfa + 0658c08 commit c796dcf

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

Diff for: src/portable/renesas/rusb2/dcd_rusb2.c

+21-3
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,24 @@ static dcd_data_t _dcd;
8989
// INTERNAL OBJECT & FUNCTION DECLARATION
9090
//--------------------------------------------------------------------+
9191

92+
#ifndef FIRST_BULK_PIPE
93+
#define FIRST_BULK_PIPE 3
94+
#endif
95+
96+
#ifndef FIRST_INTERRUPT_PIPE
97+
#define FIRST_INTERRUPT_PIPE 6
98+
#endif
99+
100+
#ifndef NUMBER_OF_PIPES
101+
#define NUMBER_OF_PIPES 10
102+
#endif
103+
104+
#ifdef NO_ISOCRONOUS_PIPE
105+
#define FIRST_PIPE FIRST_BULK_PIPE
106+
#else
107+
#define FIRST_PIPE 1
108+
#endif
109+
92110
// Transfer conditions specifiable for each pipe:
93111
// - Pipe 0: Control transfer with 64-byte single buffer
94112
// - Pipes 1 and 2: Bulk isochronous transfer continuous transfer mode with programmable buffer size up
@@ -97,9 +115,9 @@ static dcd_data_t _dcd;
97115
// optional double buffer
98116
// - Pipes 6 to 9: Interrupt transfer with 64-byte single buffer
99117
enum {
100-
PIPE_1ST_BULK = 3,
101-
PIPE_1ST_INTERRUPT = 6,
102-
PIPE_COUNT = 10,
118+
PIPE_1ST_BULK = FIRST_BULK_PIPE,
119+
PIPE_1ST_INTERRUPT = FIRST_INTERRUPT_PIPE,
120+
PIPE_COUNT = NUMBER_OF_PIPES,
103121
};
104122

105123
static unsigned find_pipe(unsigned xfer)

0 commit comments

Comments
 (0)