summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorhathach <[email protected]>2019-11-21 22:20:30 +0700
committerhathach <[email protected]>2019-11-21 22:20:30 +0700
commitbbec47b647ab7b2e38644ffff60f45b54b791d42 (patch)
tree28bdbae7b6b7874b3349358b67362fdee8dce55e /hw
parent9fe34c2e622ed8b1333839aae7b823d87e78f0ea (diff)
adding tud_isr/tuh_isr with lpc18/43
Diffstat (limited to 'hw')
-rw-r--r--hw/bsp/ea4357/board.mk3
-rw-r--r--hw/bsp/ea4357/ea4357.c25
-rw-r--r--hw/bsp/mcb1800/board.mk3
-rw-r--r--hw/bsp/mcb1800/mcb1800.c25
-rw-r--r--hw/bsp/ngx4330/board.mk3
-rw-r--r--hw/bsp/ngx4330/ngx4330.c25
6 files changed, 75 insertions, 9 deletions
diff --git a/hw/bsp/ea4357/board.mk b/hw/bsp/ea4357/board.mk
index 8e7367fa4..8c3cfd822 100644
--- a/hw/bsp/ea4357/board.mk
+++ b/hw/bsp/ea4357/board.mk
@@ -16,9 +16,6 @@ MCU_DIR = hw/mcu/nxp/lpcopen/lpc43xx/lpc_chip_43xx
# All source paths should be relative to the top level.
LD_FILE = hw/bsp/ea4357/lpc4357.ld
-# TODO remove later
-SRC_C += src/portable/$(VENDOR)/$(CHIP_FAMILY)/hal_$(CHIP_FAMILY).c
-
SRC_C += \
$(MCU_DIR)/../gcc/cr_startup_lpc43xx.c \
$(MCU_DIR)/src/chip_18xx_43xx.c \
diff --git a/hw/bsp/ea4357/ea4357.c b/hw/bsp/ea4357/ea4357.c
index c276f10d3..e8252f210 100644
--- a/hw/bsp/ea4357/ea4357.c
+++ b/hw/bsp/ea4357/ea4357.c
@@ -231,6 +231,31 @@ void board_init(void)
}
//--------------------------------------------------------------------+
+// USB Interrupt Handler
+//--------------------------------------------------------------------+
+void USB0_IRQHandler(void)
+{
+ #if TUSB_OPT_HOST_ENABLED
+ tuh_isr(0);
+ #endif
+
+ #if TUSB_OPT_DEVICE_ENABLED
+ tud_isr(0);
+ #endif
+}
+
+void USB1_IRQHandler(void)
+{
+ #if TUSB_OPT_HOST_ENABLED
+ tuh_isr(1);
+ #endif
+
+ #if TUSB_OPT_DEVICE_ENABLED
+ tud_isr(1);
+ #endif
+}
+
+//--------------------------------------------------------------------+
// Board porting API
//--------------------------------------------------------------------+
diff --git a/hw/bsp/mcb1800/board.mk b/hw/bsp/mcb1800/board.mk
index 2a0401305..953f5943a 100644
--- a/hw/bsp/mcb1800/board.mk
+++ b/hw/bsp/mcb1800/board.mk
@@ -16,9 +16,6 @@ MCU_DIR = hw/mcu/nxp/lpcopen/lpc18xx/lpc_chip_18xx
# All source paths should be relative to the top level.
LD_FILE = hw/bsp/mcb1800/lpc1857.ld
-# TODO remove later
-SRC_C += src/portable/$(VENDOR)/$(CHIP_FAMILY)/hal_$(CHIP_FAMILY).c
-
SRC_C += \
$(MCU_DIR)/../gcc/cr_startup_lpc18xx.c \
$(MCU_DIR)/src/chip_18xx_43xx.c \
diff --git a/hw/bsp/mcb1800/mcb1800.c b/hw/bsp/mcb1800/mcb1800.c
index deb17f113..4e75c10dd 100644
--- a/hw/bsp/mcb1800/mcb1800.c
+++ b/hw/bsp/mcb1800/mcb1800.c
@@ -173,6 +173,31 @@ void board_init(void)
}
//--------------------------------------------------------------------+
+// USB Interrupt Handler
+//--------------------------------------------------------------------+
+void USB0_IRQHandler(void)
+{
+ #if TUSB_OPT_HOST_ENABLED
+ tuh_isr(0);
+ #endif
+
+ #if TUSB_OPT_DEVICE_ENABLED
+ tud_isr(0);
+ #endif
+}
+
+void USB1_IRQHandler(void)
+{
+ #if TUSB_OPT_HOST_ENABLED
+ tuh_isr(1);
+ #endif
+
+ #if TUSB_OPT_DEVICE_ENABLED
+ tud_isr(1);
+ #endif
+}
+
+//--------------------------------------------------------------------+
// Board porting API
//--------------------------------------------------------------------+
diff --git a/hw/bsp/ngx4330/board.mk b/hw/bsp/ngx4330/board.mk
index 4e6032fcc..863a4966d 100644
--- a/hw/bsp/ngx4330/board.mk
+++ b/hw/bsp/ngx4330/board.mk
@@ -16,9 +16,6 @@ MCU_DIR = hw/mcu/nxp/lpcopen/lpc43xx/lpc_chip_43xx
# All source paths should be relative to the top level.
LD_FILE = hw/bsp/$(BOARD)/ngx4330.ld
-# TODO remove later
-SRC_C += src/portable/$(VENDOR)/$(CHIP_FAMILY)/hal_$(CHIP_FAMILY).c
-
SRC_C += \
$(MCU_DIR)/../gcc/cr_startup_lpc43xx.c \
$(MCU_DIR)/src/chip_18xx_43xx.c \
diff --git a/hw/bsp/ngx4330/ngx4330.c b/hw/bsp/ngx4330/ngx4330.c
index 669180026..e95f6b059 100644
--- a/hw/bsp/ngx4330/ngx4330.c
+++ b/hw/bsp/ngx4330/ngx4330.c
@@ -220,6 +220,31 @@ void board_init(void)
}
//--------------------------------------------------------------------+
+// USB Interrupt Handler
+//--------------------------------------------------------------------+
+void USB0_IRQHandler(void)
+{
+ #if TUSB_OPT_HOST_ENABLED
+ tuh_isr(0);
+ #endif
+
+ #if TUSB_OPT_DEVICE_ENABLED
+ tud_isr(0);
+ #endif
+}
+
+void USB1_IRQHandler(void)
+{
+ #if TUSB_OPT_HOST_ENABLED
+ tuh_isr(1);
+ #endif
+
+ #if TUSB_OPT_DEVICE_ENABLED
+ tud_isr(1);
+ #endif
+}
+
+//--------------------------------------------------------------------+
// Board porting API
//--------------------------------------------------------------------+