From 67ca69985af9109a0603a1cde71f21b940c059ff Mon Sep 17 00:00:00 2001
From: chen <15335560115@163.com>
Date: 星期四, 15 五月 2025 09:12:53 +0800
Subject: [PATCH] 完全将免布线标签代码移植过来版本

---
 pin_config.c |   50 ++++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 40 insertions(+), 10 deletions(-)

diff --git a/pin_config.c b/pin_config.c
index 142d3b6..884c6cc 100644
--- a/pin_config.c
+++ b/pin_config.c
@@ -43,19 +43,49 @@
 
 void board_pins_config(void)
 {
+#if UCI_INTF_PORT == 1
+
+    // SPI0 MOSI/MISO/CLK/CS
+    io_pin_mux_set(IO_PIN_11, IO_FUNC2);
+    io_pin_mux_set(IO_PIN_12, IO_FUNC2);
+    io_pin_mux_set(IO_PIN_13, IO_FUNC2);
+    io_pin_mux_set(IO_PIN_14, IO_FUNC2);
+
+    // setting for idle and sleep mode
+    io_pull_set(IO_PIN_11, IO_HIGH_Z, IO_PULL_UP_NONE);
+    io_pull_set(IO_PIN_12, IO_HIGH_Z, IO_PULL_UP_NONE);
+    io_pull_set(IO_PIN_13, IO_HIGH_Z, IO_PULL_UP_NONE);
+    io_pull_set(IO_PIN_14, IO_PULL_UP, IO_PULL_UP_LEVEL2);
+
+#if UCI_CHECK_SE_EN
+    // SPI1 MISO/MOSI/CLK/CS
+    io_pin_mux_set(IO_PIN_5, IO_FUNC2);
+    io_pin_mux_set(IO_PIN_6, IO_FUNC2);
+    io_pin_mux_set(IO_PIN_7, IO_FUNC2);
+    io_pin_mux_set(IO_PIN_8, IO_FUNC0);
+#endif
+
+#else
+
     // UART0 TX/RX
     io_pin_mux_set(IO_PIN_5, IO_FUNC4);
     io_pin_mux_set(IO_PIN_6, IO_FUNC4);
-		
-	
-	
-			//io_pin_mux_set(IO_PIN_6, IO_FUNC4);
 
-   // UART1 RX/TX已修改复用引脚为ADC留出空间
-    io_pin_mux_set(IO_PIN_10, IO_FUNC4);
+#endif
+
+#if TRACE_EN
+#if BOARD_TYPE == MK8000_EVK
+
+    // UART1 RX/TX
+    io_pin_mux_set(IO_PIN_0, IO_FUNC4);
+    io_pin_mux_set(IO_PIN_1, IO_FUNC4);
+
+#elif BOARD_TYPE == MK8000_DK
+
+    // UART1 TX/RX
     io_pin_mux_set(IO_PIN_9, IO_FUNC4);
-	
-	// Single ADC, If IO0 is set to negative input, the positive input is Vref, and vice versa
-    io_pin_mux_set(IO_PIN_0, IO_FUNC1);
-    io_pull_set(IO_PIN_0, IO_HIGH_Z, IO_PULL_UP_NONE);
+    io_pin_mux_set(IO_PIN_10, IO_FUNC4);
+
+#endif
+#endif
 }

--
Gitblit v1.9.3