Skip to content

Commit 949d7ca

Browse files
committed
refactor pin_mux to use mcux pin config tool
1 parent 4263111 commit 949d7ca

28 files changed

+3031
-1157
lines changed

ports/make.mk

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,14 @@ CFLAGS += \
7575
-DUF2_VERSION_BASE='"$(GIT_VERSION)"'\
7676
-DUF2_VERSION='"$(GIT_VERSION) - $(GIT_SUBMODULE_VERSIONS)"'\
7777

78-
# Bootloader src, board folder and TinyUSB stack
78+
# Bootloader src and TinyUSB stack
7979
SRC_C += \
8080
src/ghostfat.c \
8181
src/images.c \
8282
src/main.c \
8383
src/msc.c \
8484
src/screen.c \
85-
src/usb_descriptors.c \
86-
$(subst $(TOP)/,,$(wildcard $(TOP)/$(BOARD_DIR)/*.c))
85+
src/usb_descriptors.c
8786

8887
endif # BUILD_APPLICATION
8988

ports/mimxrt10xx/boards.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,6 @@ void board_init(void) {
6060
// Prevent clearing of SNVS General Purpose Register
6161
SNVS->LPCR |= SNVS_LPCR_GPR_Z_DIS_MASK;
6262

63-
#if NEOPIXEL_NUMBER
64-
IOMUXC_SetPinMux(NEOPIXEL_PINMUX, 0);
65-
IOMUXC_SetPinConfig(NEOPIXEL_PINMUX, 0x10B0U);
66-
67-
gpio_pin_config_t neopixel_config = {kGPIO_DigitalOutput, 0, kGPIO_NoIntmode};
68-
GPIO_PinInit(NEOPIXEL_PORT, NEOPIXEL_PIN, &neopixel_config);
69-
#endif
70-
7163
#if TUF2_LOG
7264
board_uart_init(BOARD_UART_BAUDRATE);
7365
#endif

ports/mimxrt10xx/boards/arch_mix_1052/arch_mix_1052.mex

Lines changed: 620 additions & 0 deletions
Large diffs are not rendered by default.

ports/mimxrt10xx/boards/arch_mix_1052/board.cmake

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@ set(JLINK_DEVICE MIMXRT1052xxxxB)
44
set(PYOCD_TARGET mimxrt1052)
55

66
function(update_board TARGET)
7-
target_sources(${TARGET} PRIVATE
8-
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/clock_config.c
9-
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/flash_config.c
10-
)
7+
118
target_compile_definitions(${TARGET} PUBLIC
129
CPU_MIMXRT1052DVL6B
1310
)

ports/mimxrt10xx/boards/arch_mix_1052/board.h

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -34,28 +34,18 @@
3434
//--------------------------------------------------------------------+
3535
// LED
3636
//--------------------------------------------------------------------+
37-
38-
#define LED_PINMUX IOMUXC_GPIO_AD_B0_09_GPIO1_IO09
39-
#define LED_PORT GPIO1
40-
#define LED_PIN 9
37+
#define LED_PORT BOARD_INITPINS_USER_LED_PERIPHERAL
38+
#define LED_PIN BOARD_INITPINS_USER_LED_CHANNEL
4139
#define LED_STATE_ON 0
4240

4341
//--------------------------------------------------------------------+
4442
// Neopixel
4543
//--------------------------------------------------------------------+
46-
47-
// Number of neopixels
48-
#define NEOPIXEL_NUMBER 0
49-
50-
//--------------------------------------------------------------------+
51-
// Button
52-
//--------------------------------------------------------------------+
53-
44+
#define NEOPIXEL_NUMBER 0 // Number of neopixels
5445

5546
//--------------------------------------------------------------------+
5647
// USB UF2
5748
//--------------------------------------------------------------------+
58-
5949
#define USB_VID 0x2886
6050
#define USB_PID 0x0010
6151
#define USB_MANUFACTURER "Seeed Technology Co., Ltd."
@@ -69,10 +59,6 @@
6959
//--------------------------------------------------------------------+
7060
// UART
7161
//--------------------------------------------------------------------+
72-
7362
#define UART_DEV LPUART1
74-
#define UART_RX_PINMUX IOMUXC_GPIO_AD_B0_13_LPUART1_RXD
75-
// On Rev A1 of the board this is on J31 closer to the edge.
76-
#define UART_TX_PINMUX IOMUXC_GPIO_AD_B0_12_LPUART1_TXD
7763

7864
#endif /* BOARD_H_ */

0 commit comments

Comments
 (0)