Переглянути джерело

修复spi的myRadioSpi_rwByte超时操作i

dropLin 4 тижнів тому
батько
коміт
01727591aa

+ 7 - 0
gitFocePushRemote.bat

@@ -0,0 +1,7 @@
+@echo off  
+setlocal  
+  
+:: 假设你已经处于正确的Git仓库目录中  
+  
+:: 添加所有更改到暂存区  
+git push -f --set-upstream origin master:master

+ 16 - 71
keil_v5/adapterBoardDriver.uvoptx

@@ -78,28 +78,6 @@
         <IsCurrentTarget>1</IsCurrentTarget>
       </OPTFL>
       <CpuCode>18</CpuCode>
-      <Books>
-        <Book>
-          <Number>0</Number>
-          <Title>Base Board Schematics (MCBSTM32E)</Title>
-          <Path>D:\Keil_v5\ARM\PACK\Keil\STM32F1xx_DFP\1.0.5\Documents\mcbstm32e-base-board-schematics.pdf</Path>
-        </Book>
-        <Book>
-          <Number>1</Number>
-          <Title>Display Board Schematics (MCBSTM32E)</Title>
-          <Path>D:\Keil_v5\ARM\PACK\Keil\STM32F1xx_DFP\1.0.5\Documents\mcbstm32e-display-board-schematics.pdf</Path>
-        </Book>
-        <Book>
-          <Number>2</Number>
-          <Title>User Manual (MCBSTM32E)</Title>
-          <Path>D:\Keil_v5\ARM\PACK\Keil\STM32F1xx_DFP\1.0.5\Documents\mcbstm32e.chm</Path>
-        </Book>
-        <Book>
-          <Number>3</Number>
-          <Title>MCBSTM32E Evaluation Board Web Page (MCBSTM32E)</Title>
-          <Path>http://www.keil.com/mcbstm32e/</Path>
-        </Book>
-      </Books>
       <DebugOpt>
         <uSim>0</uSim>
         <uTrg>1</uTrg>
@@ -122,7 +100,10 @@
         <tRSysVw>1</tRSysVw>
         <sRunDeb>0</sRunDeb>
         <sLrtime>0</sLrtime>
-        <nTsel>6</nTsel>
+        <bEvRecOn>1</bEvRecOn>
+        <bSchkAxf>0</bSchkAxf>
+        <bTchkAxf>0</bTchkAxf>
+        <nTsel>4</nTsel>
         <sDll></sDll>
         <sDllPa></sDllPa>
         <sDlgDll></sDlgDll>
@@ -288,8 +269,20 @@
       </DebugFlag>
       <LintExecutable></LintExecutable>
       <LintConfigFile></LintConfigFile>
+      <bLintAuto>0</bLintAuto>
+      <bAutoGenD>0</bAutoGenD>
+      <LntExFlags>0</LntExFlags>
+      <pMisraName></pMisraName>
+      <pszMrule></pszMrule>
+      <pSingCmds></pSingCmds>
+      <pMultCmds></pMultCmds>
+      <pMisraNamep></pMisraNamep>
+      <pszMrulep></pszMrulep>
+      <pSingCmdsp></pSingCmdsp>
+      <pMultCmdsp></pMultCmdsp>
       <DebugDescription>
         <Enable>1</Enable>
+        <EnableFlashSeq>0</EnableFlashSeq>
         <EnableLog>0</EnableLog>
         <Protocol>2</Protocol>
         <DbgClock>10000000</DbgClock>
@@ -308,7 +301,6 @@
       <FileNumber>1</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
-      <Focus>0</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
       <PathWithFileName>..\project\main.c</PathWithFileName>
@@ -321,7 +313,6 @@
       <FileNumber>2</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
-      <Focus>0</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
       <PathWithFileName>..\project\stm32f10x_it.c</PathWithFileName>
@@ -334,7 +325,6 @@
       <FileNumber>3</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
-      <Focus>0</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
       <PathWithFileName>..\project\system_stm32f10x.c</PathWithFileName>
@@ -355,7 +345,6 @@
       <FileNumber>4</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
-      <Focus>0</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
       <PathWithFileName>..\peripheral\myUart.c</PathWithFileName>
@@ -368,7 +357,6 @@
       <FileNumber>5</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
-      <Focus>0</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
       <PathWithFileName>..\peripheral\sys.c</PathWithFileName>
@@ -381,7 +369,6 @@
       <FileNumber>6</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
-      <Focus>0</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
       <PathWithFileName>..\peripheral\myADC.c</PathWithFileName>
@@ -394,7 +381,6 @@
       <FileNumber>7</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
-      <Focus>0</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
       <PathWithFileName>..\peripheral\myInputCapture.c</PathWithFileName>
@@ -407,7 +393,6 @@
       <FileNumber>8</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
-      <Focus>0</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
       <PathWithFileName>..\peripheral\myUart3.c</PathWithFileName>
@@ -428,7 +413,6 @@
       <FileNumber>9</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
-      <Focus>1</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
       <PathWithFileName>..\CORE\core_cm3.c</PathWithFileName>
@@ -441,7 +425,6 @@
       <FileNumber>10</FileNumber>
       <FileType>2</FileType>
       <tvExp>0</tvExp>
-      <Focus>1</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
       <PathWithFileName>..\CORE\startup_stm32f10x_hd.s</PathWithFileName>
@@ -462,7 +445,6 @@
       <FileNumber>11</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
-      <Focus>1</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
       <PathWithFileName>..\STM32F10x_FWLib\src\misc.c</PathWithFileName>
@@ -475,7 +457,6 @@
       <FileNumber>12</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
-      <Focus>1</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
       <PathWithFileName>..\STM32F10x_FWLib\src\stm32f10x_adc.c</PathWithFileName>
@@ -488,7 +469,6 @@
       <FileNumber>13</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
-      <Focus>1</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
       <PathWithFileName>..\STM32F10x_FWLib\src\stm32f10x_bkp.c</PathWithFileName>
