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 LPC1768_RFM95, 00048 UNKNOWN 00049 }BoardType_t; 00050 00051 /*! 00052 * Radio FSK modem parameters 00053 */ 00054 typedef struct 00055 { 00056 int8_t Power; 00057 uint32_t Fdev; 00058 uint32_t Bandwidth; 00059 uint32_t BandwidthAfc; 00060 uint32_t Datarate; 00061 uint16_t PreambleLen; 00062 bool FixLen; 00063 uint8_t PayloadLen; 00064 bool CrcOn; 00065 bool IqInverted; 00066 bool RxContinuous; 00067 uint32_t TxTimeout; 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 }RadioLoRaSettings_t ; 00106 00107 /*! 00108 * Radio LoRa packet handler state 00109 */ 00110 typedef struct 00111 { 00112 int8_t SnrValue; 00113 int8_t RssiValue; 00114 uint8_t Size; 00115 }RadioLoRaPacketHandler_t ; 00116 00117 /*! 00118 * Radio Settings 00119 */ 00120 typedef struct 00121 { 00122 RadioState State; 00123 ModemType Modem; 00124 uint32_t Channel; 00125 RadioFskSettings_t Fsk; 00126 RadioFskPacketHandler_t FskPacketHandler; 00127 RadioLoRaSettings_t LoRa; 00128 RadioLoRaPacketHandler_t LoRaPacketHandler; 00129 }RadioSettings_t ; 00130 00131 00132 #endif //__ENUMS_H__
Generated on Fri Jul 15 2022 21:42:05 by
1.7.2
