MySensors Library & Examples  2.3.2-38-gaa76d26
RFM69registers_new.h
1 /*
2  * The MySensors Arduino library handles the wireless radio link and protocol
3  * between your home built sensors/actuators and HA controller of choice.
4  * The sensors forms a self healing radio network with optional repeaters. Each
5  * repeater and gateway builds a routing tables in EEPROM which keeps track of the
6  * network topology allowing messages to be routed to nodes.
7  *
8  * Created by Henrik Ekblad <[email protected]>
9  * Copyright (C) 2013-2020 Sensnology AB
10  * Full contributor list: https://github.com/mysensors/MySensors/graphs/contributors
11  *
12  * Documentation: http://www.mysensors.org
13  * Support Forum: http://forum.mysensors.org
14  *
15  * This program is free software; you can redistribute it and/or
16  * modify it under the terms of the GNU General Public License
17  * version 2 as published by the Free Software Foundation.
18  *
19  * RFM69 driver refactored for MySensors
20  *
21  * Based on :
22  * - LowPowerLab RFM69 Lib Copyright Felix Rusu (2014), [email protected]
23  * - Automatic Transmit Power Control class derived from RFM69 library.
24  * Discussion and details in this forum post: https://lowpowerlab.com/forum/index.php/topic,688.0.html
25  * Copyright Thomas Studwell (2014,2015)
26  * - MySensors generic radio driver implementation Copyright (C) 2017, 2018 Olivier Mauti <[email protected]>
27  *
28  * Changes by : @tekka, @scalz, @marceloagno
29  *
30  * Definitions for Semtech SX1231/H radios:
31  * https://www.semtech.com/uploads/documents/sx1231.pdf
32  * https://www.semtech.com/uploads/documents/sx1231h.pdf
33  */
34 
35 #define RFM69_REG_FIFO 0x00
36 #define RFM69_REG_OPMODE 0x01
37 #define RFM69_REG_DATAMODUL 0x02
38 #define RFM69_REG_BITRATEMSB 0x03
39 #define RFM69_REG_BITRATELSB 0x04
40 #define RFM69_REG_FDEVMSB 0x05
41 #define RFM69_REG_FDEVLSB 0x06
42 #define RFM69_REG_FRFMSB 0x07
43 #define RFM69_REG_FRFMID 0x08
44 #define RFM69_REG_FRFLSB 0x09
45 #define RFM69_REG_OSC1 0x0A
46 #define RFM69_REG_AFCCTRL 0x0B
47 #define RFM69_REG_LOWBAT 0x0C
48 #define RFM69_REG_LISTEN1 0x0D
49 #define RFM69_REG_LISTEN2 0x0E
50 #define RFM69_REG_LISTEN3 0x0F
51 #define RFM69_REG_VERSION 0x10
52 #define RFM69_REG_PALEVEL 0x11
53 #define RFM69_REG_PARAMP 0x12
54 #define RFM69_REG_OCP 0x13
55 #define RFM69_REG_AGCREF 0x14 // not present on RFM69/SX1231
56 #define RFM69_REG_AGCTHRESH1 0x15 // not present on RFM69/SX1231
57 #define RFM69_REG_AGCTHRESH2 0x16 // not present on RFM69/SX1231
58 #define RFM69_REG_AGCTHRESH3 0x17 // not present on RFM69/SX1231
59 #define RFM69_REG_LNA 0x18
60 #define RFM69_REG_RXBW 0x19
61 #define RFM69_REG_AFCBW 0x1A
62 #define RFM69_REG_OOKPEAK 0x1B
63 #define RFM69_REG_OOKAVG 0x1C
64 #define RFM69_REG_OOKFIX 0x1D
65 #define RFM69_REG_AFCFEI 0x1E
66 #define RFM69_REG_AFCMSB 0x1F
67 #define RFM69_REG_AFCLSB 0x20
68 #define RFM69_REG_FEIMSB 0x21
69 #define RFM69_REG_FEILSB 0x22
70 #define RFM69_REG_RSSICONFIG 0x23
71 #define RFM69_REG_RSSIVALUE 0x24
72 #define RFM69_REG_DIOMAPPING1 0x25
73 #define RFM69_REG_DIOMAPPING2 0x26
74 #define RFM69_REG_IRQFLAGS1 0x27
75 #define RFM69_REG_IRQFLAGS2 0x28
76 #define RFM69_REG_RSSITHRESH 0x29
77 #define RFM69_REG_RXTIMEOUT1 0x2A
78 #define RFM69_REG_RXTIMEOUT2 0x2B
79 #define RFM69_REG_PREAMBLEMSB 0x2C
80 #define RFM69_REG_PREAMBLELSB 0x2D
81 #define RFM69_REG_SYNCCONFIG 0x2E
82 #define RFM69_REG_SYNCVALUE1 0x2F
83 #define RFM69_REG_SYNCVALUE2 0x30
84 #define RFM69_REG_SYNCVALUE3 0x31
85 #define RFM69_REG_SYNCVALUE4 0x32
86 #define RFM69_REG_SYNCVALUE5 0x33
87 #define RFM69_REG_SYNCVALUE6 0x34
88 #define RFM69_REG_SYNCVALUE7 0x35
89 #define RFM69_REG_SYNCVALUE8 0x36
90 #define RFM69_REG_PACKETCONFIG1 0x37
91 #define RFM69_REG_PAYLOADLENGTH 0x38
92 #define RFM69_REG_NODEADRS 0x39
93 #define RFM69_REG_BROADCASTADRS 0x3A
94 #define RFM69_REG_AUTOMODES 0x3B
95 #define RFM69_REG_FIFOTHRESH 0x3C
96 #define RFM69_REG_PACKETCONFIG2 0x3D
97 #define RFM69_REG_AESKEY1 0x3E
98 #define RFM69_REG_AESKEY2 0x3F
99 #define RFM69_REG_AESKEY3 0x40
100 #define RFM69_REG_AESKEY4 0x41
101 #define RFM69_REG_AESKEY5 0x42
102 #define RFM69_REG_AESKEY6 0x43
103 #define RFM69_REG_AESKEY7 0x44
104 #define RFM69_REG_AESKEY8 0x45
105 #define RFM69_REG_AESKEY9 0x46
106 #define RFM69_REG_AESKEY10 0x47
107 #define RFM69_REG_AESKEY11 0x48
108 #define RFM69_REG_AESKEY12 0x49
109 #define RFM69_REG_AESKEY13 0x4A
110 #define RFM69_REG_AESKEY14 0x4B
111 #define RFM69_REG_AESKEY15 0x4C
112 #define RFM69_REG_AESKEY16 0x4D
113 #define RFM69_REG_TEMP1 0x4E
114 #define RFM69_REG_TEMP2 0x4F
115 #define RFM69_REG_TESTLNA 0x58
116 #define RFM69_REG_TESTPA1 0x5A // only present on RFM69HW/SX1231H
117 #define RFM69_REG_TESTPA2 0x5C // only present on RFM69HW/SX1231H
118 #define RFM69_REG_TESTDAGC 0x6F
119 
120 //******************************************************
121 // RF69/SX1231 bit control definition
122 //******************************************************
123 
124 // RegOpMode
125 #define RFM69_OPMODE_SEQUENCER_OFF 0x80
126 #define RFM69_OPMODE_SEQUENCER_ON 0x00 // Default
127 
128 #define RFM69_OPMODE_LISTEN_ON 0x40
129 #define RFM69_OPMODE_LISTEN_OFF 0x00 // Default
130 
131 #define RFM69_OPMODE_LISTENABORT 0x20
132 
133 #define RFM69_OPMODE_SLEEP 0x00
134 #define RFM69_OPMODE_STANDBY 0x04 // Default
135 #define RFM69_OPMODE_SYNTHESIZER 0x08
136 #define RFM69_OPMODE_TRANSMITTER 0x0C
137 #define RFM69_OPMODE_RECEIVER 0x10
138 
139 
140 // RegDataModul
141 #define RFM69_DATAMODUL_DATAMODE_PACKET 0x00 // Default
142 #define RFM69_DATAMODUL_DATAMODE_CONTINUOUS 0x40
143 #define RFM69_DATAMODUL_DATAMODE_CONTINUOUSNOBSYNC 0x60
144 
145 #define RFM69_DATAMODUL_MODULATIONTYPE_FSK 0x00 // Default
146 #define RFM69_DATAMODUL_MODULATIONTYPE_OOK 0x08
147 
148 #define RFM69_DATAMODUL_MODULATIONSHAPING_00 0x00 // Default
149 #define RFM69_DATAMODUL_MODULATIONSHAPING_01 0x01
150 #define RFM69_DATAMODUL_MODULATIONSHAPING_10 0x02
151 #define RFM69_DATAMODUL_MODULATIONSHAPING_11 0x03
152 
153 // RegBitRate (bits/sec) example bit rates
154 #define RFM69_BITRATEMSB_1200 0x68
155 #define RFM69_BITRATELSB_1200 0x2B
156 #define RFM69_BITRATEMSB_2000 0x3e
157 #define RFM69_BITRATELSB_2000 0x80
158 #define RFM69_BITRATEMSB_2400 0x34
159 #define RFM69_BITRATELSB_2400 0x15
160 #define RFM69_BITRATEMSB_4800 0x1A // Default
161 #define RFM69_BITRATELSB_4800 0x0B // Default
162 #define RFM69_BITRATEMSB_9600 0x0D
163 #define RFM69_BITRATELSB_9600 0x05
164 #define RFM69_BITRATEMSB_12500 0x0A
165 #define RFM69_BITRATELSB_12500 0x00
166 #define RFM69_BITRATEMSB_19200 0x06
167 #define RFM69_BITRATELSB_19200 0x83
168 #define RFM69_BITRATEMSB_25000 0x05
169 #define RFM69_BITRATELSB_25000 0x00
170 #define RFM69_BITRATEMSB_32768 0x03
171 #define RFM69_BITRATELSB_32768 0xD1
172 #define RFM69_BITRATEMSB_38400 0x03
173 #define RFM69_BITRATELSB_38400 0x41
174 #define RFM69_BITRATEMSB_50000 0x02
175 #define RFM69_BITRATELSB_50000 0x80
176 #define RFM69_BITRATEMSB_55555 0x02
177 #define RFM69_BITRATELSB_55555 0x40
178 #define RFM69_BITRATEMSB_57600 0x02
179 #define RFM69_BITRATELSB_57600 0x2C
180 #define RFM69_BITRATEMSB_76800 0x01
181 #define RFM69_BITRATELSB_76800 0xA1
182 #define RFM69_BITRATEMSB_100000 0x01
183 #define RFM69_BITRATELSB_100000 0x40
184 #define RFM69_BITRATEMSB_115200 0x01
185 #define RFM69_BITRATELSB_115200 0x16
186 #define RFM69_BITRATEMSB_125000 0x01
187 #define RFM69_BITRATELSB_125000 0x00
188 #define RFM69_BITRATEMSB_150000 0x00
189 #define RFM69_BITRATELSB_150000 0xD5
190 #define RFM69_BITRATEMSB_153600 0x00
191 #define RFM69_BITRATELSB_153600 0xD0
192 #define RFM69_BITRATEMSB_200000 0x00
193 #define RFM69_BITRATELSB_200000 0xA0
194 #define RFM69_BITRATEMSB_250000 0x00
195 #define RFM69_BITRATELSB_250000 0x80
196 #define RFM69_BITRATEMSB_300000 0x00
197 #define RFM69_BITRATELSB_300000 0x6B
198 
199 // RegFdev - frequency deviation (Hz)
200 #define RFM69_FDEVMSB_2000 0x00
201 #define RFM69_FDEVLSB_2000 0x21
202 #define RFM69_FDEVMSB_4800 0x00
203 #define RFM69_FDEVLSB_4800 0x4f
204 #define RFM69_FDEVMSB_5000 0x00 // Default
205 #define RFM69_FDEVLSB_5000 0x52 // Default
206 #define RFM69_FDEVMSB_7500 0x00
207 #define RFM69_FDEVLSB_7500 0x7B
208 #define RFM69_FDEVMSB_9600 0x00
209 #define RFM69_FDEVLSB_9600 0x9d
210 #define RFM69_FDEVMSB_10000 0x00
211 #define RFM69_FDEVLSB_10000 0xA4
212 #define RFM69_FDEVMSB_15000 0x00
213 #define RFM69_FDEVLSB_15000 0xF6
214 #define RFM69_FDEVMSB_19200 0x01
215 #define RFM69_FDEVLSB_19200 0x3b
216 #define RFM69_FDEVMSB_20000 0x01
217 #define RFM69_FDEVLSB_20000 0x48
218 #define RFM69_FDEVMSB_25000 0x01
219 #define RFM69_FDEVLSB_25000 0x9A
220 #define RFM69_FDEVMSB_30000 0x01
221 #define RFM69_FDEVLSB_30000 0xEC
222 #define RFM69_FDEVMSB_35000 0x02
223 #define RFM69_FDEVLSB_35000 0x3D
224 #define RFM69_FDEVMSB_38400 0x02
225 #define RFM69_FDEVLSB_38400 0x75
226 #define RFM69_FDEVMSB_40000 0x02
227 #define RFM69_FDEVLSB_40000 0x8F
228 #define RFM69_FDEVMSB_45000 0x02
229 #define RFM69_FDEVLSB_45000 0xE1
230 #define RFM69_FDEVMSB_50000 0x03
231 #define RFM69_FDEVLSB_50000 0x33
232 #define RFM69_FDEVMSB_55000 0x03
233 #define RFM69_FDEVLSB_55000 0x85
234 #define RFM69_FDEVMSB_60000 0x03
235 #define RFM69_FDEVLSB_60000 0xD7
236 #define RFM69_FDEVMSB_65000 0x04
237 #define RFM69_FDEVLSB_65000 0x29
238 #define RFM69_FDEVMSB_70000 0x04
239 #define RFM69_FDEVLSB_70000 0x7B
240 #define RFM69_FDEVMSB_75000 0x04
241 #define RFM69_FDEVLSB_75000 0xCD
242 #define RFM69_FDEVMSB_76800 0x04
243 #define RFM69_FDEVLSB_76800 0xea
244 #define RFM69_FDEVMSB_80000 0x05
245 #define RFM69_FDEVLSB_80000 0x1F
246 #define RFM69_FDEVMSB_85000 0x05
247 #define RFM69_FDEVLSB_85000 0x71
248 #define RFM69_FDEVMSB_90000 0x05
249 #define RFM69_FDEVLSB_90000 0xC3
250 #define RFM69_FDEVMSB_95000 0x06
251 #define RFM69_FDEVLSB_95000 0x14
252 #define RFM69_FDEVMSB_100000 0x06
253 #define RFM69_FDEVLSB_100000 0x66
254 #define RFM69_FDEVMSB_110000 0x07
255 #define RFM69_FDEVLSB_110000 0x0A
256 #define RFM69_FDEVMSB_120000 0x07
257 #define RFM69_FDEVLSB_120000 0xAE
258 #define RFM69_FDEVMSB_125000 0x08
259 #define RFM69_FDEVLSB_125000 0x00
260 #define RFM69_FDEVMSB_130000 0x08
261 #define RFM69_FDEVLSB_130000 0x52
262 #define RFM69_FDEVMSB_140000 0x08
263 #define RFM69_FDEVLSB_140000 0xF6
264 #define RFM69_FDEVMSB_150000 0x09
265 #define RFM69_FDEVLSB_150000 0x9A
266 #define RFM69_FDEVMSB_160000 0x0A
267 #define RFM69_FDEVLSB_160000 0x3D
268 #define RFM69_FDEVMSB_170000 0x0A
269 #define RFM69_FDEVLSB_170000 0xE1
270 #define RFM69_FDEVMSB_180000 0x0B
271 #define RFM69_FDEVLSB_180000 0x85
272 #define RFM69_FDEVMSB_190000 0x0C
273 #define RFM69_FDEVLSB_190000 0x29
274 #define RFM69_FDEVMSB_200000 0x0C
275 #define RFM69_FDEVLSB_200000 0xCD
276 #define RFM69_FDEVMSB_210000 0x0D
277 #define RFM69_FDEVLSB_210000 0x71
278 #define RFM69_FDEVMSB_220000 0x0E
279 #define RFM69_FDEVLSB_220000 0x14
280 #define RFM69_FDEVMSB_230000 0x0E
281 #define RFM69_FDEVLSB_230000 0xB8
282 #define RFM69_FDEVMSB_240000 0x0F
283 #define RFM69_FDEVLSB_240000 0x5C
284 #define RFM69_FDEVMSB_250000 0x10
285 #define RFM69_FDEVLSB_250000 0x00
286 #define RFM69_FDEVMSB_260000 0x10
287 #define RFM69_FDEVLSB_260000 0xA4
288 #define RFM69_FDEVMSB_270000 0x11
289 #define RFM69_FDEVLSB_270000 0x48
290 #define RFM69_FDEVMSB_280000 0x11
291 #define RFM69_FDEVLSB_280000 0xEC
292 #define RFM69_FDEVMSB_290000 0x12
293 #define RFM69_FDEVLSB_290000 0x8F
294 #define RFM69_FDEVMSB_300000 0x13
295 #define RFM69_FDEVLSB_300000 0x33
296 
297 #define RFM69_NOP 0x00
298 
299 // RegOsc1
300 #define RFM69_OSC1_RCCAL_START 0x80
301 #define RFM69_OSC1_RCCAL_DONE 0x40
302 
303 
304 // RegAfcCtrl
305 #define RFM69_AFCCTRL_LOWBETA_OFF 0x00 // Default
306 #define RFM69_AFCCTRL_LOWBETA_ON 0x20
307 
308 
309 // RegLowBat
310 #define RFM69_LOWBAT_MONITOR 0x10
311 #define RFM69_LOWBAT_ON 0x08
312 #define RFM69_LOWBAT_OFF 0x00 // Default
313 
314 #define RFM69_LOWBAT_TRIM_1695 0x00
315 #define RFM69_LOWBAT_TRIM_1764 0x01
316 #define RFM69_LOWBAT_TRIM_1835 0x02 // Default
317 #define RFM69_LOWBAT_TRIM_1905 0x03
318 #define RFM69_LOWBAT_TRIM_1976 0x04
319 #define RFM69_LOWBAT_TRIM_2045 0x05
320 #define RFM69_LOWBAT_TRIM_2116 0x06
321 #define RFM69_LOWBAT_TRIM_2185 0x07
322 
323 
324 // RegListen1
325 #define RFM69_LISTEN1_RESOL_64 0x50
326 #define RFM69_LISTEN1_RESOL_4100 0xA0 // Default
327 #define RFM69_LISTEN1_RESOL_262000 0xF0
328 
329 #define RFM69_LISTEN1_RESOL_IDLE_64 0x40
330 #define RFM69_LISTEN1_RESOL_IDLE_4100 0x80 // Default
331 #define RFM69_LISTEN1_RESOL_IDLE_262000 0xC0
332 
333 #define RFM69_LISTEN1_RESOL_RX_64 0x10
334 #define RFM69_LISTEN1_RESOL_RX_4100 0x20 // Default
335 #define RFM69_LISTEN1_RESOL_RX_262000 0x30
336 
337 #define RFM69_LISTEN1_CRITERIA_RSSI 0x00 // Default
338 #define RFM69_LISTEN1_CRITERIA_RSSIANDSYNC 0x08
339 
340 #define RFM69_LISTEN1_END_00 0x00
341 #define RFM69_LISTEN1_END_01 0x02 // Default
342 #define RFM69_LISTEN1_END_10 0x04
343 
344 
345 // RegListen2
346 #define RFM69_LISTEN2_COEFIDLE_VALUE 0xF5 // Default
347 
348 
349 // RegListen3
350 #define RFM69_LISTEN3_COEFRX_VALUE 0x20 // Default
351 
352 
353 // RegVersion
354 #define RFM69_VERSION_VER 0x24 // Default
355 
356 
357 // RegPaLevel
358 #define RFM69_PALEVEL_PA0_ON 0x80 // Default
359 #define RFM69_PALEVEL_PA0_OFF 0x00
360 #define RFM69_PALEVEL_PA1_ON 0x40
361 #define RFM69_PALEVEL_PA1_OFF 0x00 // Default
362 #define RFM69_PALEVEL_PA2_ON 0x20
363 #define RFM69_PALEVEL_PA2_OFF 0x00 // Default
364 
365 #define RFM69_PALEVEL_OUTPUTPOWER_00000 0x00
366 #define RFM69_PALEVEL_OUTPUTPOWER_00001 0x01
367 #define RFM69_PALEVEL_OUTPUTPOWER_00010 0x02
368 #define RFM69_PALEVEL_OUTPUTPOWER_00011 0x03
369 #define RFM69_PALEVEL_OUTPUTPOWER_00100 0x04
370 #define RFM69_PALEVEL_OUTPUTPOWER_00101 0x05
371 #define RFM69_PALEVEL_OUTPUTPOWER_00110 0x06
372 #define RFM69_PALEVEL_OUTPUTPOWER_00111 0x07
373 #define RFM69_PALEVEL_OUTPUTPOWER_01000 0x08
374 #define RFM69_PALEVEL_OUTPUTPOWER_01001 0x09
375 #define RFM69_PALEVEL_OUTPUTPOWER_01010 0x0A
376 #define RFM69_PALEVEL_OUTPUTPOWER_01011 0x0B
377 #define RFM69_PALEVEL_OUTPUTPOWER_01100 0x0C
378 #define RFM69_PALEVEL_OUTPUTPOWER_01101 0x0D
379 #define RFM69_PALEVEL_OUTPUTPOWER_01110 0x0E
380 #define RFM69_PALEVEL_OUTPUTPOWER_01111 0x0F
381 #define RFM69_PALEVEL_OUTPUTPOWER_10000 0x10
382 #define RFM69_PALEVEL_OUTPUTPOWER_10001 0x11
383 #define RFM69_PALEVEL_OUTPUTPOWER_10010 0x12
384 #define RFM69_PALEVEL_OUTPUTPOWER_10011 0x13
385 #define RFM69_PALEVEL_OUTPUTPOWER_10100 0x14
386 #define RFM69_PALEVEL_OUTPUTPOWER_10101 0x15
387 #define RFM69_PALEVEL_OUTPUTPOWER_10110 0x16
388 #define RFM69_PALEVEL_OUTPUTPOWER_10111 0x17
389 #define RFM69_PALEVEL_OUTPUTPOWER_11000 0x18
390 #define RFM69_PALEVEL_OUTPUTPOWER_11001 0x19
391 #define RFM69_PALEVEL_OUTPUTPOWER_11010 0x1A
392 #define RFM69_PALEVEL_OUTPUTPOWER_11011 0x1B
393 #define RFM69_PALEVEL_OUTPUTPOWER_11100 0x1C
394 #define RFM69_PALEVEL_OUTPUTPOWER_11101 0x1D
395 #define RFM69_PALEVEL_OUTPUTPOWER_11110 0x1E
396 #define RFM69_PALEVEL_OUTPUTPOWER_11111 0x1F // Default
397 
398 
399 // RegPaRamp
400 #define RFM69_PARAMP_3400 0x00
401 #define RFM69_PARAMP_2000 0x01
402 #define RFM69_PARAMP_1000 0x02
403 #define RFM69_PARAMP_500 0x03
404 #define RFM69_PARAMP_250 0x04
405 #define RFM69_PARAMP_125 0x05
406 #define RFM69_PARAMP_100 0x06
407 #define RFM69_PARAMP_62 0x07
408 #define RFM69_PARAMP_50 0x08
409 #define RFM69_PARAMP_40 0x09 // Default
410 #define RFM69_PARAMP_31 0x0A
411 #define RFM69_PARAMP_25 0x0B
412 #define RFM69_PARAMP_20 0x0C
413 #define RFM69_PARAMP_15 0x0D
414 #define RFM69_PARAMP_12 0x0E
415 #define RFM69_PARAMP_10 0x0F
416 
417 
418 // RegOcp
419 #define RFM69_OCP_OFF 0x0F
420 #define RFM69_OCP_ON 0x1A // Default
421 
422 #define RFM69_OCP_TRIM_45 0x00
423 #define RFM69_OCP_TRIM_50 0x01
424 #define RFM69_OCP_TRIM_55 0x02
425 #define RFM69_OCP_TRIM_60 0x03
426 #define RFM69_OCP_TRIM_65 0x04
427 #define RFM69_OCP_TRIM_70 0x05
428 #define RFM69_OCP_TRIM_75 0x06
429 #define RFM69_OCP_TRIM_80 0x07
430 #define RFM69_OCP_TRIM_85 0x08
431 #define RFM69_OCP_TRIM_90 0x09
432 #define RFM69_OCP_TRIM_95 0x0A // Default
433 #define RFM69_OCP_TRIM_100 0x0B
434 #define RFM69_OCP_TRIM_105 0x0C
435 #define RFM69_OCP_TRIM_110 0x0D
436 #define RFM69_OCP_TRIM_115 0x0E
437 #define RFM69_OCP_TRIM_120 0x0F
438 
439 
440 // RegAgcRef - not present on RFM69/SX1231
441 #define RFM69_AGCREF_AUTO_ON 0x40 // Default
442 #define RFM69_AGCREF_AUTO_OFF 0x00
443 
444 #define RFM69_AGCREF_LEVEL_MINUS80 0x00 // Default
445 #define RFM69_AGCREF_LEVEL_MINUS81 0x01
446 #define RFM69_AGCREF_LEVEL_MINUS82 0x02
447 #define RFM69_AGCREF_LEVEL_MINUS83 0x03
448 #define RFM69_AGCREF_LEVEL_MINUS84 0x04
449 #define RFM69_AGCREF_LEVEL_MINUS85 0x05
450 #define RFM69_AGCREF_LEVEL_MINUS86 0x06
451 #define RFM69_AGCREF_LEVEL_MINUS87 0x07
452 #define RFM69_AGCREF_LEVEL_MINUS88 0x08
453 #define RFM69_AGCREF_LEVEL_MINUS89 0x09
454 #define RFM69_AGCREF_LEVEL_MINUS90 0x0A
455 #define RFM69_AGCREF_LEVEL_MINUS91 0x0B
456 #define RFM69_AGCREF_LEVEL_MINUS92 0x0C
457 #define RFM69_AGCREF_LEVEL_MINUS93 0x0D
458 #define RFM69_AGCREF_LEVEL_MINUS94 0x0E
459 #define RFM69_AGCREF_LEVEL_MINUS95 0x0F
460 #define RFM69_AGCREF_LEVEL_MINUS96 0x10
461 #define RFM69_AGCREF_LEVEL_MINUS97 0x11
462 #define RFM69_AGCREF_LEVEL_MINUS98 0x12
463 #define RFM69_AGCREF_LEVEL_MINUS99 0x13
464 #define RFM69_AGCREF_LEVEL_MINUS100 0x14
465 #define RFM69_AGCREF_LEVEL_MINUS101 0x15
466 #define RFM69_AGCREF_LEVEL_MINUS102 0x16
467 #define RFM69_AGCREF_LEVEL_MINUS103 0x17
468 #define RFM69_AGCREF_LEVEL_MINUS104 0x18
469 #define RFM69_AGCREF_LEVEL_MINUS105 0x19
470 #define RFM69_AGCREF_LEVEL_MINUS106 0x1A
471 #define RFM69_AGCREF_LEVEL_MINUS107 0x1B
472 #define RFM69_AGCREF_LEVEL_MINUS108 0x1C
473 #define RFM69_AGCREF_LEVEL_MINUS109 0x1D
474 #define RFM69_AGCREF_LEVEL_MINUS110 0x1E
475 #define RFM69_AGCREF_LEVEL_MINUS111 0x1F
476 #define RFM69_AGCREF_LEVEL_MINUS112 0x20
477 #define RFM69_AGCREF_LEVEL_MINUS113 0x21
478 #define RFM69_AGCREF_LEVEL_MINUS114 0x22
479 #define RFM69_AGCREF_LEVEL_MINUS115 0x23
480 #define RFM69_AGCREF_LEVEL_MINUS116 0x24
481 #define RFM69_AGCREF_LEVEL_MINUS117 0x25
482 #define RFM69_AGCREF_LEVEL_MINUS118 0x26
483 #define RFM69_AGCREF_LEVEL_MINUS119 0x27
484 #define RFM69_AGCREF_LEVEL_MINUS120 0x28
485 #define RFM69_AGCREF_LEVEL_MINUS121 0x29
486 #define RFM69_AGCREF_LEVEL_MINUS122 0x2A
487 #define RFM69_AGCREF_LEVEL_MINUS123 0x2B
488 #define RFM69_AGCREF_LEVEL_MINUS124 0x2C
489 #define RFM69_AGCREF_LEVEL_MINUS125 0x2D
490 #define RFM69_AGCREF_LEVEL_MINUS126 0x2E
491 #define RFM69_AGCREF_LEVEL_MINUS127 0x2F
492 #define RFM69_AGCREF_LEVEL_MINUS128 0x30
493 #define RFM69_AGCREF_LEVEL_MINUS129 0x31
494 #define RFM69_AGCREF_LEVEL_MINUS130 0x32
495 #define RFM69_AGCREF_LEVEL_MINUS131 0x33
496 #define RFM69_AGCREF_LEVEL_MINUS132 0x34
497 #define RFM69_AGCREF_LEVEL_MINUS133 0x35
498 #define RFM69_AGCREF_LEVEL_MINUS134 0x36
499 #define RFM69_AGCREF_LEVEL_MINUS135 0x37
500 #define RFM69_AGCREF_LEVEL_MINUS136 0x38
501 #define RFM69_AGCREF_LEVEL_MINUS137 0x39
502 #define RFM69_AGCREF_LEVEL_MINUS138 0x3A
503 #define RFM69_AGCREF_LEVEL_MINUS139 0x3B
504 #define RFM69_AGCREF_LEVEL_MINUS140 0x3C
505 #define RFM69_AGCREF_LEVEL_MINUS141 0x3D
506 #define RFM69_AGCREF_LEVEL_MINUS142 0x3E
507 #define RFM69_AGCREF_LEVEL_MINUS143 0x3F
508 
509 
510 // RegAgcThresh1 - not present on RFM69/SX1231
511 #define RFM69_AGCTHRESH1_SNRMARGIN_000 0x00
512 #define RFM69_AGCTHRESH1_SNRMARGIN_001 0x20
513 #define RFM69_AGCTHRESH1_SNRMARGIN_010 0x40
514 #define RFM69_AGCTHRESH1_SNRMARGIN_011 0x60
515 #define RFM69_AGCTHRESH1_SNRMARGIN_100 0x80
516 #define RFM69_AGCTHRESH1_SNRMARGIN_101 0xA0 // Default
517 #define RFM69_AGCTHRESH1_SNRMARGIN_110 0xC0
518 #define RFM69_AGCTHRESH1_SNRMARGIN_111 0xE0
519 
520 #define RFM69_AGCTHRESH1_STEP1_0 0x00
521 #define RFM69_AGCTHRESH1_STEP1_1 0x01
522 #define RFM69_AGCTHRESH1_STEP1_2 0x02
523 #define RFM69_AGCTHRESH1_STEP1_3 0x03
524 #define RFM69_AGCTHRESH1_STEP1_4 0x04
525 #define RFM69_AGCTHRESH1_STEP1_5 0x05
526 #define RFM69_AGCTHRESH1_STEP1_6 0x06
527 #define RFM69_AGCTHRESH1_STEP1_7 0x07
528 #define RFM69_AGCTHRESH1_STEP1_8 0x08
529 #define RFM69_AGCTHRESH1_STEP1_9 0x09
530 #define RFM69_AGCTHRESH1_STEP1_10 0x0A
531 #define RFM69_AGCTHRESH1_STEP1_11 0x0B
532 #define RFM69_AGCTHRESH1_STEP1_12 0x0C
533 #define RFM69_AGCTHRESH1_STEP1_13 0x0D
534 #define RFM69_AGCTHRESH1_STEP1_14 0x0E
535 #define RFM69_AGCTHRESH1_STEP1_15 0x0F
536 #define RFM69_AGCTHRESH1_STEP1_16 0x10 // Default
537 #define RFM69_AGCTHRESH1_STEP1_17 0x11
538 #define RFM69_AGCTHRESH1_STEP1_18 0x12
539 #define RFM69_AGCTHRESH1_STEP1_19 0x13
540 #define RFM69_AGCTHRESH1_STEP1_20 0x14
541 #define RFM69_AGCTHRESH1_STEP1_21 0x15
542 #define RFM69_AGCTHRESH1_STEP1_22 0x16
543 #define RFM69_AGCTHRESH1_STEP1_23 0x17
544 #define RFM69_AGCTHRESH1_STEP1_24 0x18
545 #define RFM69_AGCTHRESH1_STEP1_25 0x19
546 #define RFM69_AGCTHRESH1_STEP1_26 0x1A
547 #define RFM69_AGCTHRESH1_STEP1_27 0x1B
548 #define RFM69_AGCTHRESH1_STEP1_28 0x1C
549 #define RFM69_AGCTHRESH1_STEP1_29 0x1D
550 #define RFM69_AGCTHRESH1_STEP1_30 0x1E
551 #define RFM69_AGCTHRESH1_STEP1_31 0x1F
552 
553 
554 // RegAgcThresh2 - not present on RFM69/SX1231
555 #define RFM69_AGCTHRESH2_STEP2_0 0x00
556 #define RFM69_AGCTHRESH2_STEP2_1 0x10
557 #define RFM69_AGCTHRESH2_STEP2_2 0x20
558 #define RFM69_AGCTHRESH2_STEP2_3 0x30 // XXX wrong -- Default
559 #define RFM69_AGCTHRESH2_STEP2_4 0x40
560 #define RFM69_AGCTHRESH2_STEP2_5 0x50
561 #define RFM69_AGCTHRESH2_STEP2_6 0x60
562 #define RFM69_AGCTHRESH2_STEP2_7 0x70 // default
563 #define RFM69_AGCTHRESH2_STEP2_8 0x80
564 #define RFM69_AGCTHRESH2_STEP2_9 0x90
565 #define RFM69_AGCTHRESH2_STEP2_10 0xA0
566 #define RFM69_AGCTHRESH2_STEP2_11 0xB0
567 #define RFM69_AGCTHRESH2_STEP2_12 0xC0
568 #define RFM69_AGCTHRESH2_STEP2_13 0xD0
569 #define RFM69_AGCTHRESH2_STEP2_14 0xE0
570 #define RFM69_AGCTHRESH2_STEP2_15 0xF0
571 
572 #define RFM69_AGCTHRESH2_STEP3_0 0x00
573 #define RFM69_AGCTHRESH2_STEP3_1 0x01
574 #define RFM69_AGCTHRESH2_STEP3_2 0x02
575 #define RFM69_AGCTHRESH2_STEP3_3 0x03
576 #define RFM69_AGCTHRESH2_STEP3_4 0x04
577 #define RFM69_AGCTHRESH2_STEP3_5 0x05
578 #define RFM69_AGCTHRESH2_STEP3_6 0x06
579 #define RFM69_AGCTHRESH2_STEP3_7 0x07
580 #define RFM69_AGCTHRESH2_STEP3_8 0x08
581 #define RFM69_AGCTHRESH2_STEP3_9 0x09
582 #define RFM69_AGCTHRESH2_STEP3_10 0x0A
583 #define RFM69_AGCTHRESH2_STEP3_11 0x0B // Default
584 #define RFM69_AGCTHRESH2_STEP3_12 0x0C
585 #define RFM69_AGCTHRESH2_STEP3_13 0x0D
586 #define RFM69_AGCTHRESH2_STEP3_14 0x0E
587 #define RFM69_AGCTHRESH2_STEP3_15 0x0F
588 
589 
590 // RegAgcThresh3 - not present on RFM69/SX1231
591 #define RFM69_AGCTHRESH3_STEP4_0 0x00
592 #define RFM69_AGCTHRESH3_STEP4_1 0x10
593 #define RFM69_AGCTHRESH3_STEP4_2 0x20
594 #define RFM69_AGCTHRESH3_STEP4_3 0x30
595 #define RFM69_AGCTHRESH3_STEP4_4 0x40
596 #define RFM69_AGCTHRESH3_STEP4_5 0x50
597 #define RFM69_AGCTHRESH3_STEP4_6 0x60
598 #define RFM69_AGCTHRESH3_STEP4_7 0x70
599 #define RFM69_AGCTHRESH3_STEP4_8 0x80
600 #define RFM69_AGCTHRESH3_STEP4_9 0x90 // Default
601 #define RFM69_AGCTHRESH3_STEP4_10 0xA0
602 #define RFM69_AGCTHRESH3_STEP4_11 0xB0
603 #define RFM69_AGCTHRESH3_STEP4_12 0xC0
604 #define RFM69_AGCTHRESH3_STEP4_13 0xD0
605 #define RFM69_AGCTHRESH3_STEP4_14 0xE0
606 #define RFM69_AGCTHRESH3_STEP4_15 0xF0
607 
608 #define RFM69_AGCTHRESH3_STEP5_0 0x00
609 #define RFM69_AGCTHRESH3_STEP5_1 0x01
610 #define RFM69_AGCTHRESH3_STEP5_2 0x02
611 #define RFM69_AGCTHRESH3_STEP5_3 0x03
612 #define RFM69_AGCTHRESH3_STEP5_4 0x04
613 #define RFM69_AGCTHRESH3_STEP5_5 0x05
614 #define RFM69_AGCTHRESH3_STEP5_6 0x06
615 #define RFM69_AGCTHRESH3_STEP5_7 0x07
616 #define RFM69_AGCTHRES33_STEP5_8 0x08
617 #define RFM69_AGCTHRESH3_STEP5_9 0x09
618 #define RFM69_AGCTHRESH3_STEP5_10 0x0A
619 #define RFM69_AGCTHRESH3_STEP5_11 0x0B // Default
620 #define RFM69_AGCTHRESH3_STEP5_12 0x0C
621 #define RFM69_AGCTHRESH3_STEP5_13 0x0D
622 #define RFM69_AGCTHRESH3_STEP5_14 0x0E
623 #define RFM69_AGCTHRESH3_STEP5_15 0x0F
624 
625 
626 // RegLna
627 #define RFM69_LNA_ZIN_50 0x00 // Reset value
628 #define RFM69_LNA_ZIN_200 0x80 // Recommended default
629 
630 #define RFM69_LNA_LOWPOWER_OFF 0x00 // Default
631 #define RFM69_LNA_LOWPOWER_ON 0x40
632 
633 #define RFM69_LNA_CURRENTGAIN 0x08
634 
635 #define RFM69_LNA_GAINSELECT_AUTO 0x00 // Default
636 #define RFM69_LNA_GAINSELECT_MAX 0x01
637 #define RFM69_LNA_GAINSELECT_MAXMINUS6 0x02
638 #define RFM69_LNA_GAINSELECT_MAXMINUS12 0x03
639 #define RFM69_LNA_GAINSELECT_MAXMINUS24 0x04
640 #define RFM69_LNA_GAINSELECT_MAXMINUS36 0x05
641 #define RFM69_LNA_GAINSELECT_MAXMINUS48 0x06
642 
643 
644 // RegRxBw
645 #define RFM69_RXBW_DCCFREQ_000 0x00
646 #define RFM69_RXBW_DCCFREQ_001 0x20
647 #define RFM69_RXBW_DCCFREQ_010 0x40 // Recommended default
648 #define RFM69_RXBW_DCCFREQ_011 0x60
649 #define RFM69_RXBW_DCCFREQ_100 0x80 // Reset value
650 #define RFM69_RXBW_DCCFREQ_101 0xA0
651 #define RFM69_RXBW_DCCFREQ_110 0xC0
652 #define RFM69_RXBW_DCCFREQ_111 0xE0
653 
654 #define RFM69_RXBW_MANT_16 0x00 // Reset value
655 #define RFM69_RXBW_MANT_20 0x08
656 #define RFM69_RXBW_MANT_24 0x10 // Recommended default
657 
658 #define RFM69_RXBW_EXP_0 0x00
659 #define RFM69_RXBW_EXP_1 0x01
660 #define RFM69_RXBW_EXP_2 0x02
661 #define RFM69_RXBW_EXP_3 0x03
662 #define RFM69_RXBW_EXP_4 0x04
663 #define RFM69_RXBW_EXP_5 0x05 // Recommended default
664 #define RFM69_RXBW_EXP_6 0x06 // Reset value
665 #define RFM69_RXBW_EXP_7 0x07
666 
667 
668 // RegAfcBw
669 #define RFM69_AFCBW_DCCFREQAFC_000 0x00
670 #define RFM69_AFCBW_DCCFREQAFC_001 0x20
671 #define RFM69_AFCBW_DCCFREQAFC_010 0x40
672 #define RFM69_AFCBW_DCCFREQAFC_011 0x60
673 #define RFM69_AFCBW_DCCFREQAFC_100 0x80 // Default
674 #define RFM69_AFCBW_DCCFREQAFC_101 0xA0
675 #define RFM69_AFCBW_DCCFREQAFC_110 0xC0
676 #define RFM69_AFCBW_DCCFREQAFC_111 0xE0
677 
678 #define RFM69_AFCBW_MANTAFC_16 0x00
679 #define RFM69_AFCBW_MANTAFC_20 0x08 // Default
680 #define RFM69_AFCBW_MANTAFC_24 0x10
681 
682 #define RFM69_AFCBW_EXPAFC_0 0x00
683 #define RFM69_AFCBW_EXPAFC_1 0x01
684 #define RFM69_AFCBW_EXPAFC_2 0x02 // Reset value
685 #define RFM69_AFCBW_EXPAFC_3 0x03 // Recommended default
686 #define RFM69_AFCBW_EXPAFC_4 0x04
687 #define RFM69_AFCBW_EXPAFC_5 0x05
688 #define RFM69_AFCBW_EXPAFC_6 0x06
689 #define RFM69_AFCBW_EXPAFC_7 0x07
690 
691 
692 // RegOokPeak
693 #define RFM69_OOKPEAK_THRESHTYPE_FIXED 0x00
694 #define RFM69_OOKPEAK_THRESHTYPE_PEAK 0x40 // Default
695 #define RFM69_OOKPEAK_THRESHTYPE_AVERAGE 0x80
696 
697 #define RFM69_OOKPEAK_PEAKTHRESHSTEP_000 0x00 // Default
698 #define RFM69_OOKPEAK_PEAKTHRESHSTEP_001 0x08
699 #define RFM69_OOKPEAK_PEAKTHRESHSTEP_010 0x10
700 #define RFM69_OOKPEAK_PEAKTHRESHSTEP_011 0x18
701 #define RFM69_OOKPEAK_PEAKTHRESHSTEP_100 0x20
702 #define RFM69_OOKPEAK_PEAKTHRESHSTEP_101 0x28
703 #define RFM69_OOKPEAK_PEAKTHRESHSTEP_110 0x30
704 #define RFM69_OOKPEAK_PEAKTHRESHSTEP_111 0x38
705 
706 #define RFM69_OOKPEAK_PEAKTHRESHDEC_000 0x00 // Default
707 #define RFM69_OOKPEAK_PEAKTHRESHDEC_001 0x01
708 #define RFM69_OOKPEAK_PEAKTHRESHDEC_010 0x02
709 #define RFM69_OOKPEAK_PEAKTHRESHDEC_011 0x03
710 #define RFM69_OOKPEAK_PEAKTHRESHDEC_100 0x04
711 #define RFM69_OOKPEAK_PEAKTHRESHDEC_101 0x05
712 #define RFM69_OOKPEAK_PEAKTHRESHDEC_110 0x06
713 #define RFM69_OOKPEAK_PEAKTHRESHDEC_111 0x07
714 
715 
716 // RegOokAvg
717 #define RFM69_OOKAVG_AVERAGETHRESHFILT_00 0x00
718 #define RFM69_OOKAVG_AVERAGETHRESHFILT_01 0x40
719 #define RFM69_OOKAVG_AVERAGETHRESHFILT_10 0x80 // Default
720 #define RFM69_OOKAVG_AVERAGETHRESHFILT_11 0xC0
721 
722 
723 // RegOokFix
724 #define RFM69_OOKFIX_FIXEDTHRESH_VALUE 0x06 // Default
725 
726 
727 // RegAfcFei
728 #define RFM69_AFCFEI_FEI_DONE 0x40
729 #define RFM69_AFCFEI_FEI_START 0x20
730 #define RFM69_AFCFEI_AFC_DONE 0x10
731 #define RFM69_AFCFEI_AFCAUTOCLEAR_ON 0x08
732 #define RFM69_AFCFEI_AFCAUTOCLEAR_OFF 0x00 // Default
733 
734 #define RFM69_AFCFEI_AFCAUTO_ON 0x04
735 #define RFM69_AFCFEI_AFCAUTO_OFF 0x00 // Default
736 
737 #define RFM69_AFCFEI_AFC_CLEAR 0x02
738 #define RFM69_AFCFEI_AFC_START 0x01
739 
740 
741 // RegRssiConfig
742 #define RFM69_RSSI_FASTRX_ON 0x08 // not present on RFM69/SX1231
743 #define RFM69_RSSI_FASTRX_OFF 0x00 // Default
744 
745 #define RFM69_RSSI_DONE 0x02
746 #define RFM69_RSSI_START 0x01
747 
748 
749 // RegDioMapping1
750 #define RFM69_DIOMAPPING1_DIO0_00 0x00 // Default
751 #define RFM69_DIOMAPPING1_DIO0_01 0x40
752 #define RFM69_DIOMAPPING1_DIO0_10 0x80
753 #define RFM69_DIOMAPPING1_DIO0_11 0xC0
754 
755 #define RFM69_DIOMAPPING1_DIO1_00 0x00 // Default
756 #define RFM69_DIOMAPPING1_DIO1_01 0x10
757 #define RFM69_DIOMAPPING1_DIO1_10 0x20
758 #define RFM69_DIOMAPPING1_DIO1_11 0x30
759 
760 #define RFM69_DIOMAPPING1_DIO2_00 0x00 // Default
761 #define RFM69_DIOMAPPING1_DIO2_01 0x04
762 #define RFM69_DIOMAPPING1_DIO2_10 0x08
763 #define RFM69_DIOMAPPING1_DIO2_11 0x0C
764 
765 #define RFM69_DIOMAPPING1_DIO3_00 0x00 // Default
766 #define RFM69_DIOMAPPING1_DIO3_01 0x01
767 #define RFM69_DIOMAPPING1_DIO3_10 0x02
768 #define RFM69_DIOMAPPING1_DIO3_11 0x03
769 
770 
771 // RegDioMapping2
772 #define RFM69_DIOMAPPING2_DIO4_00 0x00 // Default
773 #define RFM69_DIOMAPPING2_DIO4_01 0x40
774 #define RFM69_DIOMAPPING2_DIO4_10 0x80
775 #define RFM69_DIOMAPPING2_DIO4_11 0xC0
776 
777 #define RFM69_DIOMAPPING2_DIO5_00 0x00 // Default
778 #define RFM69_DIOMAPPING2_DIO5_01 0x10
779 #define RFM69_DIOMAPPING2_DIO5_10 0x20
780 #define RFM69_DIOMAPPING2_DIO5_11 0x30
781 
782 #define RFM69_DIOMAPPING2_CLKOUT_32 0x00
783 #define RFM69_DIOMAPPING2_CLKOUT_16 0x01
784 #define RFM69_DIOMAPPING2_CLKOUT_8 0x02
785 #define RFM69_DIOMAPPING2_CLKOUT_4 0x03
786 #define RFM69_DIOMAPPING2_CLKOUT_2 0x04
787 #define RFM69_DIOMAPPING2_CLKOUT_1 0x05 // Reset value
788 #define RFM69_DIOMAPPING2_CLKOUT_RC 0x06
789 #define RFM69_DIOMAPPING2_CLKOUT_OFF 0x07 // Recommended default
790 
791 
792 // RegIrqFlags1
793 #define RFM69_IRQFLAGS1_MODEREADY 0x80
794 #define RFM69_IRQFLAGS1_RXREADY 0x40
795 #define RFM69_IRQFLAGS1_TXREADY 0x20
796 #define RFM69_IRQFLAGS1_PLLLOCK 0x10
797 #define RFM69_IRQFLAGS1_RSSI 0x08
798 #define RFM69_IRQFLAGS1_TIMEOUT 0x04
799 #define RFM69_IRQFLAGS1_AUTOMODE 0x02
800 #define RFM69_IRQFLAGS1_SYNCADDRESSMATCH 0x01
801 
802 
803 // RegIrqFlags2
804 #define RFM69_IRQFLAGS2_FIFOFULL 0x80
805 #define RFM69_IRQFLAGS2_FIFONOTEMPTY 0x40
806 #define RFM69_IRQFLAGS2_FIFOLEVEL 0x20
807 #define RFM69_IRQFLAGS2_FIFOOVERRUN 0x10
808 #define RFM69_IRQFLAGS2_PACKETSENT 0x08
809 #define RFM69_IRQFLAGS2_PAYLOADREADY 0x04
810 #define RFM69_IRQFLAGS2_CRCOK 0x02
811 #define RFM69_IRQFLAGS2_LOWBAT 0x01 // not present on RFM69/SX1231
812 
813 
814 // RegRssiThresh
815 #define RFM69_RSSITHRESH_VALUE 0xE4 // Default
816 
817 
818 // RegRxTimeout1
819 #define RFM69_RXTIMEOUT1_RXSTART_VALUE 0x00 // Default
820 
821 
822 // RegRxTimeout2
823 #define RFM69_RXTIMEOUT2_RSSITHRESH_VALUE 0x00 // Default
824 
825 
826 // RegPreamble
827 #define RFM69_PREAMBLESIZE_MSB_VALUE 0x00 // Default
828 #define RFM69_PREAMBLESIZE_LSB_VALUE 0x03 // Default
829 
830 
831 // RegSyncConfig
832 #define RFM69_SYNC_ON 0x80 // Default
833 #define RFM69_SYNC_OFF 0x00
834 
835 #define RFM69_SYNC_FIFOFILL_AUTO 0x00 // Default -- when sync interrupt occurs
836 #define RFM69_SYNC_FIFOFILL_MANUAL 0x40
837 
838 #define RFM69_SYNC_SIZE_1 0x00
839 #define RFM69_SYNC_SIZE_2 0x08
840 #define RFM69_SYNC_SIZE_3 0x10
841 #define RFM69_SYNC_SIZE_4 0x18 // Default
842 #define RFM69_SYNC_SIZE_5 0x20
843 #define RFM69_SYNC_SIZE_6 0x28
844 #define RFM69_SYNC_SIZE_7 0x30
845 #define RFM69_SYNC_SIZE_8 0x38
846 
847 #define RFM69_SYNC_TOL_0 0x00 // Default
848 #define RFM69_SYNC_TOL_1 0x01
849 #define RFM69_SYNC_TOL_2 0x02
850 #define RFM69_SYNC_TOL_3 0x03
851 #define RFM69_SYNC_TOL_4 0x04
852 #define RFM69_SYNC_TOL_5 0x05
853 #define RFM69_SYNC_TOL_6 0x06
854 #define RFM69_SYNC_TOL_7 0x07
855 
856 
857 // RegSyncValue1-8
858 #define RFM69_SYNC_BYTE1_VALUE 0x00 // Default
859 #define RFM69_SYNC_BYTE2_VALUE 0x00 // Default
860 #define RFM69_SYNC_BYTE3_VALUE 0x00 // Default
861 #define RFM69_SYNC_BYTE4_VALUE 0x00 // Default
862 #define RFM69_SYNC_BYTE5_VALUE 0x00 // Default
863 #define RFM69_SYNC_BYTE6_VALUE 0x00 // Default
864 #define RFM69_SYNC_BYTE7_VALUE 0x00 // Default
865 #define RFM69_SYNC_BYTE8_VALUE 0x00 // Default
866 
867 
868 // RegPacketConfig1
869 #define RFM69_PACKET1_FORMAT_FIXED 0x00 // Default
870 #define RFM69_PACKET1_FORMAT_VARIABLE 0x80
871 
872 #define RFM69_PACKET1_DCFREE_OFF 0x00 // Default
873 #define RFM69_PACKET1_DCFREE_MANCHESTER 0x20
874 #define RFM69_PACKET1_DCFREE_WHITENING 0x40
875 
876 #define RFM69_PACKET1_CRC_ON 0x10 // Default
877 #define RFM69_PACKET1_CRC_OFF 0x00
878 
879 #define RFM69_PACKET1_CRCAUTOCLEAR_ON 0x00 // Default
880 #define RFM69_PACKET1_CRCAUTOCLEAR_OFF 0x08
881 
882 #define RFM69_PACKET1_ADRSFILTERING_OFF 0x00 // Default
883 #define RFM69_PACKET1_ADRSFILTERING_NODE 0x02
884 #define RFM69_PACKET1_ADRSFILTERING_NODEBROADCAST 0x04
885 
886 
887 // RegPayloadLength
888 #define RFM69_PAYLOADLENGTH_VALUE 0x40 // Default
889 
890 
891 // RegBroadcastAdrs
892 #define RFM69_BROADCASTADDRESS_VALUE 0x00
893 
894 
895 // RegAutoModes
896 #define RFM69_AUTOMODES_ENTER_OFF 0x00 // Default
897 #define RFM69_AUTOMODES_ENTER_FIFONOTEMPTY 0x20
898 #define RFM69_AUTOMODES_ENTER_FIFOLEVEL 0x40
899 #define RFM69_AUTOMODES_ENTER_CRCOK 0x60
900 #define RFM69_AUTOMODES_ENTER_PAYLOADREADY 0x80
901 #define RFM69_AUTOMODES_ENTER_SYNCADRSMATCH 0xA0
902 #define RFM69_AUTOMODES_ENTER_PACKETSENT 0xC0
903 #define RFM69_AUTOMODES_ENTER_FIFOEMPTY 0xE0
904 
905 #define RFM69_AUTOMODES_EXIT_OFF 0x00 // Default
906 #define RFM69_AUTOMODES_EXIT_FIFOEMPTY 0x04
907 #define RFM69_AUTOMODES_EXIT_FIFOLEVEL 0x08
908 #define RFM69_AUTOMODES_EXIT_CRCOK 0x0C
909 #define RFM69_AUTOMODES_EXIT_PAYLOADREADY 0x10
910 #define RFM69_AUTOMODES_EXIT_SYNCADRSMATCH 0x14
911 #define RFM69_AUTOMODES_EXIT_PACKETSENT 0x18
912 #define RFM69_AUTOMODES_EXIT_RXTIMEOUT 0x1C
913 
914 #define RFM69_AUTOMODES_INTERMEDIATE_SLEEP 0x00 // Default
915 #define RFM69_AUTOMODES_INTERMEDIATE_STANDBY 0x01
916 #define RFM69_AUTOMODES_INTERMEDIATE_RECEIVER 0x02
917 #define RFM69_AUTOMODES_INTERMEDIATE_TRANSMITTER 0x03
918 
919 
920 // RegFifoThresh
921 #define RFM69_FIFOTHRESH_TXSTART_FIFOTHRESH 0x00 // Reset value
922 #define RFM69_FIFOTHRESH_TXSTART_FIFONOTEMPTY 0x80 // Recommended default
923 #define RFM69_FIFOTHRESH_VALUE 0x0F // Default
924 
925 
926 // RegPacketConfig2
927 #define RFM69_PACKET2_RXRESTARTDELAY_1BIT 0x00 // Default
928 #define RFM69_PACKET2_RXRESTARTDELAY_2BITS 0x10
929 #define RFM69_PACKET2_RXRESTARTDELAY_4BITS 0x20
930 #define RFM69_PACKET2_RXRESTARTDELAY_8BITS 0x30
931 #define RFM69_PACKET2_RXRESTARTDELAY_16BITS 0x40
932 #define RFM69_PACKET2_RXRESTARTDELAY_32BITS 0x50
933 #define RFM69_PACKET2_RXRESTARTDELAY_64BITS 0x60
934 #define RFM69_PACKET2_RXRESTARTDELAY_128BITS 0x70
935 #define RFM69_PACKET2_RXRESTARTDELAY_256BITS 0x80
936 #define RFM69_PACKET2_RXRESTARTDELAY_512BITS 0x90
937 #define RFM69_PACKET2_RXRESTARTDELAY_1024BITS 0xA0
938 #define RFM69_PACKET2_RXRESTARTDELAY_2048BITS 0xB0
939 #define RFM69_PACKET2_RXRESTARTDELAY_NONE 0xC0
940 #define RFM69_PACKET2_RXRESTART 0x04
941 
942 #define RFM69_PACKET2_AUTORXRESTART_ON 0x02 // Default
943 #define RFM69_PACKET2_AUTORXRESTART_OFF 0x00
944 
945 #define RFM69_PACKET2_AES_ON 0x01
946 #define RFM69_PACKET2_AES_OFF 0x00 // Default
947 
948 
949 // RegAesKey1-16
950 #define RFM69_AESKEY1_VALUE 0x00 // Default
951 #define RFM69_AESKEY2_VALUE 0x00 // Default
952 #define RFM69_AESKEY3_VALUE 0x00 // Default
953 #define RFM69_AESKEY4_VALUE 0x00 // Default
954 #define RFM69_AESKEY5_VALUE 0x00 // Default
955 #define RFM69_AESKEY6_VALUE 0x00 // Default
956 #define RFM69_AESKEY7_VALUE 0x00 // Default
957 #define RFM69_AESKEY8_VALUE 0x00 // Default
958 #define RFM69_AESKEY9_VALUE 0x00 // Default
959 #define RFM69_AESKEY10_VALUE 0x00 // Default
960 #define RFM69_AESKEY11_VALUE 0x00 // Default
961 #define RFM69_AESKEY12_VALUE 0x00 // Default
962 #define RFM69_AESKEY13_VALUE 0x00 // Default
963 #define RFM69_AESKEY14_VALUE 0x00 // Default
964 #define RFM69_AESKEY15_VALUE 0x00 // Default
965 #define RFM69_AESKEY16_VALUE 0x00 // Default
966 
967 
968 // RegTemp1
969 #define RFM69_TEMP1_MEAS_START 0x08
970 #define RFM69_TEMP1_MEAS_RUNNING 0x04
971 // not present on RFM69/SX1231
972 #define RFM69_TEMP1_ADCLOWPOWER_ON 0x01 // Default
973 #define RFM69_TEMP1_ADCLOWPOWER_OFF 0x00
974 
975 
976 // RegTestLna
977 #define RFM69_TESTLNA_NORMAL 0x1B
978 #define RFM69_TESTLNA_HIGH_SENSITIVITY 0x2D
979 
980 
981 // RegTestDagc
982 #define RFM69_DAGC_NORMAL 0x00 // Reset value
983 #define RFM69_DAGC_IMPROVED_LOWBETA1 0x20
984 #define RFM69_DAGC_IMPROVED_LOWBETA0 0x30 // Recommended default