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.
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 * Type of the supported board. [SX1276MB1MAS / SX1276MB1LAS] 00040 */ 00041 typedef enum BoardType 00042 { 00043 SX1276MB1MAS = 0, 00044 SX1276MB1LAS, 00045 UNKNOWN 00046 }BoardType_t; 00047 00048 /*! 00049 * Radio FSK modem parameters 00050 */ 00051 typedef struct 00052 { 00053 int8_t Power; 00054 uint32_t Fdev; 00055 uint32_t Bandwidth; 00056 uint32_t BandwidthAfc; 00057 uint32_t Datarate; 00058 uint16_t PreambleLen; 00059 bool FixLen; 00060 uint8_t PayloadLen; 00061 bool CrcOn; 00062 bool IqInverted; 00063 bool RxContinuous; 00064 uint32_t TxTimeout; 00065 uint32_t RxSingleTimeout; 00066 }RadioFskSettings_t ; 00067 00068 /*! 00069 * Radio FSK packet handler state 00070 */ 00071 typedef struct 00072 { 00073 uint8_t PreambleDetected; 00074 uint8_t SyncWordDetected; 00075 int8_t RssiValue; 00076 int32_t AfcValue; 00077 uint8_t RxGain; 00078 uint16_t Size; 00079 uint16_t NbBytes; 00080 uint8_t FifoThresh; 00081 uint8_t ChunkSize; 00082 }RadioFskPacketHandler_t ; 00083 00084 /*! 00085 * Radio LoRa modem parameters 00086 */ 00087 typedef struct 00088 { 00089 int8_t Power; 00090 uint32_t Bandwidth; 00091 uint32_t Datarate; 00092 bool LowDatarateOptimize; 00093 uint8_t Coderate; 00094 uint16_t PreambleLen; 00095 bool FixLen; 00096 uint8_t PayloadLen; 00097 bool CrcOn; 00098 bool FreqHopOn; 00099 uint8_t HopPeriod; 00100 bool IqInverted; 00101 bool RxContinuous; 00102 uint32_t TxTimeout; 00103 bool PublicNetwork; 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 04:57:38 by
1.7.2