1、startup.s汇编文件的的中断重定向改为ifdef,通过切换app_debug和app_boot判断是否编译
2、Sx1276Type_t 结构体给定固定值 3、lora通道选择取消,通过修改频率来修改通道 4、增加了修改lora参数的函数 5、将USE_BOOTLOADER的宏定义更改到工程预编译define 6、将BootPara_t结构体定义到bsp.h文件下 7、在bsp.h文件下增加了LoraPara_r,RS485Para_t结构体并声明 8、串口带波特率参数初始化 9、增加了MAIN_DBG_LOG和DATA_DBG_LOG调试打印 10、Update.h的boot参数定义在bsp.h获取 11、当工程是app_boot时调试口为Lpuart0,当工程是app_debug时调试口为uart0 12、设备Mac从bootloader中固定地址0x00002800获取,设备类型、通讯方式、设备标志和设备序号从获取到的mac地址解析 13、debug文件增加了调试指令
This commit is contained in:
+11
-1
@@ -2,6 +2,7 @@
|
||||
#define __SX127X_H
|
||||
|
||||
#include "bsp.h"
|
||||
#include "main.h"
|
||||
|
||||
//Constant values need to compute the RSSI value
|
||||
#define RSSI_OFFSET_LF -155
|
||||
@@ -733,6 +734,7 @@ typedef struct {
|
||||
uint8_t ucTxPacketSize;
|
||||
uint8_t RxTxBuff[LORA_BUFF_SIZE];
|
||||
void (*RxCallBack)(uint8_t *rBuff, uint8_t rlen);
|
||||
int RxRet;
|
||||
}Sx1276Type_t, *pSx1276Type;
|
||||
|
||||
//ISM Freq In China
|
||||
@@ -802,7 +804,6 @@ typedef struct {
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
void Sx1276LoRaLoopHandler(void);
|
||||
void Sx1276LoRaInit(void (*RxCallBack)(uint8_t *rBuff, uint8_t rlen));
|
||||
void SX1276LoRaSetFreqHz(uint32_t dwFreqHz);
|
||||
void Sx1276LoRaSendBuffer(uint8_t* pucBuff, uint8_t ucLen);
|
||||
uint8_t SX1276LoRaReadChannel(void);
|
||||
boolean_t SX1276LoRaWriteChannel(uint8_t Channel);
|
||||
@@ -823,5 +824,14 @@ Sx1276StateType_t SX1276LoRaReadStatus(void);
|
||||
void SX1276LoCalcRssiSnr(int8_t *pswRssi, int8_t *psbSnr);
|
||||
void Sx1276LoRaSleep(void);
|
||||
void Sx1276LoRaWakeup(void);
|
||||
|
||||
void LoraInit(void);
|
||||
bool LoraSetChannel(uint8_t Channel);
|
||||
bool LoraSetPower(uint8_t Power);
|
||||
bool LoraSetSignalBw(uint8_t SignalBw);
|
||||
bool LoraSetSpreadFactor(uint8_t SpreadFactor);
|
||||
bool LoraSetErrorCoding(uint8_t ErrorCoding);
|
||||
bool LoraSetRegPreamble(uint8_t RegPreamble);
|
||||
bool LoraSetFreqCent(uint32_t FreqCent);
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user