From ff5cfcabc63d16cafa0f3f1b8fcadcc03d74bb81 Mon Sep 17 00:00:00 2001
From: WXK <287788329@qq.com>
Date: 星期一, 28 十月 2024 15:10:08 +0800
Subject: [PATCH] 代码暂时提交,已经改完成lora uwb配合版本  还没测,标签那边没改

---
 keil/lora_3029.c |   21 ++++++++++++++++++++-
 1 files changed, 20 insertions(+), 1 deletions(-)

diff --git a/keil/lora_3029.c b/keil/lora_3029.c
index c88ff6e..69fd869 100644
--- a/keil/lora_3029.c
+++ b/keil/lora_3029.c
@@ -2,10 +2,12 @@
 #include "mk_spi.h"
 //#include "pan_port.h"
 //#include "pan_param.h"
-//#include "pan_rf.h"
+#include "pan_rf.h"
+#include <global_param.h>
 static uint8_t tx_buf[10] = {0x55, 0x44, 0x33, 0x22, 0x11};
 static uint8_t rx_buf[10] = {0x00};
 extern void spi_transfer_callback(void *dev, uint32_t err_code);
+extern uint32_t successful_cnt;
 void Lora_init(void)
 {
 //    rf_write_reg(0x04, 0x55);
@@ -25,6 +27,23 @@
 //				printf("LORA Init OK\r\n");
     }
 }
+uint8_t lora_start_poll_buff[4] = {};
+void Lora_uwb_wakeup(void)
+{
+    rf_set_transmit_flag(RADIO_FLAG_IDLE);
+    rf_enter_continous_tx();
+    memcpy(&lora_start_poll_buff[1],&g_com_map[DEV_ID],2);
+    if(rf_continous_tx_send_data(lora_start_poll_buff, 4) != OK)
+    {
+       //错误了
+        while(1);
+    }
+    else
+    {
+        successful_cnt ++;
+    }
+}
+    
 //void LORA_mode_select(void)
 //{
 //	if(TX_RX_SELECT==1)

--
Gitblit v1.9.3