Skip to content

Commit ec6f567

Browse files
committed
mimxrt: Change OPT_MCU_MIMXRT1xXX to OPT_MCU_MIMXRT.
Which fits both MIMXRT10XX and MIMXRT11XX.
1 parent 60c1750 commit ec6f567

File tree

11 files changed

+18
-19
lines changed

11 files changed

+18
-19
lines changed

hw/bsp/board_mcu.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
#elif CFG_TUSB_MCU == OPT_MCU_VALENTYUSB_EPTRI
111111
// no header needed
112112

113-
#elif CFG_TUSB_MCU == OPT_MCU_MIMXRT10XX || CFG_TUSB_MCU == OPT_MCU_MIMXRT11XX
113+
#elif CFG_TUSB_MCU == OPT_MCU_MIMXRT
114114
#include "fsl_device_registers.h"
115115

116116
#elif CFG_TUSB_MCU == OPT_MCU_NUC120

hw/bsp/f1c100s/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ Flash: `make BOARD=f1c100s flash` will write the image to SPI flash, and then re
1717

1818
## TODO
1919

20-
* Add F1C100s to `#if CFG_TUSB_MCU == OPT_MCU_LPC43XX || CFG_TUSB_MCU == OPT_MCU_LPC18XX || CFG_TUSB_MCU == OPT_MCU_MIMXRT10XX` high speed MCU check in examples (maybe we should extract the logic?)
20+
* Add F1C100s to `#if CFG_TUSB_MCU == OPT_MCU_LPC43XX || CFG_TUSB_MCU == OPT_MCU_LPC18XX || CFG_TUSB_MCU == OPT_MCU_MIMXRT` high speed MCU check in examples (maybe we should extract the logic?)

hw/bsp/imxrt/family.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ CFLAGS += \
1313
-D__ARMVFP__=0 -D__ARMFPV5__=0\
1414
-DXIP_EXTERNAL_FLASH=1 \
1515
-DXIP_BOOT_HEADER_ENABLE=1 \
16-
-DCFG_TUSB_MCU=OPT_MCU_MIMXRT10XX
16+
-DCFG_TUSB_MCU=OPT_MCU_MIMXRT
1717

1818
ifdef BOARD_TUD_RHPORT
1919
CFLAGS += -DBOARD_TUD_RHPORT=$(BOARD_TUD_RHPORT)

src/class/audio/audio_device.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666

6767
// Use ring buffer if it's available, some MCUs need extra RAM requirements
6868
#ifndef TUD_AUDIO_PREFER_RING_BUFFER
69-
#if CFG_TUSB_MCU == OPT_MCU_LPC43XX || CFG_TUSB_MCU == OPT_MCU_LPC18XX || CFG_TUSB_MCU == OPT_MCU_MIMXRT10XX || CFG_TUSB_MCU == OPT_MCU_MIMXRT11XX
69+
#if CFG_TUSB_MCU == OPT_MCU_LPC43XX || CFG_TUSB_MCU == OPT_MCU_LPC18XX || CFG_TUSB_MCU == OPT_MCU_MIMXRT
7070
#define TUD_AUDIO_PREFER_RING_BUFFER 0
7171
#else
7272
#define TUD_AUDIO_PREFER_RING_BUFFER 1
@@ -102,8 +102,7 @@
102102
CFG_TUSB_MCU == OPT_MCU_GD32VF103 || \
103103
CFG_TUSB_MCU == OPT_MCU_LPC18XX || \
104104
CFG_TUSB_MCU == OPT_MCU_LPC43XX || \
105-
CFG_TUSB_MCU == OPT_MCU_MIMXRT10XX || \
106-
CFG_TUSB_MCU == OPT_MCU_MIMXRT11XX || \
105+
CFG_TUSB_MCU == OPT_MCU_MIMXRT || \
107106
CFG_TUSB_MCU == OPT_MCU_MSP432E4
108107
#if TUD_AUDIO_PREFER_RING_BUFFER
109108
#define USE_LINEAR_BUFFER 0

src/common/tusb_mcu.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
// TODO USB0 has 5, USB1 has 6
7676
#define TUP_DCD_ENDPOINT_MAX 6
7777

78-
#elif TU_CHECK_MCU(OPT_MCU_MIMXRT10XX, OPT_MCU_MIMXRT11XX)
78+
#elif TU_CHECK_MCU(OPT_MCU_MIMXRT)
7979
#define TUP_USBIP_CHIPIDEA_HS
8080
#define TUP_USBIP_EHCI
8181

src/portable/chipidea/ci_hs/ci_hs_imxrt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
#include "fsl_device_registers.h"
3131

32-
#if CFG_TUSB_MCU == OPT_MCU_MIMXRT11XX
32+
#if !defined(USB1_BASE) && defined(USB_OTG1_BASE)
3333
#define USB1_BASE USB_OTG1_BASE
3434
#define USB2_BASE USB_OTG2_BASE
3535
#endif

src/portable/chipidea/ci_hs/dcd_ci_hs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#include "device/dcd.h"
3535
#include "ci_hs_type.h"
3636

