| | |
| | | uint32_t RF_T_Freq; //Hz |
| | | uint32_t RF_R_Freq; //Hz |
| | | uint16_t nChnSpacing; //kHz |
| | | uint16_t nCycleTime; // |
| | | uchar workMode; //0: FSK, 1: LoRa |
| | | uchar nChannel; |
| | | uchar bMaster; |
| | | uchar nRadioAddr; |
| | | uchar bEnableMulti; |
| | | |
| | | uchar Tx_Power; // dBm 5 - 22 dBm |
| | | uchar LoraBandWidth; // [0: 125 kHz, 1: 250 kHz, 2: 500 kHz, 3: Reserved ] |
| | | uchar LoRaFactor; // [SF5 .. SF 12] |
| | |
| | | uchar bEnableEncrypt; |
| | | uchar bEnableRelay; |
| | | uchar LoRaPreambleLen; // 2 - 12 |
| | | uchar bAutoPower; //自动功率 |
| | | uchar bAutoReSend; //自动重发 |
| | | |
| | | |
| | | // uchar ; // |
| | | // uchar |
| | |
| | | |
| | | |
| | | typedef enum tag_runstep{ |
| | | RS_IDEL, |
| | | RS_IDLE, |
| | | RS_MASTER_CAD, |
| | | RS_SENDING, |
| | | RS_SENT, |
| | | RS_RECVING, |
| | | RS_RECVED, |
| | | }enRunStep; |
| | | |
| | | #pragma anon_unions |
| | |
| | | uint32_t lastErrTime; //上次错误时间 |
| | | uint32_t latancy; //延迟 |
| | | uint32_t cycleTime; //循环时间 |
| | | |
| | | uint16_t LostPackets; //丢包计数 |
| | | uint16_t CtnLstPkts; //连续丢包计数 |
| | | uint16_t MaxCtnLstPkts; //最大连续丢包计数 |
| | | uint16_t TXErr; //发送错误计数 |
| | | uint16_t RXErr; //接收错误计数 |
| | | uint16_t CRCErr; //CRC错误计数 |
| | | uint16_t ChnErr; //频道错误 |
| | | uint16_t PktErr; //包错误 |
| | | uint16_t PktErr; //包错误 ; |
| | | uint16_t ChnErr; //频道错误; |
| | | uint16_t nErrChn; //错误的频道号; |
| | | uint16_t CADDoneCount; //CAD 完成次数 |
| | | uint16_t CADOkCount; //CAD 是次数 |
| | | uint16_t CADNgCount; //CAD 否次数 |
| | | uint16_t CADTimeOut; //CAD 超时次数 |
| | | uint16_t StepErr1; //步骤错误1 |
| | | uint16_t StepErr2; //步骤错误2 |
| | | uint16_t Err1Count; //微闪报警次数 |
| | |
| | | int KWSendPkg(void* pPkg, int len); |
| | | int KWProcPkg(void); |
| | | |
| | | extern uchar nRadioChannel; |
| | | extern uchar nRadioAddr; |
| | | //extern uchar nRadioChannel; |
| | | //extern uchar nRadioAddr; |
| | | |
| | | extern stWLConfig WLCfg ; |
| | | extern stWLRunStat KwRunStat; |