@@ -501,7 +481,6 @@
       <FileNumber>14</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
-      <Focus>1</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
       <PathWithFileName>..\STM32F10x_FWLib\src\stm32f10x_can.c</PathWithFileName>
@@ -514,7 +493,6 @@
       <FileNumber>15</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
-      <Focus>1</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
       <PathWithFileName>..\STM32F10x_FWLib\src\stm32f10x_cec.c</PathWithFileName>
@@ -527,7 +505,6 @@
       <FileNumber>16</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
-      <Focus>1</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
       <PathWithFileName>..\STM32F10x_FWLib\src\stm32f10x_crc.c</PathWithFileName>
@@ -540,7 +517,6 @@
       <FileNumber>17</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
-      <Focus>1</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
       <PathWithFileName>..\STM32F10x_FWLib\src\stm32f10x_dac.c</PathWithFileName>
@@ -553,7 +529,6 @@
       <FileNumber>18</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
-      <Focus>1</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
       <PathWithFileName>..\STM32F10x_FWLib\src\stm32f10x_dbgmcu.c</PathWithFileName>
@@ -566,7 +541,6 @@
       <FileNumber>19</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
-      <Focus>1</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
       <PathWithFileName>..\STM32F10x_FWLib\src\stm32f10x_dma.c</PathWithFileName>
@@ -579,7 +553,6 @@
       <FileNumber>20</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
-      <Focus>1</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
       <PathWithFileName>..\STM32F10x_FWLib\src\stm32f10x_exti.c</PathWithFileName>
@@ -592,7 +565,6 @@
       <FileNumber>21</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
-      <Focus>1</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
       <PathWithFileName>..\STM32F10x_FWLib\src\stm32f10x_flash.c</PathWithFileName>
@@ -605,7 +577,6 @@
       <FileNumber>22</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
-      <Focus>1</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
       <PathWithFileName>..\STM32F10x_FWLib\src\stm32f10x_fsmc.c</PathWithFileName>
@@ -618,7 +589,6 @@
       <FileNumber>23</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
-      <Focus>1</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
       <PathWithFileName>..\STM32F10x_FWLib\src\stm32f10x_gpio.c</PathWithFileName>
@@ -631,7 +601,6 @@
       <FileNumber>24</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
-      <Focus>1</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
       <PathWithFileName>..\STM32F10x_FWLib\src\stm32f10x_i2c.c</PathWithFileName>
@@ -644,7 +613,6 @@
       <FileNumber>25</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
-      <Focus>1</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
       <PathWithFileName>..\STM32F10x_FWLib\src\stm32f10x_iwdg.c</PathWithFileName>
@@ -657,7 +625,6 @@
       <FileNumber>26</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
-      <Focus>1</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
       <PathWithFileName>..\STM32F10x_FWLib\src\stm32f10x_pwr.c</PathWithFileName>
@@ -670,7 +637,6 @@
       <FileNumber>27</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
-      <Focus>1</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
       <PathWithFileName>..\STM32F10x_FWLib\src\stm32f10x_rcc.c</PathWithFileName>
@@ -683,7 +649,6 @@
       <FileNumber>28</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
-      <Focus>1</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
       <PathWithFileName>..\STM32F10x_FWLib\src\stm32f10x_rtc.c</PathWithFileName>
@@ -696,7 +661,6 @@
       <FileNumber>29</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
-      <Focus>1</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
       <PathWithFileName>..\STM32F10x_FWLib\src\stm32f10x_sdio.c</PathWithFileName>
@@ -709,7 +673,6 @@
       <FileNumber>30</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
-      <Focus>1</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
       <PathWithFileName>..\STM32F10x_FWLib\src\stm32f10x_spi.c</PathWithFileName>
@@ -722,7 +685,6 @@
       <FileNumber>31</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
-      <Focus>1</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
       <PathWithFileName>..\STM32F10x_FWLib\src\stm32f10x_tim.c</PathWithFileName>
@@ -735,7 +697,6 @@
       <FileNumber>32</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
-      <Focus>1</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
       <PathWithFileName>..\STM32F10x_FWLib\src\stm32f10x_usart.c</PathWithFileName>
@@ -748,7 +709,6 @@
       <FileNumber>33</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
-      <Focus>1</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
       <PathWithFileName>..\STM32F10x_FWLib\src\stm32f10x_wwdg.c</PathWithFileName>
@@ -777,7 +737,6 @@
       <FileNumber>34</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
-      <Focus>1</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
       <PathWithFileName>..\APP\led.c</PathWithFileName>
@@ -790,7 +749,6 @@
       <FileNumber>35</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
-      <Focus>1</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
       <PathWithFileName>..\APP\key.c</PathWithFileName>
@@ -803,7 +761,6 @@
       <FileNumber>36</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
-      <Focus>1</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
       <PathWithFileName>..\APP\stmflash.c</PathWithFileName>
@@ -816,7 +773,6 @@
       <FileNumber>37</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
-      <Focus>1</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
       <PathWithFileName>..\APP\ReadKey.c</PathWithFileName>
@@ -829,7 +785,6 @@
       <FileNumber>38</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
-      <Focus>1</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
       <PathWithFileName>..\APP\myLcd.c</PathWithFileName>
@@ -842,7 +797,6 @@
       <FileNumber>39</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
-      <Focus>0</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
       <PathWithFileName>..\APP\myTim.c</PathWithFileName>
@@ -855,7 +809,6 @@
       <FileNumber>40</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
-      <Focus>0</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
       <PathWithFileName>..\app\crc8.c</PathWithFileName>
@@ -868,7 +821,6 @@
       <FileNumber>41</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
-      <Focus>0</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
       <PathWithFileName>..\app\eventUnit.c</PathWithFileName>
@@ -881,7 +833,6 @@
       <FileNumber>42</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
-      <Focus>0</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
       <PathWithFileName>..\app\myDisplayUnit.c</PathWithFileName>