37-
#if CFG_TUSB_MCU == OPT_MCU_MIMXRT10XX || CFG_TUSB_MCU == OPT_MCU_MIMXRT11XX
37+
#if CFG_TUSB_MCU == OPT_MCU_MIMXRT
3838
#include "ci_hs_imxrt.h"
3939
#elif TU_CHECK_MCU(OPT_MCU_LPC18XX, OPT_MCU_LPC43XX)
4040
#include "ci_hs_lpc18_43.h"

src/portable/chipidea/ci_hs/hcd_ci_hs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
// Chipidea Highspeed USB IP implement EHCI for host functionality
3030

3131
#if CFG_TUH_ENABLED && \
32-
(CFG_TUSB_MCU == OPT_MCU_LPC18XX || CFG_TUSB_MCU == OPT_MCU_LPC43XX || CFG_TUSB_MCU == OPT_MCU_MIMXRT10XX || CFG_TUSB_MCU == OPT_MCU_MIMXRT11XX)
32+
(CFG_TUSB_MCU == OPT_MCU_LPC18XX || CFG_TUSB_MCU == OPT_MCU_LPC43XX || CFG_TUSB_MCU == OPT_MCU_MIMXRT)
3333

3434
//--------------------------------------------------------------------+
3535
// INCLUDE
@@ -39,7 +39,7 @@
3939
#include "portable/ehci/ehci_api.h"
4040
#include "ci_hs_type.h"
4141

42-
#if CFG_TUSB_MCU == OPT_MCU_MIMXRT10XX
42+
#if CFG_TUSB_MCU == OPT_MCU_MIMXRT
4343
#include "ci_hs_imxrt.h"
4444
#elif TU_CHECK_MCU(OPT_MCU_LPC18XX, OPT_MCU_LPC43XX)
4545
#include "ci_hs_lpc18_43.h"

src/portable/nxp/transdimension/dcd_transdimension.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@
2727
#include "tusb_option.h"
2828

2929
#if CFG_TUD_ENABLED && \
30-
(CFG_TUSB_MCU == OPT_MCU_LPC18XX || CFG_TUSB_MCU == OPT_MCU_LPC43XX || CFG_TUSB_MCU == OPT_MCU_MIMXRT10XX)
30+
(CFG_TUSB_MCU == OPT_MCU_LPC18XX || CFG_TUSB_MCU == OPT_MCU_LPC43XX || CFG_TUSB_MCU == OPT_MCU_MIMXRT)
3131

3232
#warning "transdimenion is renamed to chipidea (portable/chipidea/ci_hs) to match other opensource naming convention such as linux. This file will be removed in the future, please update your makefile accordingly"
3333

3434
//--------------------------------------------------------------------+
3535
// INCLUDE
3636
//--------------------------------------------------------------------+
37-
#if CFG_TUSB_MCU == OPT_MCU_MIMXRT10XX
37+
#if CFG_TUSB_MCU == OPT_MCU_MIMXRT
3838
#include "fsl_device_registers.h"
3939
#define INCLUDE_FSL_DEVICE_REGISTERS
4040
#else
@@ -153,7 +153,7 @@ typedef struct
153153
const uint8_t ep_count; // Max bi-directional Endpoints
154154
}dcd_controller_t;
155155

156-
#if CFG_TUSB_MCU == OPT_MCU_MIMXRT10XX
156+
#if CFG_TUSB_MCU == OPT_MCU_MIMXRT
157157
static const dcd_controller_t _dcd_controller[] =
158158
{
159159
// RT1010 and RT1020 only has 1 USB controller

src/portable/nxp/transdimension/hcd_transdimension.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@
2929
// NXP Trans-Dimension USB IP implement EHCI for host functionality
3030

3131
#if CFG_TUH_ENABLED && \
32-
(CFG_TUSB_MCU == OPT_MCU_LPC18XX || CFG_TUSB_MCU == OPT_MCU_LPC43XX || CFG_TUSB_MCU == OPT_MCU_MIMXRT10XX)
32+
(CFG_TUSB_MCU == OPT_MCU_LPC18XX || CFG_TUSB_MCU == OPT_MCU_LPC43XX || CFG_TUSB_MCU == OPT_MCU_MIMXRT)
3333

3434
#warning "transdimenion is renamed to chipidea (portable/chipidea/ci_hs) to match other opensource naming convention such as linux. This file will be removed in the future, please update your makefile accordingly"
3535

3636
//--------------------------------------------------------------------+
3737
// INCLUDE
3838
//--------------------------------------------------------------------+
39-
#if CFG_TUSB_MCU == OPT_MCU_MIMXRT10XX
39+
#if CFG_TUSB_MCU == OPT_MCU_MIMXRT
4040
#include "fsl_device_registers.h"
4141
#else
4242
// LPCOpen for 18xx & 43xx
@@ -58,7 +58,7 @@ typedef struct
5858
const IRQn_Type irqnum; // IRQ number
5959
}hcd_controller_t;
6060

61-
#if CFG_TUSB_MCU == OPT_MCU_MIMXRT10XX
61+
#if CFG_TUSB_MCU == OPT_MCU_MIMXRT
6262
static const hcd_controller_t _hcd_controller[] =
6363
{
6464
// RT1010 and RT1020 only has 1 USB controller

0 commit comments

Comments
 (0)