资源简介
本示例需要两块 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商业实战三部曲源码
评论
共有 条评论