@@ -894,7 +845,6 @@
       <FileNumber>43</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
-      <Focus>0</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
       <PathWithFileName>..\app\myFlashData.c</PathWithFileName>
@@ -907,7 +857,6 @@
       <FileNumber>44</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
-      <Focus>0</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
       <PathWithFileName>..\app\myRadio.c</PathWithFileName>
@@ -928,7 +877,6 @@
       <FileNumber>45</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
-      <Focus>0</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
       <PathWithFileName>..\radio\myRadio_gpio.c</PathWithFileName>
@@ -941,7 +889,6 @@
       <FileNumber>46</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
-      <Focus>0</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
       <PathWithFileName>..\radio\pan3028.c</PathWithFileName>
@@ -954,7 +901,6 @@
       <FileNumber>47</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
-      <Focus>0</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
       <PathWithFileName>..\radio\pan3028_port.c</PathWithFileName>
@@ -967,7 +913,6 @@
       <FileNumber>48</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
-      <Focus>0</Focus>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
       <PathWithFileName>..\radio\radio.c</PathWithFileName>

+ 37 - 42
keil_v5/adapterBoardDriver.uvprojx

@@ -10,11 +10,12 @@
       <TargetName>adapterBoardDriver</TargetName>
       <ToolsetNumber>0x4</ToolsetNumber>
       <ToolsetName>ARM-ADS</ToolsetName>
+      <uAC6>0</uAC6>
       <TargetOption>
         <TargetCommonOption>
           <Device>STM32F103RC</Device>
           <Vendor>STMicroelectronics</Vendor>
-          <PackID>Keil.STM32F1xx_DFP.1.0.5</PackID>
+          <PackID>Keil.STM32F1xx_DFP.2.3.0</PackID>
           <PackURL>http://www.keil.com/pack/</PackURL>
           <Cpu>IROM(0x08000000,0x40000) IRAM(0x20000000,0xC000) CPUTYPE("Cortex-M3") CLOCK(12000000) ELITTLE</Cpu>
           <FlashUtilSpec></FlashUtilSpec>
@@ -84,6 +85,8 @@
             <UserProg2Name></UserProg2Name>
             <UserProg1Dos16Mode>0</UserProg1Dos16Mode>
             <UserProg2Dos16Mode>0</UserProg2Dos16Mode>
+            <nStopA1X>0</nStopA1X>
+            <nStopA2X>0</nStopA2X>
           </AfterMake>
           <SelectedForBatchBuild>0</SelectedForBatchBuild>
           <SVCSIdString></SVCSIdString>
@@ -122,47 +125,6 @@
             <HexOffset>0</HexOffset>
             <Oh166RecLen>16</Oh166RecLen>
           </OPTHX>
-          <Simulator>
-            <UseSimulator>0</UseSimulator>
-            <LoadApplicationAtStartup>1</LoadApplicationAtStartup>
-            <RunToMain>1</RunToMain>
-            <RestoreBreakpoints>1</RestoreBreakpoints>
-            <RestoreWatchpoints>1</RestoreWatchpoints>
-            <RestoreMemoryDisplay>1</RestoreMemoryDisplay>
-            <RestoreFunctions>1</RestoreFunctions>
-            <RestoreToolbox>1</RestoreToolbox>
-            <LimitSpeedToRealTime>0</LimitSpeedToRealTime>
-            <RestoreSysVw>1</RestoreSysVw>
-          </Simulator>
-          <Target>
-            <UseTarget>1</UseTarget>
-            <LoadApplicationAtStartup>1</LoadApplicationAtStartup>
-            <RunToMain>1</RunToMain>
-            <RestoreBreakpoints>1</RestoreBreakpoints>
-            <RestoreWatchpoints>1</RestoreWatchpoints>
-            <RestoreMemoryDisplay>1</RestoreMemoryDisplay>
-            <RestoreFunctions>0</RestoreFunctions>
-            <RestoreToolbox>1</RestoreToolbox>
-            <RestoreTracepoints>1</RestoreTracepoints>
-            <RestoreSysVw>1</RestoreSysVw>
-          </Target>
-          <RunDebugAfterBuild>0</RunDebugAfterBuild>
-          <TargetSelection>6</TargetSelection>
-          <SimDlls>
-            <CpuDll></CpuDll>
-            <CpuDllArguments></CpuDllArguments>
-            <PeripheralDll></PeripheralDll>
-            <PeripheralDllArguments></PeripheralDllArguments>
-            <InitializationFile></InitializationFile>
-          </SimDlls>
-          <TargetDlls>
-            <CpuDll></CpuDll>
-            <CpuDllArguments></CpuDllArguments>
-            <PeripheralDll></PeripheralDll>
-            <PeripheralDllArguments></PeripheralDllArguments>
-            <InitializationFile></InitializationFile>
-            <Driver>Segger\JL2CM3.dll</Driver>
-          </TargetDlls>
         </DebugOption>
         <Utilities>
           <Flash1>
@@ -221,12 +183,15 @@
             <hadXRAM>0</hadXRAM>
             <uocXRam>0</uocXRam>
             <RvdsVP>0</RvdsVP>
+            <RvdsMve>0</RvdsMve>
+            <RvdsCdeCp>0</RvdsCdeCp>
             <hadIRAM2>0</hadIRAM2>
             <hadIROM2>0</hadIROM2>
             <StupSel>8</StupSel>
             <useUlib>1</useUlib>
             <EndSel>0</EndSel>
             <uLtcg>0</uLtcg>
+            <nSecure>0</nSecure>
             <RoSelD>3</RoSelD>
             <RwSelD>3</RwSelD>
             <CodeSel>0</CodeSel>
@@ -360,7 +325,15 @@
             <uThumb>0</uThumb>
             <uSurpInc>0</uSurpInc>
             <uC99>1</uC99>
+            <uGnu>0</uGnu>
             <useXO>0</useXO>
