LoraComm.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /**
  2. ******************************** STM32F0xx *********************************
  3. * @文件名 : LoraComm.h
  4. * @作者 : sun
  5. * @库版本 : V1.5.0
  6. * @文件版本 : V1.0.0
  7. * @日期 : 2016年06月04日
  8. * @摘要 : LoraComm头文件
  9. ******************************************************************************/
  10. /* 定义防止递归包含 ----------------------------------------------------------*/
  11. #ifndef _LORACOMM_H
  12. #define _LORACOMM_H
  13. /* 包含的头文件 --------------------------------------------------------------*/
  14. #include "stm32f10x.h"
  15. #define COMMOM_RF 433920000
  16. #define UPLINK_FREQUENCY 433920000 //435000000
  17. #define DOWNLINK_FREQUENCY 433920000 //435000000
  18. #define SHORT_PREAMBLE_LENGTH 12
  19. #define LONG_PREAMBLE_LENGTH 60
  20. #define MAXLOADLEN 128
  21. void LoraReadInit(uint8_t SingleMode,uint32_t RF_Frequency,uint32_t Timeout, uint16_t preamble );
  22. //void LoraWrite (uint8_t * buffer,uint16_t bufferLen,uint32_t RF_Frequency,uint16_t preamble );
  23. uint8_t LoraWrite(uint8_t * buffer,uint16_t bufferLen,uint32_t RF_Frequency,uint16_t preamble,uint32_t Timeout );
  24. int16_t LoraSpecialRead( void *Buffer ,uint16_t PreambleLength,uint32_t Timeout, int8_t *snr,int16_t *rssi );
  25. //void LoraSpecialWrite(uint8_t * buffer,uint16_t bufferLen,uint32_t RF_Frequency,uint16_t preamble );
  26. void LoraSpecialWrite(uint8_t * buffer,uint16_t bufferLen,uint32_t RF_Frequency,uint16_t preamble,uint32_t Timeout );
  27. #endif