summaryrefslogtreecommitdiff
path: root/src/portable/mentor
diff options
context:
space:
mode:
authorhathach <[email protected]>2024-10-14 18:27:52 +0700
committerhathach <[email protected]>2024-10-14 18:27:52 +0700
commit1f18be93db39dbc57bbf34f982dbe07e209a2ae3 (patch)
tree4da021608772f07fba9105da956112e495d9eeb9 /src/portable/mentor
parent1587d48e89cbaa8d0d1c870809bc40c3c8d1056f (diff)
change the tusb_rhport_init_t struct, exclude the rhport to make API more consistent
Diffstat (limited to 'src/portable/mentor')
-rw-r--r--src/portable/mentor/musb/dcd_musb.c4
-rw-r--r--src/portable/mentor/musb/hcd_musb.c3
2 files changed, 4 insertions, 3 deletions
diff --git a/src/portable/mentor/musb/dcd_musb.c b/src/portable/mentor/musb/dcd_musb.c
index a8437ad5b..02c8da1e0 100644
--- a/src/portable/mentor/musb/dcd_musb.c
+++ b/src/portable/mentor/musb/dcd_musb.c
@@ -582,8 +582,8 @@ void print_musb_info(musb_regs_t* musb_regs) {
}
#endif
-void dcd_init(const tusb_rhport_init_t* rh_init) {
- const uint8_t rhport = rh_init->rhport;
+void dcd_init(uint8_t rhport, const tusb_rhport_init_t* rh_init) {
+ (void) rh_init;
musb_regs_t* musb_regs = MUSB_REGS(rhport);
#if CFG_TUSB_DEBUG >= MUSB_DEBUG
diff --git a/src/portable/mentor/musb/hcd_musb.c b/src/portable/mentor/musb/hcd_musb.c
index 9324c6a34..1c0740193 100644
--- a/src/portable/mentor/musb/hcd_musb.c
+++ b/src/portable/mentor/musb/hcd_musb.c
@@ -556,7 +556,8 @@ static void process_pipe_rx(uint8_t rhport, uint_fast8_t pipenum)
* Host API
*------------------------------------------------------------------*/
-bool hcd_init(const tusb_rhport_init_t* rh_init) {
+bool hcd_init(uint8_t rhport, const tusb_rhport_init_t* rh_init) {
+ (void) rhport;
(void) rh_init;
NVIC_ClearPendingIRQ(USB0_IRQn);