+            <v6Lang>1</v6Lang>
+            <v6LangP>1</v6LangP>
+            <vShortEn>1</vShortEn>
+            <vShortWch>1</vShortWch>
+            <v6Lto>0</v6Lto>
+            <v6WtE>0</v6WtE>
+            <v6Rtti>0</v6Rtti>
             <VariousControls>
               <MiscControls></MiscControls>
               <Define>STM32F10X_HD,USE_STDPERIPH_DRIVER,BUY_BOARD,USE_STDPERIPH_DRIVER,SILABS_RADIO_SI446X,RADIO_DRIVER_EXTENDED_SUPPORT</Define>
@@ -378,6 +351,7 @@
             <NoWarn>0</NoWarn>
             <uSurpInc>0</uSurpInc>
             <useXO>0</useXO>
+            <ClangAsOpt>1</ClangAsOpt>
             <VariousControls>
               <MiscControls></MiscControls>
               <Define></Define>
@@ -682,4 +656,25 @@
     </Target>
   </Targets>
 
+  <RTE>
+    <apis/>
+    <components/>
+    <files/>
+  </RTE>
+
+  <LayerInfo>
+    <Layers>
+      <Layer>
+        <LayName>&lt;Project Info&gt;</LayName>
+        <LayDesc></LayDesc>
+        <LayUrl></LayUrl>
+        <LayKeys></LayKeys>
+        <LayCat></LayCat>
+        <LayLic></LayLic>
+        <LayTarg>0</LayTarg>
+        <LayPrjMark>1</LayPrjMark>
+      </Layer>
+    </Layers>
+  </LayerInfo>
+
 </Project>

+ 317 - 317
radio/myRadio_gpio.c

