-
大小: 5.71MB文件类型: .rar金币: 2下载: 1 次发布日期: 2023-11-15
- 语言: 其他
- 标签: sx1278 STM32F103 sx12xxDriver
资源简介
STM32F103SX1278是配置好的无线通讯程序,亲测,可以使用。另外附官网下载的SX12xxDriver.zip,这个里面有STM32其他版本的驱动程序,供其他版本的二次开发使用。
代码片段和文件信息
/*
* THE FOLLOWING FIRMWARE IS PROVIDED: (1) “AS IS“ WITH NO WARRANTY; AND
* (2)TO ENABLE ACCESS TO CODING INFORMATION TO GUIDE AND FACILITATE CUSTOMER.
* CONSEQUENTLY SEMTECH SHALL NOT BE HELD LIABLE FOR ANY DIRECT INDIRECT OR
* CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT
* OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION
* CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
*
* Copyright (C) SEMTECH S.A.
*/
/*!
* \file main.c
* \brief Ping-Pong example application on how to use Semtech‘s Radio
* drivers.
*
* \version 2.0
* \date Nov 21 2012
* \author Miguel Luis
*/
#include
#include
#include
#include “platform.h“
#include “led.h“
#if USE_UART
#include “uart.h“
#endif
#include “radio.h“
#define BUFFER_SIZE 9 // Define the payload size here
static uint16_t BufferSize = BUFFER_SIZE; // RF buffer size
static uint8_t Buffer[BUFFER_SIZE]; // RF buffer
static uint8_t EnableMaster = true; // Master/Slave selection
tRadioDriver *Radio = NULL;
const uint8_t PingMsg[] = “PING“;
const uint8_t PongMsg[] = “PONG“;
/*
* Manages the master operation
*/
void OnMaster( void )
{
uint8_t i;
switch( Radio->Process( ) )
{
case RF_RX_TIMEOUT:
// Send the next PING frame
Buffer[0] = ‘P‘;
Buffer[1] = ‘I‘;
Buffer[2] = ‘N‘;
Buffer[3] = ‘G‘;
for( i = 4; i < BufferSize; i++ )
{
Buffer[i] = i - 4;
}
Radio->SetTxPacket( Buffer BufferSize );
break;
case RF_RX_DONE:
Radio->GetRxPacket( Buffer ( uint16_t* )&BufferSize );
if( BufferSize > 0 )
{
if( strncmp( ( const char* )Buffer ( const char* )PongMsg 4 ) == 0 )
{
// Indicates on a LED that the received frame is a PONG
LedToggle( LED_GREEN );
// Send the next PING frame
Buffer[0] = ‘P‘;
Buffer[1] = ‘I‘;
Buffer[2] = ‘N‘;
Buffer[3] = ‘G‘;
// We fill the buffer with numbers for the payload
for( i = 4; i < BufferSize; i++ )
{
Buffer[i] = i - 4;
}
Radio->SetTxPacket( Buffer BufferSize );
}
else if( strncmp( ( const char* )Buffer ( const char* )PingMsg 4 ) == 0 )
{ // A master already exists then become a slave
EnableMaster = false;
LedOff( LED_RED );
}
}
break;
case RF_TX_DONE:
// Indicates on a LED that we have sent a PING
LedToggle( LED_RED );
Radio->StartRx( );
break;
default:
break;
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 4700616 2018-10-11 19:56 STM32F103 SX1278完整通讯程序\STM32F103_SX127x.rar
文件 13427 2014-07-24 22:24 SX12xxDrivers-V2.1.0\doc\README.txt
文件 8703 2014-07-23 15:44 SX12xxDrivers-V2.1.0\lst\fifo.lst
文件 77552 2014-07-23 15:44 SX12xxDrivers-V2.1.0\lst\i2c.lst
文件 21895 2014-07-23 15:44 SX12xxDrivers-V2.1.0\lst\ioe.lst
文件 6765 2014-07-23 15:44 SX12xxDrivers-V2.1.0\lst\led.lst
文件 19513 2014-07-23 15:44 SX12xxDrivers-V2.1.0\lst\main.lst
文件 14119 2014-07-23 15:45 SX12xxDrivers-V2.1.0\lst\misc.lst
文件 2751 2014-07-23 15:44 SX12xxDrivers-V2.1.0\lst\radio.lst
文件 9528 2014-07-23 15:44 SX12xxDrivers-V2.1.0\lst\spi.lst
文件 110586 2014-07-23 15:45 SX12xxDrivers-V2.1.0\lst\stm32f4xx_adc.lst
文件 75844 2014-07-23 15:45 SX12xxDrivers-V2.1.0\lst\stm32f4xx_dma.lst
文件 19468 2014-07-23 15:45 SX12xxDrivers-V2.1.0\lst\stm32f4xx_exti.lst
文件 107034 2014-07-23 15:45 SX12xxDrivers-V2.1.0\lst\stm32f4xx_flash.lst
文件 177404 2014-07-23 15:45 SX12xxDrivers-V2.1.0\lst\stm32f4xx_fmc.lst
文件 42337 2014-07-23 15:45 SX12xxDrivers-V2.1.0\lst\stm32f4xx_gpio.lst
文件 92780 2014-07-23 15:45 SX12xxDrivers-V2.1.0\lst\stm32f4xx_i2c.lst
文件 32826 2014-07-23 15:45 SX12xxDrivers-V2.1.0\lst\stm32f4xx_pwr.lst
文件 120018 2014-07-23 15:45 SX12xxDrivers-V2.1.0\lst\stm32f4xx_rcc.lst
文件 220276 2014-07-23 15:45 SX12xxDrivers-V2.1.0\lst\stm32f4xx_rtc.lst
文件 52653 2014-07-23 15:45 SX12xxDrivers-V2.1.0\lst\stm32f4xx_sdio.lst
文件 84121 2014-07-23 15:45 SX12xxDrivers-V2.1.0\lst\stm32f4xx_spi.lst
文件 12019 2014-07-23 15:45 SX12xxDrivers-V2.1.0\lst\stm32f4xx_syscfg.lst
文件 267070 2014-07-23 15:45 SX12xxDrivers-V2.1.0\lst\stm32f4xx_tim.lst
文件 10277 2014-07-23 15:44 SX12xxDrivers-V2.1.0\lst\stm32fxxx_it.lst
文件 153 2014-07-23 15:45 SX12xxDrivers-V2.1.0\lst\sx1232-Hal.lst
文件 155 2014-07-23 15:44 SX12xxDrivers-V2.1.0\lst\sx1232-Misc.lst
文件 145 2014-07-23 15:44 SX12xxDrivers-V2.1.0\lst\sx1232.lst
文件 153 2014-07-23 15:44 SX12xxDrivers-V2.1.0\lst\sx1272-Fsk.lst
文件 161 2014-07-23 15:44 SX12xxDrivers-V2.1.0\lst\sx1272-FskMisc.lst
............此处省略492个文件信息
相关资源
- stm32f103.SchDoc
- STM32F103 USART+DMA
- 基于STM32F103C8单片机的晶联讯电子JL
- STM32F103实现OV7670摄像头显示
- STM32F103VCT6TR - High-density performance lin
- stm32f103 虚拟U盘,调试成功的
- 基于stm32F103vct6的SD卡FATFS文件系统移植
- STM32F103启动文件HD;MD
- 基于STM32F103的实时时钟程序,采用D
- 433M无线模块的一些资料
- STM32F103系列PWM输出应用之纸短情长音
- STM32F103移植FreeModbus实现modbus主机.zi
- 基于STM32F103C8T6的循迹避障小车完成
- 基于STM32+TM1638芯片的共阳极数码管驱
- stm32f103AES加密 cbc模式
- 中国移动 M5310 模组资料 DEMO 例程- S
- STM32F103移植rt-thread
- PCA9685驱动STM32F103
- SX1278模组带PA,可到28dB发射功率
- stm32f103c8t6-max31865-pt100测温
- stm32F103C8外部flash图片显示
- STM32F103 ADC测电压 代码
- stm32f103测量pm2.5源码
- STM32F103C8T6与MQTT通信的源码
- STM32F103C8T6读取DS18B20串口显示程序.r
- MLX90614(GY906)____STM32F103ZET6
-
STM32F103C8T6_AES-128-CTR_ba
se64密文解密 - stm32f103c8t6移植uC/OS-III基于HAL库的工程
- STM32F103RCT6 TIME4 TIME5 同时捕获六路
- MPR121程序
评论
共有 条评论