-
大小: 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个文件信息
相关资源
- stm32f103c8t6_sch.Lib
- STM32F103RC+ADC+DMA多通道采样LCD显示
- I2C读写AT24C02 基于STM32F103 cube116540
- 基于stm32f103ve的程序——跑马灯实验
- STM32f103超声波模块例程
- stm32f103c8t6 4 oled.rar
- STM32F103 串口程序(完整版)
- STM32F103定时器中断程序
- [免费]基于stm32f103ze 的OLED驱动代码
- STM32F103RBT6驱动UC1698控制芯片的160160黑
- STM32F103 DS18B20 V3.5.0固件库驱动程序工
- STM32F103 CC2500完整驱动(模拟SPI)
- STM8S SX1278 项目和源代码
- 基于STM32芯片的SX1278 驱动 LORA.rar
- SX1268官方驱动包含sx1278
- SX1280.rar
- STM32F103C8T6+NRF24l01无线通信
- 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的循迹避障小车完成
评论
共有 条评论