Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of SX1272Lib by
enums.h
00001 /* 00002 / _____) _ | | 00003 ( (____ _____ ____ _| |_ _____ ____| |__ 00004 \____ \| ___ | (_ _) ___ |/ ___) _ \ 00005 _____) ) ____| | | || |_| ____( (___| | | | 00006 (______/|_____)_|_|_| \__)_____)\____)_| |_| 00007 ( C )2015 Semtech 00008 00009 Description: - 00010 00011 License: Revised BSD License, see LICENSE.TXT file include in the project 00012 00013 Maintainers: Miguel Luis, Gregory Cristian and Nicolas Huguenin 00014 */ 00015 #ifndef __ENUMS_H__ 00016 #define __ENUMS_H__ 00017 00018 /*! 00019 * Radio driver internal state machine states definition 00020 */ 00021 typedef enum RadioState 00022 { 00023 RF_IDLE = 0, 00024 RF_RX_RUNNING, 00025 RF_TX_RUNNING, 00026 RF_CAD, 00027 }RadioState_t; 00028 00029 /*! 00030 * Type of the modem. [LORA / FSK] 00031 */ 00032 typedef enum ModemType 00033 { 00034 MODEM_FSK = 0, 00035 MODEM_LORA 00036 }RadioModems_t; 00037 00038 /*! 00039 * Type of the supported board. 00040 */ 00041 typedef enum BoardType 00042 { 00043 SX1272MB2XAS = 0, 00044 SX1272MB1DCS, 00045 NA_MOTE_72, 00046 MDOT_F411RE, 00047 UNKNOWN 00048 }BoardType_t; 00049 00050 /*! 00051 * Radio FSK modem parameters 00052 */ 00053 typedef struct 00054 { 00055 int8_t Power; 00056 uint32_t Fdev; 00057 uint32_t Bandwidth; 00058 uint32_t BandwidthAfc; 00059 uint32_t Datarate; 00060 uint16_t PreambleLen; 00061 bool FixLen; 00062 uint8_t PayloadLen; 00063 bool CrcOn; 00064 bool IqInverted; 00065 bool RxContinuous; 00066 uint32_t TxTimeout; 00067 uint32_t RxSingleTimeout; 00068 }RadioFskSettings_t ; 00069 00070 /*! 00071 * Radio FSK packet handler state 00072 */ 00073 typedef struct 00074 { 00075 uint8_t PreambleDetected; 00076 uint8_t SyncWordDetected; 00077 int8_t RssiValue; 00078 int32_t AfcValue; 00079 uint8_t RxGain; 00080 uint16_t Size; 00081 uint16_t NbBytes; 00082 uint8_t FifoThresh; 00083 uint8_t ChunkSize; 00084 }RadioFskPacketHandler_t ; 00085 00086 /*! 00087 * Radio LoRa modem parameters 00088 */ 00089 typedef struct 00090 { 00091 int8_t Power; 00092 uint32_t Bandwidth; 00093 uint32_t Datarate; 00094 bool LowDatarateOptimize; 00095 uint8_t Coderate; 00096 uint16_t PreambleLen; 00097 bool FixLen; 00098 uint8_t PayloadLen; 00099 bool CrcOn; 00100 bool FreqHopOn; 00101 uint8_t HopPeriod; 00102 bool IqInverted; 00103 bool RxContinuous; 00104 uint32_t TxTimeout; 00105 bool PublicNetwork; 00106 }RadioLoRaSettings_t ; 00107 00108 /*! 00109 * Radio LoRa packet handler state 00110 */ 00111 typedef struct 00112 { 00113 int8_t SnrValue; 00114 int8_t RssiValue; 00115 uint8_t Size; 00116 }RadioLoRaPacketHandler_t ; 00117 00118 /*! 00119 * Radio Settings 00120 */ 00121 typedef struct 00122 { 00123 RadioState State; 00124 ModemType Modem; 00125 uint32_t Channel; 00126 RadioFskSettings_t Fsk; 00127 RadioFskPacketHandler_t FskPacketHandler; 00128 RadioLoRaSettings_t LoRa; 00129 RadioLoRaPacketHandler_t LoRaPacketHandler; 00130 }RadioSettings_t ; 00131 00132 00133 #endif //__ENUMS_H__
Generated on Sat Jul 16 2022 03:27:05 by
