資源簡介
本示例需要兩塊 B-L072Z-LRWAN1 套件。 該演示包括在兩個 LoRa 對象之間建立簡單的
Rx / Tx 射頻鏈路。
默認情況下,探索板會閃爍 LED 指示燈(LED1、LED2、LED3 和 LED4)。 每個 LoRa 對
象在啟動時為主機,并發送“Ping”消息,然后每個 LoRa 對象等待應答。接收到“Ping”
消息的第一個 LoRa 對象會變成從機,并使用“Pong”消息應答主機,這將在他們之間啟
動乒乓游戲。 然后主機只會閃爍紅色 LED 指示燈(LED4),從機只會閃爍藍色 LED 指示
燈(LED3)。

代碼片段和文件信息
/******************************************************************************
??*?@file????debug.c
??*?@author??MCD?Application?Team
??*?@version?V1.1.4
??*?@date????08-January-2018
??*?@brief???debug?API
??******************************************************************************
??*?@attention
??*
??*?©?Copyright?(c)?2017?STMicroelectronics?International?N.V.?
??*?All?rights?reserved.
??*
??*?Redistribution?and?use?in?source?and?binary?forms?with?or?without?
??*?modification?are?permitted?provided?that?the?following?conditions?are?met:
??*
??*?1.?Redistribution?of?source?code?must?retain?the?above?copyright?notice?
??*????this?list?of?conditions?and?the?following?disclaimer.
??*?2.?Redistributions?in?binary?form?must?reproduce?the?above?copyright?notice
??*????this?list?of?conditions?and?the?following?disclaimer?in?the?documentation
??*????and/or?other?materials?provided?with?the?distribution.
??*?3.?Neither?the?name?of?STMicroelectronics?nor?the?names?of?other?
??*????contributors?to?this?software?may?be?used?to?endorse?or?promote?products?
??*????derived?from?this?software?without?specific?written?permission.
??*?4.?This?software?including?modifications?and/or?derivative?works?of?this?
??*????software?must?execute?solely?and?exclusively?on?microcontroller?or
??*????microprocessor?devices?manufactured?by?or?for?STMicroelectronics.
??*?5.?Redistribution?and?use?of?this?software?other?than?as?permitted?under?
??*????this?license?is?void?and?will?automatically?terminate?your?rights?under?
??*????this?license.?
??*
??*?THIS?SOFTWARE?IS?PROVIDED?BY?STMICROELECTRONICS?AND?CONTRIBUTORS?“AS?IS“?
??*?AND?ANY?EXPRESS?IMPLIED?OR?STATUTORY?WARRANTIES?INCLUDING?BUT?NOT?
??*?LIMITED?TO?THE?IMPLIED?WARRANTIES?OF?MERCHANTABILITY?FITNESS?FOR?A?
??*?PARTICULAR?PURPOSE?AND?NON-INFRINGEMENT?OF?THIRD?PARTY?INTELLECTUAL?PROPERTY
??*?RIGHTS?ARE?DISCLAIMED?TO?THE?FULLEST?EXTENT?PERMITTED?BY?LAW.?IN?NO?EVENT?
??*?SHALL?STMICROELECTRONICS?OR?CONTRIBUTORS?BE?LIABLE?FOR?ANY?DIRECT?INDIRECT
??*?INCIDENTAL?SPECIAL?EXEMPLARY?OR?CONSEQUENTIAL?DAMAGES?(INCLUDING?BUT?NOT
??*?LIMITED?TO?PROCUREMENT?OF?SUBSTITUTE?GOODS?OR?SERVICES;?LOSS?OF?USE?DATA?
??*?OR?PROFITS;?OR?BUSINESS?INTERRUPTION)?HOWEVER?CAUSED?AND?ON?ANY?THEORY?OF?
??*?LIABILITY?WHETHER?IN?CONTRACT?STRICT?LIABILITY?OR?TORT?(INCLUDING?
??*?NEGLIGENCE?OR?OTHERWISE)?ARISING?IN?ANY?WAY?OUT?OF?THE?USE?OF?THIS?SOFTWARE
??*?EVEN?IF?ADVISED?OF?THE?POSSIBILITY?OF?SUCH?DAMAGE.
??*
??******************************************************************************
??*/
/*?Includes?------------------------------------------------------------------*/
#include?“hw.h“
/**
??*?@brief?Initializes?the?debug
??*?@param?None
??*?@retval?None
??*/
void?DBG_Init(?void?)
{
#ifdef?DEBUG
??GPIO_InitTypeDef??gpioinitstruct?=?{0};
??
??/*?Enable?the?GPIO_B?Clock?*/
??__HAL_RCC_GPIOB_CLK_ENABLE();
??/*?Configure?the?GPIO
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????50793??2018-01-05?22:42??PingPong\EWARM\B-L072Z-LRWAN1\Lora.ewd
?????文件??????44495??2018-01-05?22:42??PingPong\EWARM\B-L072Z-LRWAN1\Lora.ewp
?????文件????????148??2018-01-05?22:42??PingPong\EWARM\B-L072Z-LRWAN1\Project.eww
?????文件??????12506??2018-01-05?22:42??PingPong\EWARM\B-L072Z-LRWAN1\startup_stm32l072xx.s
?????文件???????1353??2018-01-05?22:42??PingPong\EWARM\B-L072Z-LRWAN1\stm32l072xx_flash.icf
?????文件?????152188??2018-01-05?22:42??PingPong\EWARM\STM32L053R8-Nucleo\Lora.ewd
?????文件?????244802??2018-01-05?22:42??PingPong\EWARM\STM32L053R8-Nucleo\Lora.ewp
?????文件????????148??2018-01-05?22:42??PingPong\EWARM\STM32L053R8-Nucleo\Project.eww
?????文件??????12054??2018-01-05?22:42??PingPong\EWARM\STM32L053R8-Nucleo\startup_stm32l053xx.s
?????文件???????1353??2018-01-05?22:42??PingPong\EWARM\STM32L053R8-Nucleo\stm32l053xx_flash.icf
?????文件?????152188??2018-01-05?22:42??PingPong\EWARM\STM32L073RZ-Nucleo\Lora.ewd
?????文件?????244802??2018-01-05?22:42??PingPong\EWARM\STM32L073RZ-Nucleo\Lora.ewp
?????文件????????148??2018-01-05?22:42??PingPong\EWARM\STM32L073RZ-Nucleo\Project.eww
?????文件??????12631??2018-01-05?22:42??PingPong\EWARM\STM32L073RZ-Nucleo\startup_stm32l073xx.s
?????文件???????1353??2018-01-05?22:42??PingPong\EWARM\STM32L073RZ-Nucleo\stm32l073xx_flash.icf
?????文件?????152200??2018-01-05?22:42??PingPong\EWARM\STM32L152RE-Nucleo\Lora.ewd
?????文件?????244800??2018-01-05?22:42??PingPong\EWARM\STM32L152RE-Nucleo\Lora.ewp
?????文件????????148??2018-01-05?22:42??PingPong\EWARM\STM32L152RE-Nucleo\Project.eww
?????文件??????17924??2018-01-05?22:42??PingPong\EWARM\STM32L152RE-Nucleo\startup_stm32l152xe.s
?????文件???????1341??2018-01-05?22:42??PingPong\EWARM\STM32L152RE-Nucleo\stm32l152xe_flash.icf
?????文件?????152200??2018-01-05?22:42??PingPong\EWARM\STM32L476RG-Nucleo\Lora.ewd
?????文件?????245600??2018-01-05?22:42??PingPong\EWARM\STM32L476RG-Nucleo\Lora.ewp
?????文件????????148??2018-01-05?22:42??PingPong\EWARM\STM32L476RG-Nucleo\Project.eww
?????文件??????22813??2018-01-05?22:42??PingPong\EWARM\STM32L476RG-Nucleo\startup_stm32l476xx.s
?????文件???????1646??2018-01-05?22:42??PingPong\EWARM\STM32L476RG-Nucleo\stm32l476xx_flash.icf
?????文件???????4530??2018-01-05?22:42??PingPong\inc\debug.h
?????文件???????3654??2018-01-05?22:42??PingPong\inc\hw.h
?????文件???????5380??2018-01-05?22:42??PingPong\inc\hw_conf.h
?????文件???????6386??2018-01-05?22:42??PingPong\inc\hw_gpio.h
?????文件???????7292??2018-01-05?22:42??PingPong\inc\hw_msp.h
............此處省略253個文件信息
- 上一篇:xinli.zip
- 下一篇:Spark商業實戰三部曲源碼
評論
共有 條評論