From 16eeda8e1e205da3395f6933f6f82b22da63c76b Mon Sep 17 00:00:00 2001
From: QuakeGod <QuakeGod@sina.com>
Date: 星期六, 28 一月 2023 15:41:25 +0800
Subject: [PATCH] Radio add channel jumpper config

---
 Src/spi.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/Src/spi.c b/Src/spi.c
index 46879e5..97202e5 100644
--- a/Src/spi.c
+++ b/Src/spi.c
@@ -5,11 +5,11 @@
 /*	
     SPI_InitTypeDef  SPI_InitStruct;
     
-    SPI_InitStruct.SPI_Direction = SPI_Direction_2Lines_FullDuplex;//全双工模式
+    SPI_InitStruct.SPI_Direction = SPI_Direction_2Lines_FullDuplex;//鍏ㄥ弻宸ユā寮�
     SPI_InitStruct.SPI_Mode = SPI_Mode_Master;
     SPI_InitStruct.SPI_DataSize = SPI_DataSize_8b;
-    SPI_InitStruct.SPI_CPHA = SPI_CPHA_1Edge;//第一个边沿
-    SPI_InitStruct.SPI_CPOL = SPI_CPOL_Low;//上升沿捕获
+    SPI_InitStruct.SPI_CPHA = SPI_CPHA_1Edge;//绗竴涓竟娌�
+    SPI_InitStruct.SPI_CPOL = SPI_CPOL_Low;//涓婂崌娌挎崟鑾�
     SPI_InitStruct.SPI_NSS = SPI_NSS_Soft;
     SPI_InitStruct.SPI_BaudRatePrescaler = SPI_BaudRatePrescaler_16; // 6MHz
     SPI_InitStruct.SPI_FirstBit = SPI_FirstBit_MSB;
@@ -32,10 +32,10 @@
 uint8_t SpiInOut( uint8_t txBuffer)
 {
  /*   
-      while( SPI_I2S_GetFlagStatus(SPI2, SPI_I2S_FLAG_TXE) == RESET);//当发送buffer为空时(说明上一次数据已复制到移位寄存器中)退出,这时可以往buffer里面写数据
+      while( SPI_I2S_GetFlagStatus(SPI2, SPI_I2S_FLAG_TXE) == RESET);//褰撳彂閫乥uffer涓虹┖鏃�(璇存槑涓婁竴娆℃暟鎹凡澶嶅埗鍒扮Щ浣嶅瘎瀛樺櫒涓�)閫�鍑�,杩欐椂鍙互寰�buffer閲岄潰鍐欐暟鎹�
       SPI_SendData8(SPI2, txBuffer);
     
-      while( SPI_I2S_GetFlagStatus(SPI2, SPI_I2S_FLAG_RXNE) == RESET);//当接收buffer为非空时退出
+      while( SPI_I2S_GetFlagStatus(SPI2, SPI_I2S_FLAG_RXNE) == RESET);//褰撴帴鏀禸uffer涓洪潪绌烘椂閫�鍑�
       return SPI_ReceiveData8(SPI2);
       
   */ 
@@ -58,9 +58,9 @@
     
     for(i=0;i<size;i++)
     {
-      while( LL_SPI_IsActiveFlag_TXE(SPI1) == RESET);//当发送buffer为空时(说明上一次数据已复制到移位寄存器中)退出,这时可以往buffer里面写数据
+      while( LL_SPI_IsActiveFlag_TXE(SPI1) == RESET);//褰撳彂閫乥uffer涓虹┖鏃�(璇存槑涓婁竴娆℃暟鎹凡澶嶅埗鍒扮Щ浣嶅瘎瀛樺櫒涓�)閫�鍑�,杩欐椂鍙互寰�buffer閲岄潰鍐欐暟鎹�
       LL_SPI_TransmitData8(SPI1,txBuffer[i]);
-      while( LL_SPI_IsActiveFlag_RXNE(SPI1) == RESET);//当接收buffer为非空时退出
+      while( LL_SPI_IsActiveFlag_RXNE(SPI1) == RESET);//褰撴帴鏀禸uffer涓洪潪绌烘椂閫�鍑�
       LL_SPI_ReceiveData8( SPI1);	
     }
 		

--
Gitblit v1.9.1