From bccfff0ace10f85619e9f1fd4b2806f99e9390c2 Mon Sep 17 00:00:00 2001
From: chen <15335560115@163.com>
Date: 星期六, 16 八月 2025 18:33:27 +0800
Subject: [PATCH] 防丢标签V1.0,demo版本实现震动和测距

---
 keil/include/board/board.c |   20 ++++++++++++--------
 1 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/keil/include/board/board.c b/keil/include/board/board.c
index ae6dfd1..0d9c080 100644
--- a/keil/include/board/board.c
+++ b/keil/include/board/board.c
@@ -67,6 +67,7 @@
 extern struct UART_CFG_T test_uart_cfg;
 extern struct ADC_CFG_T usr_adc_cfg;
 extern volatile int32_t m_EUART_DMA_RXPtr;	
+extern struct PWM_CFG_T usr_pwm_cfg;
 void board_clock_run(void)
 {
     // default load cap
@@ -464,13 +465,16 @@
 {
     gpio_pin_toggle(idx);
 }
-void board_output_init(void)
-{
-		//adc采集gnd默认拉高
-		io_pin_mux_set(ADC_GND_ENABLE, IO_FUNC0);
-    gpio_pin_set_dir(ADC_GND_ENABLE , GPIO_DIR_OUT, 1);
-//		io_open_drain_set(ADC_GND_ENABLE, 1);
-    io_pull_set(ADC_GND_ENABLE,IO_HIGH_Z,IO_PULL_UP_NONE);//3
+void LED_output_init(void)
+{		
+//			//LEDgpio控制
+//		io_pin_mux_set(BOARD_LED_1, IO_FUNC0);
+//    gpio_pin_set_dir(BOARD_LED_1 , GPIO_DIR_OUT, 0);
+////    io_pull_set(WS2812_PIN,IO_HIGH_Z,IO_PULL_UP_NONE);//3
+//    	//LED
+		io_pin_mux_set(IO_PIN_7, IO_FUNC0);
+		gpio_pin_set_dir( IO_PIN_7, GPIO_DIR_OUT, 0);
+		io_pull_set(IO_PIN_7 , IO_PULL_DOWN, IO_PULL_UP_LEVEL4);
 
 }
 void board_configure(void)
@@ -489,7 +493,7 @@
 	uart_open(UART_ID1, &test_uart_cfg);
 	AIR780EUartInit();
 	adc_open(&usr_adc_cfg);
-	
+	 pwm_open(&usr_pwm_cfg);
 	m_EUART_DMA_RXPtr = 0;//清空上次缓存器避免重复发
 #if defined(UCI_INTF_PORT)
     uci_tl_resume();

--
Gitblit v1.9.3