summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhathach <[email protected]>2020-04-08 16:47:20 +0700
committerhathach <[email protected]>2020-04-08 16:47:20 +0700
commit40e23672ff192b3d0ab1312987ecc94d4e0de0e7 (patch)
treec204f32c3482f406d77816835fe57328ef18f3c9
parente879ad1e6f6535768ebcf05f02f30a8266518276 (diff)
rename hal_dcd_isr to dcd_irq_handler for fomu
-rw-r--r--hw/bsp/fomu/board.mk5
-rw-r--r--hw/bsp/fomu/fomu.c8
-rw-r--r--src/portable/valentyusb/eptri/dcd_eptri.c2
-rw-r--r--src/portable/valentyusb/eptri/hal_eptri.c33
4 files changed, 4 insertions, 44 deletions
diff --git a/hw/bsp/fomu/board.mk b/hw/bsp/fomu/board.mk
index 403a7fb95..ffd0158c9 100644
--- a/hw/bsp/fomu/board.mk
+++ b/hw/bsp/fomu/board.mk
@@ -14,11 +14,6 @@ BSP_DIR = hw/bsp/fomu
# All source paths should be relative to the top level.
LD_FILE = hw/bsp/$(BOARD)/fomu.ld
-# TODO remove later
-SRC_C += src/portable/$(VENDOR)/$(CHIP_FAMILY)/hal_$(CHIP_FAMILY).c
-
-SRC_C +=
-
SRC_S += hw/bsp/fomu/crt0-vexriscv.S
INC += \
diff --git a/hw/bsp/fomu/fomu.c b/hw/bsp/fomu/fomu.c
index 519c63630..404b72333 100644
--- a/hw/bsp/fomu/fomu.c
+++ b/hw/bsp/fomu/fomu.c
@@ -26,7 +26,7 @@
#include <stdint.h>
#include <stdbool.h>
-#include "common/tusb_common.h"
+#include "../board.h"
#include "csr.h"
#include "irq.h"
@@ -34,8 +34,6 @@
// Board porting API
//--------------------------------------------------------------------+
-void hal_dcd_isr(uint8_t rhport);
-
void fomu_error(uint32_t line)
{
(void)line;
@@ -65,7 +63,7 @@ void isr(void)
#if CFG_TUSB_RHPORT0_MODE == OPT_MODE_DEVICE
if (irqs & (1 << USB_INTERRUPT)) {
- hal_dcd_isr(0);
+ tud_irq_handler(0);
}
#endif
if (irqs & (1 << TIMER0_INTERRUPT)) {
@@ -114,4 +112,4 @@ uint32_t board_millis(void)
{
return system_ticks;
}
-#endif \ No newline at end of file
+#endif
diff --git a/src/portable/valentyusb/eptri/dcd_eptri.c b/src/portable/valentyusb/eptri/dcd_eptri.c
index f1b79dcfd..1054e71d6 100644
--- a/src/portable/valentyusb/eptri/dcd_eptri.c
+++ b/src/portable/valentyusb/eptri/dcd_eptri.c
@@ -613,7 +613,7 @@ static void handle_setup(void)
usb_setup_ev_pending_write(1);
}
-void hal_dcd_isr(uint8_t rhport)
+void dcd_irq_handler(uint8_t rhport)
{
(void)rhport;
uint8_t next_ev;
diff --git a/src/portable/valentyusb/eptri/hal_eptri.c b/src/portable/valentyusb/eptri/hal_eptri.c
deleted file mode 100644
index 72453affa..000000000
--- a/src/portable/valentyusb/eptri/hal_eptri.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2019 Ha Thach (tinyusb.org)
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- *
- * This file is part of the TinyUSB stack.
- */
-
-#include "common/tusb_common.h"
-
-#if (CFG_TUSB_MCU == OPT_MCU_VALENTYUSB_EPTRI)
-
-// No HAL-specific stuff here!
-
-#endif