Modtronix inAir9 driver based on SX1276 standard driver
Dependents: SX1276PingPong_inAir Sensors LoRaTerminal
Fork of SX1276Lib by
enums.h
00001 /* 00002 / _____) _ | | 00003 ( (____ _____ ____ _| |_ _____ ____| |__ 00004 \____ \| ___ | (_ _) ___ |/ ___) _ \ 00005 _____) ) ____| | | || |_| ____( (___| | | | 00006 (______/|_____)_|_|_| \__)_____)\____)_| |_| 00007 (C) 2014 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 /*! 00040 * Type of the supported board. 00041 */ 00042 typedef enum BoardTypeInAir 00043 { 00044 BOARD_INAIR4 = 0, 00045 BOARD_INAIR9, 00046 BOARD_INAIR9B, 00047 BOARD_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 }RadioFskSettings_t ; 00068 00069 /*! 00070 * Radio FSK packet handler state 00071 */ 00072 typedef struct 00073 { 00074 uint8_t PreambleDetected; 00075 uint8_t SyncWordDetected; 00076 int8_t RssiValue; 00077 int32_t AfcValue; 00078 uint8_t RxGain; 00079 uint16_t Size; 00080 uint16_t NbBytes; 00081 uint8_t FifoThresh; 00082 uint8_t ChunkSize; 00083 }RadioFskPacketHandler_t ; 00084 00085 /*! 00086 * Radio LoRa modem parameters 00087 */ 00088 typedef struct 00089 { 00090 int8_t Power; 00091 uint32_t Bandwidth; 00092 uint32_t Datarate; 00093 bool LowDatarateOptimize; 00094 uint8_t Coderate; 00095 uint16_t PreambleLen; 00096 bool FixLen; 00097 uint8_t PayloadLen; 00098 bool CrcOn; 00099 bool FreqHopOn; 00100 uint8_t HopPeriod; 00101 bool IqInverted; 00102 bool RxContinuous; 00103 uint32_t TxTimeout; 00104 }RadioLoRaSettings_t ; 00105 00106 /*! 00107 * Radio LoRa packet handler state 00108 */ 00109 typedef struct 00110 { 00111 int8_t SnrValue; 00112 int8_t RssiValue; 00113 uint8_t Size; 00114 }RadioLoRaPacketHandler_t ; 00115 00116 /*! 00117 * Radio Settings 00118 */ 00119 typedef struct 00120 { 00121 RadioState State; 00122 ModemType Modem; 00123 uint32_t Channel; 00124 RadioFskSettings_t Fsk; 00125 RadioFskPacketHandler_t FskPacketHandler; 00126 RadioLoRaSettings_t LoRa; 00127 RadioLoRaPacketHandler_t LoRaPacketHandler; 00128 }RadioSettings_t ; 00129 00130 00131 #endif //__ENUMS_H__
Generated on Thu Jul 14 2022 20:59:58 by 1.7.2