summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGordon McNab <[email protected]>2021-10-06 16:50:55 +0100
committerGordon McNab <[email protected]>2021-10-06 16:50:55 +0100
commit37c5eeb51de532dfbd46ae528d4d99220932d6bd (patch)
treefd1ba4836268b1897c545f9b1748a3c1aa6ae348
parentbcecbfdc29f58ac019a36099a8c398650cd27191 (diff)
Rename directories to indicate that FT930 and FT900 devices are both covered by the same SDK and src/portable code. Board makefile includes __FT900__ macro for FT90x and __FT930__ macro for boards with FT93x.
-rw-r--r--hw/bsp/brtmm90x/family.c6
-rw-r--r--hw/bsp/brtmm90x/family.mk14
-rw-r--r--hw/mcu/bridgetek/ft9xx/Readme.md (renamed from hw/mcu/bridgetek/ft90x/Readme.md)7
-rw-r--r--hw/mcu/bridgetek/ft9xx/hardware/scripts/crt0.S (renamed from hw/mcu/bridgetek/ft90x/hardware/scripts/crt0.S)0
-rw-r--r--hw/mcu/bridgetek/ft9xx/hardware/scripts/ldscript.ld (renamed from hw/mcu/bridgetek/ft90x/hardware/scripts/ldscript.ld)0
-rw-r--r--src/portable/bridgetek/ft9xx/dcd_ft9xx.c (renamed from src/portable/bridgetek/ft90x/dcd_ft90x.c)2
6 files changed, 14 insertions, 15 deletions
diff --git a/hw/bsp/brtmm90x/family.c b/hw/bsp/brtmm90x/family.c
index 010704d92..6352f2324 100644
--- a/hw/bsp/brtmm90x/family.c
+++ b/hw/bsp/brtmm90x/family.c
@@ -28,7 +28,6 @@
#include <ft900.h>
#include "bsp/board.h"
#include "board.h"
-//#include "src/device/dcd.h"
#if TUSB_OPT_DEVICE_ENABLED
int8_t board_ft90x_vbus(void); // Board specific implementation of VBUS detection for USB device.
@@ -67,16 +66,17 @@ void board_init(void)
#if 1
gpio_function(GPIO_ETH_LED0, pad_gpio4); /* ETH LED0 */
gpio_dir(GPIO_ETH_LED0, pad_dir_open_drain);
- gpio_function(GPIO_ETH_LED1, pad_gpio5); /* ETH LED0 */
+ gpio_function(GPIO_ETH_LED1, pad_gpio5); /* ETH LED1 */
gpio_dir(GPIO_ETH_LED1, pad_dir_output);
#endif
+
sys_enable(sys_device_timer_wdt);
- interrupt_attach(interrupt_timers, (int8_t)interrupt_timers, timer_ISR);
/* Timer A = 1ms */
timer_prescaler(timer_select_a, 1000);
timer_init(timer_select_a, 100, timer_direction_down, timer_prescaler_select_on, timer_mode_continuous);
timer_enable_interrupt(timer_select_a);
timer_start(timer_select_a);
+ interrupt_attach(interrupt_timers, (int8_t)interrupt_timers, timer_ISR);
// Setup VBUS detect GPIO. If the device is connected then this
// will set the MASK_SYS_PMCFG_DEV_DETECT_EN bit in PMCFG.
diff --git a/hw/bsp/brtmm90x/family.mk b/hw/bsp/brtmm90x/family.mk
index 57a141506..42769c254 100644
--- a/hw/bsp/brtmm90x/family.mk
+++ b/hw/bsp/brtmm90x/family.mk
@@ -1,10 +1,10 @@
CROSS_COMPILE = ft32-elf-
-DEPS_SUBMODULES += hw/mcu/bridgetek/ft90x/hardware
+DEPS_SUBMODULES += hw/mcu/bridgetek/ft9xx/hardware
SKIP_NANOLIB = 1
# This is installed at "C:/Program Files(x86)/Bridgetek/FT9xx Toolchain/Toolchain/hardware"
-FT90X_SDK = $(TOP)/hw/mcu/bridgetek/ft90x/hardware
+FT9XX_SDK = $(TOP)/hw/mcu/bridgetek/ft9xx/hardware
CFLAGS += \
-D__FT900__ \
@@ -19,17 +19,17 @@ CFLAGS += -Wno-error=shadow
CFLAGS:=$(filter-out -Wcast-function-type,$(CFLAGS))
# All source paths should be relative to the top level.
-LDINC += $(FT90X_SDK)/lib/Release
+LDINC += $(FT9XX_SDK)/lib/Release
LIBS += -lft900
-LD_FILE = hw/mcu/bridgetek/ft90x/hardware/scripts/ldscript.ld
+LD_FILE = hw/mcu/bridgetek/ft9xx/hardware/scripts/ldscript.ld
LDFLAGS += $(addprefix -L,$(LDINC)) \
-Xlinker --entry=_start \
-Wl,-lc
-SRC_C += src/portable/bridgetek/ft90x/dcd_ft90x.c
+SRC_C += src/portable/bridgetek/ft9xx/dcd_ft9xx.c
-#SRC_S += hw/mcu/bridgetek/ft90x/hardware/scripts/crt0.S
+#SRC_S += hw/mcu/bridgetek/ft9xx/hardware/scripts/crt0.S
INC += \
- $(FT90X_SDK)/include \
+ $(FT9XX_SDK)/include \
$(TOP)/$(BOARD_PATH)
diff --git a/hw/mcu/bridgetek/ft90x/Readme.md b/hw/mcu/bridgetek/ft9xx/Readme.md
index e197f182e..1db91058c 100644
--- a/hw/mcu/bridgetek/ft90x/Readme.md
+++ b/hw/mcu/bridgetek/ft9xx/Readme.md
@@ -1,6 +1,7 @@
# BridgeTek FT9xx MCU
**BridgeTek** provides a hardware abstraction library with software source code for the SDKs for FT9xx software family.
-The pre-built libraries and the source code can be redistributed.
-Registers definition files `<sdk>/include/registers/ft900_registers.h` and included peripheral register definition files have licenses that allow for redistribution.
-Whole SDK repository is installed as part of the FT9xx Toolchain and can be downloaded from BridgeTek web page `https://www.brtchip.com`
+
+Whole SDK repository is installed as part of the FT9xx Toolchain and can be downloaded from BridgeTek web page `https://www.brtchip.com`.
+
+Registers definition files, and included peripheral register definition files have licenses that allow for redistribution.
diff --git a/hw/mcu/bridgetek/ft90x/hardware/scripts/crt0.S b/hw/mcu/bridgetek/ft9xx/hardware/scripts/crt0.S
index 62fa266ee..62fa266ee 100644
--- a/hw/mcu/bridgetek/ft90x/hardware/scripts/crt0.S
+++ b/hw/mcu/bridgetek/ft9xx/hardware/scripts/crt0.S
diff --git a/hw/mcu/bridgetek/ft90x/hardware/scripts/ldscript.ld b/hw/mcu/bridgetek/ft9xx/hardware/scripts/ldscript.ld
index d1b4d46cd..d1b4d46cd 100644
--- a/hw/mcu/bridgetek/ft90x/hardware/scripts/ldscript.ld
+++ b/hw/mcu/bridgetek/ft9xx/hardware/scripts/ldscript.ld
diff --git a/src/portable/bridgetek/ft90x/dcd_ft90x.c b/src/portable/bridgetek/ft9xx/dcd_ft9xx.c
index ac13f11d1..69b51fac7 100644
--- a/src/portable/bridgetek/ft90x/dcd_ft90x.c
+++ b/src/portable/bridgetek/ft9xx/dcd_ft9xx.c
@@ -524,8 +524,6 @@ void dcd_init(uint8_t rhport)
_dcd_ft90x_attach();
- //_ft90x_reset_edpts(void);//tu_memclr(ep_xfer, sizeof(ep_xfer));
-
interrupt_attach(interrupt_usb_device, (int8_t)interrupt_usb_device, _ft90x_usbd_ISR);
dcd_connect(rhport);