@@ -1,317 +1,317 @@
-#include "myRadio_gpio.h"
-#include "stm32f10x.h"
-#include "stm32f10x_exti.h"
-
-RADIO_GPIO_CALLBACK gpioCallback;
-void BOARD_SPI_NSS_H(void)
-{
-    GPIO_WriteBit(BOARD_GPIO_SPI_CSN, BOARD_PIN_H);
-}
-void BOARD_SPI_NSS_L(void)
-{
-    GPIO_WriteBit(BOARD_GPIO_SPI_CSN, BOARD_PIN_L);
-}
-void BOARD_SPI_SCK_H(void)
-{
-    GPIO_WriteBit(BOARD_GPIO_SPI_CLK, BOARD_PIN_H);
-}
-void BOARD_SPI_SCK_L(void)
-{
-    GPIO_WriteBit(BOARD_GPIO_SPI_CLK, BOARD_PIN_L);
-}
-void BOARD_SPI_MISO_H(void)
-{
-    GPIO_WriteBit(BOARD_GPIO_SPI_MISO, BOARD_PIN_H);
-}
-void BOARD_SPI_MISO_L(void)
-{
-    GPIO_WriteBit(BOARD_GPIO_SPI_MISO, BOARD_PIN_L);
-}
-void BOARD_SPI_MOSI_H(void)
-{
-    GPIO_WriteBit(BOARD_GPIO_SPI_MOSI, BOARD_PIN_H);
-}
-void BOARD_SPI_MOSI_L(void)
-{
-    GPIO_WriteBit(BOARD_GPIO_SPI_MOSI, BOARD_PIN_L);
-}
-void BOARD_GPIOA_H(void)
-{
-    GPIO_WriteBit(BOARD_GPIO_SPI_GPIOA, BOARD_PIN_H);
-}
-void BOARD_GPIOA_L(void)
-{
-    GPIO_WriteBit(BOARD_GPIO_SPI_GPIOA, BOARD_PIN_L);
-}
-void BOARD_GPIOB_H(void)
-{
-    GPIO_WriteBit(BOARD_GPIO_SPI_GPIOB, BOARD_PIN_H);
-}
-void BOARD_GPIOB_L(void)
-{
-    GPIO_WriteBit(BOARD_GPIO_SPI_GPIOB, BOARD_PIN_L);
-}
-void BOARD_GPIOC_H(void)
-{
-    GPIO_WriteBit(BOARD_GPIO_SPI_GPIOC, BOARD_PIN_H);
-}
-void BOARD_GPIOC_L(void)
-{
-    GPIO_WriteBit(BOARD_GPIO_SPI_GPIOC, BOARD_PIN_L);
-}
-void BOARD_GPIOD_H(void)
-{
-    GPIO_WriteBit(BOARD_GPIO_SPI_GPIOD, BOARD_PIN_H);
-}
-void BOARD_GPIOD_L(void)
-{
-    GPIO_WriteBit(BOARD_GPIO_SPI_GPIOD, BOARD_PIN_L);
-}
-void BOARD_GPIOE_H(void)
-{
-    GPIO_WriteBit(BOARD_GPIO_SPI_GPIOE, BOARD_PIN_H);
-}
-void BOARD_GPIOE_L(void)
-{
-    GPIO_WriteBit(BOARD_GPIO_SPI_GPIOE, BOARD_PIN_L);
-}
-void BOARD_GPIOF_H(void)
-{
-    GPIO_WriteBit(BOARD_GPIO_SPI_GPIOF, BOARD_PIN_H);
-}
-void BOARD_GPIOF_L(void)
-{
-    GPIO_WriteBit(BOARD_GPIO_SPI_GPIOF, BOARD_PIN_L);
-}
-void BOARD_GPIOG_H(void)
-{
-    GPIO_WriteBit(BOARD_GPIO_SPI_GPIOG, BOARD_PIN_H);
-}
-void BOARD_GPIOG_L(void)
-{
-    GPIO_WriteBit(BOARD_GPIO_SPI_GPIOG, BOARD_PIN_L);
-}
-void BOARD_GPIOH_H(void)
-{
-    GPIO_WriteBit(BOARD_GPIO_SPI_GPIOH, BOARD_PIN_H);
-}
-void BOARD_GPIOH_L(void)
-{
-    GPIO_WriteBit(BOARD_GPIO_SPI_GPIOH, BOARD_PIN_L);
-}
-
-uint8_t READ_BOARD_SPI_MISO(void)
-{
-    return GPIO_ReadInputDataBit(BOARD_GPIO_SPI_MISO);
-}
-uint8_t READ_BOARD_GPIOA(void)
-{
-    return GPIO_ReadInputDataBit(BOARD_GPIO_SPI_GPIOA);
-}
-uint8_t READ_BOARD_GPIOB(void)
-{
-    return GPIO_ReadInputDataBit(BOARD_GPIO_SPI_GPIOB);
-}
-uint8_t READ_BOARD_GPIOC(void)
-{
-    return GPIO_ReadInputDataBit(BOARD_GPIO_SPI_GPIOC);
-}
-uint8_t READ_BOARD_GPIOD(void)
-{
-    return GPIO_ReadInputDataBit(BOARD_GPIO_SPI_GPIOD);
-}
-uint8_t READ_BOARD_GPIOE(void)
-{
-    return GPIO_ReadInputDataBit(BOARD_GPIO_SPI_GPIOE);
-}
-uint8_t READ_BOARD_GPIOF(void)
-{
-    return GPIO_ReadInputDataBit(BOARD_GPIO_SPI_GPIOF);
-}
-uint8_t READ_BOARD_GPIOG(void)
-{
-    return GPIO_ReadInputDataBit(BOARD_GPIO_SPI_GPIOG);
-}
-uint8_t READ_BOARD_GPIOH(void)
-{
-    return GPIO_ReadInputDataBit(BOARD_GPIO_SPI_GPIOH);
-}
-void EXTI0_IRQHandler(void)
-{
-    if(EXTI_GetITStatus(EXTI_Line0) != RESET)
-    {
-        /* Clear the EXTI line 1 pending bit */
-        EXTI_ClearITPendingBit(EXTI_Line0);
-        gpioCallback(1);
-    }
-}
-// BOARD_PIN_SPI_GPIOD
-void myRadio_gpio_irq_init()
-{
-    NVIC_InitTypeDef  NVIC_InitStructure;
-    EXTI_InitTypeDef  EXTI_InitStructure;
-    
-    EXTI_ClearITPendingBit(EXTI_Line1);
-    EXTI_InitStructure.EXTI_Line = EXTI_Line0;
-    EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt;
-    EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Rising;
-    EXTI_InitStructure.EXTI_LineCmd = ENABLE;
-    EXTI_Init(&EXTI_InitStructure);
-    GPIO_EXTILineConfig(GPIO_PortSourceGPIOB, GPIO_PinSource0);
-    /* Enable and set EXTI1 Interrupt */
-    NVIC_InitStructure.NVIC_IRQChannel = EXTI0_IRQn;
-    NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0x01;
-    NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0x00;
-    NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
-    NVIC_Init(&NVIC_InitStructure);
-}
-void myRadio_gpio_init(RADIO_GPIO_CALLBACK cb)
-{
-    GPIO_InitTypeDef  GPIO_InitStructure;
-	SPI_InitTypeDef  SPI_InitStructure;
-    
-#if defined(SPI_HARD)    
-    //----------SPI1时钟使能
-    RCC_APB2PeriphClockCmd(	RCC_APB2Periph_SPI1, ENABLE );
-
-	GPIO_InitStructure.GPIO_Pin = BOARD_PIN_SPI_CLK | BOARD_PIN_SPI_MISO | BOARD_PIN_SPI_MOSI;
-	GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;  //复用推挽输出
-	GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
-	GPIO_Init(BOARD_PORT_SPI_CLK, &GPIO_InitStructure);
-
- 	GPIO_SetBits(BOARD_GPIO_SPI_CLK | BOARD_PIN_SPI_MISO | BOARD_PIN_SPI_MOSI);
-    /*!< SPI configuration */
-    SPI_InitStructure.SPI_Direction = SPI_Direction_2Lines_FullDuplex;
-    SPI_InitStructure.SPI_Mode = SPI_Mode_Master;
-    SPI_InitStructure.SPI_DataSize = SPI_DataSize_8b;
-    SPI_InitStructure.SPI_CPOL = SPI_CPOL_Low;
-    SPI_InitStructure.SPI_CPHA = SPI_CPHA_1Edge;
-    SPI_InitStructure.SPI_NSS = SPI_NSS_Soft;
-    SPI_InitStructure.SPI_BaudRatePrescaler = SPI_BaudRatePrescaler_16;
-
-    SPI_InitStructure.SPI_FirstBit = SPI_FirstBit_MSB;
-    SPI_InitStructure.SPI_CRCPolynomial = 7;
-    SPI_Init(SPI1, &SPI_InitStructure);
-
-    /*!< Enable the SPI1  */
-    SPI_Cmd(SPI1, ENABLE);
-#else
-
-    GPIO_InitStructure.GPIO_Pin = BOARD_PIN_SPI_MOSI;           
-    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;      
-    GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;      
-    GPIO_Init(BOARD_PORT_SPI_MOSI, &GPIO_InitStructure);
-    GPIO_InitStructure.GPIO_Pin = BOARD_PIN_SPI_MISO;           
-    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;     
-    GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;      
-    GPIO_Init(BOARD_PORT_SPI_MISO, &GPIO_InitStructure);
-    GPIO_InitStructure.GPIO_Pin = BOARD_PIN_SPI_CLK;            
-    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;      
-    GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;      
-    GPIO_Init(BOARD_PORT_SPI_CLK, &GPIO_InitStructure);
-#endif
-    GPIO_InitStructure.GPIO_Pin = BOARD_PIN_SPI_CSN;            
-    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;      
-    GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;      
-    GPIO_Init(BOARD_PORT_SPI_CSN, &GPIO_InitStructure);
-
-    GPIO_InitStructure.GPIO_Pin = BOARD_PIN_SPI_GPIOA;         
-    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU;      
-    GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;  
-    GPIO_Init(BOARD_PORT_SPI_GPIOA, &GPIO_InitStructure);
-    GPIO_InitStructure.GPIO_Pin = BOARD_PIN_SPI_GPIOB;         
-    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU;      
-    GPIO_Init(BOARD_PORT_SPI_GPIOB, &GPIO_InitStructure);
-    GPIO_InitStructure.GPIO_Pin = BOARD_PIN_SPI_GPIOC;         
-    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU;      
-    GPIO_Init(BOARD_PORT_SPI_GPIOC, &GPIO_InitStructure);
-    GPIO_InitStructure.GPIO_Pin = BOARD_PIN_SPI_GPIOD;         
-    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU;      
-    GPIO_Init(BOARD_PORT_SPI_GPIOD, &GPIO_InitStructure);
-    GPIO_InitStructure.GPIO_Pin = BOARD_PIN_SPI_GPIOE;         
-    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;      
-    GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;  
-    GPIO_Init(BOARD_PORT_SPI_GPIOE, &GPIO_InitStructure);
-    GPIO_InitStructure.GPIO_Pin = BOARD_PIN_SPI_GPIOF;         
-    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;      
-    GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;  
-    GPIO_Init(BOARD_PORT_SPI_GPIOF, &GPIO_InitStructure);
-
-    BOARD_SPI_NSS_H();
-
-    myRadio_gpio_irq_init();
-    gpioCallback = cb;
-}
-uint8_t myRadioSpi_rwByte(uint8_t byteToWrite)
-{
-    uint8_t i, temp;
-    temp = 0;   
-#if defined(SPI_HARD)
-	while (SPI_I2S_GetFlagStatus(SPI1, SPI_I2S_FLAG_TXE) == RESET) //检查指定的SPI标志位设置与否:发送缓存空标志位
-    {
-        i++;
-        if(i > 200)return 0;
-    }			  
-	SPI_I2S_SendData(SPI1, byteToWrite); //通过外设SPIx发送一个数据
-	i=0;
-
-	while (SPI_I2S_GetFlagStatus(SPI1, SPI_I2S_FLAG_RXNE) == RESET)//检查指定的SPI标志位设置与否:接受缓存非空标志位
-    {
-        i++;
-        if(i > 200)return 0;
-    }
-    /*!< Return the byte read from the SPI bus */
-    temp = SPI_I2S_ReceiveData(SPI1);
-#else
-    BOARD_SPI_SCK_L();
-    for(i = 0; i < 8; i ++)
-    {
-        if(byteToWrite & 0x80)
-        {
-          //SpiSetMosiHigh();
-          BOARD_SPI_MOSI_H();
-        }
-        else
-        {
-          //SpiSetMosiLow();
-          BOARD_SPI_MOSI_L();
-        } 
-
-        byteToWrite <<= 1;
-
-        //SpiSetSckHigh(); 
-        BOARD_SPI_SCK_H();
-        temp <<= 1;
-        if(READ_BOARD_SPI_MISO())
-        {
-          temp ++; 
-        }
-        //SpiSetSckLow();
-        BOARD_SPI_SCK_L();
-    }
-#endif
-	return temp;
-}
-
-void myRadioSpi_wBuffer(uint8_t* pData, uint8_t len)
-{
-  uint8_t i;
-  
-  for(i = 0; i < len; i++)
-  {
-    myRadioSpi_rwByte(*pData);
-    pData ++;
-  }
-}
-
-void myRadioSpi_rBuffer(uint8_t* pData, uint8_t len)
-{
-  uint8_t i;
-  
-  for(i = 0; i < len; i++)
-  {
-    *pData = myRadioSpi_rwByte(0xFF);
-    pData ++;
-  }
-}
-
+#include "myRadio_gpio.h"
+#include "stm32f10x.h"
+#include "stm32f10x_exti.h"
+
+RADIO_GPIO_CALLBACK gpioCallback;
+void BOARD_SPI_NSS_H(void)
+{
+    GPIO_WriteBit(BOARD_GPIO_SPI_CSN, BOARD_PIN_H);
+}
+void BOARD_SPI_NSS_L(void)
+{
+    GPIO_WriteBit(BOARD_GPIO_SPI_CSN, BOARD_PIN_L);
+}
+void BOARD_SPI_SCK_H(void)
+{
+    GPIO_WriteBit(BOARD_GPIO_SPI_CLK, BOARD_PIN_H);
+}
+void BOARD_SPI_SCK_L(void)
+{
+    GPIO_WriteBit(BOARD_GPIO_SPI_CLK, BOARD_PIN_L);
+}
+void BOARD_SPI_MISO_H(void)
+{
+    GPIO_WriteBit(BOARD_GPIO_SPI_MISO, BOARD_PIN_H);
+}
+void BOARD_SPI_MISO_L(void)
+{
+    GPIO_WriteBit(BOARD_GPIO_SPI_MISO, BOARD_PIN_L);
+}
+void BOARD_SPI_MOSI_H(void)
+{
+    GPIO_WriteBit(BOARD_GPIO_SPI_MOSI, BOARD_PIN_H);
+}
+void BOARD_SPI_MOSI_L(void)
+{
+    GPIO_WriteBit(BOARD_GPIO_SPI_MOSI, BOARD_PIN_L);
+}
+void BOARD_GPIOA_H(void)
+{
+    GPIO_WriteBit(BOARD_GPIO_SPI_GPIOA, BOARD_PIN_H);
+}
+void BOARD_GPIOA_L(void)
+{
+    GPIO_WriteBit(BOARD_GPIO_SPI_GPIOA, BOARD_PIN_L);
+}
+void BOARD_GPIOB_H(void)
+{
+    GPIO_WriteBit(BOARD_GPIO_SPI_GPIOB, BOARD_PIN_H);
+}
+void BOARD_GPIOB_L(void)
+{
+    GPIO_WriteBit(BOARD_GPIO_SPI_GPIOB, BOARD_PIN_L);
+}
+void BOARD_GPIOC_H(void)
+{
+    GPIO_WriteBit(BOARD_GPIO_SPI_GPIOC, BOARD_PIN_H);
+}
+void BOARD_GPIOC_L(void)
+{
+    GPIO_WriteBit(BOARD_GPIO_SPI_GPIOC, BOARD_PIN_L);
+}
+void BOARD_GPIOD_H(void)
+{
+    GPIO_WriteBit(BOARD_GPIO_SPI_GPIOD, BOARD_PIN_H);
+}
+void BOARD_GPIOD_L(void)
+{
+    GPIO_WriteBit(BOARD_GPIO_SPI_GPIOD, BOARD_PIN_L);
+}
+void BOARD_GPIOE_H(void)
+{
+    GPIO_WriteBit(BOARD_GPIO_SPI_GPIOE, BOARD_PIN_H);
+}
+void BOARD_GPIOE_L(void)
+{
+    GPIO_WriteBit(BOARD_GPIO_SPI_GPIOE, BOARD_PIN_L);
+}
+void BOARD_GPIOF_H(void)
+{
+    GPIO_WriteBit(BOARD_GPIO_SPI_GPIOF, BOARD_PIN_H);
+}
+void BOARD_GPIOF_L(void)
+{
+    GPIO_WriteBit(BOARD_GPIO_SPI_GPIOF, BOARD_PIN_L);
+}
+void BOARD_GPIOG_H(void)
+{
+    GPIO_WriteBit(BOARD_GPIO_SPI_GPIOG, BOARD_PIN_H);
+}
+void BOARD_GPIOG_L(void)
+{
+    GPIO_WriteBit(BOARD_GPIO_SPI_GPIOG, BOARD_PIN_L);
+}
+void BOARD_GPIOH_H(void)
+{
+    GPIO_WriteBit(BOARD_GPIO_SPI_GPIOH, BOARD_PIN_H);
+}
+void BOARD_GPIOH_L(void)
+{
+    GPIO_WriteBit(BOARD_GPIO_SPI_GPIOH, BOARD_PIN_L);
+}
+
+uint8_t READ_BOARD_SPI_MISO(void)
+{
+    return GPIO_ReadInputDataBit(BOARD_GPIO_SPI_MISO);
+}
+uint8_t READ_BOARD_GPIOA(void)
+{
+    return GPIO_ReadInputDataBit(BOARD_GPIO_SPI_GPIOA);
+}
+uint8_t READ_BOARD_GPIOB(void)
+{
+    return GPIO_ReadInputDataBit(BOARD_GPIO_SPI_GPIOB);
+}
+uint8_t READ_BOARD_GPIOC(void)
+{
+    return GPIO_ReadInputDataBit(BOARD_GPIO_SPI_GPIOC);
+}
+uint8_t READ_BOARD_GPIOD(void)
+{
+    return GPIO_ReadInputDataBit(BOARD_GPIO_SPI_GPIOD);
+}
+uint8_t READ_BOARD_GPIOE(void)
+{
+    return GPIO_ReadInputDataBit(BOARD_GPIO_SPI_GPIOE);
+}
+uint8_t READ_BOARD_GPIOF(void)
+{
+    return GPIO_ReadInputDataBit(BOARD_GPIO_SPI_GPIOF);
+}
+uint8_t READ_BOARD_GPIOG(void)
+{
+    return GPIO_ReadInputDataBit(BOARD_GPIO_SPI_GPIOG);
+}
+uint8_t READ_BOARD_GPIOH(void)
+{
+    return GPIO_ReadInputDataBit(BOARD_GPIO_SPI_GPIOH);
+}
+void EXTI0_IRQHandler(void)
+{
+    if(EXTI_GetITStatus(EXTI_Line0) != RESET)
+    {
+        /* Clear the EXTI line 1 pending bit */
+        EXTI_ClearITPendingBit(EXTI_Line0);
+        gpioCallback(1);
+    }
+}
+// BOARD_PIN_SPI_GPIOD
+void myRadio_gpio_irq_init()
+{
+    NVIC_InitTypeDef  NVIC_InitStructure;
+    EXTI_InitTypeDef  EXTI_InitStructure;
+    
+    EXTI_ClearITPendingBit(EXTI_Line1);
+    EXTI_InitStructure.EXTI_Line = EXTI_Line0;
+    EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt;
+    EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Rising;
+    EXTI_InitStructure.EXTI_LineCmd = ENABLE;
+    EXTI_Init(&EXTI_InitStructure);
+    GPIO_EXTILineConfig(GPIO_PortSourceGPIOB, GPIO_PinSource0);
+    /* Enable and set EXTI1 Interrupt */
+    NVIC_InitStructure.NVIC_IRQChannel = EXTI0_IRQn;
+    NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0x01;
+    NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0x00;
+    NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
+    NVIC_Init(&NVIC_InitStructure);
+}
+void myRadio_gpio_init(RADIO_GPIO_CALLBACK cb)
+{
+    GPIO_InitTypeDef  GPIO_InitStructure;
+	SPI_InitTypeDef  SPI_InitStructure;
+    
+#if defined(SPI_HARD)    
+    //----------SPI1时钟使能
+    RCC_APB2PeriphClockCmd(	RCC_APB2Periph_SPI1, ENABLE );
+
+	GPIO_InitStructure.GPIO_Pin = BOARD_PIN_SPI_CLK | BOARD_PIN_SPI_MISO | BOARD_PIN_SPI_MOSI;
+	GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;  //复用推挽输出
+	GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
+	GPIO_Init(BOARD_PORT_SPI_CLK, &GPIO_InitStructure);
+
+ 	GPIO_SetBits(BOARD_GPIO_SPI_CLK | BOARD_PIN_SPI_MISO | BOARD_PIN_SPI_MOSI);
+    /*!< SPI configuration */
+    SPI_InitStructure.SPI_Direction = SPI_Direction_2Lines_FullDuplex;
+    SPI_InitStructure.SPI_Mode = SPI_Mode_Master;
+    SPI_InitStructure.SPI_DataSize = SPI_DataSize_8b;
+    SPI_InitStructure.SPI_CPOL = SPI_CPOL_Low;
+    SPI_InitStructure.SPI_CPHA = SPI_CPHA_1Edge;
+    SPI_InitStructure.SPI_NSS = SPI_NSS_Soft;
+    SPI_InitStructure.SPI_BaudRatePrescaler = SPI_BaudRatePrescaler_16;
+
+    SPI_InitStructure.SPI_FirstBit = SPI_FirstBit_MSB;
+    SPI_InitStructure.SPI_CRCPolynomial = 7;
+    SPI_Init(SPI1, &SPI_InitStructure);
+
+    /*!< Enable the SPI1  */
+    SPI_Cmd(SPI1, ENABLE);
+#else
+
+    GPIO_InitStructure.GPIO_Pin = BOARD_PIN_SPI_MOSI;           
+    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;      
+    GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;      
+    GPIO_Init(BOARD_PORT_SPI_MOSI, &GPIO_InitStructure);
+    GPIO_InitStructure.GPIO_Pin = BOARD_PIN_SPI_MISO;           
+    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;     
+    GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;      
+    GPIO_Init(BOARD_PORT_SPI_MISO, &GPIO_InitStructure);
+    GPIO_InitStructure.GPIO_Pin = BOARD_PIN_SPI_CLK;            
+    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;      
+    GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;      
+    GPIO_Init(BOARD_PORT_SPI_CLK, &GPIO_InitStructure);
+#endif
+    GPIO_InitStructure.GPIO_Pin = BOARD_PIN_SPI_CSN;            
+    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;      
+    GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;      
+    GPIO_Init(BOARD_PORT_SPI_CSN, &GPIO_InitStructure);
+
+    GPIO_InitStructure.GPIO_Pin = BOARD_PIN_SPI_GPIOA;         
+    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU;      
+    GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;  
+    GPIO_Init(BOARD_PORT_SPI_GPIOA, &GPIO_InitStructure);
+    GPIO_InitStructure.GPIO_Pin = BOARD_PIN_SPI_GPIOB;         
+    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU;      
+    GPIO_Init(BOARD_PORT_SPI_GPIOB, &GPIO_InitStructure);
+    GPIO_InitStructure.GPIO_Pin = BOARD_PIN_SPI_GPIOC;         
+    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU;      
+    GPIO_Init(BOARD_PORT_SPI_GPIOC, &GPIO_InitStructure);
+    GPIO_InitStructure.GPIO_Pin = BOARD_PIN_SPI_GPIOD;         
+    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU;      
+    GPIO_Init(BOARD_PORT_SPI_GPIOD, &GPIO_InitStructure);
+    GPIO_InitStructure.GPIO_Pin = BOARD_PIN_SPI_GPIOE;         
+    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;      
+    GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;  
+    GPIO_Init(BOARD_PORT_SPI_GPIOE, &GPIO_InitStructure);
+    GPIO_InitStructure.GPIO_Pin = BOARD_PIN_SPI_GPIOF;         
+    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;      
+    GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;  
+    GPIO_Init(BOARD_PORT_SPI_GPIOF, &GPIO_InitStructure);
+
+    BOARD_SPI_NSS_H();
+
+    myRadio_gpio_irq_init();
+    gpioCallback = cb;
+}
+uint8_t myRadioSpi_rwByte(uint8_t byteToWrite)
+{
+    uint16_t i = 0;
+    uint8_t temp = 0;   
+#if defined(SPI_HARD)
+	while (SPI_I2S_GetFlagStatus(SPI1, SPI_I2S_FLAG_TXE) == RESET) //检查指定的SPI标志位设置与否:发送缓存空标志位
+    {
+        i++;
+        if(i > 2000)return 0;
+    }			  
+	SPI_I2S_SendData(SPI1, byteToWrite); //通过外设SPIx发送一个数据
+	i=0;
+
+	while (SPI_I2S_GetFlagStatus(SPI1, SPI_I2S_FLAG_RXNE) == RESET)//检查指定的SPI标志位设置与否:接受缓存非空标志位
+    {
+        i++;
+        if(i > 2000)return 0;
+    }
+    /*!< Return the byte read from the SPI bus */
+    temp = SPI_I2S_ReceiveData(SPI1);
+#else
+    BOARD_SPI_SCK_L();
+    for(i = 0; i < 8; i ++)
+    {
+        if(byteToWrite & 0x80)
+        {
+          //SpiSetMosiHigh();
+          BOARD_SPI_MOSI_H();
+        }
+        else
+        {
+          //SpiSetMosiLow();
+          BOARD_SPI_MOSI_L();
+        } 
+
+        byteToWrite <<= 1;
+
+        //SpiSetSckHigh(); 
+        BOARD_SPI_SCK_H();
+        temp <<= 1;
+        if(READ_BOARD_SPI_MISO())
+        {
+          temp ++; 
+        }
+        //SpiSetSckLow();
+        BOARD_SPI_SCK_L();
+    }
+#endif
+	return temp;
+}
+
+void myRadioSpi_wBuffer(uint8_t* pData, uint8_t len)
+{
+  uint8_t i;
+  
+  for(i = 0; i < len; i++)
+  {
+    myRadioSpi_rwByte(*pData);
+    pData ++;
+  }
+}
+
+void myRadioSpi_rBuffer(uint8_t* pData, uint8_t len)
+{
+  uint8_t i;
+  
+  for(i = 0; i < len; i++)
+  {
+    *pData = myRadioSpi_rwByte(0xFF);
+    pData ++;
+  }
+}
+