diff --git a/hw/bsp/fomu/board.mk b/hw/bsp/fomu/board.mk index 403a7fb9..ffd0158c 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 519c6363..404b7233 100644 --- a/hw/bsp/fomu/fomu.c +++ b/hw/bsp/fomu/fomu.c @@ -26,7 +26,7 @@ #include #include -#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 f1b79dcf..1054e71d 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 72453aff..00000000 --- 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