@@ -8,9 +8,9 @@ type RadioRampTime = uint8
88type CadSymbolNum = uint8
99
1010// GFSK Modulation Params
11- type GFSKBitrateBandwidth = uint8
12- type GFSKModulationIndex = uint8
13- type GFSKModulationShaping = uint8
11+ type GFSKBLEBitrateBandwidth = uint8
12+ type ModulationIndex = uint8
13+ type ModulationShaping = uint8
1414
1515// GFSK Packet Params
1616type GFSKPreambleLength = uint8
@@ -19,11 +19,6 @@ type GFSKSyncWordMatch = uint8
1919type GFSKHeaderType = uint8
2020type GFSKCrcType = uint8
2121
22- // BLE Modulation Params
23- type BLEBitrateBandwidth = uint8
24- type BLEModulationIndex = uint8
25- type BLEModulationShaping = uint8
26-
2722// BLE Packet Params
2823type BLEConnectionState = uint8
2924type BLECrcType = uint8
@@ -32,7 +27,6 @@ type BLETestPayload = uint8
3227// FLRC Modulation Params
3328type FLRCBitrateBandwidth = uint8
3429type FLRCCodingRate = uint8
35- type FLRCModulationShaping = uint8
3630
3731// FLRC Packet Params
3832type FLRCPreambleLength = uint8
@@ -53,9 +47,7 @@ type LoRaIqType = uint8
5347
5448// Misc
5549type RegulatorMode = uint8
56-
5750type IRQMask = uint16
58-
5951type CircuitMode = uint8
6052type CommandStatus = uint8
6153
@@ -126,43 +118,43 @@ const (
126118 LORA_CAD_16_SYMBOLS = CadSymbolNum (0x80 )
127119
128120 // GFSK Modulation Params
129- // Bitrate + Bandwidth
130- GFSK_BR_2_000_BW_2_4 = GFSKBitrateBandwidth (0x04 )
131- GFSK_BR_1_600_BW_2_4 = GFSKBitrateBandwidth (0x28 )
132- GFSK_BR_1_000_BW_2_4 = GFSKBitrateBandwidth (0x4C )
133- GFSK_BR_1_000_BW_1_2 = GFSKBitrateBandwidth (0x45 )
134- GFSK_BR_0_800_BW_2_4 = GFSKBitrateBandwidth (0x70 )
135- GFSK_BR_0_800_BW_1_2 = GFSKBitrateBandwidth (0x69 )
136- GFSK_BR_0_500_BW_1_2 = GFSKBitrateBandwidth (0x8D )
137- GFSK_BR_0_500_BW_0_6 = GFSKBitrateBandwidth (0x86 )
138- GFSK_BR_0_400_BW_1_2 = GFSKBitrateBandwidth (0xB1 )
139- GFSK_BR_0_400_BW_0_6 = GFSKBitrateBandwidth (0xAA )
140- GFSK_BR_0_250_BW_0_6 = GFSKBitrateBandwidth (0xCE )
141- GFSK_BR_0_250_BW_0_3 = GFSKBitrateBandwidth (0xC7 )
142- GFSK_BR_0_125_BW_0_3 = GFSKBitrateBandwidth (0xEF )
143-
144- // Modulation Index
145- GFS_MOD_IND_0_35 = GFSKModulationIndex (0x00 )
146- GFS_MOD_IND_0_5 = GFSKModulationIndex (0x01 )
147- GFS_MOD_IND_0_75 = GFSKModulationIndex (0x02 )
148- GFS_MOD_IND_1_00 = GFSKModulationIndex (0x03 )
149- GFS_MOD_IND_1_25 = GFSKModulationIndex (0x04 )
150- GFS_MOD_IND_1_50 = GFSKModulationIndex (0x05 )
151- GFS_MOD_IND_1_75 = GFSKModulationIndex (0x06 )
152- GFS_MOD_IND_2_00 = GFSKModulationIndex (0x07 )
153- GFS_MOD_IND_2_25 = GFSKModulationIndex (0x08 )
154- GFS_MOD_IND_2_50 = GFSKModulationIndex (0x09 )
155- GFS_MOD_IND_2_75 = GFSKModulationIndex (0x0A )
156- GFS_MOD_IND_3_00 = GFSKModulationIndex (0x0B )
157- GFS_MOD_IND_3_25 = GFSKModulationIndex (0x0C )
158- GFS_MOD_IND_3_50 = GFSKModulationIndex (0x0D )
159- GFS_MOD_IND_3_75 = GFSKModulationIndex (0x0E )
160- GFS_MOD_IND_4_00 = GFSKModulationIndex (0x0F )
161-
162- // GFSK Modulation Shaping
163- GFSK_MOD_SHAPING_OFF = GFSKModulationShaping (0x00 )
164- GFSK_MOD_SHAPING_1_0 = GFSKModulationShaping (0x10 )
165- GFSK_MOD_SHAPING_0_5 = GFSKModulationShaping (0x20 )
121+ // Bitrate + Bandwidth - same for BLE
122+ GFSK_BLE_BR_2_000_BW_2_4 = GFSKBLEBitrateBandwidth (0x04 )
123+ GFSK_BLE_BR_1_600_BW_2_4 = GFSKBLEBitrateBandwidth (0x28 )
124+ GFSK_BLE_BR_1_000_BW_2_4 = GFSKBLEBitrateBandwidth (0x4C )
125+ GFSK_BLE_BR_1_000_BW_1_2 = GFSKBLEBitrateBandwidth (0x45 )
126+ GFSK_BLE_BR_0_800_BW_2_4 = GFSKBLEBitrateBandwidth (0x70 )
127+ GFSK_BLE_BR_0_800_BW_1_2 = GFSKBLEBitrateBandwidth (0x69 )
128+ GFSK_BLE_BR_0_500_BW_1_2 = GFSKBLEBitrateBandwidth (0x8D )
129+ GFSK_BLE_BR_0_500_BW_0_6 = GFSKBLEBitrateBandwidth (0x86 )
130+ GFSK_BLE_BR_0_400_BW_1_2 = GFSKBLEBitrateBandwidth (0xB1 )
131+ GFSK_BLE_BR_0_400_BW_0_6 = GFSKBLEBitrateBandwidth (0xAA )
132+ GFSK_BLE_BR_0_250_BW_0_6 = GFSKBLEBitrateBandwidth (0xCE )
133+ GFSK_BLE_BR_0_250_BW_0_3 = GFSKBLEBitrateBandwidth (0xC7 )
134+ GFSK_BLE_BR_0_125_BW_0_3 = GFSKBLEBitrateBandwidth (0xEF )
135+
136+ // Modulation Index - same for BLE
137+ MOD_IND_0_35 = ModulationIndex (0x00 )
138+ MOD_IND_0_5 = ModulationIndex (0x01 )
139+ MOD_IND_0_75 = ModulationIndex (0x02 )
140+ MOD_IND_1_00 = ModulationIndex (0x03 )
141+ MOD_IND_1_25 = ModulationIndex (0x04 )
142+ MOD_IND_1_50 = ModulationIndex (0x05 )
143+ MOD_IND_1_75 = ModulationIndex (0x06 )
144+ MOD_IND_2_00 = ModulationIndex (0x07 )
145+ MOD_IND_2_25 = ModulationIndex (0x08 )
146+ MOD_IND_2_50 = ModulationIndex (0x09 )
147+ MOD_IND_2_75 = ModulationIndex (0x0A )
148+ MOD_IND_3_00 = ModulationIndex (0x0B )
149+ MOD_IND_3_25 = ModulationIndex (0x0C )
150+ MOD_IND_3_50 = ModulationIndex (0x0D )
151+ MOD_IND_3_75 = ModulationIndex (0x0E )
152+ MOD_IND_4_00 = ModulationIndex (0x0F )
153+
154+ // Modulation Shaping - same for BLE and FLRC
155+ MOD_SHAPING_OFF = ModulationShaping (0x00 )
156+ MOD_SHAPING_1_0 = ModulationShaping (0x10 )
157+ MOD_SHAPING_0_5 = ModulationShaping (0x20 )
166158
167159 // GFSK Packet Params
168160 // Preamble Length
@@ -201,45 +193,6 @@ const (
201193 GFSK_CRC_1_BYTE = GFSKCrcType (0x10 )
202194 GFSK_CRC_2_BYTES = GFSKCrcType (0x20 )
203195
204- // BLE Modulation Params
205- // Bitrate + Bandwidth
206- BLE_BR_2_000_BW_2_4 = BLEBitrateBandwidth (0x04 )
207- BLE_BR_1_600_BW_2_4 = BLEBitrateBandwidth (0x28 )
208- BLE_BR_1_000_BW_2_4 = BLEBitrateBandwidth (0x4C )
209- BLE_BR_1_000_BW_1_2 = BLEBitrateBandwidth (0x45 )
210- BLE_BR_0_800_BW_2_4 = BLEBitrateBandwidth (0x70 )
211- BLE_BR_0_800_BW_1_2 = BLEBitrateBandwidth (0x69 )
212- BLE_BR_0_500_BW_1_2 = BLEBitrateBandwidth (0x8D )
213- BLE_BR_0_500_BW_0_6 = BLEBitrateBandwidth (0x86 )
214- BLE_BR_0_400_BW_1_2 = BLEBitrateBandwidth (0xB1 )
215- BLE_BR_0_400_BW_0_6 = BLEBitrateBandwidth (0xAA )
216- BLE_BR_0_250_BW_0_6 = BLEBitrateBandwidth (0xCE )
217- BLE_BR_0_250_BW_0_3 = BLEBitrateBandwidth (0xC7 )
218- BLE_BR_0_125_BW_0_3 = BLEBitrateBandwidth (0xEF )
219-
220- // Modulation Index
221- BLE_MOD_IND_0_35 = BLEModulationIndex (0x00 )
222- BLE_MOD_IND_0_5 = BLEModulationIndex (0x01 )
223- BLE_MOD_IND_0_75 = BLEModulationIndex (0x02 )
224- BLE_MOD_IND_1 = BLEModulationIndex (0x03 )
225- BLE_MOD_IND_1_25 = BLEModulationIndex (0x04 )
226- BLE_MOD_IND_1_5 = BLEModulationIndex (0x05 )
227- BLE_MOD_IND_1_75 = BLEModulationIndex (0x06 )
228- BLE_MOD_IND_2 = BLEModulationIndex (0x07 )
229- BLE_MOD_IND_2_25 = BLEModulationIndex (0x08 )
230- BLE_MOD_IND_2_5 = BLEModulationIndex (0x09 )
231- BLE_MOD_IND_2_75 = BLEModulationIndex (0x0A )
232- BLE_MOD_IND_3 = BLEModulationIndex (0x0B )
233- BLE_MOD_IND_3_25 = BLEModulationIndex (0x0C )
234- BLE_MOD_IND_3_5 = BLEModulationIndex (0x0D )
235- BLE_MOD_IND_3_75 = BLEModulationIndex (0x0E )
236- BLE_MOD_IND_4 = BLEModulationIndex (0x0F )
237-
238- // Modulation Shaping
239- BLE_MOD_SHAPING_OFF = BLEModulationShaping (0x00 )
240- BLE_MOD_SHAPING_1_0 = BLEModulationShaping (0x10 )
241- BLE_MOD_SHAPING_0_5 = BLEModulationShaping (0x20 )
242-
243196 // BLE Packet Params
244197 // Connection State
245198 BLE_MASTER_SLAVE = BLEConnectionState (0x00 )
@@ -276,11 +229,6 @@ const (
276229 FLRC_CR_3_4 = FLRCCodingRate (0x02 ) // 3/4
277230 FLRC_CR_1_0 = FLRCCodingRate (0x04 ) // 1
278231
279- // Modulation Shaping
280- FLRC_MOD_SHAPING_OFF = FLRCModulationShaping (0x00 )
281- FLRC_MOD_SHAPING_1_0 = FLRCModulationShaping (0x10 ) // 1
282- FLRC_MOD_SHAPING_0_5 = FLRCModulationShaping (0x20 ) // 0.5
283-
284232 // FLRC Packet Params
285233 // Preamble Length
286234 FLRC_PREAMBLE_LENGTH_4_BITS = FLRCPreambleLength (0x00 )
0 commit comments