From 93bb31b3dc561a145f0e06cb7a79b87d7ffcbff6 Mon Sep 17 00:00:00 2001 From: jgromes Date: Sat, 13 Mar 2021 18:06:52 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20=20@=201903c?= =?UTF-8?q?fa89839424c5875b36be68309fb11f48c88=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _a_f_s_k_8h_source.html | 80 +- _a_x25_8h_source.html | 246 +++++- _build_opt_8h_source.html | 457 +++++++++- _c_c1101_8h_source.html | 743 ++++++++++++++-- _e_s_p8266_8h_source.html | 79 +- _h_c05_8h_source.html | 43 +- _h_t_t_p_8h_source.html | 59 +- _hellschreiber_8h_source.html | 178 +++- _i_serial_8h_source.html | 77 +- _j_d_y08_8h_source.html | 43 +- _m_q_t_t_8h_source.html | 109 ++- _module_8h_source.html | 260 ++++-- _morse_8h_source.html | 176 +++- _physical_layer_8h_source.html | 122 ++- _r_f69_8h_source.html | 693 +++++++++++++-- _r_f_m22_8h_source.html | 40 +- _r_f_m23_8h_source.html | 40 +- _r_f_m95_8h_source.html | 71 +- _r_f_m96_8h_source.html | 75 +- _r_f_m97_8h_source.html | 62 +- _r_t_t_y_8h_source.html | 164 +++- _radio_lib_8h_source.html | 122 ++- _s_s_t_v_8h_source.html | 174 +++- _s_x1231_8h_source.html | 65 +- _s_x1261_8h_source.html | 59 +- _s_x1262_8h_source.html | 74 +- _s_x1268_8h_source.html | 74 +- _s_x126x_8h_source.html | 678 +++++++++++++-- _s_x1272_8h_source.html | 216 ++++- _s_x1273_8h_source.html | 65 +- _s_x1276_8h_source.html | 69 +- _s_x1277_8h_source.html | 73 +- _s_x1278_8h_source.html | 225 ++++- _s_x1279_8h_source.html | 69 +- _s_x127x_8h_source.html | 808 ++++++++++++++++-- _s_x1280_8h_source.html | 64 +- _s_x1281_8h_source.html | 51 +- _s_x1282_8h_source.html | 52 +- _s_x128x_8h_source.html | 610 +++++++++++-- _si4430_8h_source.html | 74 +- _si4431_8h_source.html | 70 +- _si4432_8h_source.html | 74 +- _si443x_8h_source.html | 728 +++++++++++++++- _transport_layer_8h_source.html | 58 +- _type_def_8h_source.html | 236 ++++- _x_bee_8h_source.html | 151 +++- annotated.html | 54 +- class_a_f_s_k_client-members.html | 20 +- class_a_f_s_k_client.html | 34 +- class_a_x25_client-members.html | 20 +- class_a_x25_client.html | 32 +- class_a_x25_frame-members.html | 20 +- class_a_x25_frame.html | 40 +- class_c_c1101-members.html | 47 +- class_c_c1101.html | 523 +++++++++--- class_c_c1101.js | 13 +- class_e_s_p8266-members.html | 20 +- class_e_s_p8266.html | 52 +- class_h_c05-members.html | 20 +- class_h_c05.html | 36 +- class_h_t_t_p_client-members.html | 20 +- class_h_t_t_p_client.html | 42 +- class_h_t_t_p_client.js | 2 +- class_hell_client-members.html | 20 +- class_hell_client.html | 30 +- class_hell_client.js | 30 +- class_i_serial-members.html | 20 +- class_i_serial.html | 24 +- class_i_serial.js | 36 +- class_i_t_a2_string-members.html | 20 +- class_i_t_a2_string.html | 28 +- class_j_d_y08-members.html | 20 +- class_j_d_y08.html | 36 +- class_m_q_t_t_client-members.html | 20 +- class_m_q_t_t_client.html | 118 +-- class_m_q_t_t_client.js | 2 +- class_module-members.html | 20 +- class_module.html | 102 +-- class_morse_client-members.html | 20 +- class_morse_client.html | 30 +- class_morse_client.js | 30 +- class_physical_layer-members.html | 20 +- class_physical_layer.html | 318 +++---- class_physical_layer.js | 6 +- class_r_f69-members.html | 47 +- class_r_f69.html | 429 ++++++++-- class_r_f69.js | 11 + class_r_f_m22.html | 24 +- class_r_f_m23.html | 24 +- class_r_f_m95-members.html | 51 +- class_r_f_m95.html | 81 +- class_r_f_m96-members.html | 51 +- class_r_f_m96.html | 79 +- class_r_f_m97-members.html | 51 +- class_r_f_m97.html | 73 +- class_r_f_m98.html | 20 +- class_r_t_t_y_client-members.html | 20 +- class_r_t_t_y_client.html | 28 +- class_r_t_t_y_client.js | 34 +- class_s_s_t_v_client-members.html | 20 +- class_s_s_t_v_client.html | 112 +-- class_s_s_t_v_client.js | 2 +- class_s_x1231-members.html | 49 +- class_s_x1231.html | 77 +- class_s_x1261-members.html | 53 +- class_s_x1261.html | 81 +- class_s_x1262-members.html | 51 +- class_s_x1262.html | 89 +- class_s_x1268-members.html | 51 +- class_s_x1268.html | 87 +- class_s_x126x-members.html | 49 +- class_s_x126x.html | 547 +++++++++--- class_s_x126x.js | 13 +- class_s_x1272-members.html | 51 +- class_s_x1272.html | 101 ++- class_s_x1273-members.html | 53 +- class_s_x1273.html | 73 +- class_s_x1276-members.html | 53 +- class_s_x1276.html | 81 +- class_s_x1277-members.html | 53 +- class_s_x1277.html | 83 +- class_s_x1278-members.html | 51 +- class_s_x1278.html | 103 ++- class_s_x1279-members.html | 53 +- class_s_x1279.html | 81 +- class_s_x127x-members.html | 49 +- class_s_x127x.html | 489 +++++++++-- class_s_x127x.js | 13 +- class_s_x1280-members.html | 51 +- class_s_x1280.html | 87 +- class_s_x1281-members.html | 49 +- class_s_x1281.html | 81 +- class_s_x1282-members.html | 53 +- class_s_x1282.html | 81 +- class_s_x128x-members.html | 47 +- class_s_x128x.html | 445 ++++++++-- class_s_x128x.js | 11 + class_si4430-members.html | 45 +- class_si4430.html | 75 +- class_si4431-members.html | 45 +- class_si4431.html | 73 +- class_si4432-members.html | 45 +- class_si4432.html | 77 +- class_si443x-members.html | 45 +- class_si443x.html | 397 +++++++-- class_si443x.js | 11 + class_transport_layer-members.html | 20 +- class_transport_layer.html | 38 +- class_x_bee-members.html | 20 +- class_x_bee.html | 38 +- class_x_bee_serial-members.html | 20 +- class_x_bee_serial.html | 42 +- classes.html | 133 ++- classn_r_f24-members.html | 45 +- classn_r_f24.html | 417 +++++++-- classn_r_f24.js | 11 + dir_022d1f7e87f0a3cd97fb9c4aa339f7b1.html | 20 +- dir_1496c164e9c77875dd570f4157f3157f.html | 20 +- dir_2cdd3c47e80335731aa10f67042c391a.html | 20 +- dir_2d04440730a0443b949b3f3ffedccfc3.html | 20 +- dir_31c953e8b112b915d208fa745d66f12e.html | 20 +- dir_3a277ada553fbb989028f9b071a02542.html | 20 +- dir_47c60a953c7c148861b9fe25d51850eb.html | 20 +- dir_620e20826520c01cf981aa9c981ff885.html | 20 +- dir_66baa0cb3ce3b01929266fe63d8714ed.html | 20 +- dir_66ce0d8112a82c480b60d648cf9cb1ca.html | 20 +- dir_68267d1309a1af8e8297ef4c3efbcdba.html | 20 +- dir_6baa7f88a31cf8c1ad1b651eaa1fd5b9.html | 20 +- dir_70c194bd40717a4946dbd8bc35f09b17.html | 20 +- dir_747c20e84f9dfe1cc835713177129efc.html | 20 +- dir_79690749eba542503bb1a9a3dbb495e1.html | 20 +- dir_7b8feacc70eb38d5fd56f060c649a59c.html | 20 +- dir_8d5439df06ea2679013aa8390703d116.html | 20 +- dir_a6b6d785787649e9a3efd5036a39108c.html | 20 +- dir_a758e8e29d8436beff5e1f16d5ed2d65.html | 20 +- dir_c14921ab4918e015c91d11c846a1924a.html | 20 +- dir_d916eb25599dc82f14db514c97a6ae6d.html | 20 +- dir_ddb4d7e95cc2d6c8e1ade10a20d7247d.html | 20 +- dir_e2961291c878e1b3ab9447d79b865c81.html | 20 +- dir_e824c1032eaf58988755f8ba9735594b.html | 20 +- dir_ec8372b468150f98f42c73cf97f51298.html | 20 +- dir_ed12d23d857ca7061030f8751e72e77c.html | 20 +- dir_f980efad9544c0545d0fa50a84ff12f2.html | 20 +- doxygen.css | 303 +++++-- dynsections.js | 27 +- files.html | 20 +- files.js => files_dup.js | 2 +- functions.html | 20 +- functions_b.html | 20 +- functions_c.html | 20 +- functions_d.html | 20 +- functions_dup.js | 2 +- functions_e.html | 20 +- functions_f.html | 20 +- functions_func.html | 20 +- functions_func.js | 2 +- functions_func_b.html | 20 +- functions_func_c.html | 20 +- functions_func_d.html | 20 +- functions_func_e.html | 20 +- functions_func_f.html | 20 +- functions_func_g.html | 20 +- functions_func_h.html | 20 +- functions_func_i.html | 20 +- functions_func_j.html | 20 +- functions_func_l.html | 20 +- functions_func_m.html | 20 +- functions_func_n.html | 20 +- functions_func_o.html | 20 +- functions_func_p.html | 20 +- functions_func_r.html | 20 +- functions_func_s.html | 20 +- functions_func_t.html | 20 +- functions_func_u.html | 20 +- functions_func_v.html | 20 +- functions_func_x.html | 20 +- functions_func_y.html | 20 +- ...ns_func_0x7e.html => functions_func_~.html | 22 +- functions_g.html | 20 +- functions_h.html | 20 +- functions_i.html | 20 +- functions_j.html | 20 +- functions_l.html | 20 +- functions_m.html | 20 +- functions_n.html | 20 +- functions_o.html | 20 +- functions_p.html | 20 +- functions_r.html | 20 +- functions_s.html | 20 +- functions_t.html | 22 +- functions_u.html | 20 +- functions_v.html | 20 +- functions_vars.html | 22 +- functions_w.html | 20 +- functions_x.html | 20 +- functions_y.html | 20 +- functions_0x7e.html => functions_~.html | 22 +- group__config__encoding.html | 20 +- group__config__shaping.html | 20 +- group__shield__config.html | 20 +- group__status__codes.html | 32 +- group__uart__config.html | 20 +- hierarchy.html | 54 +- index.html | 61 +- jquery.js | 94 +- menu.js | 26 +- menudata.js | 26 +- modules.html | 20 +- n_r_f24_8h_source.html | 353 +++++++- navtree.css | 2 +- navtree.js | 67 +- navtreedata.js | 33 +- navtreeindex0.js | 154 ++-- navtreeindex1.js | 256 +++--- navtreeindex2.js | 272 +++--- navtreeindex3.js | 103 ++- navtreeindex4.js | 21 + pages.html | 20 +- resize.js | 29 +- search/all_0.html | 8 +- search/all_0.js | 22 +- search/all_1.html | 8 +- search/all_1.js | 14 +- search/all_10.html | 8 +- search/all_10.js | 200 ++--- search/all_11.html | 8 +- search/all_11.js | 18 +- search/all_12.html | 8 +- search/all_12.js | 4 +- search/all_13.html | 8 +- search/all_13.js | 4 +- search/all_14.html | 8 +- search/all_14.js | 2 +- search/all_15.html | 8 +- search/all_15.js | 4 +- search/all_16.html | 8 +- search/all_16.js | 2 +- search/all_17.html | 8 +- search/all_17.js | 4 +- search/all_2.html | 8 +- search/all_2.js | 22 +- search/all_3.html | 8 +- search/all_3.js | 26 +- search/all_4.html | 8 +- search/all_4.js | 142 +-- search/all_5.html | 8 +- search/all_5.js | 6 +- search/all_6.html | 8 +- search/all_6.js | 60 +- search/all_7.html | 8 +- search/all_7.js | 8 +- search/all_8.html | 8 +- search/all_8.js | 18 +- search/all_9.html | 8 +- search/all_9.js | 4 +- search/all_a.html | 8 +- search/all_a.js | 6 +- search/all_b.html | 8 +- search/all_b.js | 18 +- search/all_c.html | 8 +- search/all_c.js | 8 +- search/all_d.html | 8 +- search/all_d.js | 4 +- search/all_e.html | 8 +- search/all_e.js | 18 +- search/all_f.html | 8 +- search/all_f.js | 78 +- search/classes_0.html | 8 +- search/classes_0.js | 6 +- search/classes_1.html | 8 +- search/classes_1.js | 2 +- search/classes_2.html | 8 +- search/classes_2.js | 2 +- search/classes_3.html | 8 +- search/classes_3.js | 6 +- search/classes_4.html | 8 +- search/classes_4.js | 4 +- search/classes_5.html | 8 +- search/classes_5.js | 2 +- search/classes_6.html | 8 +- search/classes_6.js | 6 +- search/classes_7.html | 8 +- search/classes_7.js | 2 +- search/classes_8.html | 8 +- search/classes_8.js | 2 +- search/classes_9.html | 8 +- search/classes_9.js | 16 +- search/classes_a.html | 8 +- search/classes_a.js | 44 +- search/classes_b.html | 8 +- search/classes_b.js | 4 +- search/classes_c.html | 8 +- search/classes_c.js | 4 +- search/functions_0.html | 8 +- search/functions_0.js | 20 +- search/functions_1.html | 8 +- search/functions_1.js | 12 +- search/functions_10.html | 8 +- search/functions_10.js | 182 ++-- search/functions_11.html | 8 +- search/functions_11.js | 8 +- search/functions_12.html | 8 +- search/functions_12.js | 2 +- search/functions_13.html | 8 +- search/functions_13.js | 2 +- search/functions_14.html | 8 +- search/functions_14.js | 4 +- search/functions_15.html | 8 +- search/functions_15.js | 2 +- search/functions_16.html | 8 +- search/functions_16.js | 4 +- search/functions_2.html | 8 +- search/functions_2.js | 18 +- search/functions_3.html | 8 +- search/functions_3.js | 20 +- search/functions_4.html | 8 +- search/functions_4.js | 8 +- search/functions_5.html | 8 +- search/functions_5.js | 4 +- search/functions_6.html | 8 +- search/functions_6.js | 60 +- search/functions_7.html | 8 +- search/functions_7.js | 6 +- search/functions_8.html | 8 +- search/functions_8.js | 12 +- search/functions_9.html | 8 +- search/functions_9.js | 4 +- search/functions_a.html | 8 +- search/functions_a.js | 2 +- search/functions_b.html | 8 +- search/functions_b.js | 10 +- search/functions_c.html | 8 +- search/functions_c.js | 4 +- search/functions_d.html | 8 +- search/functions_d.js | 4 +- search/functions_e.html | 8 +- search/functions_e.js | 14 +- search/functions_f.html | 8 +- search/functions_f.js | 22 +- search/groups_0.html | 8 +- search/groups_0.js | 2 +- search/groups_1.html | 8 +- search/groups_1.js | 2 +- search/groups_2.html | 8 +- search/groups_2.js | 4 +- search/groups_3.html | 8 +- search/groups_3.js | 2 +- search/mag_sel.png | Bin 563 -> 465 bytes search/nomatches.html | 2 +- search/pages_0.html | 8 +- search/pages_0.js | 2 +- search/pages_1.html | 8 +- search/pages_1.js | 2 +- search/search.js | 25 +- search/search_l.png | Bin 604 -> 567 bytes search/search_r.png | Bin 612 -> 553 bytes search/variables_0.html | 8 +- search/variables_0.js | 2 +- search/variables_1.html | 8 +- search/variables_1.js | 2 +- search/variables_2.html | 8 +- search/variables_2.js | 2 +- search/variables_3.html | 8 +- search/variables_3.js | 4 +- search/variables_4.html | 8 +- search/variables_4.js | 2 +- search/variables_5.html | 8 +- search/variables_5.js | 2 +- search/variables_6.html | 8 +- search/variables_6.js | 4 +- search/variables_7.html | 8 +- search/variables_7.js | 2 +- search/variables_8.html | 8 +- search/variables_8.js | 2 +- search/variables_9.html | 8 +- search/variables_9.js | 4 +- search/variables_a.html | 8 +- search/variables_a.js | 2 +- search/variables_b.html | 8 +- search/variables_b.js | 6 +- search/variables_c.html | 8 +- search/variables_c.js | 12 +- search/variables_d.html | 8 +- search/variables_d.js | 4 +- search/variables_e.html | 8 +- search/variables_e.js | 2 +- search/variables_f.html | 8 +- search/variables_f.js | 2 +- struct_s_s_t_v_mode__t-members.html | 20 +- struct_s_s_t_v_mode__t.html | 20 +- structtone__t-members.html | 22 +- structtone__t.html | 32 +- structtone__t.js | 2 +- tabs.css | 2 +- todo.html | 85 +- 435 files changed, 16883 insertions(+), 5728 deletions(-) rename files.js => files_dup.js (86%) rename functions_func_0x7e.html => functions_func_~.html (83%) rename functions_0x7e.html => functions_~.html (83%) create mode 100644 navtreeindex4.js diff --git a/_a_f_s_k_8h_source.html b/_a_f_s_k_8h_source.html index d13b32a1..857f38b2 100644 --- a/_a_f_s_k_8h_source.html +++ b/_a_f_s_k_8h_source.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/protocols/AFSK/AFSK.h Source File @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -84,26 +86,64 @@ $(document).ready(function(){initNavTree('_a_f_s_k_8h_source.html','');});
AFSK.h
-
1 #if !defined(_RADIOLIB_AFSK_H)
2 #define _RADIOLIB_AFSK_H
3 
4 #include "../../TypeDef.h"
5 
6 #if !defined(RADIOLIB_EXCLUDE_AFSK)
7 
8 #include "../../Module.h"
9 
10 #include "../PhysicalLayer/PhysicalLayer.h"
11 
17 class AFSKClient {
18  public:
26  AFSKClient(PhysicalLayer* phy, RADIOLIB_PIN_TYPE pin);
27 
33  int16_t begin();
34 
44  int16_t tone(uint16_t freq, bool autoStart = true);
45 
51  int16_t noTone();
52 
53 #ifndef RADIOLIB_GODMODE
54  private:
55 #endif
56  PhysicalLayer* _phy;
57  RADIOLIB_PIN_TYPE _pin;
58 
59  // allow specific classes access the private PhysicalLayer pointer
60  friend class RTTYClient;
61  friend class MorseClient;
62  friend class HellClient;
63  friend class SSTVClient;
64  friend class AX25Client;
65 };
66 
67 #endif
68 
69 #endif
Client for audio-based transmissions. Requires Arduino tone() function, and a module capable of direc...
Definition: AFSK.h:17
-
int16_t noTone()
Stops transmitting audio tone.
Definition: AFSK.cpp:26
-
Client for Hellschreiber transmissions.
Definition: Hellschreiber.h:89
-
AFSKClient(PhysicalLayer *phy, RADIOLIB_PIN_TYPE pin)
Default contructor.
Definition: AFSK.cpp:4
-
Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN...
Definition: PhysicalLayer.h:13
-
Client for RTTY communication. The public interface is the same as Arduino Serial.
Definition: RTTY.h:88
-
Client for SSTV transmissions.
Definition: SSTV.h:120
-
Client for AX25 communication.
Definition: AX25.h:279
-
int16_t begin()
Initialization method.
Definition: AFSK.cpp:8
-
Client for Morse Code communication. The public interface is the same as Arduino Serial.
Definition: Morse.h:89
-
int16_t tone(uint16_t freq, bool autoStart=true)
Start transmitting audio tone.
Definition: AFSK.cpp:12
+
1 #if !defined(_RADIOLIB_AFSK_H)
+
2 #define _RADIOLIB_AFSK_H
+
3 
+
4 #include "../../TypeDef.h"
+
5 
+
6 #if !defined(RADIOLIB_EXCLUDE_AFSK)
+
7 
+
8 #include "../../Module.h"
+
9 
+
10 #include "../PhysicalLayer/PhysicalLayer.h"
+
11 
+
17 class AFSKClient {
+
18  public:
+
26  AFSKClient(PhysicalLayer* phy, RADIOLIB_PIN_TYPE pin);
+
27 
+
33  int16_t begin();
+
34 
+
44  int16_t tone(uint16_t freq, bool autoStart = true);
+
45 
+
51  int16_t noTone();
+
52 
+
53 #ifndef RADIOLIB_GODMODE
+
54  private:
+
55 #endif
+
56  PhysicalLayer* _phy;
+
57  RADIOLIB_PIN_TYPE _pin;
+
58 
+
59  // allow specific classes access the private PhysicalLayer pointer
+
60  friend class RTTYClient;
+
61  friend class MorseClient;
+
62  friend class HellClient;
+
63  friend class SSTVClient;
+
64  friend class AX25Client;
+
65 };
+
66 
+
67 #endif
+
68 
+
69 #endif
+
Client for Hellschreiber transmissions.
Definition: Hellschreiber.h:89
+
Client for audio-based transmissions. Requires Arduino tone() function, and a module capable of direc...
Definition: AFSK.h:17
+
Client for AX25 communication.
Definition: AX25.h:279
+
int16_t noTone()
Stops transmitting audio tone.
Definition: AFSK.cpp:26
+
int16_t tone(uint16_t freq, bool autoStart=true)
Start transmitting audio tone.
Definition: AFSK.cpp:12
+
AFSKClient(PhysicalLayer *phy, RADIOLIB_PIN_TYPE pin)
Default contructor.
Definition: AFSK.cpp:4
+
Client for Morse Code communication. The public interface is the same as Arduino Serial.
Definition: Morse.h:89
+
Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN....
Definition: PhysicalLayer.h:13
+
Client for RTTY communication. The public interface is the same as Arduino Serial.
Definition: RTTY.h:88
+
Client for SSTV transmissions.
Definition: SSTV.h:120
+
int16_t begin()
Initialization method.
Definition: AFSK.cpp:8
diff --git a/_a_x25_8h_source.html b/_a_x25_8h_source.html index 0d075fc5..05ba5d92 100644 --- a/_a_x25_8h_source.html +++ b/_a_x25_8h_source.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/protocols/AX25/AX25.h Source File @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -84,38 +86,218 @@ $(document).ready(function(){initNavTree('_a_x25_8h_source.html','');});
AX25.h
-
1 #if !defined(_RADIOLIB_AX25_H)
2 #define _RADIOLIB_AX25_H
3 
4 #include "../../TypeDef.h"
5 
6 #if !defined(RADIOLIB_EXCLUDE_AX25)
7 
8 #include "../PhysicalLayer/PhysicalLayer.h"
9 #include "../AFSK/AFSK.h"
10 
11 // macros to access bits in byte array, from http://www.mathcs.emory.edu/~cheung/Courses/255/Syllabus/1-C-intro/bit-array.html
12 #define SET_BIT_IN_ARRAY(A, k) ( A[(k/8)] |= (1 << (k%8)) )
13 #define CLEAR_BIT_IN_ARRAY(A, k) ( A[(k/8)] &= ~(1 << (k%8)) )
14 #define TEST_BIT_IN_ARRAY(A, k) ( A[(k/8)] & (1 << (k%8)) )
15 #define GET_BIT_IN_ARRAY(A, k) ( (A[(k/8)] & (1 << (k%8))) ? 1 : 0 )
16 
17 // CRC-CCITT calculation macros
18 #define XOR(A, B) ( ((A) || (B)) && !((A) && (B)) )
19 #define CRC_CCITT_POLY 0x1021 // generator polynomial
20 #define CRC_CCITT_POLY_REVERSED 0x8408 // CRC_CCITT_POLY in reversed bit order
21 #define CRC_CCITT_INIT 0xFFFF // initial value
22 
23 // maximum callsign length in bytes
24 #define AX25_MAX_CALLSIGN_LEN 6
25 
26 // flag field MSB LSB DESCRIPTION
27 #define AX25_FLAG 0b01111110 // 7 0 AX.25 frame start/end flag
28 
29 // address field
30 #define AX25_SSID_COMMAND_DEST 0b10000000 // 7 7 frame type: command (set in destination SSID)
31 #define AX25_SSID_COMMAND_SOURCE 0b00000000 // 7 7 command (set in source SSID)
32 #define AX25_SSID_RESPONSE_DEST 0b00000000 // 7 7 response (set in destination SSID)
33 #define AX25_SSID_RESPONSE_SOURCE 0b10000000 // 7 7 response (set in source SSID)
34 #define AX25_SSID_HAS_NOT_BEEN_REPEATED 0b00000000 // 7 7 not repeated yet (set in repeater SSID)
35 #define AX25_SSID_HAS_BEEN_REPEATED 0b10000000 // 7 7 repeated (set in repeater SSID)
36 #define AX25_SSID_RESERVED_BITS 0b01100000 // 6 5 reserved bits in SSID
37 #define AX25_SSID_HDLC_EXTENSION_CONTINUE 0b00000000 // 0 0 HDLC extension bit: next octet contains more address information
38 #define AX25_SSID_HDLC_EXTENSION_END 0b00000001 // 0 0 address field end
39 
40 // control field
41 #define AX25_CONTROL_U_SET_ASYNC_BAL_MODE 0b01101100 // 7 2 U frame type: set asynchronous balanced mode (connect request)
42 #define AX25_CONTROL_U_SET_ASYNC_BAL_MODE_EXT 0b00101100 // 7 2 set asynchronous balanced mode extended (connect request with module 128)
43 #define AX25_CONTROL_U_DISCONNECT 0b01000000 // 7 2 disconnect request
44 #define AX25_CONTROL_U_DISCONNECT_MODE 0b00001100 // 7 2 disconnect mode (system busy or disconnected)
45 #define AX25_CONTROL_U_UNNUMBERED_ACK 0b01100000 // 7 2 unnumbered acknowledge
46 #define AX25_CONTROL_U_FRAME_REJECT 0b10000100 // 7 2 frame reject
47 #define AX25_CONTROL_U_UNNUMBERED_INFORMATION 0b00000000 // 7 2 unnumbered information
48 #define AX25_CONTROL_U_EXHANGE_IDENTIFICATION 0b10101100 // 7 2 exchange ID
49 #define AX25_CONTROL_U_TEST 0b11100000 // 7 2 test
50 #define AX25_CONTROL_POLL_FINAL_ENABLED 0b00010000 // 4 4 control field poll/final bit: enabled
51 #define AX25_CONTROL_POLL_FINAL_DISABLED 0b00000000 // 4 4 disabled
52 #define AX25_CONTROL_S_RECEIVE_READY 0b00000000 // 3 2 S frame type: receive ready (system ready to receive)
53 #define AX25_CONTROL_S_RECEIVE_NOT_READY 0b00000100 // 3 2 receive not ready (TNC buffer full)
54 #define AX25_CONTROL_S_REJECT 0b00001000 // 3 2 reject (out of sequence or duplicate)
55 #define AX25_CONTROL_S_SELECTIVE_REJECT 0b00001100 // 3 2 selective reject (single frame repeat request)
56 #define AX25_CONTROL_INFORMATION_FRAME 0b00000000 // 0 0 frame type: information (I frame)
57 #define AX25_CONTROL_SUPERVISORY_FRAME 0b00000001 // 1 0 supervisory (S frame)
58 #define AX25_CONTROL_UNNUMBERED_FRAME 0b00000011 // 1 0 unnumbered (U frame)
59 
60 // protocol identifier field
61 #define AX25_PID_ISO_8208 0x01
62 #define AX25_PID_TCP_IP_COMPRESSED 0x06
63 #define AX25_PID_TCP_IP_UNCOMPRESSED 0x07
64 #define AX25_PID_SEGMENTATION_FRAGMENT 0x08
65 #define AX25_PID_TEXNET_DATAGRAM_PROTOCOL 0xC3
66 #define AX25_PID_LINK_QUALITY_PROTOCOL 0xC4
67 #define AX25_PID_APPLETALK 0xCA
68 #define AX25_PID_APPLETALK_ARP 0xCB
69 #define AX25_PID_ARPA_INTERNET_PROTOCOL 0xCC
70 #define AX25_PID_ARPA_ADDRESS_RESOLUTION 0xCD
71 #define AX25_PID_FLEXNET 0xCE
72 #define AX25_PID_NET_ROM 0xCF
73 #define AX25_PID_NO_LAYER_3 0xF0
74 #define AX25_PID_ESCAPE_CHARACTER 0xFF
75 
76 // AFSK tones in Hz
77 #define AX25_AFSK_MARK 1200
78 #define AX25_AFSK_SPACE 2200
79 
80 // tone duration in us (for 1200 baud AFSK)
81 #define AX25_AFSK_TONE_DURATION 833
82 
88 class AX25Frame {
89  public:
93  char destCallsign[AX25_MAX_CALLSIGN_LEN + 1];
94 
98  uint8_t destSSID;
99 
103  char srcCallsign[AX25_MAX_CALLSIGN_LEN + 1];
104 
108  uint8_t srcSSID;
109 
113  uint8_t numRepeaters;
114 
118  uint8_t control;
119 
123  uint8_t protocolID;
124 
128  uint16_t infoLen;
129 
133  uint8_t rcvSeqNumber;
134 
138  uint16_t sendSeqNumber;
139 
140  #ifndef RADIOLIB_STATIC_ONLY
141 
144  uint8_t* info;
145 
150 
154  uint8_t* repeaterSSIDs;
155  #else
156 
159  uint8_t info[RADIOLIB_STATIC_ARRAY_SIZE];
160 
164  char repeaterCallsigns[8][AX25_MAX_CALLSIGN_LEN + 1];
165 
169  uint8_t repeaterSSIDs[8];
170  #endif
171 
185  AX25Frame(const char* destCallsign, uint8_t destSSID, const char* srcCallsign, uint8_t srcSSID, uint8_t control);
186 
204  AX25Frame(const char* destCallsign, uint8_t destSSID, const char* srcCallsign, uint8_t srcSSID, uint8_t control, uint8_t protocolID, const char* info);
205 
225  AX25Frame(const char* destCallsign, uint8_t destSSID, const char* srcCallsign, uint8_t srcSSID, uint8_t control, uint8_t protocolID, uint8_t* info, uint16_t infoLen);
226 
232  AX25Frame(const AX25Frame& frame);
233 
237  ~AX25Frame();
238 
244  AX25Frame& operator=(const AX25Frame& frame);
245 
257  int16_t setRepeaters(char** repeaterCallsigns, uint8_t* repeaterSSIDs, uint8_t numRepeaters);
258 
264  void setRecvSequence(uint8_t seqNumber);
265 
271  void setSendSequence(uint8_t seqNumber);
272 };
273 
279 class AX25Client {
280  public:
286  explicit AX25Client(PhysicalLayer* phy);
287 
288  #if !defined(RADIOLIB_EXCLUDE_AFSK)
289 
294  explicit AX25Client(AFSKClient* audio);
295  #endif
296 
297  // basic methods
298 
310  int16_t begin(const char* srcCallsign, uint8_t srcSSID = 0x00, uint8_t preambleLen = 8);
311 
323  int16_t transmit(const char* str, const char* destCallsign, uint8_t destSSID = 0x00);
324 
332  int16_t sendFrame(AX25Frame* frame);
333 
334 #ifndef RADIOLIB_GODMODE
335  private:
336 #endif
337  PhysicalLayer* _phy;
338  #if !defined(RADIOLIB_EXCLUDE_AFSK)
339  AFSKClient* _audio;
340  #endif
341 
342  char _srcCallsign[AX25_MAX_CALLSIGN_LEN + 1] = {0, 0, 0, 0, 0, 0, 0};
343  uint8_t _srcSSID = 0;
344  uint16_t _preambleLen = 0;
345 
346  static uint16_t getFrameCheckSequence(uint8_t* buff, size_t len);
347  static uint8_t flipBits(uint8_t b);
348  static uint16_t flipBits16(uint16_t i);
349 };
350 
351 #endif
352 
353 #endif
~AX25Frame()
Default destructor.
Definition: AX25.cpp:56
-
AX25Frame & operator=(const AX25Frame &frame)
Overload for assignment operator.
Definition: AX25.cpp:74
-
Client for audio-based transmissions. Requires Arduino tone() function, and a module capable of direc...
Definition: AFSK.h:17
-
char ** repeaterCallsigns
Array of repeater callsigns.
Definition: AX25.h:149
-
uint8_t numRepeaters
Number of repeaters to be used.
Definition: AX25.h:113
-
int16_t setRepeaters(char **repeaterCallsigns, uint8_t *repeaterSSIDs, uint8_t numRepeaters)
Method to set the repeater callsigns and SSIDs.
Definition: AX25.cpp:109
-
uint8_t protocolID
The protocol identifier (PID) field.
Definition: AX25.h:123
-
uint16_t infoLen
Number of bytes in the information field.
Definition: AX25.h:128
-
void setRecvSequence(uint8_t seqNumber)
Method to set receive sequence number.
Definition: AX25.cpp:144
-
Abstraction of AX.25 frame format.
Definition: AX25.h:88
-
uint8_t destSSID
SSID of the destination station.
Definition: AX25.h:98
-
uint8_t * info
The info field.
Definition: AX25.h:144
-
uint8_t control
The control field.
Definition: AX25.h:118
-
uint8_t srcSSID
SSID of the source station.
Definition: AX25.h:108
-
char srcCallsign[AX25_MAX_CALLSIGN_LEN+1]
Callsign of the source station.
Definition: AX25.h:103
-
char destCallsign[AX25_MAX_CALLSIGN_LEN+1]
Callsign of the destination station.
Definition: AX25.h:93
-
uint16_t sendSeqNumber
Send sequence number.
Definition: AX25.h:138
-
AX25Frame(const char *destCallsign, uint8_t destSSID, const char *srcCallsign, uint8_t srcSSID, uint8_t control)
Overloaded constructor, for frames without info field.
Definition: AX25.cpp:4
-
Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN...
Definition: PhysicalLayer.h:13
-
uint8_t * repeaterSSIDs
Array of repeater SSIDs.
Definition: AX25.h:154
-
void setSendSequence(uint8_t seqNumber)
Method to set send sequence number.
Definition: AX25.cpp:148
-
uint8_t rcvSeqNumber
Receive sequence number.
Definition: AX25.h:133
-
Client for AX25 communication.
Definition: AX25.h:279
+
1 #if !defined(_RADIOLIB_AX25_H)
+
2 #define _RADIOLIB_AX25_H
+
3 
+
4 #include "../../TypeDef.h"
+
5 
+
6 #if !defined(RADIOLIB_EXCLUDE_AX25)
+
7 
+
8 #include "../PhysicalLayer/PhysicalLayer.h"
+
9 #include "../AFSK/AFSK.h"
+
10 
+
11 // macros to access bits in byte array, from http://www.mathcs.emory.edu/~cheung/Courses/255/Syllabus/1-C-intro/bit-array.html
+
12 #define SET_BIT_IN_ARRAY(A, k) ( A[(k/8)] |= (1 << (k%8)) )
+
13 #define CLEAR_BIT_IN_ARRAY(A, k) ( A[(k/8)] &= ~(1 << (k%8)) )
+
14 #define TEST_BIT_IN_ARRAY(A, k) ( A[(k/8)] & (1 << (k%8)) )
+
15 #define GET_BIT_IN_ARRAY(A, k) ( (A[(k/8)] & (1 << (k%8))) ? 1 : 0 )
+
16 
+
17 // CRC-CCITT calculation macros
+
18 #define XOR(A, B) ( ((A) || (B)) && !((A) && (B)) )
+
19 #define CRC_CCITT_POLY 0x1021 // generator polynomial
+
20 #define CRC_CCITT_POLY_REVERSED 0x8408 // CRC_CCITT_POLY in reversed bit order
+
21 #define CRC_CCITT_INIT 0xFFFF // initial value
+
22 
+
23 // maximum callsign length in bytes
+
24 #define AX25_MAX_CALLSIGN_LEN 6
+
25 
+
26 // flag field MSB LSB DESCRIPTION
+
27 #define AX25_FLAG 0b01111110 // 7 0 AX.25 frame start/end flag
+
28 
+
29 // address field
+
30 #define AX25_SSID_COMMAND_DEST 0b10000000 // 7 7 frame type: command (set in destination SSID)
+
31 #define AX25_SSID_COMMAND_SOURCE 0b00000000 // 7 7 command (set in source SSID)
+
32 #define AX25_SSID_RESPONSE_DEST 0b00000000 // 7 7 response (set in destination SSID)
+
33 #define AX25_SSID_RESPONSE_SOURCE 0b10000000 // 7 7 response (set in source SSID)
+
34 #define AX25_SSID_HAS_NOT_BEEN_REPEATED 0b00000000 // 7 7 not repeated yet (set in repeater SSID)
+
35 #define AX25_SSID_HAS_BEEN_REPEATED 0b10000000 // 7 7 repeated (set in repeater SSID)
+
36 #define AX25_SSID_RESERVED_BITS 0b01100000 // 6 5 reserved bits in SSID
+
37 #define AX25_SSID_HDLC_EXTENSION_CONTINUE 0b00000000 // 0 0 HDLC extension bit: next octet contains more address information
+
38 #define AX25_SSID_HDLC_EXTENSION_END 0b00000001 // 0 0 address field end
+
39 
+
40 // control field
+
41 #define AX25_CONTROL_U_SET_ASYNC_BAL_MODE 0b01101100 // 7 2 U frame type: set asynchronous balanced mode (connect request)
+
42 #define AX25_CONTROL_U_SET_ASYNC_BAL_MODE_EXT 0b00101100 // 7 2 set asynchronous balanced mode extended (connect request with module 128)
+
43 #define AX25_CONTROL_U_DISCONNECT 0b01000000 // 7 2 disconnect request
+
44 #define AX25_CONTROL_U_DISCONNECT_MODE 0b00001100 // 7 2 disconnect mode (system busy or disconnected)
+
45 #define AX25_CONTROL_U_UNNUMBERED_ACK 0b01100000 // 7 2 unnumbered acknowledge
+
46 #define AX25_CONTROL_U_FRAME_REJECT 0b10000100 // 7 2 frame reject
+
47 #define AX25_CONTROL_U_UNNUMBERED_INFORMATION 0b00000000 // 7 2 unnumbered information
+
48 #define AX25_CONTROL_U_EXHANGE_IDENTIFICATION 0b10101100 // 7 2 exchange ID
+
49 #define AX25_CONTROL_U_TEST 0b11100000 // 7 2 test
+
50 #define AX25_CONTROL_POLL_FINAL_ENABLED 0b00010000 // 4 4 control field poll/final bit: enabled
+
51 #define AX25_CONTROL_POLL_FINAL_DISABLED 0b00000000 // 4 4 disabled
+
52 #define AX25_CONTROL_S_RECEIVE_READY 0b00000000 // 3 2 S frame type: receive ready (system ready to receive)
+
53 #define AX25_CONTROL_S_RECEIVE_NOT_READY 0b00000100 // 3 2 receive not ready (TNC buffer full)
+
54 #define AX25_CONTROL_S_REJECT 0b00001000 // 3 2 reject (out of sequence or duplicate)
+
55 #define AX25_CONTROL_S_SELECTIVE_REJECT 0b00001100 // 3 2 selective reject (single frame repeat request)
+
56 #define AX25_CONTROL_INFORMATION_FRAME 0b00000000 // 0 0 frame type: information (I frame)
+
57 #define AX25_CONTROL_SUPERVISORY_FRAME 0b00000001 // 1 0 supervisory (S frame)
+
58 #define AX25_CONTROL_UNNUMBERED_FRAME 0b00000011 // 1 0 unnumbered (U frame)
+
59 
+
60 // protocol identifier field
+
61 #define AX25_PID_ISO_8208 0x01
+
62 #define AX25_PID_TCP_IP_COMPRESSED 0x06
+
63 #define AX25_PID_TCP_IP_UNCOMPRESSED 0x07
+
64 #define AX25_PID_SEGMENTATION_FRAGMENT 0x08
+
65 #define AX25_PID_TEXNET_DATAGRAM_PROTOCOL 0xC3
+
66 #define AX25_PID_LINK_QUALITY_PROTOCOL 0xC4
+
67 #define AX25_PID_APPLETALK 0xCA
+
68 #define AX25_PID_APPLETALK_ARP 0xCB
+
69 #define AX25_PID_ARPA_INTERNET_PROTOCOL 0xCC
+
70 #define AX25_PID_ARPA_ADDRESS_RESOLUTION 0xCD
+
71 #define AX25_PID_FLEXNET 0xCE
+
72 #define AX25_PID_NET_ROM 0xCF
+
73 #define AX25_PID_NO_LAYER_3 0xF0
+
74 #define AX25_PID_ESCAPE_CHARACTER 0xFF
+
75 
+
76 // AFSK tones in Hz
+
77 #define AX25_AFSK_MARK 1200
+
78 #define AX25_AFSK_SPACE 2200
+
79 
+
80 // tone duration in us (for 1200 baud AFSK)
+
81 #define AX25_AFSK_TONE_DURATION 833
+
82 
+
88 class AX25Frame {
+
89  public:
+
93  char destCallsign[AX25_MAX_CALLSIGN_LEN + 1];
+
94 
+
98  uint8_t destSSID;
+
99 
+
103  char srcCallsign[AX25_MAX_CALLSIGN_LEN + 1];
+
104 
+
108  uint8_t srcSSID;
+
109 
+
113  uint8_t numRepeaters;
+
114 
+
118  uint8_t control;
+
119 
+
123  uint8_t protocolID;
+
124 
+
128  uint16_t infoLen;
+
129 
+
133  uint8_t rcvSeqNumber;
+
134 
+
138  uint16_t sendSeqNumber;
+
139 
+
140  #ifndef RADIOLIB_STATIC_ONLY
+
141 
+
144  uint8_t* info;
+
145 
+ +
150 
+
154  uint8_t* repeaterSSIDs;
+
155  #else
+
156 
+
159  uint8_t info[RADIOLIB_STATIC_ARRAY_SIZE];
+
160 
+
164  char repeaterCallsigns[8][AX25_MAX_CALLSIGN_LEN + 1];
+
165 
+
169  uint8_t repeaterSSIDs[8];
+
170  #endif
+
171 
+
185  AX25Frame(const char* destCallsign, uint8_t destSSID, const char* srcCallsign, uint8_t srcSSID, uint8_t control);
+
186 
+
204  AX25Frame(const char* destCallsign, uint8_t destSSID, const char* srcCallsign, uint8_t srcSSID, uint8_t control, uint8_t protocolID, const char* info);
+
205 
+
225  AX25Frame(const char* destCallsign, uint8_t destSSID, const char* srcCallsign, uint8_t srcSSID, uint8_t control, uint8_t protocolID, uint8_t* info, uint16_t infoLen);
+
226 
+
232  AX25Frame(const AX25Frame& frame);
+
233 
+
237  ~AX25Frame();
+
238 
+
244  AX25Frame& operator=(const AX25Frame& frame);
+
245 
+
257  int16_t setRepeaters(char** repeaterCallsigns, uint8_t* repeaterSSIDs, uint8_t numRepeaters);
+
258 
+
264  void setRecvSequence(uint8_t seqNumber);
+
265 
+
271  void setSendSequence(uint8_t seqNumber);
+
272 };
+
273 
+
279 class AX25Client {
+
280  public:
+
286  explicit AX25Client(PhysicalLayer* phy);
+
287 
+
288  #if !defined(RADIOLIB_EXCLUDE_AFSK)
+
289 
+
294  explicit AX25Client(AFSKClient* audio);
+
295  #endif
+
296 
+
297  // basic methods
+
298 
+
310  int16_t begin(const char* srcCallsign, uint8_t srcSSID = 0x00, uint8_t preambleLen = 8);
+
311 
+
323  int16_t transmit(const char* str, const char* destCallsign, uint8_t destSSID = 0x00);
+
324 
+
332  int16_t sendFrame(AX25Frame* frame);
+
333 
+
334 #ifndef RADIOLIB_GODMODE
+
335  private:
+
336 #endif
+
337  PhysicalLayer* _phy;
+
338  #if !defined(RADIOLIB_EXCLUDE_AFSK)
+
339  AFSKClient* _audio;
+
340  #endif
+
341 
+
342  char _srcCallsign[AX25_MAX_CALLSIGN_LEN + 1] = {0, 0, 0, 0, 0, 0, 0};
+
343  uint8_t _srcSSID = 0;
+
344  uint16_t _preambleLen = 0;
+
345 
+
346  static uint16_t getFrameCheckSequence(uint8_t* buff, size_t len);
+
347  static uint8_t flipBits(uint8_t b);
+
348  static uint16_t flipBits16(uint16_t i);
+
349 };
+
350 
+
351 #endif
+
352 
+
353 #endif
+
uint16_t infoLen
Number of bytes in the information field.
Definition: AX25.h:128
+
uint8_t protocolID
The protocol identifier (PID) field.
Definition: AX25.h:123
+
void setSendSequence(uint8_t seqNumber)
Method to set send sequence number.
Definition: AX25.cpp:148
+
Abstraction of AX.25 frame format.
Definition: AX25.h:88
+
Client for audio-based transmissions. Requires Arduino tone() function, and a module capable of direc...
Definition: AFSK.h:17
+
Client for AX25 communication.
Definition: AX25.h:279
+
uint8_t * info
The info field.
Definition: AX25.h:144
+
int16_t begin(const char *srcCallsign, uint8_t srcSSID=0x00, uint8_t preambleLen=8)
Initialization method.
Definition: AX25.cpp:166
+
int16_t setRepeaters(char **repeaterCallsigns, uint8_t *repeaterSSIDs, uint8_t numRepeaters)
Method to set the repeater callsigns and SSIDs.
Definition: AX25.cpp:109
+
void setRecvSequence(uint8_t seqNumber)
Method to set receive sequence number.
Definition: AX25.cpp:144
+
AX25Client(PhysicalLayer *phy)
Constructor for 2-FSK mode.
Definition: AX25.cpp:152
+
uint8_t * repeaterSSIDs
Array of repeater SSIDs.
Definition: AX25.h:154
+
uint8_t destSSID
SSID of the destination station.
Definition: AX25.h:98
+
int16_t transmit(const char *str, const char *destCallsign, uint8_t destSSID=0x00)
Transmit unnumbered information (UI) frame.
Definition: AX25.cpp:186
+
Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN....
Definition: PhysicalLayer.h:13
+
uint8_t control
The control field.
Definition: AX25.h:118
+
uint8_t rcvSeqNumber
Receive sequence number.
Definition: AX25.h:133
+
char destCallsign[AX25_MAX_CALLSIGN_LEN+1]
Callsign of the destination station.
Definition: AX25.h:93
+
uint8_t srcSSID
SSID of the source station.
Definition: AX25.h:108
+
~AX25Frame()
Default destructor.
Definition: AX25.cpp:56
+
uint16_t sendSeqNumber
Send sequence number.
Definition: AX25.h:138
+
char srcCallsign[AX25_MAX_CALLSIGN_LEN+1]
Callsign of the source station.
Definition: AX25.h:103
+
AX25Frame(const char *destCallsign, uint8_t destSSID, const char *srcCallsign, uint8_t srcSSID, uint8_t control)
Overloaded constructor, for frames without info field.
Definition: AX25.cpp:4
+
AX25Frame & operator=(const AX25Frame &frame)
Overload for assignment operator.
Definition: AX25.cpp:74
+
uint8_t numRepeaters
Number of repeaters to be used.
Definition: AX25.h:113
+
int16_t sendFrame(AX25Frame *frame)
Transmit arbitrary AX.25 frame.
Definition: AX25.cpp:197
+
char ** repeaterCallsigns
Array of repeater callsigns.
Definition: AX25.h:149
diff --git a/_build_opt_8h_source.html b/_build_opt_8h_source.html index 1588af10..4fdd6f4a 100644 --- a/_build_opt_8h_source.html +++ b/_build_opt_8h_source.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/BuildOpt.h Source File @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -84,7 +86,442 @@ $(document).ready(function(){initNavTree('_build_opt_8h_source.html','');});
BuildOpt.h
-
1 #if !defined(_RADIOLIB_BUILD_OPTIONS_H)
2 #define _RADIOLIB_BUILD_OPTIONS_H
3 
4 #if ARDUINO >= 100
5  #include "Arduino.h"
6 #else
7  #error "Unsupported Arduino version (< 1.0.0)"
8 #endif
9 
10 /*
11  * Platform-specific configuration.
12  *
13  * RADIOLIB_PLATFORM - platform name, used in debugging to quickly check the correct platform is detected.
14  * RADIOLIB_PIN_TYPE - which type should be used for pin numbers in functions like digitalRead().
15  * RADIOLIB_PIN_MODE - which type should be used for pin modes in functions like pinMode().
16  * RADIOLIB_PIN_STATUS - which type should be used for pin values in functions like digitalWrite().
17  * RADIOLIB_INTERRUPT_STATUS - which type should be used for pin changes in functions like attachInterrupt().
18  * RADIOLIB_DIGITAL_PIN_TO_INTERRUPT - function/macro to be used to convert digital pin number to interrupt pin number.
19  * RADIOLIB_NC - alias for unused pin, usually the largest possible value of RADIOLIB_PIN_TYPE.
20  * RADIOLIB_DEFAULT_SPI - default SPIClass instance to use.
21  * RADIOLIB_PROGMEM - macro to place variable into program storage (usually Flash).
22  * RADIOLIB_PROGMEM_READ_BYTE - function/macro to read variables saved in program storage (usually Flash).
23  * RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED - defined if the specific platform does not support SoftwareSerial.
24  * RADIOLIB_HARDWARE_SERIAL_PORT - which hardware serial port should be used on platform that do not have SoftwareSerial support.
25  * RADIOLIB_TONE_UNSUPPORTED - some platforms do not have tone()/noTone(), which is required for AFSK.
26  *
27  * In addition, some platforms may require RadioLib to disable specific drivers (such as ESP8266).
28  *
29  * Users may also specify their own configuration by uncommenting the RADIOLIB_CUSTOM_PLATFORM,
30  * and then specifying all platform parameters in the section below. This will override automatic
31  * platform detection.
32  */
33 
34 // uncomment to enable custom platform definition
35 //#define RADIOLIB_CUSTOM_PLATFORM
36 
37 #if defined(RADIOLIB_CUSTOM_PLATFORM)
38  // name for your platform
39  #define RADIOLIB_PLATFORM "Custom"
40 
41  // the following parameters must always be defined
42  #define RADIOLIB_PIN_TYPE uint8_t
43  #define RADIOLIB_PIN_MODE uint8_t
44  #define RADIOLIB_PIN_STATUS uint8_t
45  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
46  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
47  #define RADIOLIB_NC (0xFF)
48  #define RADIOLIB_DEFAULT_SPI SPI
49  #define RADIOLIB_PROGMEM PROGMEM
50  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
51 
52  // the following must be defined if the Arduino core does not support SoftwareSerial library
53  //#define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED
54  //#define RADIOLIB_HARDWARE_SERIAL_PORT Serial1
55 
56  // the following must be defined if the Arduino core does not support tone function
57  //#define RADIOLIB_TONE_UNSUPPORTED
58 
59  // some platforms seem to have issues with SPI modules that use a command interface
60  // this can be mitigated by adding delays into SPI communication
61  // (see https://github.com/jgromes/RadioLib/issues/158 for details)
62  //#define RADIOLIB_SPI_SLOWDOWN
63 
64  // some of RadioLib drivers may be excluded, to prevent collisions with platforms (or to speed up build process)
65  // the following is a complete list of all possible exclusion macros, uncomment any of them to disable that driver
66  // NOTE: Some of the exclusion macros are dependent on each other. For example, it is not possible to exclude RF69
67  // while keeping SX1231 (because RF69 is the base class for SX1231). The dependency is always uni-directional,
68  // so excluding SX1231 and keeping RF69 is valid.
69  //#define RADIOLIB_EXCLUDE_CC1101
70  //#define RADIOLIB_EXCLUDE_ESP8266
71  //#define RADIOLIB_EXCLUDE_HC05
72  //#define RADIOLIB_EXCLUDE_JDY08
73  //#define RADIOLIB_EXCLUDE_NRF24
74  //#define RADIOLIB_EXCLUDE_RF69
75  //#define RADIOLIB_EXCLUDE_SX1231 // dependent on RADIOLIB_EXCLUDE_RF69
76  //#define RADIOLIB_EXCLUDE_SI443X
77  //#define RADIOLIB_EXCLUDE_RFM2X // dependent on RADIOLIB_EXCLUDE_SI443X
78  //#define RADIOLIB_EXCLUDE_SX127X
79  //#define RADIOLIB_EXCLUDE_RFM9X // dependent on RADIOLIB_EXCLUDE_SX127X
80  //#define RADIOLIB_EXCLUDE_SX126X
81  //#define RADIOLIB_EXCLUDE_SX128X
82  //#define RADIOLIB_EXCLUDE_XBEE
83  //#define RADIOLIB_EXCLUDE_AFSK
84  //#define RADIOLIB_EXCLUDE_AX25
85  //#define RADIOLIB_EXCLUDE_HELLSCHREIBER
86  //#define RADIOLIB_EXCLUDE_HTTP
87  //#define RADIOLIB_EXCLUDE_MORSE
88  //#define RADIOLIB_EXCLUDE_MQTT
89  //#define RADIOLIB_EXCLUDE_RTTY
90  //#define RADIOLIB_EXCLUDE_SSTV
91 
92 #else
93  #if defined(__AVR__) && !(defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_AVR_NANO_EVERY) || defined(ARDUINO_ARCH_MEGAAVR))
94  // Arduino AVR boards (except for megaAVR) - Uno, Mega etc.
95  #define RADIOLIB_PLATFORM "Arduino AVR"
96  #define RADIOLIB_PIN_TYPE uint8_t
97  #define RADIOLIB_PIN_MODE uint8_t
98  #define RADIOLIB_PIN_STATUS uint8_t
99  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
100  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
101  #define RADIOLIB_NC (0xFF)
102  #define RADIOLIB_DEFAULT_SPI SPI
103  #define RADIOLIB_PROGMEM PROGMEM
104  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
105 
106  #elif defined(ESP8266)
107  // ESP8266 boards
108  #define RADIOLIB_PLATFORM "ESP8266"
109  #define RADIOLIB_PIN_TYPE uint8_t
110  #define RADIOLIB_PIN_MODE uint8_t
111  #define RADIOLIB_PIN_STATUS uint8_t
112  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
113  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
114  #define RADIOLIB_NC (0xFF)
115  #define RADIOLIB_DEFAULT_SPI SPI
116  #define RADIOLIB_PROGMEM PROGMEM
117  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
118 
119  // RadioLib has ESP8266 driver, this must be disabled to use ESP8266 as platform
120  #define RADIOLIB_EXCLUDE_ESP8266
121 
122  #elif defined(ESP32)
123  // ESP32 boards
124  #define RADIOLIB_PLATFORM "ESP32"
125  #define RADIOLIB_PIN_TYPE uint8_t
126  #define RADIOLIB_PIN_MODE uint8_t
127  #define RADIOLIB_PIN_STATUS uint8_t
128  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
129  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
130  #define RADIOLIB_NC (0xFF)
131  #define RADIOLIB_DEFAULT_SPI SPI
132  #define RADIOLIB_PROGMEM PROGMEM
133  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
134  #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED
135  #define RADIOLIB_HARDWARE_SERIAL_PORT Serial1
136 
137  // ESP32 doesn't support tone(), but it can be emulated via LED control peripheral
138  #define RADIOLIB_TONE_UNSUPPORTED
139  #define RADIOLIB_TONE_ESP32_CHANNEL (1)
140 
141  #elif defined(ARDUINO_ARCH_STM32)
142  // official STM32 Arduino core (https://github.com/stm32duino/Arduino_Core_STM32)
143  #define RADIOLIB_PLATFORM "Arduino STM32 (official)"
144  #define RADIOLIB_PIN_TYPE uint32_t
145  #define RADIOLIB_PIN_MODE uint32_t
146  #define RADIOLIB_PIN_STATUS uint32_t
147  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
148  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
149  #define RADIOLIB_NC (0xFFFFFFFF)
150  #define RADIOLIB_DEFAULT_SPI SPI
151  #define RADIOLIB_PROGMEM PROGMEM
152  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
153  #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED
154  #define RADIOLIB_HARDWARE_SERIAL_PORT Serial1
155 
156  // slow down SX126x/8x SPI on this platform
157  #define RADIOLIB_SPI_SLOWDOWN
158 
159  #elif defined(SAMD_SERIES)
160  // Adafruit SAMD boards (M0 and M4)
161  #define RADIOLIB_PLATFORM "Adafruit SAMD"
162  #define RADIOLIB_PIN_TYPE uint32_t
163  #define RADIOLIB_PIN_MODE uint32_t
164  #define RADIOLIB_PIN_STATUS uint32_t
165  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
166  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
167  #define RADIOLIB_NC (0xFFFFFFFF)
168  #define RADIOLIB_DEFAULT_SPI SPI
169  #define RADIOLIB_PROGMEM PROGMEM
170  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
171  #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED
172  #define RADIOLIB_HARDWARE_SERIAL_PORT Serial1
173 
174  // slow down SX126x/8x SPI on this platform
175  #define RADIOLIB_SPI_SLOWDOWN
176 
177  #elif defined(ARDUINO_ARCH_SAMD)
178  // Arduino SAMD (Zero, MKR, etc.)
179  #define RADIOLIB_PLATFORM "Arduino SAMD"
180  #define RADIOLIB_PIN_TYPE pin_size_t
181  #define RADIOLIB_PIN_MODE PinMode
182  #define RADIOLIB_PIN_STATUS PinStatus
183  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
184  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
185  #define RADIOLIB_NC (0xFF)
186  #define RADIOLIB_DEFAULT_SPI SPI
187  #define RADIOLIB_PROGMEM PROGMEM
188  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
189  #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED
190  #define RADIOLIB_HARDWARE_SERIAL_PORT Serial1
191 
192  #elif defined(__SAM3X8E__)
193  // Arduino Due
194  #define RADIOLIB_PLATFORM "Arduino Due"
195  #define RADIOLIB_PIN_TYPE uint32_t
196  #define RADIOLIB_PIN_MODE uint32_t
197  #define RADIOLIB_PIN_STATUS uint32_t
198  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
199  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
200  #define RADIOLIB_NC (0xFFFFFFFF)
201  #define RADIOLIB_DEFAULT_SPI SPI
202  #define RADIOLIB_PROGMEM PROGMEM
203  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
204  #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED
205  #define RADIOLIB_HARDWARE_SERIAL_PORT Serial1
206  #define RADIOLIB_TONE_UNSUPPORTED
207 
208  #elif (defined(NRF52832_XXAA) || defined(NRF52840_XXAA)) && !defined(ARDUINO_ARDUINO_NANO33BLE)
209  // Adafruit nRF52 boards
210  #define RADIOLIB_PLATFORM "Adafruit nRF52"
211  #define RADIOLIB_PIN_TYPE uint32_t
212  #define RADIOLIB_PIN_MODE uint32_t
213  #define RADIOLIB_PIN_STATUS uint32_t
214  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
215  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
216  #define RADIOLIB_NC (0xFFFFFFFF)
217  #define RADIOLIB_DEFAULT_SPI SPI
218  #define RADIOLIB_PROGMEM PROGMEM
219  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
220 
221  #elif defined(ARDUINO_ARC32_TOOLS)
222  // Intel Curie
223  #define RADIOLIB_PLATFORM "Intel Curie"
224  #define RADIOLIB_PIN_TYPE uint8_t
225  #define RADIOLIB_PIN_MODE uint8_t
226  #define RADIOLIB_PIN_STATUS uint8_t
227  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
228  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
229  #define RADIOLIB_NC (0xFF)
230  #define RADIOLIB_DEFAULT_SPI SPI
231  #define RADIOLIB_PROGMEM PROGMEM
232  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
233 
234  #elif defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_AVR_NANO_EVERY)
235  // Arduino megaAVR boards - Uno Wifi Rev.2, Nano Every
236  #define RADIOLIB_PLATFORM "Arduino megaAVR"
237  #define RADIOLIB_PIN_TYPE uint8_t
238  #define RADIOLIB_PIN_MODE PinMode
239  #define RADIOLIB_PIN_STATUS PinStatus
240  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
241  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
242  #define RADIOLIB_NC (0xFF)
243  #define RADIOLIB_DEFAULT_SPI SPI
244  #define RADIOLIB_PROGMEM PROGMEM
245  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
246 
247  #elif defined(ARDUINO_ARCH_APOLLO3)
248  // Sparkfun Apollo3 boards
249  #define RADIOLIB_PLATFORM "Sparkfun Apollo3"
250  #define RADIOLIB_PIN_TYPE pin_size_t
251  #define RADIOLIB_PIN_MODE Arduino_PinMode
252  #define RADIOLIB_PIN_STATUS PinStatus
253  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
254  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
255  #define RADIOLIB_NC (0xFF)
256  #define RADIOLIB_DEFAULT_SPI SPI
257  #define RADIOLIB_PROGMEM PROGMEM
258  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
259  #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED
260  #define RADIOLIB_HARDWARE_SERIAL_PORT Serial1
261 
262  // Apollo3 uses mbed libraries, which already contain ESP8266 driver
263  #define RADIOLIB_EXCLUDE_ESP8266
264 
265  // slow down SX126x/8x SPI on this platform
266  #define RADIOLIB_SPI_SLOWDOWN
267 
268  #elif defined(ARDUINO_ARDUINO_NANO33BLE)
269  // Arduino Nano 33 BLE
270  #define RADIOLIB_PLATFORM "Arduino Nano 33 BLE"
271  #define RADIOLIB_PIN_TYPE pin_size_t
272  #define RADIOLIB_PIN_MODE PinMode
273  #define RADIOLIB_PIN_STATUS PinStatus
274  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
275  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
276  #define RADIOLIB_NC (0xFF)
277  #define RADIOLIB_DEFAULT_SPI SPI
278  #define RADIOLIB_PROGMEM PROGMEM
279  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
280  #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED
281  #define RADIOLIB_HARDWARE_SERIAL_PORT Serial1
282 
283  // Nano 33 BLE uses mbed libraries, which already contain ESP8266 driver
284  #define RADIOLIB_EXCLUDE_ESP8266
285 
286  #elif defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4)
287  // Arduino Portenta H7
288  #define RADIOLIB_PLATFORM "Portenta H7"
289  #define RADIOLIB_PIN_TYPE pin_size_t
290  #define RADIOLIB_PIN_MODE PinMode
291  #define RADIOLIB_PIN_STATUS PinStatus
292  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
293  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
294  #define RADIOLIB_NC (0xFF)
295  #define RADIOLIB_DEFAULT_SPI SPI
296  #define RADIOLIB_PROGMEM PROGMEM
297  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
298  #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED
299  #define RADIOLIB_HARDWARE_SERIAL_PORT Serial1
300 
301  // Arduino Portenta H7 uses mbed libraries, which already contain ESP8266 driver
302  #define RADIOLIB_EXCLUDE_ESP8266
303 
304  #elif defined(__STM32F4__) || defined(__STM32F1__)
305  // Arduino STM32 core by Roger Clark (https://github.com/rogerclarkmelbourne/Arduino_STM32)
306  #define RADIOLIB_PLATFORM "STM32duino (unofficial)"
307  #define RADIOLIB_PIN_TYPE uint8_t
308  #define RADIOLIB_PIN_MODE WiringPinMode
309  #define RADIOLIB_PIN_STATUS uint8_t
310  #define RADIOLIB_INTERRUPT_STATUS ExtIntTriggerMode
311  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
312  #define RADIOLIB_NC (0xFF)
313  #define RADIOLIB_DEFAULT_SPI SPI
314  #define RADIOLIB_PROGMEM PROGMEM
315  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
316  #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED
317  #define RADIOLIB_HARDWARE_SERIAL_PORT Serial1
318 
319  #elif defined(ARDUINO_ARCH_MEGAAVR)
320  // MegaCoreX by MCUdude (https://github.com/MCUdude/MegaCoreX)
321  #define RADIOLIB_PLATFORM "MegaCoreX"
322  #define RADIOLIB_PIN_TYPE uint8_t
323  #define RADIOLIB_PIN_MODE uint8_t
324  #define RADIOLIB_PIN_STATUS uint8_t
325  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
326  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
327  #define RADIOLIB_NC (0xFF)
328  #define RADIOLIB_DEFAULT_SPI SPI
329  #define RADIOLIB_PROGMEM PROGMEM
330  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
331 
332  #else
333  // other platforms not covered by the above list - this may or may not work
334  #define RADIOLIB_PLATFORM "Unknown"
335  #define RADIOLIB_UNKNOWN_PLATFORM
336  #define RADIOLIB_PIN_TYPE uint8_t
337  #define RADIOLIB_PIN_MODE uint8_t
338  #define RADIOLIB_PIN_STATUS uint8_t
339  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
340  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
341  #define RADIOLIB_NC (0xFF)
342  #define RADIOLIB_DEFAULT_SPI SPI
343  #define RADIOLIB_PROGMEM PROGMEM
344  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
345 
346  #endif
347 #endif
348 
349 /*
350  * Uncomment to enable debug output.
351  * Warning: Debug output will slow down the whole system significantly.
352  * Also, it will result in larger compiled binary.
353  * Levels: debug - only main info
354  * verbose - full transcript of all SPI/UART communication
355  */
356 
357 //#define RADIOLIB_DEBUG
358 //#define RADIOLIB_VERBOSE
359 
360 // set which Serial port should be used for debug output
361 #define RADIOLIB_DEBUG_PORT Serial
362 
363 #if defined(RADIOLIB_DEBUG)
364  #define RADIOLIB_DEBUG_PRINT(...) { RADIOLIB_DEBUG_PORT.print(__VA_ARGS__); }
365  #define RADIOLIB_DEBUG_PRINTLN(...) { RADIOLIB_DEBUG_PORT.println(__VA_ARGS__); }
366 #else
367  #define RADIOLIB_DEBUG_PRINT(...) {}
368  #define RADIOLIB_DEBUG_PRINTLN(...) {}
369 #endif
370 
371 #if defined(RADIOLIB_VERBOSE)
372  #define RADIOLIB_VERBOSE_PRINT(...) { RADIOLIB_DEBUG_PORT.print(__VA_ARGS__); }
373  #define RADIOLIB_VERBOSE_PRINTLN(...) { RADIOLIB_DEBUG_PORT.println(__VA_ARGS__); }
374 #else
375  #define RADIOLIB_VERBOSE_PRINT(...) {}
376  #define RADIOLIB_VERBOSE_PRINTLN(...) {}
377 #endif
378 
379 /*
380  * Uncomment to enable "paranoid" SPI mode
381  * Every write to an SPI register using SPI set function will be verified by a subsequent read operation.
382  * This improves reliablility, but slightly slows down communication.
383  * Note: Enabled by default.
384  */
385 #define RADIOLIB_SPI_PARANOID
386 
387 /*
388  * Uncomment to enable parameter range checking
389  * RadioLib will check provided parameters (such as frequency) against limits determined by the device manufacturer.
390  * It is highly advised to keep this macro defined, removing it will allow invalid values to be set,
391  * possibly leading to bricked module and/or program crashing.
392  * Note: Enabled by default.
393  */
394 #define RADIOLIB_CHECK_PARAMS
395 
396 /*
397  * Uncomment to enable god mode - all methods and member variables in all classes will be made public, thus making them accessible from Arduino code.
398  * Warning: Come on, it's called GOD mode - obviously only use this if you know what you're doing.
399  * Failure to heed the above warning may result in bricked module.
400  */
401 //#define RADIOLIB_GODMODE
402 
403 /*
404  * Uncomment to enable pre-defined modules when using RadioShield.
405  */
406 //#define RADIOLIB_RADIOSHIELD
407 
408 /*
409  * Uncomment to enable static-only memory management: no dynamic allocation will be performed.
410  * Warning: Large static arrays will be created in some methods. It is not advised to send large packets in this mode.
411  */
412 //#define RADIOLIB_STATIC_ONLY
413 
414 // set the size of static arrays to use
415 #if !defined(RADIOLIB_STATIC_ARRAY_SIZE)
416 #define RADIOLIB_STATIC_ARRAY_SIZE 256
417 #endif
418 
422 #define RADIOLIB_ASSERT(STATEVAR) { if((STATEVAR) != ERR_NONE) { return(STATEVAR); } }
423 
427 #if defined(RADIOLIB_CHECK_PARAMS)
428 #define RADIOLIB_CHECK_RANGE(VAR, MIN, MAX, ERR) { if(!(((VAR) >= (MIN)) && ((VAR) <= (MAX)))) { return(ERR); } }
429 #else
430 #define RADIOLIB_CHECK_RANGE(VAR, MIN, MAX, ERR) {}
431 #endif
432 
433 // version definitions
434 #define RADIOLIB_VERSION_MAJOR (0x04)
435 #define RADIOLIB_VERSION_MINOR (0x02)
436 #define RADIOLIB_VERSION_PATCH (0x00)
437 #define RADIOLIB_VERSION_EXTRA (0x00)
438 
439 #define RADIOLIB_VERSION ((RADIOLIB_VERSION_MAJOR << 24) | (RADIOLIB_VERSION_MINOR << 16) | (RADIOLIB_VERSION_PATCH << 8) | (RADIOLIB_VERSION_EXTRA))
440 
441 #endif
+
1 #if !defined(_RADIOLIB_BUILD_OPTIONS_H)
+
2 #define _RADIOLIB_BUILD_OPTIONS_H
+
3 
+
4 #if ARDUINO >= 100
+
5  #include "Arduino.h"
+
6 #else
+
7  #error "Unsupported Arduino version (< 1.0.0)"
+
8 #endif
+
9 
+
10 /*
+
11  * Platform-specific configuration.
+
12  *
+
13  * RADIOLIB_PLATFORM - platform name, used in debugging to quickly check the correct platform is detected.
+
14  * RADIOLIB_PIN_TYPE - which type should be used for pin numbers in functions like digitalRead().
+
15  * RADIOLIB_PIN_MODE - which type should be used for pin modes in functions like pinMode().
+
16  * RADIOLIB_PIN_STATUS - which type should be used for pin values in functions like digitalWrite().
+
17  * RADIOLIB_INTERRUPT_STATUS - which type should be used for pin changes in functions like attachInterrupt().
+
18  * RADIOLIB_DIGITAL_PIN_TO_INTERRUPT - function/macro to be used to convert digital pin number to interrupt pin number.
+
19  * RADIOLIB_NC - alias for unused pin, usually the largest possible value of RADIOLIB_PIN_TYPE.
+
20  * RADIOLIB_DEFAULT_SPI - default SPIClass instance to use.
+
21  * RADIOLIB_PROGMEM - macro to place variable into program storage (usually Flash).
+
22  * RADIOLIB_PROGMEM_READ_BYTE - function/macro to read variables saved in program storage (usually Flash).
+
23  * RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED - defined if the specific platform does not support SoftwareSerial.
+
24  * RADIOLIB_HARDWARE_SERIAL_PORT - which hardware serial port should be used on platform that do not have SoftwareSerial support.
+
25  * RADIOLIB_TONE_UNSUPPORTED - some platforms do not have tone()/noTone(), which is required for AFSK.
+
26  *
+
27  * In addition, some platforms may require RadioLib to disable specific drivers (such as ESP8266).
+
28  *
+
29  * Users may also specify their own configuration by uncommenting the RADIOLIB_CUSTOM_PLATFORM,
+
30  * and then specifying all platform parameters in the section below. This will override automatic
+
31  * platform detection.
+
32  */
+
33 
+
34 // uncomment to enable custom platform definition
+
35 //#define RADIOLIB_CUSTOM_PLATFORM
+
36 
+
37 #if defined(RADIOLIB_CUSTOM_PLATFORM)
+
38  // name for your platform
+
39  #define RADIOLIB_PLATFORM "Custom"
+
40 
+
41  // the following parameters must always be defined
+
42  #define RADIOLIB_PIN_TYPE uint8_t
+
43  #define RADIOLIB_PIN_MODE uint8_t
+
44  #define RADIOLIB_PIN_STATUS uint8_t
+
45  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
+
46  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
47  #define RADIOLIB_NC (0xFF)
+
48  #define RADIOLIB_DEFAULT_SPI SPI
+
49  #define RADIOLIB_PROGMEM PROGMEM
+
50  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
+
51 
+
52  // the following must be defined if the Arduino core does not support SoftwareSerial library
+
53  //#define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED
+
54  //#define RADIOLIB_HARDWARE_SERIAL_PORT Serial1
+
55 
+
56  // the following must be defined if the Arduino core does not support tone function
+
57  //#define RADIOLIB_TONE_UNSUPPORTED
+
58 
+
59  // some platforms seem to have issues with SPI modules that use a command interface
+
60  // this can be mitigated by adding delays into SPI communication
+
61  // (see https://github.com/jgromes/RadioLib/issues/158 for details)
+
62  //#define RADIOLIB_SPI_SLOWDOWN
+
63 
+
64  // some of RadioLib drivers may be excluded, to prevent collisions with platforms (or to speed up build process)
+
65  // the following is a complete list of all possible exclusion macros, uncomment any of them to disable that driver
+
66  // NOTE: Some of the exclusion macros are dependent on each other. For example, it is not possible to exclude RF69
+
67  // while keeping SX1231 (because RF69 is the base class for SX1231). The dependency is always uni-directional,
+
68  // so excluding SX1231 and keeping RF69 is valid.
+
69  //#define RADIOLIB_EXCLUDE_CC1101
+
70  //#define RADIOLIB_EXCLUDE_ESP8266
+
71  //#define RADIOLIB_EXCLUDE_HC05
+
72  //#define RADIOLIB_EXCLUDE_JDY08
+
73  //#define RADIOLIB_EXCLUDE_NRF24
+
74  //#define RADIOLIB_EXCLUDE_RF69
+
75  //#define RADIOLIB_EXCLUDE_SX1231 // dependent on RADIOLIB_EXCLUDE_RF69
+
76  //#define RADIOLIB_EXCLUDE_SI443X
+
77  //#define RADIOLIB_EXCLUDE_RFM2X // dependent on RADIOLIB_EXCLUDE_SI443X
+
78  //#define RADIOLIB_EXCLUDE_SX127X
+
79  //#define RADIOLIB_EXCLUDE_RFM9X // dependent on RADIOLIB_EXCLUDE_SX127X
+
80  //#define RADIOLIB_EXCLUDE_SX126X
+
81  //#define RADIOLIB_EXCLUDE_SX128X
+
82  //#define RADIOLIB_EXCLUDE_XBEE
+
83  //#define RADIOLIB_EXCLUDE_AFSK
+
84  //#define RADIOLIB_EXCLUDE_AX25
+
85  //#define RADIOLIB_EXCLUDE_HELLSCHREIBER
+
86  //#define RADIOLIB_EXCLUDE_HTTP
+
87  //#define RADIOLIB_EXCLUDE_MORSE
+
88  //#define RADIOLIB_EXCLUDE_MQTT
+
89  //#define RADIOLIB_EXCLUDE_RTTY
+
90  //#define RADIOLIB_EXCLUDE_SSTV
+
91 
+
92 #else
+
93  #if defined(__AVR__) && !(defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_AVR_NANO_EVERY) || defined(ARDUINO_ARCH_MEGAAVR))
+
94  // Arduino AVR boards (except for megaAVR) - Uno, Mega etc.
+
95  #define RADIOLIB_PLATFORM "Arduino AVR"
+
96  #define RADIOLIB_PIN_TYPE uint8_t
+
97  #define RADIOLIB_PIN_MODE uint8_t
+
98  #define RADIOLIB_PIN_STATUS uint8_t
+
99  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
+
100  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
101  #define RADIOLIB_NC (0xFF)
+
102  #define RADIOLIB_DEFAULT_SPI SPI
+
103  #define RADIOLIB_PROGMEM PROGMEM
+
104  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
+
105 
+
106  #elif defined(ESP8266)
+
107  // ESP8266 boards
+
108  #define RADIOLIB_PLATFORM "ESP8266"
+
109  #define RADIOLIB_PIN_TYPE uint8_t
+
110  #define RADIOLIB_PIN_MODE uint8_t
+
111  #define RADIOLIB_PIN_STATUS uint8_t
+
112  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
+
113  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
114  #define RADIOLIB_NC (0xFF)
+
115  #define RADIOLIB_DEFAULT_SPI SPI
+
116  #define RADIOLIB_PROGMEM PROGMEM
+
117  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
+
118 
+
119  // RadioLib has ESP8266 driver, this must be disabled to use ESP8266 as platform
+
120  #define RADIOLIB_EXCLUDE_ESP8266
+
121 
+
122  #elif defined(ESP32)
+
123  // ESP32 boards
+
124  #define RADIOLIB_PLATFORM "ESP32"
+
125  #define RADIOLIB_PIN_TYPE uint8_t
+
126  #define RADIOLIB_PIN_MODE uint8_t
+
127  #define RADIOLIB_PIN_STATUS uint8_t
+
128  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
+
129  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
130  #define RADIOLIB_NC (0xFF)
+
131  #define RADIOLIB_DEFAULT_SPI SPI
+
132  #define RADIOLIB_PROGMEM PROGMEM
+
133  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
+
134  #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED
+
135  #define RADIOLIB_HARDWARE_SERIAL_PORT Serial1
+
136 
+
137  // ESP32 doesn't support tone(), but it can be emulated via LED control peripheral
+
138  #define RADIOLIB_TONE_UNSUPPORTED
+
139  #define RADIOLIB_TONE_ESP32_CHANNEL (1)
+
140 
+
141  #elif defined(ARDUINO_ARCH_STM32)
+
142  // official STM32 Arduino core (https://github.com/stm32duino/Arduino_Core_STM32)
+
143  #define RADIOLIB_PLATFORM "Arduino STM32 (official)"
+
144  #define RADIOLIB_PIN_TYPE uint32_t
+
145  #define RADIOLIB_PIN_MODE uint32_t
+
146  #define RADIOLIB_PIN_STATUS uint32_t
+
147  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
+
148  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
149  #define RADIOLIB_NC (0xFFFFFFFF)
+
150  #define RADIOLIB_DEFAULT_SPI SPI
+
151  #define RADIOLIB_PROGMEM PROGMEM
+
152  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
+
153  #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED
+
154  #define RADIOLIB_HARDWARE_SERIAL_PORT Serial1
+
155 
+
156  // slow down SX126x/8x SPI on this platform
+
157  #define RADIOLIB_SPI_SLOWDOWN
+
158 
+
159  #elif defined(SAMD_SERIES)
+
160  // Adafruit SAMD boards (M0 and M4)
+
161  #define RADIOLIB_PLATFORM "Adafruit SAMD"
+
162  #define RADIOLIB_PIN_TYPE uint32_t
+
163  #define RADIOLIB_PIN_MODE uint32_t
+
164  #define RADIOLIB_PIN_STATUS uint32_t
+
165  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
+
166  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
167  #define RADIOLIB_NC (0xFFFFFFFF)
+
168  #define RADIOLIB_DEFAULT_SPI SPI
+
169  #define RADIOLIB_PROGMEM PROGMEM
+
170  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
+
171  #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED
+
172  #define RADIOLIB_HARDWARE_SERIAL_PORT Serial1
+
173 
+
174  // slow down SX126x/8x SPI on this platform
+
175  #define RADIOLIB_SPI_SLOWDOWN
+
176 
+
177  #elif defined(ARDUINO_ARCH_SAMD)
+
178  // Arduino SAMD (Zero, MKR, etc.)
+
179  #define RADIOLIB_PLATFORM "Arduino SAMD"
+
180  #define RADIOLIB_PIN_TYPE pin_size_t
+
181  #define RADIOLIB_PIN_MODE PinMode
+
182  #define RADIOLIB_PIN_STATUS PinStatus
+
183  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
+
184  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
185  #define RADIOLIB_NC (0xFF)
+
186  #define RADIOLIB_DEFAULT_SPI SPI
+
187  #define RADIOLIB_PROGMEM PROGMEM
+
188  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
+
189  #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED
+
190  #define RADIOLIB_HARDWARE_SERIAL_PORT Serial1
+
191 
+
192  #elif defined(__SAM3X8E__)
+
193  // Arduino Due
+
194  #define RADIOLIB_PLATFORM "Arduino Due"
+
195  #define RADIOLIB_PIN_TYPE uint32_t
+
196  #define RADIOLIB_PIN_MODE uint32_t
+
197  #define RADIOLIB_PIN_STATUS uint32_t
+
198  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
+
199  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
200  #define RADIOLIB_NC (0xFFFFFFFF)
+
201  #define RADIOLIB_DEFAULT_SPI SPI
+
202  #define RADIOLIB_PROGMEM PROGMEM
+
203  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
+
204  #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED
+
205  #define RADIOLIB_HARDWARE_SERIAL_PORT Serial1
+
206  #define RADIOLIB_TONE_UNSUPPORTED
+
207 
+
208  #elif (defined(NRF52832_XXAA) || defined(NRF52840_XXAA)) && !defined(ARDUINO_ARDUINO_NANO33BLE)
+
209  // Adafruit nRF52 boards
+
210  #define RADIOLIB_PLATFORM "Adafruit nRF52"
+
211  #define RADIOLIB_PIN_TYPE uint32_t
+
212  #define RADIOLIB_PIN_MODE uint32_t
+
213  #define RADIOLIB_PIN_STATUS uint32_t
+
214  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
+
215  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
216  #define RADIOLIB_NC (0xFFFFFFFF)
+
217  #define RADIOLIB_DEFAULT_SPI SPI
+
218  #define RADIOLIB_PROGMEM PROGMEM
+
219  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
+
220 
+
221  #elif defined(ARDUINO_ARC32_TOOLS)
+
222  // Intel Curie
+
223  #define RADIOLIB_PLATFORM "Intel Curie"
+
224  #define RADIOLIB_PIN_TYPE uint8_t
+
225  #define RADIOLIB_PIN_MODE uint8_t
+
226  #define RADIOLIB_PIN_STATUS uint8_t
+
227  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
+
228  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
229  #define RADIOLIB_NC (0xFF)
+
230  #define RADIOLIB_DEFAULT_SPI SPI
+
231  #define RADIOLIB_PROGMEM PROGMEM
+
232  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
+
233 
+
234  #elif defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_AVR_NANO_EVERY)
+
235  // Arduino megaAVR boards - Uno Wifi Rev.2, Nano Every
+
236  #define RADIOLIB_PLATFORM "Arduino megaAVR"
+
237  #define RADIOLIB_PIN_TYPE uint8_t
+
238  #define RADIOLIB_PIN_MODE PinMode
+
239  #define RADIOLIB_PIN_STATUS PinStatus
+
240  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
+
241  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
242  #define RADIOLIB_NC (0xFF)
+
243  #define RADIOLIB_DEFAULT_SPI SPI
+
244  #define RADIOLIB_PROGMEM PROGMEM
+
245  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
+
246 
+
247  #elif defined(ARDUINO_ARCH_APOLLO3)
+
248  // Sparkfun Apollo3 boards
+
249  #define RADIOLIB_PLATFORM "Sparkfun Apollo3"
+
250  #define RADIOLIB_PIN_TYPE pin_size_t
+
251  #define RADIOLIB_PIN_MODE Arduino_PinMode
+
252  #define RADIOLIB_PIN_STATUS PinStatus
+
253  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
+
254  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
255  #define RADIOLIB_NC (0xFF)
+
256  #define RADIOLIB_DEFAULT_SPI SPI
+
257  #define RADIOLIB_PROGMEM PROGMEM
+
258  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
+
259  #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED
+
260  #define RADIOLIB_HARDWARE_SERIAL_PORT Serial1
+
261 
+
262  // Apollo3 uses mbed libraries, which already contain ESP8266 driver
+
263  #define RADIOLIB_EXCLUDE_ESP8266
+
264 
+
265  // slow down SX126x/8x SPI on this platform
+
266  #define RADIOLIB_SPI_SLOWDOWN
+
267 
+
268  #elif defined(ARDUINO_ARDUINO_NANO33BLE)
+
269  // Arduino Nano 33 BLE
+
270  #define RADIOLIB_PLATFORM "Arduino Nano 33 BLE"
+
271  #define RADIOLIB_PIN_TYPE pin_size_t
+
272  #define RADIOLIB_PIN_MODE PinMode
+
273  #define RADIOLIB_PIN_STATUS PinStatus
+
274  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
+
275  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
276  #define RADIOLIB_NC (0xFF)
+
277  #define RADIOLIB_DEFAULT_SPI SPI
+
278  #define RADIOLIB_PROGMEM PROGMEM
+
279  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
+
280  #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED
+
281  #define RADIOLIB_HARDWARE_SERIAL_PORT Serial1
+
282 
+
283  // Nano 33 BLE uses mbed libraries, which already contain ESP8266 driver
+
284  #define RADIOLIB_EXCLUDE_ESP8266
+
285 
+
286  #elif defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4)
+
287  // Arduino Portenta H7
+
288  #define RADIOLIB_PLATFORM "Portenta H7"
+
289  #define RADIOLIB_PIN_TYPE pin_size_t
+
290  #define RADIOLIB_PIN_MODE PinMode
+
291  #define RADIOLIB_PIN_STATUS PinStatus
+
292  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
+
293  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
294  #define RADIOLIB_NC (0xFF)
+
295  #define RADIOLIB_DEFAULT_SPI SPI
+
296  #define RADIOLIB_PROGMEM PROGMEM
+
297  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
+
298  #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED
+
299  #define RADIOLIB_HARDWARE_SERIAL_PORT Serial1
+
300 
+
301  // Arduino Portenta H7 uses mbed libraries, which already contain ESP8266 driver
+
302  #define RADIOLIB_EXCLUDE_ESP8266
+
303 
+
304  #elif defined(__STM32F4__) || defined(__STM32F1__)
+
305  // Arduino STM32 core by Roger Clark (https://github.com/rogerclarkmelbourne/Arduino_STM32)
+
306  #define RADIOLIB_PLATFORM "STM32duino (unofficial)"
+
307  #define RADIOLIB_PIN_TYPE uint8_t
+
308  #define RADIOLIB_PIN_MODE WiringPinMode
+
309  #define RADIOLIB_PIN_STATUS uint8_t
+
310  #define RADIOLIB_INTERRUPT_STATUS ExtIntTriggerMode
+
311  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
312  #define RADIOLIB_NC (0xFF)
+
313  #define RADIOLIB_DEFAULT_SPI SPI
+
314  #define RADIOLIB_PROGMEM PROGMEM
+
315  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
+
316  #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED
+
317  #define RADIOLIB_HARDWARE_SERIAL_PORT Serial1
+
318 
+
319  #elif defined(ARDUINO_ARCH_MEGAAVR)
+
320  // MegaCoreX by MCUdude (https://github.com/MCUdude/MegaCoreX)
+
321  #define RADIOLIB_PLATFORM "MegaCoreX"
+
322  #define RADIOLIB_PIN_TYPE uint8_t
+
323  #define RADIOLIB_PIN_MODE uint8_t
+
324  #define RADIOLIB_PIN_STATUS uint8_t
+
325  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
+
326  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
327  #define RADIOLIB_NC (0xFF)
+
328  #define RADIOLIB_DEFAULT_SPI SPI
+
329  #define RADIOLIB_PROGMEM PROGMEM
+
330  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
+
331 
+
332  #else
+
333  // other platforms not covered by the above list - this may or may not work
+
334  #define RADIOLIB_PLATFORM "Unknown"
+
335  #define RADIOLIB_UNKNOWN_PLATFORM
+
336  #define RADIOLIB_PIN_TYPE uint8_t
+
337  #define RADIOLIB_PIN_MODE uint8_t
+
338  #define RADIOLIB_PIN_STATUS uint8_t
+
339  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
+
340  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
341  #define RADIOLIB_NC (0xFF)
+
342  #define RADIOLIB_DEFAULT_SPI SPI
+
343  #define RADIOLIB_PROGMEM PROGMEM
+
344  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
+
345 
+
346  #endif
+
347 #endif
+
348 
+
349 /*
+
350  * Uncomment to enable debug output.
+
351  * Warning: Debug output will slow down the whole system significantly.
+
352  * Also, it will result in larger compiled binary.
+
353  * Levels: debug - only main info
+
354  * verbose - full transcript of all SPI/UART communication
+
355  */
+
356 
+
357 //#define RADIOLIB_DEBUG
+
358 //#define RADIOLIB_VERBOSE
+
359 
+
360 // set which Serial port should be used for debug output
+
361 #define RADIOLIB_DEBUG_PORT Serial
+
362 
+
363 #if defined(RADIOLIB_DEBUG)
+
364  #define RADIOLIB_DEBUG_PRINT(...) { RADIOLIB_DEBUG_PORT.print(__VA_ARGS__); }
+
365  #define RADIOLIB_DEBUG_PRINTLN(...) { RADIOLIB_DEBUG_PORT.println(__VA_ARGS__); }
+
366 #else
+
367  #define RADIOLIB_DEBUG_PRINT(...) {}
+
368  #define RADIOLIB_DEBUG_PRINTLN(...) {}
+
369 #endif
+
370 
+
371 #if defined(RADIOLIB_VERBOSE)
+
372  #define RADIOLIB_VERBOSE_PRINT(...) { RADIOLIB_DEBUG_PORT.print(__VA_ARGS__); }
+
373  #define RADIOLIB_VERBOSE_PRINTLN(...) { RADIOLIB_DEBUG_PORT.println(__VA_ARGS__); }
+
374 #else
+
375  #define RADIOLIB_VERBOSE_PRINT(...) {}
+
376  #define RADIOLIB_VERBOSE_PRINTLN(...) {}
+
377 #endif
+
378 
+
379 /*
+
380  * Uncomment to enable "paranoid" SPI mode
+
381  * Every write to an SPI register using SPI set function will be verified by a subsequent read operation.
+
382  * This improves reliablility, but slightly slows down communication.
+
383  * Note: Enabled by default.
+
384  */
+
385 #define RADIOLIB_SPI_PARANOID
+
386 
+
387 /*
+
388  * Uncomment to enable parameter range checking
+
389  * RadioLib will check provided parameters (such as frequency) against limits determined by the device manufacturer.
+
390  * It is highly advised to keep this macro defined, removing it will allow invalid values to be set,
+
391  * possibly leading to bricked module and/or program crashing.
+
392  * Note: Enabled by default.
+
393  */
+
394 #define RADIOLIB_CHECK_PARAMS
+
395 
+
396 /*
+
397  * Uncomment to enable god mode - all methods and member variables in all classes will be made public, thus making them accessible from Arduino code.
+
398  * Warning: Come on, it's called GOD mode - obviously only use this if you know what you're doing.
+
399  * Failure to heed the above warning may result in bricked module.
+
400  */
+
401 //#define RADIOLIB_GODMODE
+
402 
+
403 /*
+
404  * Uncomment to enable pre-defined modules when using RadioShield.
+
405  */
+
406 //#define RADIOLIB_RADIOSHIELD
+
407 
+
408 /*
+
409  * Uncomment to enable static-only memory management: no dynamic allocation will be performed.
+
410  * Warning: Large static arrays will be created in some methods. It is not advised to send large packets in this mode.
+
411  */
+
412 //#define RADIOLIB_STATIC_ONLY
+
413 
+
414 // set the size of static arrays to use
+
415 #if !defined(RADIOLIB_STATIC_ARRAY_SIZE)
+
416 #define RADIOLIB_STATIC_ARRAY_SIZE 256
+
417 #endif
+
418 
+
422 #define RADIOLIB_ASSERT(STATEVAR) { if((STATEVAR) != ERR_NONE) { return(STATEVAR); } }
+
423 
+
427 #if defined(RADIOLIB_CHECK_PARAMS)
+
428 #define RADIOLIB_CHECK_RANGE(VAR, MIN, MAX, ERR) { if(!(((VAR) >= (MIN)) && ((VAR) <= (MAX)))) { return(ERR); } }
+
429 #else
+
430 #define RADIOLIB_CHECK_RANGE(VAR, MIN, MAX, ERR) {}
+
431 #endif
+
432 
+
433 // version definitions
+
434 #define RADIOLIB_VERSION_MAJOR (0x04)
+
435 #define RADIOLIB_VERSION_MINOR (0x02)
+
436 #define RADIOLIB_VERSION_PATCH (0x00)
+
437 #define RADIOLIB_VERSION_EXTRA (0x00)
+
438 
+
439 #define RADIOLIB_VERSION ((RADIOLIB_VERSION_MAJOR << 24) | (RADIOLIB_VERSION_MINOR << 16) | (RADIOLIB_VERSION_PATCH << 8) | (RADIOLIB_VERSION_EXTRA))
+
440 
+
441 #endif
+
diff --git a/_c_c1101_8h_source.html b/_c_c1101_8h_source.html index 19d81c53..acd64156 100644 --- a/_c_c1101_8h_source.html +++ b/_c_c1101_8h_source.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/modules/CC1101/CC1101.h Source File @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -84,61 +86,692 @@ $(document).ready(function(){initNavTree('_c_c1101_8h_source.html','');});
CC1101.h
-
1 #if !defined(_RADIOLIB_CC1101_H) && !defined(RADIOLIB_EXCLUDE_CC1101)
2 #define _RADIOLIB_CC1101_H
3 
4 #include "../../TypeDef.h"
5 #include "../../Module.h"
6 
7 #include "../../protocols/PhysicalLayer/PhysicalLayer.h"
8 
9 // CC1101 physical layer properties
10 #define CC1101_FREQUENCY_STEP_SIZE 396.7285156
11 #define CC1101_MAX_PACKET_LENGTH 63
12 #define CC1101_CRYSTAL_FREQ 26.0
13 #define CC1101_DIV_EXPONENT 16
14 
15 // CC1101 SPI commands
16 #define CC1101_CMD_READ 0b10000000
17 #define CC1101_CMD_WRITE 0b00000000
18 #define CC1101_CMD_BURST 0b01000000
19 #define CC1101_CMD_ACCESS_STATUS_REG 0b01000000
20 #define CC1101_CMD_FIFO_RX 0b10000000
21 #define CC1101_CMD_FIFO_TX 0b00000000
22 #define CC1101_CMD_RESET 0x30
23 #define CC1101_CMD_FSTXON 0x31
24 #define CC1101_CMD_XOFF 0x32
25 #define CC1101_CMD_CAL 0x33
26 #define CC1101_CMD_RX 0x34
27 #define CC1101_CMD_TX 0x35
28 #define CC1101_CMD_IDLE 0x36
29 #define CC1101_CMD_WOR 0x38
30 #define CC1101_CMD_POWER_DOWN 0x39
31 #define CC1101_CMD_FLUSH_RX 0x3A
32 #define CC1101_CMD_FLUSH_TX 0x3B
33 #define CC1101_CMD_WOR_RESET 0x3C
34 #define CC1101_CMD_NOP 0x3D
35 
36 // CC1101 register map
37 #define CC1101_REG_IOCFG2 0x00
38 #define CC1101_REG_IOCFG1 0x01
39 #define CC1101_REG_IOCFG0 0x02
40 #define CC1101_REG_FIFOTHR 0x03
41 #define CC1101_REG_SYNC1 0x04
42 #define CC1101_REG_SYNC0 0x05
43 #define CC1101_REG_PKTLEN 0x06
44 #define CC1101_REG_PKTCTRL1 0x07
45 #define CC1101_REG_PKTCTRL0 0x08
46 #define CC1101_REG_ADDR 0x09
47 #define CC1101_REG_CHANNR 0x0A
48 #define CC1101_REG_FSCTRL1 0x0B
49 #define CC1101_REG_FSCTRL0 0x0C
50 #define CC1101_REG_FREQ2 0x0D
51 #define CC1101_REG_FREQ1 0x0E
52 #define CC1101_REG_FREQ0 0x0F
53 #define CC1101_REG_MDMCFG4 0x10
54 #define CC1101_REG_MDMCFG3 0x11
55 #define CC1101_REG_MDMCFG2 0x12
56 #define CC1101_REG_MDMCFG1 0x13
57 #define CC1101_REG_MDMCFG0 0x14
58 #define CC1101_REG_DEVIATN 0x15
59 #define CC1101_REG_MCSM2 0x16
60 #define CC1101_REG_MCSM1 0x17
61 #define CC1101_REG_MCSM0 0x18
62 #define CC1101_REG_FOCCFG 0x19
63 #define CC1101_REG_BSCFG 0x1A
64 #define CC1101_REG_AGCCTRL2 0x1B
65 #define CC1101_REG_AGCCTRL1 0x1C
66 #define CC1101_REG_AGCCTRL0 0x1D
67 #define CC1101_REG_WOREVT1 0x1E
68 #define CC1101_REG_WOREVT0 0x1F
69 #define CC1101_REG_WORCTRL 0x20
70 #define CC1101_REG_FREND1 0x21
71 #define CC1101_REG_FREND0 0x22
72 #define CC1101_REG_FSCAL3 0x23
73 #define CC1101_REG_FSCAL2 0x24
74 #define CC1101_REG_FSCAL1 0x25
75 #define CC1101_REG_FSCAL0 0x26
76 #define CC1101_REG_RCCTRL1 0x27
77 #define CC1101_REG_RCCTRL0 0x28
78 #define CC1101_REG_FSTEST 0x29
79 #define CC1101_REG_PTEST 0x2A
80 #define CC1101_REG_AGCTEST 0x2B
81 #define CC1101_REG_TEST2 0x2C
82 #define CC1101_REG_TEST1 0x2D
83 #define CC1101_REG_TEST0 0x2E
84 #define CC1101_REG_PARTNUM 0x30
85 #define CC1101_REG_VERSION 0x31
86 #define CC1101_REG_FREQEST 0x32
87 #define CC1101_REG_LQI 0x33
88 #define CC1101_REG_RSSI 0x34
89 #define CC1101_REG_MARCSTATE 0x35
90 #define CC1101_REG_WORTIME1 0x36
91 #define CC1101_REG_WORTIME0 0x37
92 #define CC1101_REG_PKTSTATUS 0x38
93 #define CC1101_REG_VCO_VC_DAC 0x39
94 #define CC1101_REG_TXBYTES 0x3A
95 #define CC1101_REG_RXBYTES 0x3B
96 #define CC1101_REG_RCCTRL1_STATUS 0x3C
97 #define CC1101_REG_RCCTRL0_STATUS 0x3D
98 #define CC1101_REG_PATABLE 0x3E
99 #define CC1101_REG_FIFO 0x3F
100 
101 // CC1101_REG_IOCFG2 MSB LSB DESCRIPTION
102 #define CC1101_GDO2_NORM 0b00000000 // 6 6 GDO2 output: active high (default)
103 #define CC1101_GDO2_INV 0b01000000 // 6 6 active low
104 
105 // CC1101_REG_IOCFG1
106 #define CC1101_GDO1_DS_LOW 0b00000000 // 7 7 GDO1 output drive strength: low (default)
107 #define CC1101_GDO1_DS_HIGH 0b10000000 // 7 7 high
108 #define CC1101_GDO1_NORM 0b00000000 // 6 6 GDO1 output: active high (default)
109 #define CC1101_GDO1_INV 0b01000000 // 6 6 active low
110 
111 // CC1101_REG_IOCFG0
112 #define CC1101_GDO0_TEMP_SENSOR_OFF 0b00000000 // 7 7 analog temperature sensor output: disabled (default)
113 #define CC1101_GDO0_TEMP_SENSOR_ON 0b10000000 // 7 0 enabled
114 #define CC1101_GDO0_NORM 0b00000000 // 6 6 GDO0 output: active high (default)
115 #define CC1101_GDO0_INV 0b01000000 // 6 6 active low
116 
117 // CC1101_REG_IOCFG2 + REG_IOCFG1 + REG_IOCFG0
118 #define CC1101_GDOX_RX_FIFO_FULL 0x00 // 5 0 Rx FIFO full or above threshold
119 #define CC1101_GDOX_RX_FIFO_FULL_OR_PKT_END 0x01 // 5 0 Rx FIFO full or above threshold or reached packet end
120 #define CC1101_GDOX_TX_FIFO_ABOVE_THR 0x02 // 5 0 Tx FIFO above threshold
121 #define CC1101_GDOX_TX_FIFO_FULL 0x03 // 5 0 Tx FIFO full
122 #define CC1101_GDOX_RX_FIFO_OVERFLOW 0x04 // 5 0 Rx FIFO overflowed
123 #define CC1101_GDOX_TX_FIFO_UNDERFLOW 0x05 // 5 0 Tx FIFO underflowed
124 #define CC1101_GDOX_SYNC_WORD_SENT_OR_RECEIVED 0x06 // 5 0 sync word was sent or received
125 #define CC1101_GDOX_PKT_RECEIVED_CRC_OK 0x07 // 5 0 packet received and CRC check passed
126 #define CC1101_GDOX_PREAMBLE_QUALITY_REACHED 0x08 // 5 0 received preamble quality is above threshold
127 #define CC1101_GDOX_CHANNEL_CLEAR 0x09 // 5 0 RSSI level below threshold (channel is clear)
128 #define CC1101_GDOX_PLL_LOCKED 0x0A // 5 0 PLL is locked
129 #define CC1101_GDOX_SERIAL_CLOCK 0x0B // 5 0 serial data clock
130 #define CC1101_GDOX_SERIAL_DATA_SYNC 0x0C // 5 0 serial data output in: synchronous mode
131 #define CC1101_GDOX_SERIAL_DATA_ASYNC 0x0D // 5 0 asynchronous mode
132 #define CC1101_GDOX_CARRIER_SENSE 0x0E // 5 0 RSSI above threshold
133 #define CC1101_GDOX_CRC_OK 0x0F // 5 0 CRC check passed
134 #define CC1101_GDOX_RX_HARD_DATA1 0x16 // 5 0 direct access to demodulated data
135 #define CC1101_GDOX_RX_HARD_DATA0 0x17 // 5 0 direct access to demodulated data
136 #define CC1101_GDOX_PA_PD 0x1B // 5 0 power amplifier circuit is powered down
137 #define CC1101_GDOX_LNA_PD 0x1C // 5 0 low-noise amplifier circuit is powered down
138 #define CC1101_GDOX_RX_SYMBOL_TICK 0x1D // 5 0 direct access to symbol tick of received data
139 #define CC1101_GDOX_WOR_EVNT0 0x24 // 5 0 wake-on-radio event 0
140 #define CC1101_GDOX_WOR_EVNT1 0x25 // 5 0 wake-on-radio event 1
141 #define CC1101_GDOX_CLK_256 0x26 // 5 0 256 Hz clock
142 #define CC1101_GDOX_CLK_32K 0x27 // 5 0 32 kHz clock
143 #define CC1101_GDOX_CHIP_RDYN 0x29 // 5 0 (default for GDO2)
144 #define CC1101_GDOX_XOSC_STABLE 0x2B // 5 0
145 #define CC1101_GDOX_HIGH_Z 0x2E // 5 0 high impedance state (default for GDO1)
146 #define CC1101_GDOX_HW_TO_0 0x2F // 5 0
147 #define CC1101_GDOX_CLOCK_XOSC_1 0x30 // 5 0 crystal oscillator clock: f = f(XOSC)/1
148 #define CC1101_GDOX_CLOCK_XOSC_1_5 0x31 // 5 0 f = f(XOSC)/1.5
149 #define CC1101_GDOX_CLOCK_XOSC_2 0x32 // 5 0 f = f(XOSC)/2
150 #define CC1101_GDOX_CLOCK_XOSC_3 0x33 // 5 0 f = f(XOSC)/3
151 #define CC1101_GDOX_CLOCK_XOSC_4 0x34 // 5 0 f = f(XOSC)/4
152 #define CC1101_GDOX_CLOCK_XOSC_6 0x35 // 5 0 f = f(XOSC)/6
153 #define CC1101_GDOX_CLOCK_XOSC_8 0x36 // 5 0 f = f(XOSC)/8
154 #define CC1101_GDOX_CLOCK_XOSC_12 0x37 // 5 0 f = f(XOSC)/12
155 #define CC1101_GDOX_CLOCK_XOSC_16 0x38 // 5 0 f = f(XOSC)/16
156 #define CC1101_GDOX_CLOCK_XOSC_24 0x39 // 5 0 f = f(XOSC)/24
157 #define CC1101_GDOX_CLOCK_XOSC_32 0x3A // 5 0 f = f(XOSC)/32
158 #define CC1101_GDOX_CLOCK_XOSC_48 0x3B // 5 0 f = f(XOSC)/48
159 #define CC1101_GDOX_CLOCK_XOSC_64 0x3C // 5 0 f = f(XOSC)/64
160 #define CC1101_GDOX_CLOCK_XOSC_96 0x3D // 5 0 f = f(XOSC)/96
161 #define CC1101_GDOX_CLOCK_XOSC_128 0x3E // 5 0 f = f(XOSC)/128
162 #define CC1101_GDOX_CLOCK_XOSC_192 0x3F // 5 0 f = f(XOSC)/192 (default for GDO0)
163 
164 // CC1101_REG_FIFOTHR
165 #define CC1101_ADC_RETENTION_OFF 0b00000000 // 6 6 do not retain ADC settings in sleep mode (default)
166 #define CC1101_ADC_RETENTION_ON 0b01000000 // 6 6 retain ADC settings in sleep mode
167 #define CC1101_RX_ATTEN_0_DB 0b00000000 // 5 4 Rx attenuation: 0 dB (default)
168 #define CC1101_RX_ATTEN_6_DB 0b00010000 // 5 4 6 dB
169 #define CC1101_RX_ATTEN_12_DB 0b00100000 // 5 4 12 dB
170 #define CC1101_RX_ATTEN_18_DB 0b00110000 // 5 4 18 dB
171 #define CC1101_FIFO_THR 0b00000111 // 5 4 Rx FIFO threshold [bytes] = CC1101_FIFO_THR * 4; Tx FIFO threshold [bytes] = 65 - (CC1101_FIFO_THR * 4)
172 
173 // CC1101_REG_SYNC1
174 #define CC1101_SYNC_WORD_MSB 0xD3 // 7 0 sync word MSB
175 
176 // CC1101_REG_SYNC0
177 #define CC1101_SYNC_WORD_LSB 0x91 // 7 0 sync word LSB
178 
179 // CC1101_REG_PKTLEN
180 #define CC1101_PACKET_LENGTH 0xFF // 7 0 packet length in bytes
181 
182 // CC1101_REG_PKTCTRL1
183 #define CC1101_PQT 0x00 // 7 5 preamble quality threshold
184 #define CC1101_CRC_AUTOFLUSH_OFF 0b00000000 // 3 3 automatic Rx FIFO flush on CRC check fail: disabled (default)
185 #define CC1101_CRC_AUTOFLUSH_ON 0b00001000 // 3 3 enabled
186 #define CC1101_APPEND_STATUS_OFF 0b00000000 // 2 2 append 2 status bytes to packet: disabled
187 #define CC1101_APPEND_STATUS_ON 0b00000100 // 2 2 enabled (default)
188 #define CC1101_ADR_CHK_NONE 0b00000000 // 1 0 address check: none (default)
189 #define CC1101_ADR_CHK_NO_BROADCAST 0b00000001 // 1 0 without broadcast
190 #define CC1101_ADR_CHK_SINGLE_BROADCAST 0b00000010 // 1 0 broadcast address 0x00
191 #define CC1101_ADR_CHK_DOUBLE_BROADCAST 0b00000011 // 1 0 broadcast addresses 0x00 and 0xFF
192 
193 // CC1101_REG_PKTCTRL0
194 #define CC1101_WHITE_DATA_OFF 0b00000000 // 6 6 data whitening: disabled
195 #define CC1101_WHITE_DATA_ON 0b01000000 // 6 6 enabled (default)
196 #define CC1101_PKT_FORMAT_NORMAL 0b00000000 // 5 4 packet format: normal (FIFOs)
197 #define CC1101_PKT_FORMAT_SYNCHRONOUS 0b00010000 // 5 4 synchronous serial
198 #define CC1101_PKT_FORMAT_RANDOM 0b00100000 // 5 4 random transmissions
199 #define CC1101_PKT_FORMAT_ASYNCHRONOUS 0b00110000 // 5 4 asynchronous serial
200 #define CC1101_CRC_OFF 0b00000000 // 2 2 CRC disabled
201 #define CC1101_CRC_ON 0b00000100 // 2 2 CRC enabled (default)
202 #define CC1101_LENGTH_CONFIG_FIXED 0b00000000 // 1 0 packet length: fixed
203 #define CC1101_LENGTH_CONFIG_VARIABLE 0b00000001 // 1 0 variable (default)
204 #define CC1101_LENGTH_CONFIG_INFINITE 0b00000010 // 1 0 infinite
205 
206 // CC1101_REG_ADDR
207 #define CC1101_DEVICE_ADDR 0x00 // 7 0 device address
208 
209 // CC1101_REG_CHANNR
210 #define CC1101_CHAN 0x00 // 7 0 channel number
211 
212 // CC1101_REG_FSCTRL1
213 #define CC1101_FREQ_IF 0x0F // 4 0 IF frequency setting; f_IF = (f(XOSC) / 2^10) * CC1101_FREQ_IF
214 
215 // CC1101_REG_FSCTRL0
216 #define CC1101_FREQOFF 0x00 // 7 0 base frequency offset (2s-compliment)
217 
218 // CC1101_REG_FREQ2 + REG_FREQ1 + REG_FREQ0
219 #define CC1101_FREQ_MSB 0x1E // 5 0 base frequency setting: f_carrier = (f(XOSC) / 2^16) * FREQ
220 #define CC1101_FREQ_MID 0xC4 // 7 0 where f(XOSC) = 26 MHz
221 #define CC1101_FREQ_LSB 0xEC // 7 0 FREQ = 3-byte value of FREQ registers
222 
223 // CC1101_REG_MDMCFG4
224 #define CC1101_CHANBW_E 0b10000000 // 7 6 channel bandwidth: BW_channel = f(XOSC) / (8 * (4 + CHANBW_M)*2^CHANBW_E) [Hz]
225 #define CC1101_CHANBW_M 0b00000000 // 5 4 default value for 26 MHz crystal: 203 125 Hz
226 #define CC1101_DRATE_E 0x0C // 3 0 symbol rate: R_data = (((256 + DRATE_M) * 2^DRATE_E) / 2^28) * f(XOSC) [Baud]
227 
228 // CC1101_REG_MDMCFG3
229 #define CC1101_DRATE_M 0x22 // 7 0 default value for 26 MHz crystal: 115 051 Baud
230 
231 // CC1101_REG_MDMCFG2
232 #define CC1101_DEM_DCFILT_OFF 0b10000000 // 7 7 digital DC filter: disabled
233 #define CC1101_DEM_DCFILT_ON 0b00000000 // 7 7 enabled - only for data rates above 250 kBaud (default)
234 #define CC1101_MOD_FORMAT_2_FSK 0b00000000 // 6 4 modulation format: 2-FSK (default)
235 #define CC1101_MOD_FORMAT_GFSK 0b00010000 // 6 4 GFSK
236 #define CC1101_MOD_FORMAT_ASK_OOK 0b00110000 // 6 4 ASK/OOK
237 #define CC1101_MOD_FORMAT_4_FSK 0b01000000 // 6 4 4-FSK
238 #define CC1101_MOD_FORMAT_MFSK 0b01110000 // 6 4 MFSK - only for data rates above 26 kBaud
239 #define CC1101_MANCHESTER_EN_OFF 0b00000000 // 3 3 Manchester encoding: disabled (default)
240 #define CC1101_MANCHESTER_EN_ON 0b00001000 // 3 3 enabled
241 #define CC1101_SYNC_MODE_NONE 0b00000000 // 2 0 synchronization: no preamble/sync
242 #define CC1101_SYNC_MODE_15_16 0b00000001 // 2 0 15/16 sync word bits
243 #define CC1101_SYNC_MODE_16_16 0b00000010 // 2 0 16/16 sync word bits (default)
244 #define CC1101_SYNC_MODE_30_32 0b00000011 // 2 0 30/32 sync word bits
245 #define CC1101_SYNC_MODE_NONE_THR 0b00000100 // 2 0 no preamble sync, carrier sense above threshold
246 #define CC1101_SYNC_MODE_15_16_THR 0b00000101 // 2 0 15/16 sync word bits, carrier sense above threshold
247 #define CC1101_SYNC_MODE_16_16_THR 0b00000110 // 2 0 16/16 sync word bits, carrier sense above threshold
248 #define CC1101_SYNC_MODE_30_32_THR 0b00000111 // 2 0 30/32 sync word bits, carrier sense above threshold
249 
250 // CC1101_REG_MDMCFG1
251 #define CC1101_FEC_OFF 0b00000000 // 7 7 forward error correction: disabled (default)
252 #define CC1101_FEC_ON 0b10000000 // 7 7 enabled - only for fixed packet length
253 #define CC1101_NUM_PREAMBLE_2 0b00000000 // 6 4 number of preamble bytes: 2
254 #define CC1101_NUM_PREAMBLE_3 0b00010000 // 6 4 3
255 #define CC1101_NUM_PREAMBLE_4 0b00100000 // 6 4 4 (default)
256 #define CC1101_NUM_PREAMBLE_6 0b00110000 // 6 4 6
257 #define CC1101_NUM_PREAMBLE_8 0b01000000 // 6 4 8
258 #define CC1101_NUM_PREAMBLE_12 0b01010000 // 6 4 12
259 #define CC1101_NUM_PREAMBLE_16 0b01100000 // 6 4 16
260 #define CC1101_NUM_PREAMBLE_24 0b01110000 // 6 4 24
261 #define CC1101_CHANSPC_E 0x02 // 1 0 channel spacing: df_channel = (f(XOSC) / 2^18) * (256 + CHANSPC_M) * 2^CHANSPC_E [Hz]
262 
263 // CC1101_REG_MDMCFG0
264 #define CC1101_CHANSPC_M 0xF8 // 7 0 default value for 26 MHz crystal: 199 951 kHz
265 
266 // CC1101_REG_DEVIATN
267 #define CC1101_DEVIATION_E 0b01000000 // 6 4 frequency deviation: f_dev = (f(XOSC) / 2^17) * (8 + DEVIATION_M) * 2^DEVIATION_E [Hz]
268 #define CC1101_DEVIATION_M 0b00000111 // 2 0 default value for 26 MHz crystal: +- 47 607 Hz
269 #define CC1101_MSK_PHASE_CHANGE_PERIOD 0x07 // 2 0 phase change symbol period fraction: 1 / (MSK_PHASE_CHANGE_PERIOD + 1)
270 
271 // CC1101_REG_MCSM2
272 #define CC1101_RX_TIMEOUT_RSSI_OFF 0b00000000 // 4 4 Rx timeout based on RSSI value: disabled (default)
273 #define CC1101_RX_TIMEOUT_RSSI_ON 0b00010000 // 4 4 enabled
274 #define CC1101_RX_TIMEOUT_QUAL_OFF 0b00000000 // 3 3 check for sync word on Rx timeout
275 #define CC1101_RX_TIMEOUT_QUAL_ON 0b00001000 // 3 3 check for PQI set on Rx timeout
276 #define CC1101_RX_TIMEOUT_OFF 0b00000111 // 2 0 Rx timeout: disabled (default)
277 #define CC1101_RX_TIMEOUT_MAX 0b00000000 // 2 0 max value (actual value depends on WOR_RES, EVENT0 and f(XOSC))
278 
279 // CC1101_REG_MCSM1
280 #define CC1101_CCA_MODE_ALWAYS 0b00000000 // 5 4 clear channel indication: always
281 #define CC1101_CCA_MODE_RSSI_THR 0b00010000 // 5 4 RSSI below threshold
282 #define CC1101_CCA_MODE_RX_PKT 0b00100000 // 5 4 unless receiving packet
283 #define CC1101_CCA_MODE_RSSI_THR_RX_PKT 0b00110000 // 5 4 RSSI below threshold unless receiving packet (default)
284 #define CC1101_RXOFF_IDLE 0b00000000 // 3 2 next mode after packet reception: idle (default)
285 #define CC1101_RXOFF_FSTXON 0b00000100 // 3 2 FSTxOn
286 #define CC1101_RXOFF_TX 0b00001000 // 3 2 Tx
287 #define CC1101_RXOFF_RX 0b00001100 // 3 2 Rx
288 #define CC1101_TXOFF_IDLE 0b00000000 // 1 0 next mode after packet transmission: idle (default)
289 #define CC1101_TXOFF_FSTXON 0b00000001 // 1 0 FSTxOn
290 #define CC1101_TXOFF_TX 0b00000010 // 1 0 Tx
291 #define CC1101_TXOFF_RX 0b00000011 // 1 0 Rx
292 
293 // CC1101_REG_MCSM0
294 #define CC1101_FS_AUTOCAL_NEVER 0b00000000 // 5 4 automatic calibration: never (default)
295 #define CC1101_FS_AUTOCAL_IDLE_TO_RXTX 0b00010000 // 5 4 every transition from idle to Rx/Tx
296 #define CC1101_FS_AUTOCAL_RXTX_TO_IDLE 0b00100000 // 5 4 every transition from Rx/Tx to idle
297 #define CC1101_FS_AUTOCAL_RXTX_TO_IDLE_4TH 0b00110000 // 5 4 every 4th transition from Rx/Tx to idle
298 #define CC1101_PO_TIMEOUT_COUNT_1 0b00000000 // 3 2 number of counter expirations before CHP_RDYN goes low: 1 (default)
299 #define CC1101_PO_TIMEOUT_COUNT_16 0b00000100 // 3 2 16
300 #define CC1101_PO_TIMEOUT_COUNT_64 0b00001000 // 3 2 64
301 #define CC1101_PO_TIMEOUT_COUNT_256 0b00001100 // 3 2 256
302 #define CC1101_PIN_CTRL_OFF 0b00000000 // 1 1 pin radio control: disabled (default)
303 #define CC1101_PIN_CTRL_ON 0b00000010 // 1 1 enabled
304 #define CC1101_XOSC_FORCE_OFF 0b00000000 // 0 0 do not force XOSC to remain on in sleep (default)
305 #define CC1101_XOSC_FORCE_ON 0b00000001 // 0 0 force XOSC to remain on in sleep
306 
307 // CC1101_REG_FOCCFG
308 #define CC1101_FOC_BS_CS_GATE_OFF 0b00000000 // 5 5 do not freeze frequency compensation until CS goes high
309 #define CC1101_FOC_BS_CS_GATE_ON 0b00100000 // 5 5 freeze frequency compensation until CS goes high (default)
310 #define CC1101_FOC_PRE_K 0b00000000 // 4 3 frequency compensation loop gain before sync word: K
311 #define CC1101_FOC_PRE_2K 0b00001000 // 4 3 2K
312 #define CC1101_FOC_PRE_3K 0b00010000 // 4 3 3K (default)
313 #define CC1101_FOC_PRE_4K 0b00011000 // 4 3 4K
314 #define CC1101_FOC_POST_K 0b00000000 // 2 2 frequency compensation loop gain after sync word: same as FOC_PRE
315 #define CC1101_FOC_POST_K_2 0b00000100 // 2 2 K/2 (default)
316 #define CC1101_FOC_LIMIT_NO_COMPENSATION 0b00000000 // 1 0 frequency compensation saturation point: no compensation - required for ASK/OOK
317 #define CC1101_FOC_LIMIT_BW_CHAN_8 0b00000001 // 1 0 +- BW_chan/8
318 #define CC1101_FOC_LIMIT_BW_CHAN_4 0b00000010 // 1 0 +- BW_chan/4 (default)
319 #define CC1101_FOC_LIMIT_BW_CHAN_2 0b00000011 // 1 0 +- BW_chan/2
320 
321 // CC1101_REG_BSCFG
322 #define CC1101_BS_PRE_KI 0b00000000 // 7 6 clock recovery integral gain before sync word: Ki
323 #define CC1101_BS_PRE_2KI 0b01000000 // 7 6 2Ki (default)
324 #define CC1101_BS_PRE_3KI 0b10000000 // 7 6 3Ki
325 #define CC1101_BS_PRE_4KI 0b11000000 // 7 6 4Ki
326 #define CC1101_BS_PRE_KP 0b00000000 // 5 4 clock recovery proportional gain before sync word: Kp
327 #define CC1101_BS_PRE_2KP 0b00010000 // 5 4 2Kp
328 #define CC1101_BS_PRE_3KP 0b00100000 // 5 4 3Kp (default)
329 #define CC1101_BS_PRE_4KP 0b00110000 // 5 4 4Kp
330 #define CC1101_BS_POST_KI 0b00000000 // 3 3 clock recovery integral gain after sync word: same as BS_PRE
331 #define CC1101_BS_POST_KI_2 0b00001000 // 3 3 Ki/2 (default)
332 #define CC1101_BS_POST_KP 0b00000000 // 2 2 clock recovery proportional gain after sync word: same as BS_PRE
333 #define CC1101_BS_POST_KP_1 0b00000100 // 2 2 Kp (default)
334 #define CC1101_BS_LIMIT_NO_COMPENSATION 0b00000000 // 1 0 data rate compensation saturation point: no compensation
335 #define CC1101_BS_LIMIT_3_125 0b00000001 // 1 0 +- 3.125 %
336 #define CC1101_BS_LIMIT_6_25 0b00000010 // 1 0 +- 6.25 %
337 #define CC1101_BS_LIMIT_12_5 0b00000011 // 1 0 +- 12.5 %
338 
339 // CC1101_REG_AGCCTRL2
340 #define CC1101_MAX_DVGA_GAIN_0 0b00000000 // 7 6 reduce maximum available DVGA gain: no reduction (default)
341 #define CC1101_MAX_DVGA_GAIN_1 0b01000000 // 7 6 disable top gain setting
342 #define CC1101_MAX_DVGA_GAIN_2 0b10000000 // 7 6 disable top two gain setting
343 #define CC1101_MAX_DVGA_GAIN_3 0b11000000 // 7 6 disable top three gain setting
344 #define CC1101_LNA_GAIN_REDUCE_0_DB 0b00000000 // 5 3 reduce maximum LNA gain by: 0 dB (default)
345 #define CC1101_LNA_GAIN_REDUCE_2_6_DB 0b00001000 // 5 3 2.6 dB
346 #define CC1101_LNA_GAIN_REDUCE_6_1_DB 0b00010000 // 5 3 6.1 dB
347 #define CC1101_LNA_GAIN_REDUCE_7_4_DB 0b00011000 // 5 3 7.4 dB
348 #define CC1101_LNA_GAIN_REDUCE_9_2_DB 0b00100000 // 5 3 9.2 dB
349 #define CC1101_LNA_GAIN_REDUCE_11_5_DB 0b00101000 // 5 3 11.5 dB
350 #define CC1101_LNA_GAIN_REDUCE_14_6_DB 0b00110000 // 5 3 14.6 dB
351 #define CC1101_LNA_GAIN_REDUCE_17_1_DB 0b00111000 // 5 3 17.1 dB
352 #define CC1101_MAGN_TARGET_24_DB 0b00000000 // 2 0 average amplitude target for filter: 24 dB
353 #define CC1101_MAGN_TARGET_27_DB 0b00000001 // 2 0 27 dB
354 #define CC1101_MAGN_TARGET_30_DB 0b00000010 // 2 0 30 dB
355 #define CC1101_MAGN_TARGET_33_DB 0b00000011 // 2 0 33 dB (default)
356 #define CC1101_MAGN_TARGET_36_DB 0b00000100 // 2 0 36 dB
357 #define CC1101_MAGN_TARGET_38_DB 0b00000101 // 2 0 38 dB
358 #define CC1101_MAGN_TARGET_40_DB 0b00000110 // 2 0 40 dB
359 #define CC1101_MAGN_TARGET_42_DB 0b00000111 // 2 0 42 dB
360 
361 // CC1101_REG_AGCCTRL1
362 #define CC1101_AGC_LNA_PRIORITY_LNA2 0b00000000 // 6 6 LNA priority setting: LNA2 first
363 #define CC1101_AGC_LNA_PRIORITY_LNA 0b01000000 // 6 6 LNA first (default)
364 #define CC1101_CARRIER_SENSE_REL_THR_OFF 0b00000000 // 5 4 RSSI relative change to assert carrier sense: disabled (default)
365 #define CC1101_CARRIER_SENSE_REL_THR_6_DB 0b00010000 // 5 4 6 dB
366 #define CC1101_CARRIER_SENSE_REL_THR_10_DB 0b00100000 // 5 4 10 dB
367 #define CC1101_CARRIER_SENSE_REL_THR_14_DB 0b00110000 // 5 4 14 dB
368 #define CC1101_CARRIER_SENSE_ABS_THR 0x00 // 3 0 RSSI threshold to assert carrier sense in 2s compliment, Thr = MAGN_TARGET + CARRIER_SENSE_ABS_TH [dB]
369 
370 // CC1101_REG_AGCCTRL0
371 #define CC1101_HYST_LEVEL_NONE 0b00000000 // 7 6 AGC hysteresis level: none
372 #define CC1101_HYST_LEVEL_LOW 0b01000000 // 7 6 low
373 #define CC1101_HYST_LEVEL_MEDIUM 0b10000000 // 7 6 medium (default)
374 #define CC1101_HYST_LEVEL_HIGH 0b11000000 // 7 6 high
375 #define CC1101_WAIT_TIME_8_SAMPLES 0b00000000 // 5 4 AGC wait time: 8 samples
376 #define CC1101_WAIT_TIME_16_SAMPLES 0b00010000 // 5 4 16 samples (default)
377 #define CC1101_WAIT_TIME_24_SAMPLES 0b00100000 // 5 4 24 samples
378 #define CC1101_WAIT_TIME_32_SAMPLES 0b00110000 // 5 4 32 samples
379 #define CC1101_AGC_FREEZE_NEVER 0b00000000 // 3 2 freeze AGC gain: never (default)
380 #define CC1101_AGC_FREEZE_SYNC_WORD 0b00000100 // 3 2 when sync word is found
381 #define CC1101_AGC_FREEZE_MANUAL_A 0b00001000 // 3 2 manually freeze analog control
382 #define CC1101_AGC_FREEZE_MANUAL_AD 0b00001100 // 3 2 manually freeze analog and digital control
383 #define CC1101_FILTER_LENGTH_8 0b00000000 // 1 0 averaging length for channel filter: 8 samples
384 #define CC1101_FILTER_LENGTH_16 0b00000001 // 1 0 16 samples (default)
385 #define CC1101_FILTER_LENGTH_32 0b00000010 // 1 0 32 samples
386 #define CC1101_FILTER_LENGTH_64 0b00000011 // 1 0 64 samples
387 #define CC1101_ASK_OOK_BOUNDARY_4_DB 0b00000000 // 1 0 ASK/OOK decision boundary: 4 dB
388 #define CC1101_ASK_OOK_BOUNDARY_8_DB 0b00000001 // 1 0 8 dB (default)
389 #define CC1101_ASK_OOK_BOUNDARY_12_DB 0b00000010 // 1 0 12 dB
390 #define CC1101_ASK_OOK_BOUNDARY_16_DB 0b00000011 // 1 0 16 dB
391 
392 // CC1101_REG_WOREVT1 + REG_WOREVT0
393 #define CC1101_EVENT0_TIMEOUT_MSB 0x87 // 7 0 EVENT0 timeout: t_event0 = (750 / f(XOSC)) * EVENT0_TIMEOUT * 2^(5 * WOR_RES) [s]
394 #define CC1101_EVENT0_TIMEOUT_LSB 0x6B // 7 0 default value for 26 MHz crystal: 1.0 s
395 
396 // CC1101_REG_WORCTRL
397 #define CC1101_RC_POWER_UP 0b00000000 // 7 7 power up RC oscillator
398 #define CC1101_RC_POWER_DOWN 0b10000000 // 7 7 power down RC oscillator
399 #define CC1101_EVENT1_TIMEOUT_4 0b00000000 // 6 4 EVENT1 timeout: 4 RC periods
400 #define CC1101_EVENT1_TIMEOUT_6 0b00010000 // 6 4 6 RC periods
401 #define CC1101_EVENT1_TIMEOUT_8 0b00100000 // 6 4 8 RC periods
402 #define CC1101_EVENT1_TIMEOUT_12 0b00110000 // 6 4 12 RC periods
403 #define CC1101_EVENT1_TIMEOUT_16 0b01000000 // 6 4 16 RC periods
404 #define CC1101_EVENT1_TIMEOUT_24 0b01010000 // 6 4 24 RC periods
405 #define CC1101_EVENT1_TIMEOUT_32 0b01100000 // 6 4 32 RC periods
406 #define CC1101_EVENT1_TIMEOUT_48 0b01110000 // 6 4 48 RC periods (default)
407 #define CC1101_RC_CAL_OFF 0b00000000 // 3 3 disable RC oscillator calibration
408 #define CC1101_RC_CAL_ON 0b00001000 // 3 3 enable RC oscillator calibration (default)
409 #define CC1101_WOR_RES_1 0b00000000 // 1 0 EVENT0 resolution: 1 period (default)
410 #define CC1101_WOR_RES_2_5 0b00000001 // 1 0 2^5 periods
411 #define CC1101_WOR_RES_2_10 0b00000010 // 1 0 2^10 periods
412 #define CC1101_WOR_RES_2_15 0b00000011 // 1 0 2^15 periods
413 
414 // CC1101_REG_FREND1
415 #define CC1101_LNA_CURRENT 0x01 // 7 6 front-end LNA PTAT current output adjustment
416 #define CC1101_LNA2MIX_CURRENT 0x01 // 5 4 front-end PTAT output adjustment
417 #define CC1101_LODIV_BUF_CURRENT_RX 0x01 // 3 2 Rx LO buffer current adjustment
418 #define CC1101_MIX_CURRENT 0x02 // 1 0 mixer current adjustment
419 
420 // CC1101_REG_FREND0
421 #define CC1101_LODIV_BUF_CURRENT_TX 0x01 // 5 4 Tx LO buffer current adjustment
422 #define CC1101_PA_POWER 0x00 // 2 0 set power amplifier power according to PATABLE
423 
424 // CC1101_REG_FSCAL3
425 #define CC1101_CHP_CURR_CAL_OFF 0b00000000 // 5 4 disable charge pump calibration
426 #define CC1101_CHP_CURR_CAL_ON 0b00100000 // 5 4 enable charge pump calibration (default)
427 #define CC1101_FSCAL3 0x09 // 3 0 charge pump output current: I_out = I_0 * 2^(FSCAL3/4) [A]
428 
429 // CC1101_REG_FSCAL2
430 #define CC1101_VCO_CORE_LOW 0b00000000 // 5 5 VCO: low (default)
431 #define CC1101_VCO_CORE_HIGH 0b00100000 // 5 5 high
432 #define CC1101_FSCAL2 0x0A // 4 0 VCO current result/override
433 
434 // CC1101_REG_FSCAL1
435 #define CC1101_FSCAL1 0x20 // 5 0 capacitor array setting for coarse VCO tuning
436 
437 // CC1101_REG_FSCAL0
438 #define CC1101_FSCAL0 0x0D // 6 0 frequency synthesizer calibration setting
439 
440 // CC1101_REG_RCCTRL1
441 #define CC1101_RCCTRL1 0x41 // 6 0 RC oscillator configuration
442 
443 // CC1101_REG_RCCTRL0
444 #define CC1101_RCCTRL0 0x00 // 6 0 RC oscillator configuration
445 
446 // CC1101_REG_PTEST
447 #define CC1101_TEMP_SENS_IDLE_OFF 0x7F // 7 0 temperature sensor will not be available in idle mode (default)
448 #define CC1101_TEMP_SENS_IDLE_ON 0xBF // 7 0 temperature sensor will be available in idle mode
449 
450 // CC1101_REG_TEST0
451 #define CC1101_VCO_SEL_CAL_OFF 0b00000000 // 1 1 disable VCO selection calibration stage
452 #define CC1101_VCO_SEL_CAL_ON 0b00000010 // 1 1 enable VCO selection calibration stage
453 
454 // CC1101_REG_PARTNUM
455 #define CC1101_PARTNUM 0x00
456 
457 // CC1101_REG_VERSION
458 #define CC1101_VERSION_CURRENT 0x14
459 #define CC1101_VERSION_LEGACY 0x04
460 
461 // CC1101_REG_MARCSTATE
462 #define CC1101_MARC_STATE_SLEEP 0x00 // 4 0 main radio control state: sleep
463 #define CC1101_MARC_STATE_IDLE 0x01 // 4 0 idle
464 #define CC1101_MARC_STATE_XOFF 0x02 // 4 0 XOFF
465 #define CC1101_MARC_STATE_VCOON_MC 0x03 // 4 0 VCOON_MC
466 #define CC1101_MARC_STATE_REGON_MC 0x04 // 4 0 REGON_MC
467 #define CC1101_MARC_STATE_MANCAL 0x05 // 4 0 MANCAL
468 #define CC1101_MARC_STATE_VCOON 0x06 // 4 0 VCOON
469 #define CC1101_MARC_STATE_REGON 0x07 // 4 0 REGON
470 #define CC1101_MARC_STATE_STARTCAL 0x08 // 4 0 STARTCAL
471 #define CC1101_MARC_STATE_BWBOOST 0x09 // 4 0 BWBOOST
472 #define CC1101_MARC_STATE_FS_LOCK 0x0A // 4 0 FS_LOCK
473 #define CC1101_MARC_STATE_IFADCON 0x0B // 4 0 IFADCON
474 #define CC1101_MARC_STATE_ENDCAL 0x0C // 4 0 ENDCAL
475 #define CC1101_MARC_STATE_RX 0x0D // 4 0 RX
476 #define CC1101_MARC_STATE_RX_END 0x0E // 4 0 RX_END
477 #define CC1101_MARC_STATE_RX_RST 0x0F // 4 0 RX_RST
478 #define CC1101_MARC_STATE_TXRX_SWITCH 0x10 // 4 0 TXRX_SWITCH
479 #define CC1101_MARC_STATE_RXFIFO_OVERFLOW 0x11 // 4 0 RXFIFO_OVERFLOW
480 #define CC1101_MARC_STATE_FSTXON 0x12 // 4 0 FSTXON
481 #define CC1101_MARC_STATE_TX 0x13 // 4 0 TX
482 #define CC1101_MARC_STATE_TX_END 0x14 // 4 0 TX_END
483 #define CC1101_MARC_STATE_RXTX_SWITCH 0x15 // 4 0 RXTX_SWITCH
484 #define CC1101_MARC_STATE_TXFIFO_UNDERFLOW 0x16 // 4 0 TXFIFO_UNDERFLOW
485 
486 // CC1101_REG_WORTIME1 + REG_WORTIME0
487 #define CC1101_WORTIME_MSB 0x00 // 7 0 WOR timer value
488 #define CC1101_WORTIME_LSB 0x00 // 7 0
489 
490 // CC1101_REG_PKTSTATUS
491 #define CC1101_CRC_OK 0b10000000 // 7 7 CRC check passed
492 #define CC1101_CRC_ERROR 0b00000000 // 7 7 CRC check failed
493 #define CC1101_CS 0b01000000 // 6 6 carrier sense
494 #define CC1101_PQT_REACHED 0b00100000 // 5 5 preamble quality reached
495 #define CC1101_CCA 0b00010000 // 4 4 channel clear
496 #define CC1101_SFD 0b00001000 // 3 3 start of frame delimiter - sync word received
497 #define CC1101_GDO2_ACTIVE 0b00000100 // 2 2 GDO2 is active/asserted
498 #define CC1101_GDO0_ACTIVE 0b00000001 // 0 0 GDO0 is active/asserted
499 
505 class CC1101: public PhysicalLayer {
506  public:
507  // introduce PhysicalLayer overloads
512 
518  CC1101(Module* module);
519 
520  // basic methods
521 
539  int16_t begin(float freq = 434.0, float br = 48.0, float freqDev = 48.0, float rxBw = 135.0, int8_t power = 10, uint8_t preambleLength = 16);
540 
553  int16_t transmit(uint8_t* data, size_t len, uint8_t addr = 0) override;
554 
565  int16_t receive(uint8_t* data, size_t len) override;
566 
572  int16_t standby() override;
573 
581  int16_t transmitDirect(uint32_t frf = 0) override;
582 
588  int16_t receiveDirect() override;
589 
593  int16_t packetMode();
594 
595  // interrupt methods
596 
604  void setGdo0Action(void (*func)(void), RADIOLIB_INTERRUPT_STATUS dir = FALLING);
605 
609  void clearGdo0Action();
610 
618  void setGdo2Action(void (*func)(void), RADIOLIB_INTERRUPT_STATUS dir = FALLING);
619 
623  void clearGdo2Action();
624 
637  int16_t startTransmit(uint8_t* data, size_t len, uint8_t addr = 0) override;
638 
644  int16_t startReceive();
645 
655  int16_t readData(uint8_t* data, size_t len) override;
656 
657  // configuration methods
658 
666  int16_t setFrequency(float freq);
667 
675  int16_t setBitRate(float br);
676 
684  int16_t setRxBandwidth(float rxBw);
685 
693  int16_t setFrequencyDeviation(float freqDev) override;
694 
702  int16_t setOutputPower(int8_t power);
703 
717  int16_t setSyncWord(uint8_t syncH, uint8_t syncL, uint8_t maxErrBits = 0, bool requireCarrierSense = false);
718 
732  int16_t setSyncWord(uint8_t* syncWord, uint8_t len, uint8_t maxErrBits = 0, bool requireCarrierSense = false);
733 
741  int16_t setPreambleLength(uint8_t preambleLength);
742 
752  int16_t setNodeAddress(uint8_t nodeAddr, uint8_t numBroadcastAddrs = 0);
753 
759  int16_t disableAddressFiltering();
760 
768  int16_t setOOK(bool enableOOK);
769 
775  float getRSSI() const;
776 
782  uint8_t getLQI() const;
783 
791  size_t getPacketLength(bool update = true) override;
792 
800  int16_t fixedPacketLengthMode(uint8_t len = CC1101_MAX_PACKET_LENGTH);
801 
809  int16_t variablePacketLengthMode(uint8_t maxLen = CC1101_MAX_PACKET_LENGTH);
810 
820  int16_t enableSyncWordFiltering(uint8_t maxErrBits = 0, bool requireCarrierSense = false);
821 
829  int16_t disableSyncWordFiltering(bool requireCarrierSense = false);
830 
838  int16_t setCrcFiltering(bool crcOn = true);
839 
847  int16_t setPromiscuousMode(bool promiscuous = true);
848 
857  int16_t setDataShaping(uint8_t sh) override;
858 
866  int16_t setEncoding(uint8_t encoding) override;
867 
876  void setRfSwitchPins(RADIOLIB_PIN_TYPE rxEn, RADIOLIB_PIN_TYPE txEn);
877 
883  uint8_t random();
884 
890  int16_t getChipVersion();
891 
892 #ifndef RADIOLIB_GODMODE
893  private:
894 #endif
895  Module* _mod;
896 
897  float _freq = 0;
898  float _br = 0;
899  uint8_t _rawRSSI = 0;
900  uint8_t _rawLQI = 0;
901  uint8_t _modulation = CC1101_MOD_FORMAT_2_FSK;
902 
903  size_t _packetLength = 0;
904  bool _packetLengthQueried = false;
905  uint8_t _packetLengthConfig = CC1101_LENGTH_CONFIG_VARIABLE;
906 
907  bool _promiscuous = false;
908  bool _crcOn = true;
909 
910  uint8_t _syncWordLength = 2;
911  int8_t _power = 0;
912 
913  int16_t config();
914  int16_t directMode();
915  static void getExpMant(float target, uint16_t mantOffset, uint8_t divExp, uint8_t expMax, uint8_t& exp, uint8_t& mant);
916  int16_t setPacketMode(uint8_t mode, uint8_t len);
917 
918  // SPI read overrides to set bit for burst write and status registers access
919  int16_t SPIgetRegValue(uint8_t reg, uint8_t msb = 7, uint8_t lsb = 0);
920  int16_t SPIsetRegValue(uint8_t reg, uint8_t value, uint8_t msb = 7, uint8_t lsb = 0, uint8_t checkInterval = 2);
921  void SPIreadRegisterBurst(uint8_t reg, uint8_t numBytes, uint8_t* inBytes);
922  uint8_t SPIreadRegister(uint8_t reg);
923  void SPIwriteRegisterBurst(uint8_t reg, uint8_t* data, size_t len);
924  void SPIwriteRegister(uint8_t reg, uint8_t data);
925 
926  void SPIsendCommand(uint8_t cmd);
927 };
928 
929 #endif
uint8_t random()
Get one truly random byte from RSSI noise.
Definition: CC1101.cpp:768
-
int16_t packetMode()
Stops direct mode. It is required to call this method to switch from direct transmissions to packet-b...
Definition: CC1101.cpp:219
-
int16_t begin(float freq=434.0, float br=48.0, float freqDev=48.0, float rxBw=135.0, int8_t power=10, uint8_t preambleLength=16)
Initialization method.
Definition: CC1101.cpp:8
-
int16_t startTransmit(String &str, uint8_t addr=0)
Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes.
Definition: PhysicalLayer.cpp:49
-
int16_t enableSyncWordFiltering(uint8_t maxErrBits=0, bool requireCarrierSense=false)
Enable sync word filtering and generation.
Definition: CC1101.cpp:668
-
int16_t startReceive()
Interrupt-driven receive method. GDO0 will be activated when full packet is received.
Definition: CC1101.cpp:288
-
int16_t disableSyncWordFiltering(bool requireCarrierSense=false)
Disable preamble and sync word filtering and generation.
Definition: CC1101.cpp:681
-
void setGdo0Action(void(*func)(void), RADIOLIB_INTERRUPT_STATUS dir=FALLING)
Sets interrupt service routine to call when GDO0 activates.
Definition: CC1101.cpp:226
-
int16_t variablePacketLengthMode(uint8_t maxLen=CC1101_MAX_PACKET_LENGTH)
Set modem in variable packet length mode.
Definition: CC1101.cpp:664
-
size_t getPacketLength(bool update=true) override
Query modem for the packet length of received payload.
Definition: CC1101.cpp:646
-
int16_t setEncoding(uint8_t encoding) override
Sets transmission encoding. Allowed values are RADIOLIB_ENCODING_NRZ and RADIOLIB_ENCODING_WHITENING...
Definition: CC1101.cpp:740
-
void clearGdo0Action()
Clears interrupt service routine to call when GDO0 activates.
Definition: CC1101.cpp:230
-
Control class for CC1101 module.
Definition: CC1101.h:505
-
uint8_t getLQI() const
Gets LQI (Link Quality Indicator) of the last received packet.
Definition: CC1101.cpp:642
-
int16_t disableAddressFiltering()
Disables address filtering. Calling this method will also erase previously set addresses.
Definition: CC1101.cpp:591
-
void setGdo2Action(void(*func)(void), RADIOLIB_INTERRUPT_STATUS dir=FALLING)
Sets interrupt service routine to call when GDO2 activates.
Definition: CC1101.cpp:234
-
int16_t setRxBandwidth(float rxBw)
Sets receiver bandwidth. Allowed values range from 58.0 to 812.0 kHz.
Definition: CC1101.cpp:394
-
float getRSSI() const
Gets RSSI (Recorded Signal Strength Indicator) of the last received packet.
Definition: CC1101.cpp:632
-
int16_t setOutputPower(int8_t power)
Sets output power. Allowed values are -30, -20, -15, -10, 0, 5, 7 or 10 dBm.
Definition: CC1101.cpp:437
-
int16_t startTransmit(uint8_t *data, size_t len, uint8_t addr=0) override
Interrupt-driven binary transmit method. Overloads for string-based transmissions are implemented in ...
Definition: CC1101.cpp:249
-
int16_t standby() override
Sets the module to standby mode.
Definition: CC1101.cpp:175
-
void setRfSwitchPins(RADIOLIB_PIN_TYPE rxEn, RADIOLIB_PIN_TYPE txEn)
Some modules contain external RF switch controlled by two pins. This function gives RadioLib control ...
Definition: CC1101.cpp:764
-
int16_t getChipVersion()
Read version SPI register. Should return CC1101_VERSION_LEGACY (0x04) or CC1101_VERSION_CURRENT (0x14...
Definition: CC1101.cpp:788
-
int16_t fixedPacketLengthMode(uint8_t len=CC1101_MAX_PACKET_LENGTH)
Set modem in fixed packet length mode.
Definition: CC1101.cpp:660
-
Implements all common low-level SPI/UART/I2C methods to control the wireless module. Every module class contains one private instance of this class.
Definition: Module.h:17
-
int16_t transmit(__FlashStringHelper *fstr, uint8_t addr=0)
Arduino Flash String transmit method.
Definition: PhysicalLayer.cpp:8
-
int16_t readData(uint8_t *data, size_t len) override
Reads data received after calling startReceive method.
Definition: CC1101.cpp:308
-
void clearGdo2Action()
Clears interrupt service routine to call when GDO0 activates.
Definition: CC1101.cpp:242
-
int16_t setSyncWord(uint8_t syncH, uint8_t syncL, uint8_t maxErrBits=0, bool requireCarrierSense=false)
Sets 16-bit sync word as a two byte value.
Definition: CC1101.cpp:538
-
int16_t receive(String &str, size_t len=0)
Arduino String receive method.
Definition: PhysicalLayer.cpp:98
-
int16_t transmit(uint8_t *data, size_t len, uint8_t addr=0) override
Blocking binary transmit method. Overloads for string-based transmissions are implemented in Physical...
Definition: CC1101.cpp:98
-
int16_t receive(uint8_t *data, size_t len) override
Blocking binary receive method. Overloads for string-based transmissions are implemented in PhysicalL...
Definition: CC1101.cpp:139
-
int16_t setFrequency(float freq)
Sets carrier frequency. Allowed values are in bands 300.0 to 348.0 MHz, 387.0 to 464.0 MHz and 779.0 to 928.0 MHz.
Definition: CC1101.cpp:348
-
int16_t setFrequencyDeviation(float freqDev) override
Sets frequency deviation. Allowed values range from 1.587 to 380.8 kHz.
Definition: CC1101.cpp:414
-
Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN...
Definition: PhysicalLayer.h:13
-
int16_t setNodeAddress(uint8_t nodeAddr, uint8_t numBroadcastAddrs=0)
Sets node and broadcast addresses. Calling this method will also enable address filtering.
Definition: CC1101.cpp:580
-
CC1101(Module *module)
Default constructor.
Definition: CC1101.cpp:4
-
int16_t transmitDirect(uint32_t frf=0) override
Starts direct mode transmission.
Definition: CC1101.cpp:184
-
int16_t setBitRate(float br)
Sets bit rate. Allowed values range from 0.025 to 600.0 kbps.
Definition: CC1101.cpp:374
-
int16_t setPromiscuousMode(bool promiscuous=true)
Set modem in "sniff" mode: no packet filtering (e.g., no preamble, sync word, address, CRC).
Definition: CC1101.cpp:695
-
int16_t setCrcFiltering(bool crcOn=true)
Enable CRC filtering and generation.
Definition: CC1101.cpp:685
-
int16_t setOOK(bool enableOOK)
Enables/disables OOK modulation instead of FSK.
Definition: CC1101.cpp:601
-
int16_t setPreambleLength(uint8_t preambleLength)
Sets preamble length.
Definition: CC1101.cpp:543
-
int16_t receiveDirect() override
Starts direct mode reception.
Definition: CC1101.cpp:206
-
int16_t setDataShaping(uint8_t sh) override
Sets Gaussian filter bandwidth-time product that will be used for data shaping. Allowed value is RADI...
Definition: CC1101.cpp:721
-
int16_t readData(String &str, size_t len=0)
Reads data that was received after calling startReceive method.
Definition: PhysicalLayer.cpp:57
+
1 #if !defined(_RADIOLIB_CC1101_H) && !defined(RADIOLIB_EXCLUDE_CC1101)
+
2 #define _RADIOLIB_CC1101_H
+
3 
+
4 #include "../../TypeDef.h"
+
5 #include "../../Module.h"
+
6 
+
7 #include "../../protocols/PhysicalLayer/PhysicalLayer.h"
+
8 
+
9 // CC1101 physical layer properties
+
10 #define CC1101_FREQUENCY_STEP_SIZE 396.7285156
+
11 #define CC1101_MAX_PACKET_LENGTH 63
+
12 #define CC1101_CRYSTAL_FREQ 26.0
+
13 #define CC1101_DIV_EXPONENT 16
+
14 
+
15 // CC1101 SPI commands
+
16 #define CC1101_CMD_READ 0b10000000
+
17 #define CC1101_CMD_WRITE 0b00000000
+
18 #define CC1101_CMD_BURST 0b01000000
+
19 #define CC1101_CMD_ACCESS_STATUS_REG 0b01000000
+
20 #define CC1101_CMD_FIFO_RX 0b10000000
+
21 #define CC1101_CMD_FIFO_TX 0b00000000
+
22 #define CC1101_CMD_RESET 0x30
+
23 #define CC1101_CMD_FSTXON 0x31
+
24 #define CC1101_CMD_XOFF 0x32
+
25 #define CC1101_CMD_CAL 0x33
+
26 #define CC1101_CMD_RX 0x34
+
27 #define CC1101_CMD_TX 0x35
+
28 #define CC1101_CMD_IDLE 0x36
+
29 #define CC1101_CMD_WOR 0x38
+
30 #define CC1101_CMD_POWER_DOWN 0x39
+
31 #define CC1101_CMD_FLUSH_RX 0x3A
+
32 #define CC1101_CMD_FLUSH_TX 0x3B
+
33 #define CC1101_CMD_WOR_RESET 0x3C
+
34 #define CC1101_CMD_NOP 0x3D
+
35 
+
36 // CC1101 register map
+
37 #define CC1101_REG_IOCFG2 0x00
+
38 #define CC1101_REG_IOCFG1 0x01
+
39 #define CC1101_REG_IOCFG0 0x02
+
40 #define CC1101_REG_FIFOTHR 0x03
+
41 #define CC1101_REG_SYNC1 0x04
+
42 #define CC1101_REG_SYNC0 0x05
+
43 #define CC1101_REG_PKTLEN 0x06
+
44 #define CC1101_REG_PKTCTRL1 0x07
+
45 #define CC1101_REG_PKTCTRL0 0x08
+
46 #define CC1101_REG_ADDR 0x09
+
47 #define CC1101_REG_CHANNR 0x0A
+
48 #define CC1101_REG_FSCTRL1 0x0B
+
49 #define CC1101_REG_FSCTRL0 0x0C
+
50 #define CC1101_REG_FREQ2 0x0D
+
51 #define CC1101_REG_FREQ1 0x0E
+
52 #define CC1101_REG_FREQ0 0x0F
+
53 #define CC1101_REG_MDMCFG4 0x10
+
54 #define CC1101_REG_MDMCFG3 0x11
+
55 #define CC1101_REG_MDMCFG2 0x12
+
56 #define CC1101_REG_MDMCFG1 0x13
+
57 #define CC1101_REG_MDMCFG0 0x14
+
58 #define CC1101_REG_DEVIATN 0x15
+
59 #define CC1101_REG_MCSM2 0x16
+
60 #define CC1101_REG_MCSM1 0x17
+
61 #define CC1101_REG_MCSM0 0x18
+
62 #define CC1101_REG_FOCCFG 0x19
+
63 #define CC1101_REG_BSCFG 0x1A
+
64 #define CC1101_REG_AGCCTRL2 0x1B
+
65 #define CC1101_REG_AGCCTRL1 0x1C
+
66 #define CC1101_REG_AGCCTRL0 0x1D
+
67 #define CC1101_REG_WOREVT1 0x1E
+
68 #define CC1101_REG_WOREVT0 0x1F
+
69 #define CC1101_REG_WORCTRL 0x20
+
70 #define CC1101_REG_FREND1 0x21
+
71 #define CC1101_REG_FREND0 0x22
+
72 #define CC1101_REG_FSCAL3 0x23
+
73 #define CC1101_REG_FSCAL2 0x24
+
74 #define CC1101_REG_FSCAL1 0x25
+
75 #define CC1101_REG_FSCAL0 0x26
+
76 #define CC1101_REG_RCCTRL1 0x27
+
77 #define CC1101_REG_RCCTRL0 0x28
+
78 #define CC1101_REG_FSTEST 0x29
+
79 #define CC1101_REG_PTEST 0x2A
+
80 #define CC1101_REG_AGCTEST 0x2B
+
81 #define CC1101_REG_TEST2 0x2C
+
82 #define CC1101_REG_TEST1 0x2D
+
83 #define CC1101_REG_TEST0 0x2E
+
84 #define CC1101_REG_PARTNUM 0x30
+
85 #define CC1101_REG_VERSION 0x31
+
86 #define CC1101_REG_FREQEST 0x32
+
87 #define CC1101_REG_LQI 0x33
+
88 #define CC1101_REG_RSSI 0x34
+
89 #define CC1101_REG_MARCSTATE 0x35
+
90 #define CC1101_REG_WORTIME1 0x36
+
91 #define CC1101_REG_WORTIME0 0x37
+
92 #define CC1101_REG_PKTSTATUS 0x38
+
93 #define CC1101_REG_VCO_VC_DAC 0x39
+
94 #define CC1101_REG_TXBYTES 0x3A
+
95 #define CC1101_REG_RXBYTES 0x3B
+
96 #define CC1101_REG_RCCTRL1_STATUS 0x3C
+
97 #define CC1101_REG_RCCTRL0_STATUS 0x3D
+
98 #define CC1101_REG_PATABLE 0x3E
+
99 #define CC1101_REG_FIFO 0x3F
+
100 
+
101 // CC1101_REG_IOCFG2 MSB LSB DESCRIPTION
+
102 #define CC1101_GDO2_NORM 0b00000000 // 6 6 GDO2 output: active high (default)
+
103 #define CC1101_GDO2_INV 0b01000000 // 6 6 active low
+
104 
+
105 // CC1101_REG_IOCFG1
+
106 #define CC1101_GDO1_DS_LOW 0b00000000 // 7 7 GDO1 output drive strength: low (default)
+
107 #define CC1101_GDO1_DS_HIGH 0b10000000 // 7 7 high
+
108 #define CC1101_GDO1_NORM 0b00000000 // 6 6 GDO1 output: active high (default)
+
109 #define CC1101_GDO1_INV 0b01000000 // 6 6 active low
+
110 
+
111 // CC1101_REG_IOCFG0
+
112 #define CC1101_GDO0_TEMP_SENSOR_OFF 0b00000000 // 7 7 analog temperature sensor output: disabled (default)
+
113 #define CC1101_GDO0_TEMP_SENSOR_ON 0b10000000 // 7 0 enabled
+
114 #define CC1101_GDO0_NORM 0b00000000 // 6 6 GDO0 output: active high (default)
+
115 #define CC1101_GDO0_INV 0b01000000 // 6 6 active low
+
116 
+
117 // CC1101_REG_IOCFG2 + REG_IOCFG1 + REG_IOCFG0
+
118 #define CC1101_GDOX_RX_FIFO_FULL 0x00 // 5 0 Rx FIFO full or above threshold
+
119 #define CC1101_GDOX_RX_FIFO_FULL_OR_PKT_END 0x01 // 5 0 Rx FIFO full or above threshold or reached packet end
+
120 #define CC1101_GDOX_TX_FIFO_ABOVE_THR 0x02 // 5 0 Tx FIFO above threshold
+
121 #define CC1101_GDOX_TX_FIFO_FULL 0x03 // 5 0 Tx FIFO full
+
122 #define CC1101_GDOX_RX_FIFO_OVERFLOW 0x04 // 5 0 Rx FIFO overflowed
+
123 #define CC1101_GDOX_TX_FIFO_UNDERFLOW 0x05 // 5 0 Tx FIFO underflowed
+
124 #define CC1101_GDOX_SYNC_WORD_SENT_OR_RECEIVED 0x06 // 5 0 sync word was sent or received
+
125 #define CC1101_GDOX_PKT_RECEIVED_CRC_OK 0x07 // 5 0 packet received and CRC check passed
+
126 #define CC1101_GDOX_PREAMBLE_QUALITY_REACHED 0x08 // 5 0 received preamble quality is above threshold
+
127 #define CC1101_GDOX_CHANNEL_CLEAR 0x09 // 5 0 RSSI level below threshold (channel is clear)
+
128 #define CC1101_GDOX_PLL_LOCKED 0x0A // 5 0 PLL is locked
+
129 #define CC1101_GDOX_SERIAL_CLOCK 0x0B // 5 0 serial data clock
+
130 #define CC1101_GDOX_SERIAL_DATA_SYNC 0x0C // 5 0 serial data output in: synchronous mode
+
131 #define CC1101_GDOX_SERIAL_DATA_ASYNC 0x0D // 5 0 asynchronous mode
+
132 #define CC1101_GDOX_CARRIER_SENSE 0x0E // 5 0 RSSI above threshold
+
133 #define CC1101_GDOX_CRC_OK 0x0F // 5 0 CRC check passed
+
134 #define CC1101_GDOX_RX_HARD_DATA1 0x16 // 5 0 direct access to demodulated data
+
135 #define CC1101_GDOX_RX_HARD_DATA0 0x17 // 5 0 direct access to demodulated data
+
136 #define CC1101_GDOX_PA_PD 0x1B // 5 0 power amplifier circuit is powered down
+
137 #define CC1101_GDOX_LNA_PD 0x1C // 5 0 low-noise amplifier circuit is powered down
+
138 #define CC1101_GDOX_RX_SYMBOL_TICK 0x1D // 5 0 direct access to symbol tick of received data
+
139 #define CC1101_GDOX_WOR_EVNT0 0x24 // 5 0 wake-on-radio event 0
+
140 #define CC1101_GDOX_WOR_EVNT1 0x25 // 5 0 wake-on-radio event 1
+
141 #define CC1101_GDOX_CLK_256 0x26 // 5 0 256 Hz clock
+
142 #define CC1101_GDOX_CLK_32K 0x27 // 5 0 32 kHz clock
+
143 #define CC1101_GDOX_CHIP_RDYN 0x29 // 5 0 (default for GDO2)
+
144 #define CC1101_GDOX_XOSC_STABLE 0x2B // 5 0
+
145 #define CC1101_GDOX_HIGH_Z 0x2E // 5 0 high impedance state (default for GDO1)
+
146 #define CC1101_GDOX_HW_TO_0 0x2F // 5 0
+
147 #define CC1101_GDOX_CLOCK_XOSC_1 0x30 // 5 0 crystal oscillator clock: f = f(XOSC)/1
+
148 #define CC1101_GDOX_CLOCK_XOSC_1_5 0x31 // 5 0 f = f(XOSC)/1.5
+
149 #define CC1101_GDOX_CLOCK_XOSC_2 0x32 // 5 0 f = f(XOSC)/2
+
150 #define CC1101_GDOX_CLOCK_XOSC_3 0x33 // 5 0 f = f(XOSC)/3
+
151 #define CC1101_GDOX_CLOCK_XOSC_4 0x34 // 5 0 f = f(XOSC)/4
+
152 #define CC1101_GDOX_CLOCK_XOSC_6 0x35 // 5 0 f = f(XOSC)/6
+
153 #define CC1101_GDOX_CLOCK_XOSC_8 0x36 // 5 0 f = f(XOSC)/8
+
154 #define CC1101_GDOX_CLOCK_XOSC_12 0x37 // 5 0 f = f(XOSC)/12
+
155 #define CC1101_GDOX_CLOCK_XOSC_16 0x38 // 5 0 f = f(XOSC)/16
+
156 #define CC1101_GDOX_CLOCK_XOSC_24 0x39 // 5 0 f = f(XOSC)/24
+
157 #define CC1101_GDOX_CLOCK_XOSC_32 0x3A // 5 0 f = f(XOSC)/32
+
158 #define CC1101_GDOX_CLOCK_XOSC_48 0x3B // 5 0 f = f(XOSC)/48
+
159 #define CC1101_GDOX_CLOCK_XOSC_64 0x3C // 5 0 f = f(XOSC)/64
+
160 #define CC1101_GDOX_CLOCK_XOSC_96 0x3D // 5 0 f = f(XOSC)/96
+
161 #define CC1101_GDOX_CLOCK_XOSC_128 0x3E // 5 0 f = f(XOSC)/128
+
162 #define CC1101_GDOX_CLOCK_XOSC_192 0x3F // 5 0 f = f(XOSC)/192 (default for GDO0)
+
163 
+
164 // CC1101_REG_FIFOTHR
+
165 #define CC1101_ADC_RETENTION_OFF 0b00000000 // 6 6 do not retain ADC settings in sleep mode (default)
+
166 #define CC1101_ADC_RETENTION_ON 0b01000000 // 6 6 retain ADC settings in sleep mode
+
167 #define CC1101_RX_ATTEN_0_DB 0b00000000 // 5 4 Rx attenuation: 0 dB (default)
+
168 #define CC1101_RX_ATTEN_6_DB 0b00010000 // 5 4 6 dB
+
169 #define CC1101_RX_ATTEN_12_DB 0b00100000 // 5 4 12 dB
+
170 #define CC1101_RX_ATTEN_18_DB 0b00110000 // 5 4 18 dB
+
171 #define CC1101_FIFO_THR 0b00000111 // 5 4 Rx FIFO threshold [bytes] = CC1101_FIFO_THR * 4; Tx FIFO threshold [bytes] = 65 - (CC1101_FIFO_THR * 4)
+
172 
+
173 // CC1101_REG_SYNC1
+
174 #define CC1101_SYNC_WORD_MSB 0xD3 // 7 0 sync word MSB
+
175 
+
176 // CC1101_REG_SYNC0
+
177 #define CC1101_SYNC_WORD_LSB 0x91 // 7 0 sync word LSB
+
178 
+
179 // CC1101_REG_PKTLEN
+
180 #define CC1101_PACKET_LENGTH 0xFF // 7 0 packet length in bytes
+
181 
+
182 // CC1101_REG_PKTCTRL1
+
183 #define CC1101_PQT 0x00 // 7 5 preamble quality threshold
+
184 #define CC1101_CRC_AUTOFLUSH_OFF 0b00000000 // 3 3 automatic Rx FIFO flush on CRC check fail: disabled (default)
+
185 #define CC1101_CRC_AUTOFLUSH_ON 0b00001000 // 3 3 enabled
+
186 #define CC1101_APPEND_STATUS_OFF 0b00000000 // 2 2 append 2 status bytes to packet: disabled
+
187 #define CC1101_APPEND_STATUS_ON 0b00000100 // 2 2 enabled (default)
+
188 #define CC1101_ADR_CHK_NONE 0b00000000 // 1 0 address check: none (default)
+
189 #define CC1101_ADR_CHK_NO_BROADCAST 0b00000001 // 1 0 without broadcast
+
190 #define CC1101_ADR_CHK_SINGLE_BROADCAST 0b00000010 // 1 0 broadcast address 0x00
+
191 #define CC1101_ADR_CHK_DOUBLE_BROADCAST 0b00000011 // 1 0 broadcast addresses 0x00 and 0xFF
+
192 
+
193 // CC1101_REG_PKTCTRL0
+
194 #define CC1101_WHITE_DATA_OFF 0b00000000 // 6 6 data whitening: disabled
+
195 #define CC1101_WHITE_DATA_ON 0b01000000 // 6 6 enabled (default)
+
196 #define CC1101_PKT_FORMAT_NORMAL 0b00000000 // 5 4 packet format: normal (FIFOs)
+
197 #define CC1101_PKT_FORMAT_SYNCHRONOUS 0b00010000 // 5 4 synchronous serial
+
198 #define CC1101_PKT_FORMAT_RANDOM 0b00100000 // 5 4 random transmissions
+
199 #define CC1101_PKT_FORMAT_ASYNCHRONOUS 0b00110000 // 5 4 asynchronous serial
+
200 #define CC1101_CRC_OFF 0b00000000 // 2 2 CRC disabled
+
201 #define CC1101_CRC_ON 0b00000100 // 2 2 CRC enabled (default)
+
202 #define CC1101_LENGTH_CONFIG_FIXED 0b00000000 // 1 0 packet length: fixed
+
203 #define CC1101_LENGTH_CONFIG_VARIABLE 0b00000001 // 1 0 variable (default)
+
204 #define CC1101_LENGTH_CONFIG_INFINITE 0b00000010 // 1 0 infinite
+
205 
+
206 // CC1101_REG_ADDR
+
207 #define CC1101_DEVICE_ADDR 0x00 // 7 0 device address
+
208 
+
209 // CC1101_REG_CHANNR
+
210 #define CC1101_CHAN 0x00 // 7 0 channel number
+
211 
+
212 // CC1101_REG_FSCTRL1
+
213 #define CC1101_FREQ_IF 0x0F // 4 0 IF frequency setting; f_IF = (f(XOSC) / 2^10) * CC1101_FREQ_IF
+
214 
+
215 // CC1101_REG_FSCTRL0
+
216 #define CC1101_FREQOFF 0x00 // 7 0 base frequency offset (2s-compliment)
+
217 
+
218 // CC1101_REG_FREQ2 + REG_FREQ1 + REG_FREQ0
+
219 #define CC1101_FREQ_MSB 0x1E // 5 0 base frequency setting: f_carrier = (f(XOSC) / 2^16) * FREQ
+
220 #define CC1101_FREQ_MID 0xC4 // 7 0 where f(XOSC) = 26 MHz
+
221 #define CC1101_FREQ_LSB 0xEC // 7 0 FREQ = 3-byte value of FREQ registers
+
222 
+
223 // CC1101_REG_MDMCFG4
+
224 #define CC1101_CHANBW_E 0b10000000 // 7 6 channel bandwidth: BW_channel = f(XOSC) / (8 * (4 + CHANBW_M)*2^CHANBW_E) [Hz]
+
225 #define CC1101_CHANBW_M 0b00000000 // 5 4 default value for 26 MHz crystal: 203 125 Hz
+
226 #define CC1101_DRATE_E 0x0C // 3 0 symbol rate: R_data = (((256 + DRATE_M) * 2^DRATE_E) / 2^28) * f(XOSC) [Baud]
+
227 
+
228 // CC1101_REG_MDMCFG3
+
229 #define CC1101_DRATE_M 0x22 // 7 0 default value for 26 MHz crystal: 115 051 Baud
+
230 
+
231 // CC1101_REG_MDMCFG2
+
232 #define CC1101_DEM_DCFILT_OFF 0b10000000 // 7 7 digital DC filter: disabled
+
233 #define CC1101_DEM_DCFILT_ON 0b00000000 // 7 7 enabled - only for data rates above 250 kBaud (default)
+
234 #define CC1101_MOD_FORMAT_2_FSK 0b00000000 // 6 4 modulation format: 2-FSK (default)
+
235 #define CC1101_MOD_FORMAT_GFSK 0b00010000 // 6 4 GFSK
+
236 #define CC1101_MOD_FORMAT_ASK_OOK 0b00110000 // 6 4 ASK/OOK
+
237 #define CC1101_MOD_FORMAT_4_FSK 0b01000000 // 6 4 4-FSK
+
238 #define CC1101_MOD_FORMAT_MFSK 0b01110000 // 6 4 MFSK - only for data rates above 26 kBaud
+
239 #define CC1101_MANCHESTER_EN_OFF 0b00000000 // 3 3 Manchester encoding: disabled (default)
+
240 #define CC1101_MANCHESTER_EN_ON 0b00001000 // 3 3 enabled
+
241 #define CC1101_SYNC_MODE_NONE 0b00000000 // 2 0 synchronization: no preamble/sync
+
242 #define CC1101_SYNC_MODE_15_16 0b00000001 // 2 0 15/16 sync word bits
+
243 #define CC1101_SYNC_MODE_16_16 0b00000010 // 2 0 16/16 sync word bits (default)
+
244 #define CC1101_SYNC_MODE_30_32 0b00000011 // 2 0 30/32 sync word bits
+
245 #define CC1101_SYNC_MODE_NONE_THR 0b00000100 // 2 0 no preamble sync, carrier sense above threshold
+
246 #define CC1101_SYNC_MODE_15_16_THR 0b00000101 // 2 0 15/16 sync word bits, carrier sense above threshold
+
247 #define CC1101_SYNC_MODE_16_16_THR 0b00000110 // 2 0 16/16 sync word bits, carrier sense above threshold
+
248 #define CC1101_SYNC_MODE_30_32_THR 0b00000111 // 2 0 30/32 sync word bits, carrier sense above threshold
+
249 
+
250 // CC1101_REG_MDMCFG1
+
251 #define CC1101_FEC_OFF 0b00000000 // 7 7 forward error correction: disabled (default)
+
252 #define CC1101_FEC_ON 0b10000000 // 7 7 enabled - only for fixed packet length
+
253 #define CC1101_NUM_PREAMBLE_2 0b00000000 // 6 4 number of preamble bytes: 2
+
254 #define CC1101_NUM_PREAMBLE_3 0b00010000 // 6 4 3
+
255 #define CC1101_NUM_PREAMBLE_4 0b00100000 // 6 4 4 (default)
+
256 #define CC1101_NUM_PREAMBLE_6 0b00110000 // 6 4 6
+
257 #define CC1101_NUM_PREAMBLE_8 0b01000000 // 6 4 8
+
258 #define CC1101_NUM_PREAMBLE_12 0b01010000 // 6 4 12
+
259 #define CC1101_NUM_PREAMBLE_16 0b01100000 // 6 4 16
+
260 #define CC1101_NUM_PREAMBLE_24 0b01110000 // 6 4 24
+
261 #define CC1101_CHANSPC_E 0x02 // 1 0 channel spacing: df_channel = (f(XOSC) / 2^18) * (256 + CHANSPC_M) * 2^CHANSPC_E [Hz]
+
262 
+
263 // CC1101_REG_MDMCFG0
+
264 #define CC1101_CHANSPC_M 0xF8 // 7 0 default value for 26 MHz crystal: 199 951 kHz
+
265 
+
266 // CC1101_REG_DEVIATN
+
267 #define CC1101_DEVIATION_E 0b01000000 // 6 4 frequency deviation: f_dev = (f(XOSC) / 2^17) * (8 + DEVIATION_M) * 2^DEVIATION_E [Hz]
+
268 #define CC1101_DEVIATION_M 0b00000111 // 2 0 default value for 26 MHz crystal: +- 47 607 Hz
+
269 #define CC1101_MSK_PHASE_CHANGE_PERIOD 0x07 // 2 0 phase change symbol period fraction: 1 / (MSK_PHASE_CHANGE_PERIOD + 1)
+
270 
+
271 // CC1101_REG_MCSM2
+
272 #define CC1101_RX_TIMEOUT_RSSI_OFF 0b00000000 // 4 4 Rx timeout based on RSSI value: disabled (default)
+
273 #define CC1101_RX_TIMEOUT_RSSI_ON 0b00010000 // 4 4 enabled
+
274 #define CC1101_RX_TIMEOUT_QUAL_OFF 0b00000000 // 3 3 check for sync word on Rx timeout
+
275 #define CC1101_RX_TIMEOUT_QUAL_ON 0b00001000 // 3 3 check for PQI set on Rx timeout
+
276 #define CC1101_RX_TIMEOUT_OFF 0b00000111 // 2 0 Rx timeout: disabled (default)
+
277 #define CC1101_RX_TIMEOUT_MAX 0b00000000 // 2 0 max value (actual value depends on WOR_RES, EVENT0 and f(XOSC))
+
278 
+
279 // CC1101_REG_MCSM1
+
280 #define CC1101_CCA_MODE_ALWAYS 0b00000000 // 5 4 clear channel indication: always
+
281 #define CC1101_CCA_MODE_RSSI_THR 0b00010000 // 5 4 RSSI below threshold
+
282 #define CC1101_CCA_MODE_RX_PKT 0b00100000 // 5 4 unless receiving packet
+
283 #define CC1101_CCA_MODE_RSSI_THR_RX_PKT 0b00110000 // 5 4 RSSI below threshold unless receiving packet (default)
+
284 #define CC1101_RXOFF_IDLE 0b00000000 // 3 2 next mode after packet reception: idle (default)
+
285 #define CC1101_RXOFF_FSTXON 0b00000100 // 3 2 FSTxOn
+
286 #define CC1101_RXOFF_TX 0b00001000 // 3 2 Tx
+
287 #define CC1101_RXOFF_RX 0b00001100 // 3 2 Rx
+
288 #define CC1101_TXOFF_IDLE 0b00000000 // 1 0 next mode after packet transmission: idle (default)
+
289 #define CC1101_TXOFF_FSTXON 0b00000001 // 1 0 FSTxOn
+
290 #define CC1101_TXOFF_TX 0b00000010 // 1 0 Tx
+
291 #define CC1101_TXOFF_RX 0b00000011 // 1 0 Rx
+
292 
+
293 // CC1101_REG_MCSM0
+
294 #define CC1101_FS_AUTOCAL_NEVER 0b00000000 // 5 4 automatic calibration: never (default)
+
295 #define CC1101_FS_AUTOCAL_IDLE_TO_RXTX 0b00010000 // 5 4 every transition from idle to Rx/Tx
+
296 #define CC1101_FS_AUTOCAL_RXTX_TO_IDLE 0b00100000 // 5 4 every transition from Rx/Tx to idle
+
297 #define CC1101_FS_AUTOCAL_RXTX_TO_IDLE_4TH 0b00110000 // 5 4 every 4th transition from Rx/Tx to idle
+
298 #define CC1101_PO_TIMEOUT_COUNT_1 0b00000000 // 3 2 number of counter expirations before CHP_RDYN goes low: 1 (default)
+
299 #define CC1101_PO_TIMEOUT_COUNT_16 0b00000100 // 3 2 16
+
300 #define CC1101_PO_TIMEOUT_COUNT_64 0b00001000 // 3 2 64
+
301 #define CC1101_PO_TIMEOUT_COUNT_256 0b00001100 // 3 2 256
+
302 #define CC1101_PIN_CTRL_OFF 0b00000000 // 1 1 pin radio control: disabled (default)
+
303 #define CC1101_PIN_CTRL_ON 0b00000010 // 1 1 enabled
+
304 #define CC1101_XOSC_FORCE_OFF 0b00000000 // 0 0 do not force XOSC to remain on in sleep (default)
+
305 #define CC1101_XOSC_FORCE_ON 0b00000001 // 0 0 force XOSC to remain on in sleep
+
306 
+
307 // CC1101_REG_FOCCFG
+
308 #define CC1101_FOC_BS_CS_GATE_OFF 0b00000000 // 5 5 do not freeze frequency compensation until CS goes high
+
309 #define CC1101_FOC_BS_CS_GATE_ON 0b00100000 // 5 5 freeze frequency compensation until CS goes high (default)
+
310 #define CC1101_FOC_PRE_K 0b00000000 // 4 3 frequency compensation loop gain before sync word: K
+
311 #define CC1101_FOC_PRE_2K 0b00001000 // 4 3 2K
+
312 #define CC1101_FOC_PRE_3K 0b00010000 // 4 3 3K (default)
+
313 #define CC1101_FOC_PRE_4K 0b00011000 // 4 3 4K
+
314 #define CC1101_FOC_POST_K 0b00000000 // 2 2 frequency compensation loop gain after sync word: same as FOC_PRE
+
315 #define CC1101_FOC_POST_K_2 0b00000100 // 2 2 K/2 (default)
+
316 #define CC1101_FOC_LIMIT_NO_COMPENSATION 0b00000000 // 1 0 frequency compensation saturation point: no compensation - required for ASK/OOK
+
317 #define CC1101_FOC_LIMIT_BW_CHAN_8 0b00000001 // 1 0 +- BW_chan/8
+
318 #define CC1101_FOC_LIMIT_BW_CHAN_4 0b00000010 // 1 0 +- BW_chan/4 (default)
+
319 #define CC1101_FOC_LIMIT_BW_CHAN_2 0b00000011 // 1 0 +- BW_chan/2
+
320 
+
321 // CC1101_REG_BSCFG
+
322 #define CC1101_BS_PRE_KI 0b00000000 // 7 6 clock recovery integral gain before sync word: Ki
+
323 #define CC1101_BS_PRE_2KI 0b01000000 // 7 6 2Ki (default)
+
324 #define CC1101_BS_PRE_3KI 0b10000000 // 7 6 3Ki
+
325 #define CC1101_BS_PRE_4KI 0b11000000 // 7 6 4Ki
+
326 #define CC1101_BS_PRE_KP 0b00000000 // 5 4 clock recovery proportional gain before sync word: Kp
+
327 #define CC1101_BS_PRE_2KP 0b00010000 // 5 4 2Kp
+
328 #define CC1101_BS_PRE_3KP 0b00100000 // 5 4 3Kp (default)
+
329 #define CC1101_BS_PRE_4KP 0b00110000 // 5 4 4Kp
+
330 #define CC1101_BS_POST_KI 0b00000000 // 3 3 clock recovery integral gain after sync word: same as BS_PRE
+
331 #define CC1101_BS_POST_KI_2 0b00001000 // 3 3 Ki/2 (default)
+
332 #define CC1101_BS_POST_KP 0b00000000 // 2 2 clock recovery proportional gain after sync word: same as BS_PRE
+
333 #define CC1101_BS_POST_KP_1 0b00000100 // 2 2 Kp (default)
+
334 #define CC1101_BS_LIMIT_NO_COMPENSATION 0b00000000 // 1 0 data rate compensation saturation point: no compensation
+
335 #define CC1101_BS_LIMIT_3_125 0b00000001 // 1 0 +- 3.125 %
+
336 #define CC1101_BS_LIMIT_6_25 0b00000010 // 1 0 +- 6.25 %
+
337 #define CC1101_BS_LIMIT_12_5 0b00000011 // 1 0 +- 12.5 %
+
338 
+
339 // CC1101_REG_AGCCTRL2
+
340 #define CC1101_MAX_DVGA_GAIN_0 0b00000000 // 7 6 reduce maximum available DVGA gain: no reduction (default)
+
341 #define CC1101_MAX_DVGA_GAIN_1 0b01000000 // 7 6 disable top gain setting
+
342 #define CC1101_MAX_DVGA_GAIN_2 0b10000000 // 7 6 disable top two gain setting
+
343 #define CC1101_MAX_DVGA_GAIN_3 0b11000000 // 7 6 disable top three gain setting
+
344 #define CC1101_LNA_GAIN_REDUCE_0_DB 0b00000000 // 5 3 reduce maximum LNA gain by: 0 dB (default)
+
345 #define CC1101_LNA_GAIN_REDUCE_2_6_DB 0b00001000 // 5 3 2.6 dB
+
346 #define CC1101_LNA_GAIN_REDUCE_6_1_DB 0b00010000 // 5 3 6.1 dB
+
347 #define CC1101_LNA_GAIN_REDUCE_7_4_DB 0b00011000 // 5 3 7.4 dB
+
348 #define CC1101_LNA_GAIN_REDUCE_9_2_DB 0b00100000 // 5 3 9.2 dB
+
349 #define CC1101_LNA_GAIN_REDUCE_11_5_DB 0b00101000 // 5 3 11.5 dB
+
350 #define CC1101_LNA_GAIN_REDUCE_14_6_DB 0b00110000 // 5 3 14.6 dB
+
351 #define CC1101_LNA_GAIN_REDUCE_17_1_DB 0b00111000 // 5 3 17.1 dB
+
352 #define CC1101_MAGN_TARGET_24_DB 0b00000000 // 2 0 average amplitude target for filter: 24 dB
+
353 #define CC1101_MAGN_TARGET_27_DB 0b00000001 // 2 0 27 dB
+
354 #define CC1101_MAGN_TARGET_30_DB 0b00000010 // 2 0 30 dB
+
355 #define CC1101_MAGN_TARGET_33_DB 0b00000011 // 2 0 33 dB (default)
+
356 #define CC1101_MAGN_TARGET_36_DB 0b00000100 // 2 0 36 dB
+
357 #define CC1101_MAGN_TARGET_38_DB 0b00000101 // 2 0 38 dB
+
358 #define CC1101_MAGN_TARGET_40_DB 0b00000110 // 2 0 40 dB
+
359 #define CC1101_MAGN_TARGET_42_DB 0b00000111 // 2 0 42 dB
+
360 
+
361 // CC1101_REG_AGCCTRL1
+
362 #define CC1101_AGC_LNA_PRIORITY_LNA2 0b00000000 // 6 6 LNA priority setting: LNA2 first
+
363 #define CC1101_AGC_LNA_PRIORITY_LNA 0b01000000 // 6 6 LNA first (default)
+
364 #define CC1101_CARRIER_SENSE_REL_THR_OFF 0b00000000 // 5 4 RSSI relative change to assert carrier sense: disabled (default)
+
365 #define CC1101_CARRIER_SENSE_REL_THR_6_DB 0b00010000 // 5 4 6 dB
+
366 #define CC1101_CARRIER_SENSE_REL_THR_10_DB 0b00100000 // 5 4 10 dB
+
367 #define CC1101_CARRIER_SENSE_REL_THR_14_DB 0b00110000 // 5 4 14 dB
+
368 #define CC1101_CARRIER_SENSE_ABS_THR 0x00 // 3 0 RSSI threshold to assert carrier sense in 2s compliment, Thr = MAGN_TARGET + CARRIER_SENSE_ABS_TH [dB]
+
369 
+
370 // CC1101_REG_AGCCTRL0
+
371 #define CC1101_HYST_LEVEL_NONE 0b00000000 // 7 6 AGC hysteresis level: none
+
372 #define CC1101_HYST_LEVEL_LOW 0b01000000 // 7 6 low
+
373 #define CC1101_HYST_LEVEL_MEDIUM 0b10000000 // 7 6 medium (default)
+
374 #define CC1101_HYST_LEVEL_HIGH 0b11000000 // 7 6 high
+
375 #define CC1101_WAIT_TIME_8_SAMPLES 0b00000000 // 5 4 AGC wait time: 8 samples
+
376 #define CC1101_WAIT_TIME_16_SAMPLES 0b00010000 // 5 4 16 samples (default)
+
377 #define CC1101_WAIT_TIME_24_SAMPLES 0b00100000 // 5 4 24 samples
+
378 #define CC1101_WAIT_TIME_32_SAMPLES 0b00110000 // 5 4 32 samples
+
379 #define CC1101_AGC_FREEZE_NEVER 0b00000000 // 3 2 freeze AGC gain: never (default)
+
380 #define CC1101_AGC_FREEZE_SYNC_WORD 0b00000100 // 3 2 when sync word is found
+
381 #define CC1101_AGC_FREEZE_MANUAL_A 0b00001000 // 3 2 manually freeze analog control
+
382 #define CC1101_AGC_FREEZE_MANUAL_AD 0b00001100 // 3 2 manually freeze analog and digital control
+
383 #define CC1101_FILTER_LENGTH_8 0b00000000 // 1 0 averaging length for channel filter: 8 samples
+
384 #define CC1101_FILTER_LENGTH_16 0b00000001 // 1 0 16 samples (default)
+
385 #define CC1101_FILTER_LENGTH_32 0b00000010 // 1 0 32 samples
+
386 #define CC1101_FILTER_LENGTH_64 0b00000011 // 1 0 64 samples
+
387 #define CC1101_ASK_OOK_BOUNDARY_4_DB 0b00000000 // 1 0 ASK/OOK decision boundary: 4 dB
+
388 #define CC1101_ASK_OOK_BOUNDARY_8_DB 0b00000001 // 1 0 8 dB (default)
+
389 #define CC1101_ASK_OOK_BOUNDARY_12_DB 0b00000010 // 1 0 12 dB
+
390 #define CC1101_ASK_OOK_BOUNDARY_16_DB 0b00000011 // 1 0 16 dB
+
391 
+
392 // CC1101_REG_WOREVT1 + REG_WOREVT0
+
393 #define CC1101_EVENT0_TIMEOUT_MSB 0x87 // 7 0 EVENT0 timeout: t_event0 = (750 / f(XOSC)) * EVENT0_TIMEOUT * 2^(5 * WOR_RES) [s]
+
394 #define CC1101_EVENT0_TIMEOUT_LSB 0x6B // 7 0 default value for 26 MHz crystal: 1.0 s
+
395 
+
396 // CC1101_REG_WORCTRL
+
397 #define CC1101_RC_POWER_UP 0b00000000 // 7 7 power up RC oscillator
+
398 #define CC1101_RC_POWER_DOWN 0b10000000 // 7 7 power down RC oscillator
+
399 #define CC1101_EVENT1_TIMEOUT_4 0b00000000 // 6 4 EVENT1 timeout: 4 RC periods
+
400 #define CC1101_EVENT1_TIMEOUT_6 0b00010000 // 6 4 6 RC periods
+
401 #define CC1101_EVENT1_TIMEOUT_8 0b00100000 // 6 4 8 RC periods
+
402 #define CC1101_EVENT1_TIMEOUT_12 0b00110000 // 6 4 12 RC periods
+
403 #define CC1101_EVENT1_TIMEOUT_16 0b01000000 // 6 4 16 RC periods
+
404 #define CC1101_EVENT1_TIMEOUT_24 0b01010000 // 6 4 24 RC periods
+
405 #define CC1101_EVENT1_TIMEOUT_32 0b01100000 // 6 4 32 RC periods
+
406 #define CC1101_EVENT1_TIMEOUT_48 0b01110000 // 6 4 48 RC periods (default)
+
407 #define CC1101_RC_CAL_OFF 0b00000000 // 3 3 disable RC oscillator calibration
+
408 #define CC1101_RC_CAL_ON 0b00001000 // 3 3 enable RC oscillator calibration (default)
+
409 #define CC1101_WOR_RES_1 0b00000000 // 1 0 EVENT0 resolution: 1 period (default)
+
410 #define CC1101_WOR_RES_2_5 0b00000001 // 1 0 2^5 periods
+
411 #define CC1101_WOR_RES_2_10 0b00000010 // 1 0 2^10 periods
+
412 #define CC1101_WOR_RES_2_15 0b00000011 // 1 0 2^15 periods
+
413 
+
414 // CC1101_REG_FREND1
+
415 #define CC1101_LNA_CURRENT 0x01 // 7 6 front-end LNA PTAT current output adjustment
+
416 #define CC1101_LNA2MIX_CURRENT 0x01 // 5 4 front-end PTAT output adjustment
+
417 #define CC1101_LODIV_BUF_CURRENT_RX 0x01 // 3 2 Rx LO buffer current adjustment
+
418 #define CC1101_MIX_CURRENT 0x02 // 1 0 mixer current adjustment
+
419 
+
420 // CC1101_REG_FREND0
+
421 #define CC1101_LODIV_BUF_CURRENT_TX 0x01 // 5 4 Tx LO buffer current adjustment
+
422 #define CC1101_PA_POWER 0x00 // 2 0 set power amplifier power according to PATABLE
+
423 
+
424 // CC1101_REG_FSCAL3
+
425 #define CC1101_CHP_CURR_CAL_OFF 0b00000000 // 5 4 disable charge pump calibration
+
426 #define CC1101_CHP_CURR_CAL_ON 0b00100000 // 5 4 enable charge pump calibration (default)
+
427 #define CC1101_FSCAL3 0x09 // 3 0 charge pump output current: I_out = I_0 * 2^(FSCAL3/4) [A]
+
428 
+
429 // CC1101_REG_FSCAL2
+
430 #define CC1101_VCO_CORE_LOW 0b00000000 // 5 5 VCO: low (default)
+
431 #define CC1101_VCO_CORE_HIGH 0b00100000 // 5 5 high
+
432 #define CC1101_FSCAL2 0x0A // 4 0 VCO current result/override
+
433 
+
434 // CC1101_REG_FSCAL1
+
435 #define CC1101_FSCAL1 0x20 // 5 0 capacitor array setting for coarse VCO tuning
+
436 
+
437 // CC1101_REG_FSCAL0
+
438 #define CC1101_FSCAL0 0x0D // 6 0 frequency synthesizer calibration setting
+
439 
+
440 // CC1101_REG_RCCTRL1
+
441 #define CC1101_RCCTRL1 0x41 // 6 0 RC oscillator configuration
+
442 
+
443 // CC1101_REG_RCCTRL0
+
444 #define CC1101_RCCTRL0 0x00 // 6 0 RC oscillator configuration
+
445 
+
446 // CC1101_REG_PTEST
+
447 #define CC1101_TEMP_SENS_IDLE_OFF 0x7F // 7 0 temperature sensor will not be available in idle mode (default)
+
448 #define CC1101_TEMP_SENS_IDLE_ON 0xBF // 7 0 temperature sensor will be available in idle mode
+
449 
+
450 // CC1101_REG_TEST0
+
451 #define CC1101_VCO_SEL_CAL_OFF 0b00000000 // 1 1 disable VCO selection calibration stage
+
452 #define CC1101_VCO_SEL_CAL_ON 0b00000010 // 1 1 enable VCO selection calibration stage
+
453 
+
454 // CC1101_REG_PARTNUM
+
455 #define CC1101_PARTNUM 0x00
+
456 
+
457 // CC1101_REG_VERSION
+
458 #define CC1101_VERSION_CURRENT 0x14
+
459 #define CC1101_VERSION_LEGACY 0x04
+
460 
+
461 // CC1101_REG_MARCSTATE
+
462 #define CC1101_MARC_STATE_SLEEP 0x00 // 4 0 main radio control state: sleep
+
463 #define CC1101_MARC_STATE_IDLE 0x01 // 4 0 idle
+
464 #define CC1101_MARC_STATE_XOFF 0x02 // 4 0 XOFF
+
465 #define CC1101_MARC_STATE_VCOON_MC 0x03 // 4 0 VCOON_MC
+
466 #define CC1101_MARC_STATE_REGON_MC 0x04 // 4 0 REGON_MC
+
467 #define CC1101_MARC_STATE_MANCAL 0x05 // 4 0 MANCAL
+
468 #define CC1101_MARC_STATE_VCOON 0x06 // 4 0 VCOON
+
469 #define CC1101_MARC_STATE_REGON 0x07 // 4 0 REGON
+
470 #define CC1101_MARC_STATE_STARTCAL 0x08 // 4 0 STARTCAL
+
471 #define CC1101_MARC_STATE_BWBOOST 0x09 // 4 0 BWBOOST
+
472 #define CC1101_MARC_STATE_FS_LOCK 0x0A // 4 0 FS_LOCK
+
473 #define CC1101_MARC_STATE_IFADCON 0x0B // 4 0 IFADCON
+
474 #define CC1101_MARC_STATE_ENDCAL 0x0C // 4 0 ENDCAL
+
475 #define CC1101_MARC_STATE_RX 0x0D // 4 0 RX
+
476 #define CC1101_MARC_STATE_RX_END 0x0E // 4 0 RX_END
+
477 #define CC1101_MARC_STATE_RX_RST 0x0F // 4 0 RX_RST
+
478 #define CC1101_MARC_STATE_TXRX_SWITCH 0x10 // 4 0 TXRX_SWITCH
+
479 #define CC1101_MARC_STATE_RXFIFO_OVERFLOW 0x11 // 4 0 RXFIFO_OVERFLOW
+
480 #define CC1101_MARC_STATE_FSTXON 0x12 // 4 0 FSTXON
+
481 #define CC1101_MARC_STATE_TX 0x13 // 4 0 TX
+
482 #define CC1101_MARC_STATE_TX_END 0x14 // 4 0 TX_END
+
483 #define CC1101_MARC_STATE_RXTX_SWITCH 0x15 // 4 0 RXTX_SWITCH
+
484 #define CC1101_MARC_STATE_TXFIFO_UNDERFLOW 0x16 // 4 0 TXFIFO_UNDERFLOW
+
485 
+
486 // CC1101_REG_WORTIME1 + REG_WORTIME0
+
487 #define CC1101_WORTIME_MSB 0x00 // 7 0 WOR timer value
+
488 #define CC1101_WORTIME_LSB 0x00 // 7 0
+
489 
+
490 // CC1101_REG_PKTSTATUS
+
491 #define CC1101_CRC_OK 0b10000000 // 7 7 CRC check passed
+
492 #define CC1101_CRC_ERROR 0b00000000 // 7 7 CRC check failed
+
493 #define CC1101_CS 0b01000000 // 6 6 carrier sense
+
494 #define CC1101_PQT_REACHED 0b00100000 // 5 5 preamble quality reached
+
495 #define CC1101_CCA 0b00010000 // 4 4 channel clear
+
496 #define CC1101_SFD 0b00001000 // 3 3 start of frame delimiter - sync word received
+
497 #define CC1101_GDO2_ACTIVE 0b00000100 // 2 2 GDO2 is active/asserted
+
498 #define CC1101_GDO0_ACTIVE 0b00000001 // 0 0 GDO0 is active/asserted
+
499 
+
505 class CC1101: public PhysicalLayer {
+
506  public:
+
507  // introduce PhysicalLayer overloads
+ + + + +
512 
+
518  CC1101(Module* module);
+
519 
+
520  // basic methods
+
521 
+
539  int16_t begin(float freq = 434.0, float br = 48.0, float freqDev = 48.0, float rxBw = 135.0, int8_t power = 10, uint8_t preambleLength = 16);
+
540 
+
553  int16_t transmit(uint8_t* data, size_t len, uint8_t addr = 0) override;
+
554 
+
565  int16_t receive(uint8_t* data, size_t len) override;
+
566 
+
572  int16_t standby() override;
+
573 
+
581  int16_t transmitDirect(uint32_t frf = 0) override;
+
582 
+
588  int16_t receiveDirect() override;
+
589 
+
593  int16_t packetMode();
+
594 
+
595  // interrupt methods
+
596 
+
604  void setGdo0Action(void (*func)(void), RADIOLIB_INTERRUPT_STATUS dir = FALLING);
+
605 
+
609  void clearGdo0Action();
+
610 
+
618  void setGdo2Action(void (*func)(void), RADIOLIB_INTERRUPT_STATUS dir = FALLING);
+
619 
+
623  void clearGdo2Action();
+
624 
+
637  int16_t startTransmit(uint8_t* data, size_t len, uint8_t addr = 0) override;
+
638 
+
644  int16_t startReceive();
+
645 
+
655  int16_t readData(uint8_t* data, size_t len) override;
+
656 
+
657  // configuration methods
+
658 
+
666  int16_t setFrequency(float freq);
+
667 
+
675  int16_t setBitRate(float br);
+
676 
+
684  int16_t setRxBandwidth(float rxBw);
+
685 
+
693  int16_t setFrequencyDeviation(float freqDev) override;
+
694 
+
702  int16_t setOutputPower(int8_t power);
+
703 
+
717  int16_t setSyncWord(uint8_t syncH, uint8_t syncL, uint8_t maxErrBits = 0, bool requireCarrierSense = false);
+
718 
+
732  int16_t setSyncWord(uint8_t* syncWord, uint8_t len, uint8_t maxErrBits = 0, bool requireCarrierSense = false);
+
733 
+
741  int16_t setPreambleLength(uint8_t preambleLength);
+
742 
+
752  int16_t setNodeAddress(uint8_t nodeAddr, uint8_t numBroadcastAddrs = 0);
+
753 
+
759  int16_t disableAddressFiltering();
+
760 
+
768  int16_t setOOK(bool enableOOK);
+
769 
+
775  float getRSSI() const;
+
776 
+
782  uint8_t getLQI() const;
+
783 
+
791  size_t getPacketLength(bool update = true) override;
+
792 
+
800  int16_t fixedPacketLengthMode(uint8_t len = CC1101_MAX_PACKET_LENGTH);
+
801 
+
809  int16_t variablePacketLengthMode(uint8_t maxLen = CC1101_MAX_PACKET_LENGTH);
+
810 
+
820  int16_t enableSyncWordFiltering(uint8_t maxErrBits = 0, bool requireCarrierSense = false);
+
821 
+
829  int16_t disableSyncWordFiltering(bool requireCarrierSense = false);
+
830 
+
838  int16_t setCrcFiltering(bool crcOn = true);
+
839 
+
847  int16_t setPromiscuousMode(bool promiscuous = true);
+
848 
+
857  int16_t setDataShaping(uint8_t sh) override;
+
858 
+
866  int16_t setEncoding(uint8_t encoding) override;
+
867 
+
876  void setRfSwitchPins(RADIOLIB_PIN_TYPE rxEn, RADIOLIB_PIN_TYPE txEn);
+
877 
+
883  uint8_t random();
+
884 
+
890  int16_t getChipVersion();
+
891 
+
892 #ifndef RADIOLIB_GODMODE
+
893  private:
+
894 #endif
+
895  Module* _mod;
+
896 
+
897  float _freq = 0;
+
898  float _br = 0;
+
899  uint8_t _rawRSSI = 0;
+
900  uint8_t _rawLQI = 0;
+
901  uint8_t _modulation = CC1101_MOD_FORMAT_2_FSK;
+
902 
+
903  size_t _packetLength = 0;
+
904  bool _packetLengthQueried = false;
+
905  uint8_t _packetLengthConfig = CC1101_LENGTH_CONFIG_VARIABLE;
+
906 
+
907  bool _promiscuous = false;
+
908  bool _crcOn = true;
+
909 
+
910  uint8_t _syncWordLength = 2;
+
911  int8_t _power = 0;
+
912 
+
913  int16_t config();
+
914  int16_t directMode();
+
915  static void getExpMant(float target, uint16_t mantOffset, uint8_t divExp, uint8_t expMax, uint8_t& exp, uint8_t& mant);
+
916  int16_t setPacketMode(uint8_t mode, uint8_t len);
+
917 
+
918  // SPI read overrides to set bit for burst write and status registers access
+
919  int16_t SPIgetRegValue(uint8_t reg, uint8_t msb = 7, uint8_t lsb = 0);
+
920  int16_t SPIsetRegValue(uint8_t reg, uint8_t value, uint8_t msb = 7, uint8_t lsb = 0, uint8_t checkInterval = 2);
+
921  void SPIreadRegisterBurst(uint8_t reg, uint8_t numBytes, uint8_t* inBytes);
+
922  uint8_t SPIreadRegister(uint8_t reg);
+
923  void SPIwriteRegisterBurst(uint8_t reg, uint8_t* data, size_t len);
+
924  void SPIwriteRegister(uint8_t reg, uint8_t data);
+
925 
+
926  void SPIsendCommand(uint8_t cmd);
+
927 };
+
928 
+
929 #endif
+
int16_t transmit(__FlashStringHelper *fstr, uint8_t addr=0)
Arduino Flash String transmit method.
Definition: PhysicalLayer.cpp:8
+
int16_t disableSyncWordFiltering(bool requireCarrierSense=false)
Disable preamble and sync word filtering and generation.
Definition: CC1101.cpp:681
+
void setGdo0Action(void(*func)(void), RADIOLIB_INTERRUPT_STATUS dir=FALLING)
Sets interrupt service routine to call when GDO0 activates.
Definition: CC1101.cpp:226
+
uint8_t random()
Get one truly random byte from RSSI noise.
Definition: CC1101.cpp:768
+
int16_t startReceive()
Interrupt-driven receive method. GDO0 will be activated when full packet is received.
Definition: CC1101.cpp:288
+
size_t getPacketLength(bool update=true) override
Query modem for the packet length of received payload.
Definition: CC1101.cpp:646
+
uint8_t getLQI() const
Gets LQI (Link Quality Indicator) of the last received packet.
Definition: CC1101.cpp:642
+
void clearGdo0Action()
Clears interrupt service routine to call when GDO0 activates.
Definition: CC1101.cpp:230
+
int16_t startTransmit(uint8_t *data, size_t len, uint8_t addr=0) override
Interrupt-driven binary transmit method. Overloads for string-based transmissions are implemented in ...
Definition: CC1101.cpp:249
+
int16_t variablePacketLengthMode(uint8_t maxLen=CC1101_MAX_PACKET_LENGTH)
Set modem in variable packet length mode.
Definition: CC1101.cpp:664
+
int16_t transmit(uint8_t *data, size_t len, uint8_t addr=0) override
Blocking binary transmit method. Overloads for string-based transmissions are implemented in Physical...
Definition: CC1101.cpp:98
+
int16_t setOutputPower(int8_t power)
Sets output power. Allowed values are -30, -20, -15, -10, 0, 5, 7 or 10 dBm.
Definition: CC1101.cpp:437
+
int16_t setEncoding(uint8_t encoding) override
Sets transmission encoding. Allowed values are RADIOLIB_ENCODING_NRZ and RADIOLIB_ENCODING_WHITENING.
Definition: CC1101.cpp:740
+
int16_t readData(String &str, size_t len=0)
Reads data that was received after calling startReceive method.
Definition: PhysicalLayer.cpp:57
+
int16_t readData(uint8_t *data, size_t len) override
Reads data received after calling startReceive method.
Definition: CC1101.cpp:308
+
void setGdo2Action(void(*func)(void), RADIOLIB_INTERRUPT_STATUS dir=FALLING)
Sets interrupt service routine to call when GDO2 activates.
Definition: CC1101.cpp:234
+
void clearGdo2Action()
Clears interrupt service routine to call when GDO0 activates.
Definition: CC1101.cpp:242
+
int16_t setSyncWord(uint8_t syncH, uint8_t syncL, uint8_t maxErrBits=0, bool requireCarrierSense=false)
Sets 16-bit sync word as a two byte value.
Definition: CC1101.cpp:538
+
int16_t getChipVersion()
Read version SPI register. Should return CC1101_VERSION_LEGACY (0x04) or CC1101_VERSION_CURRENT (0x14...
Definition: CC1101.cpp:788
+
float getRSSI() const
Gets RSSI (Recorded Signal Strength Indicator) of the last received packet.
Definition: CC1101.cpp:632
+
int16_t setOOK(bool enableOOK)
Enables/disables OOK modulation instead of FSK.
Definition: CC1101.cpp:601
+
int16_t fixedPacketLengthMode(uint8_t len=CC1101_MAX_PACKET_LENGTH)
Set modem in fixed packet length mode.
Definition: CC1101.cpp:660
+
int16_t setFrequency(float freq)
Sets carrier frequency. Allowed values are in bands 300.0 to 348.0 MHz, 387.0 to 464....
Definition: CC1101.cpp:348
+
int16_t disableAddressFiltering()
Disables address filtering. Calling this method will also erase previously set addresses.
Definition: CC1101.cpp:591
+
int16_t setNodeAddress(uint8_t nodeAddr, uint8_t numBroadcastAddrs=0)
Sets node and broadcast addresses. Calling this method will also enable address filtering.
Definition: CC1101.cpp:580
+
int16_t setFrequencyDeviation(float freqDev) override
Sets frequency deviation. Allowed values range from 1.587 to 380.8 kHz.
Definition: CC1101.cpp:414
+
Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN....
Definition: PhysicalLayer.h:13
+
int16_t standby() override
Sets the module to standby mode.
Definition: CC1101.cpp:175
+
int16_t receive(String &str, size_t len=0)
Arduino String receive method.
Definition: PhysicalLayer.cpp:98
+
int16_t setDataShaping(uint8_t sh) override
Sets Gaussian filter bandwidth-time product that will be used for data shaping. Allowed value is RADI...
Definition: CC1101.cpp:721
+
int16_t setRxBandwidth(float rxBw)
Sets receiver bandwidth. Allowed values range from 58.0 to 812.0 kHz.
Definition: CC1101.cpp:394
+
int16_t setBitRate(float br)
Sets bit rate. Allowed values range from 0.025 to 600.0 kbps.
Definition: CC1101.cpp:374
+
int16_t packetMode()
Stops direct mode. It is required to call this method to switch from direct transmissions to packet-b...
Definition: CC1101.cpp:219
+
int16_t begin(float freq=434.0, float br=48.0, float freqDev=48.0, float rxBw=135.0, int8_t power=10, uint8_t preambleLength=16)
Initialization method.
Definition: CC1101.cpp:8
+
int16_t setPreambleLength(uint8_t preambleLength)
Sets preamble length.
Definition: CC1101.cpp:543
+
Implements all common low-level SPI/UART/I2C methods to control the wireless module....
Definition: Module.h:17
+
int16_t receive(uint8_t *data, size_t len) override
Blocking binary receive method. Overloads for string-based transmissions are implemented in PhysicalL...
Definition: CC1101.cpp:139
+
int16_t receiveDirect() override
Starts direct mode reception.
Definition: CC1101.cpp:206
+
int16_t enableSyncWordFiltering(uint8_t maxErrBits=0, bool requireCarrierSense=false)
Enable sync word filtering and generation.
Definition: CC1101.cpp:668
+
Control class for CC1101 module.
Definition: CC1101.h:505
+
void setRfSwitchPins(RADIOLIB_PIN_TYPE rxEn, RADIOLIB_PIN_TYPE txEn)
Some modules contain external RF switch controlled by two pins. This function gives RadioLib control ...
Definition: CC1101.cpp:764
+
int16_t setPromiscuousMode(bool promiscuous=true)
Set modem in "sniff" mode: no packet filtering (e.g., no preamble, sync word, address,...
Definition: CC1101.cpp:695
+
int16_t setCrcFiltering(bool crcOn=true)
Enable CRC filtering and generation.
Definition: CC1101.cpp:685
+
int16_t transmitDirect(uint32_t frf=0) override
Starts direct mode transmission.
Definition: CC1101.cpp:184
+
CC1101(Module *module)
Default constructor.
Definition: CC1101.cpp:4
+
int16_t startTransmit(String &str, uint8_t addr=0)
Interrupt-driven Arduino String transmit method. Unlike the standard transmit method,...
Definition: PhysicalLayer.cpp:49
diff --git a/_e_s_p8266_8h_source.html b/_e_s_p8266_8h_source.html index e0b0fcd6..4e4a6393 100644 --- a/_e_s_p8266_8h_source.html +++ b/_e_s_p8266_8h_source.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/modules/ESP8266/ESP8266.h Source File @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -84,27 +86,62 @@ $(document).ready(function(){initNavTree('_e_s_p8266_8h_source.html','');});
ESP8266.h
-
1 #if !defined(_RADIOLIB_ESP8266_H) && !defined(RADIOLIB_EXCLUDE_ESP8266) && !defined(ESP8266)
2 #define _RADIOLIB_ESP8266_H
3 
4 #include "../../TypeDef.h"
5 #include "../../Module.h"
6 
7 #include "../../protocols/TransportLayer/TransportLayer.h"
8 
14 class ESP8266: public TransportLayer {
15  public:
21  ESP8266(Module* module);
22 
23  // basic methods
24 
32  int16_t begin(long speed);
33 
39  int16_t reset();
40 
48  int16_t join(const char* ssid, const char* password);
49 
50  // transport layer methods (implementations of purely virtual methods in TransportLayer class)
51  int16_t openTransportConnection(const char* host, const char* protocol, uint16_t port, uint16_t tcpKeepAlive = 0) override;
52  int16_t closeTransportConnection() override;
53  int16_t send(const char* data) override;
54  int16_t send(uint8_t* data, size_t len) override;
55  size_t receive(uint8_t* data, size_t len, uint32_t timeout = 10000) override;
56  size_t getNumBytes(uint32_t timeout = 10000, size_t minBytes = 10) override;
57 
58 #ifndef RADIOLIB_GODMODE
59  private:
60 #endif
61  Module* _mod;
62 };
63 
64 #endif
Provides common interface for protocols that run on modules with Internet connectivity, such as HTTP or MQTT. Because this class is used mainly as interface, all of its virtual members must be implemented in the module class.
Definition: TransportLayer.h:12
-
int16_t send(const char *data) override
Send string-based data.
Definition: ESP8266.cpp:133
-
ESP8266(Module *module)
Default constructor.
Definition: ESP8266.cpp:4
-
size_t receive(uint8_t *data, size_t len, uint32_t timeout=10000) override
Receive data.
Definition: ESP8266.cpp:193
-
int16_t openTransportConnection(const char *host, const char *protocol, uint16_t port, uint16_t tcpKeepAlive=0) override
Open transport layer connection.
Definition: ESP8266.cpp:85
-
size_t getNumBytes(uint32_t timeout=10000, size_t minBytes=10) override
Get number of received bytes.
Definition: ESP8266.cpp:210
-
Implements all common low-level SPI/UART/I2C methods to control the wireless module. Every module class contains one private instance of this class.
Definition: Module.h:17
-
int16_t reset()
Resets module using AT command.
Definition: ESP8266.cpp:26
-
int16_t begin(long speed)
Initialization method.
Definition: ESP8266.cpp:8
-
int16_t closeTransportConnection() override
Close transport layer connection.
Definition: ESP8266.cpp:125
-
int16_t join(const char *ssid, const char *password)
Joins access point.
Definition: ESP8266.cpp:48
-
Control class for ESP8266 module. Implements TransportLayer methods.
Definition: ESP8266.h:14
+
1 #if !defined(_RADIOLIB_ESP8266_H) && !defined(RADIOLIB_EXCLUDE_ESP8266) && !defined(ESP8266)
+
2 #define _RADIOLIB_ESP8266_H
+
3 
+
4 #include "../../TypeDef.h"
+
5 #include "../../Module.h"
+
6 
+
7 #include "../../protocols/TransportLayer/TransportLayer.h"
+
8 
+
14 class ESP8266: public TransportLayer {
+
15  public:
+
21  ESP8266(Module* module);
+
22 
+
23  // basic methods
+
24 
+
32  int16_t begin(long speed);
+
33 
+
39  int16_t reset();
+
40 
+
48  int16_t join(const char* ssid, const char* password);
+
49 
+
50  // transport layer methods (implementations of purely virtual methods in TransportLayer class)
+
51  int16_t openTransportConnection(const char* host, const char* protocol, uint16_t port, uint16_t tcpKeepAlive = 0) override;
+
52  int16_t closeTransportConnection() override;
+
53  int16_t send(const char* data) override;
+
54  int16_t send(uint8_t* data, size_t len) override;
+
55  size_t receive(uint8_t* data, size_t len, uint32_t timeout = 10000) override;
+
56  size_t getNumBytes(uint32_t timeout = 10000, size_t minBytes = 10) override;
+
57 
+
58 #ifndef RADIOLIB_GODMODE
+
59  private:
+
60 #endif
+
61  Module* _mod;
+
62 };
+
63 
+
64 #endif
+
Control class for ESP8266 module. Implements TransportLayer methods.
Definition: ESP8266.h:14
+
int16_t begin(long speed)
Initialization method.
Definition: ESP8266.cpp:8
+
size_t receive(uint8_t *data, size_t len, uint32_t timeout=10000) override
Receive data.
Definition: ESP8266.cpp:193
+
int16_t join(const char *ssid, const char *password)
Joins access point.
Definition: ESP8266.cpp:48
+
int16_t closeTransportConnection() override
Close transport layer connection.
Definition: ESP8266.cpp:125
+
size_t getNumBytes(uint32_t timeout=10000, size_t minBytes=10) override
Get number of received bytes.
Definition: ESP8266.cpp:210
+
int16_t reset()
Resets module using AT command.
Definition: ESP8266.cpp:26
+
ESP8266(Module *module)
Default constructor.
Definition: ESP8266.cpp:4
+
int16_t send(const char *data) override
Send string-based data.
Definition: ESP8266.cpp:133
+
int16_t openTransportConnection(const char *host, const char *protocol, uint16_t port, uint16_t tcpKeepAlive=0) override
Open transport layer connection.
Definition: ESP8266.cpp:85
+
Implements all common low-level SPI/UART/I2C methods to control the wireless module....
Definition: Module.h:17
+
Provides common interface for protocols that run on modules with Internet connectivity,...
Definition: TransportLayer.h:12
diff --git a/_h_c05_8h_source.html b/_h_c05_8h_source.html index cda37e15..c6826d95 100644 --- a/_h_c05_8h_source.html +++ b/_h_c05_8h_source.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/modules/HC05/HC05.h Source File @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -84,20 +86,33 @@ $(document).ready(function(){initNavTree('_h_c05_8h_source.html','');});
HC05.h
-
1 #if !defined(_RADIOLIB_HC05_H) && !defined(RADIOLIB_EXCLUDE_HC05)
2 #define _RADIOLIB_HC05_H
3 
4 #include "../../ISerial.h"
5 
12 class HC05: public ISerial {
13  public:
19  HC05(Module* mod);
20 
26  void begin(long speed);
27 };
28 
29 #endif
HC05(Module *mod)
Default constructor.
Definition: HC05.cpp:4
-
void begin(long speed)
Initialization method.
Definition: HC05.cpp:8
-
Implements all common low-level SPI/UART/I2C methods to control the wireless module. Every module class contains one private instance of this class.
Definition: Module.h:17
-
Interface class for Arduino Serial. Only calls the appropriate methods for the active UART interface...
Definition: ISerial.h:11
-
Control class for HC05 module. Most methods supported by this module are implemented in ISerial inter...
Definition: HC05.h:12
+
1 #if !defined(_RADIOLIB_HC05_H) && !defined(RADIOLIB_EXCLUDE_HC05)
+
2 #define _RADIOLIB_HC05_H
+
3 
+
4 #include "../../ISerial.h"
+
5 
+
12 class HC05: public ISerial {
+
13  public:
+
19  HC05(Module* mod);
+
20 
+
26  void begin(long speed);
+
27 };
+
28 
+
29 #endif
+
void begin(long speed)
Initialization method.
Definition: HC05.cpp:8
+
Interface class for Arduino Serial. Only calls the appropriate methods for the active UART interface.
Definition: ISerial.h:11
+
Control class for HC05 module. Most methods supported by this module are implemented in ISerial inter...
Definition: HC05.h:12
+
Implements all common low-level SPI/UART/I2C methods to control the wireless module....
Definition: Module.h:17
+
HC05(Module *mod)
Default constructor.
Definition: HC05.cpp:4
diff --git a/_h_t_t_p_8h_source.html b/_h_t_t_p_8h_source.html index dce4613d..11e84912 100644 --- a/_h_t_t_p_8h_source.html +++ b/_h_t_t_p_8h_source.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/protocols/HTTP/HTTP.h Source File @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -84,19 +86,50 @@ $(document).ready(function(){initNavTree('_h_t_t_p_8h_source.html','');});
HTTP.h
-
1 #if !defined(_RADIOLIB_HTTP_H)
2 #define _RADIOLIB_HTTP_H
3 
4 #include "../../TypeDef.h"
5 
6 #if !defined(RADIOLIB_EXCLUDE_HTTP)
7 
8 #include "../TransportLayer/TransportLayer.h"
9 
15 class HTTPClient {
16  public:
24  explicit HTTPClient(TransportLayer* tl, uint16_t port = 80);
25 
35  int16_t get(String& url, String& response);
36 
46  int16_t get(const char* url, String& response);
47 
61  int16_t post(const char* url, const char* content, String& response, const char* contentType = "text/plain");
62 
63 #ifndef RADIOLIB_GODMODE
64  private:
65 #endif
66  TransportLayer* _tl;
67 
68  uint16_t _port;
69 };
70 
71 #endif
72 
73 #endif
Provides common interface for protocols that run on modules with Internet connectivity, such as HTTP or MQTT. Because this class is used mainly as interface, all of its virtual members must be implemented in the module class.
Definition: TransportLayer.h:12
-
int16_t post(const char *url, const char *content, String &response, const char *contentType="text/plain")
Sends HTTP POST request.
Definition: HTTP.cpp:112
-
HTTPClient(TransportLayer *tl, uint16_t port=80)
Default constructor.
Definition: HTTP.cpp:4
-
Client for simple HTTP communication.
Definition: HTTP.h:15
+
1 #if !defined(_RADIOLIB_HTTP_H)
+
2 #define _RADIOLIB_HTTP_H
+
3 
+
4 #include "../../TypeDef.h"
+
5 
+
6 #if !defined(RADIOLIB_EXCLUDE_HTTP)
+
7 
+
8 #include "../TransportLayer/TransportLayer.h"
+
9 
+
15 class HTTPClient {
+
16  public:
+
24  explicit HTTPClient(TransportLayer* tl, uint16_t port = 80);
+
25 
+
35  int16_t get(String& url, String& response);
+
36 
+
46  int16_t get(const char* url, String& response);
+
47 
+
61  int16_t post(const char* url, const char* content, String& response, const char* contentType = "text/plain");
+
62 
+
63 #ifndef RADIOLIB_GODMODE
+
64  private:
+
65 #endif
+
66  TransportLayer* _tl;
+
67 
+
68  uint16_t _port;
+
69 };
+
70 
+
71 #endif
+
72 
+
73 #endif
+
HTTPClient(TransportLayer *tl, uint16_t port=80)
Default constructor.
Definition: HTTP.cpp:4
+
int16_t get(String &url, String &response)
Sends HTTP GET request.
Definition: HTTP.cpp:9
+
Client for simple HTTP communication.
Definition: HTTP.h:15
+
int16_t post(const char *url, const char *content, String &response, const char *contentType="text/plain")
Sends HTTP POST request.
Definition: HTTP.cpp:112
+
Provides common interface for protocols that run on modules with Internet connectivity,...
Definition: TransportLayer.h:12
diff --git a/_hellschreiber_8h_source.html b/_hellschreiber_8h_source.html index d921968d..58301b08 100644 --- a/_hellschreiber_8h_source.html +++ b/_hellschreiber_8h_source.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/protocols/Hellschreiber/Hellschreiber.h Source File @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -84,21 +86,167 @@ $(document).ready(function(){initNavTree('_hellschreiber_8h_source.html','');});
Hellschreiber.h
-
1 #if !defined(_RADIOLIB_HELLSCHREIBER_H)
2 #define _RADIOLIB_HELLSCHREIBER_H
3 
4 #include "../../TypeDef.h"
5 
6 #if !defined(RADIOLIB_EXCLUDE_HELLSCHREIBER)
7 
8 #include "../PhysicalLayer/PhysicalLayer.h"
9 #include "../AFSK/AFSK.h"
10 
11 #define HELL_FONT_WIDTH 7
12 #define HELL_FONT_HEIGHT 7
13 
14 // font definition: characters are stored in rows,
15 // least significant byte of each character is the first row
16 // Hellschreiber use 7x7 characters, but this simplified font uses only 5x5 - the extra bytes aren't stored
17 static const uint8_t HellFont[64][HELL_FONT_WIDTH - 2] RADIOLIB_PROGMEM = {
18  { 0b0000000, 0b0000000, 0b0000000, 0b0000000, 0b0000000 }, // space
19  { 0b0001000, 0b0001000, 0b0001000, 0b0000000, 0b0001000 }, // !
20  { 0b0010100, 0b0010100, 0b0000000, 0b0000000, 0b0000000 }, // "
21  { 0b0010100, 0b0111110, 0b0010100, 0b0111110, 0b0010100 }, // #
22  { 0b0111110, 0b0101000, 0b0111110, 0b0001010, 0b0111110 }, // $
23  { 0b0110010, 0b0110100, 0b0001000, 0b0010110, 0b0100110 }, // %
24  { 0b0010000, 0b0101000, 0b0010000, 0b0101000, 0b0110100 }, // &
25  { 0b0001000, 0b0001000, 0b0000000, 0b0000000, 0b0000000 }, // '
26  { 0b0000100, 0b0001000, 0b0001000, 0b0001000, 0b0000100 }, // (
27  { 0b0010000, 0b0001000, 0b0001000, 0b0001000, 0b0010000 }, // )
28  { 0b0010100, 0b0001000, 0b0010100, 0b0000000, 0b0000000 }, // *
29  { 0b0001000, 0b0001000, 0b0111110, 0b0001000, 0b0001000 }, // +
30  { 0b0001000, 0b0010000, 0b0000000, 0b0000000, 0b0000000 }, // ´
31  { 0b0000000, 0b0000000, 0b0111110, 0b0000000, 0b0000000 }, // -
32  { 0b0000000, 0b0000000, 0b0000000, 0b0000000, 0b0001000 }, // .
33  { 0b0000010, 0b0000100, 0b0001000, 0b0010000, 0b0100000 }, // /
34  { 0b0011100, 0b0100110, 0b0101010, 0b0110010, 0b0011100 }, // 0
35  { 0b0011000, 0b0001000, 0b0001000, 0b0001000, 0b0001000 }, // 1
36  { 0b0011000, 0b0100100, 0b0001000, 0b0010000, 0b0111100 }, // 2
37  { 0b0111100, 0b0000100, 0b0011100, 0b0000100, 0b0111100 }, // 3
38  { 0b0100100, 0b0100100, 0b0111100, 0b0000100, 0b0000100 }, // 4
39  { 0b0011100, 0b0100000, 0b0111100, 0b0000100, 0b0111100 }, // 5
40  { 0b0111100, 0b0100000, 0b0111100, 0b0100100, 0b0111100 }, // 6
41  { 0b0111100, 0b0000100, 0b0001000, 0b0010000, 0b0100000 }, // 7
42  { 0b0111100, 0b0100100, 0b0011000, 0b0100100, 0b0111100 }, // 8
43  { 0b0111100, 0b0100100, 0b0111100, 0b0000100, 0b0111100 }, // 9
44  { 0b0000000, 0b0001000, 0b0000000, 0b0000000, 0b0001000 }, // :
45  { 0b0000000, 0b0001000, 0b0000000, 0b0001000, 0b0001000 }, // ;
46  { 0b0000100, 0b0001000, 0b0010000, 0b0001000, 0b0000100 }, // <
47  { 0b0000000, 0b0111110, 0b0000000, 0b0111110, 0b0000000 }, // =
48  { 0b0010000, 0b0001000, 0b0000100, 0b0001000, 0b0010000 }, // >
49  { 0b0011100, 0b0000100, 0b0001000, 0b0000000, 0b0001000 }, // ?
50  { 0b0011100, 0b0100010, 0b0101110, 0b0101010, 0b0001100 }, // @
51  { 0b0111110, 0b0100010, 0b0111110, 0b0100010, 0b0100010 }, // A
52  { 0b0111100, 0b0010010, 0b0011110, 0b0010010, 0b0111100 }, // B
53  { 0b0011110, 0b0110000, 0b0100000, 0b0110000, 0b0011110 }, // C
54  { 0b0111100, 0b0100010, 0b0100010, 0b0100010, 0b0111100 }, // D
55  { 0b0111110, 0b0100000, 0b0111100, 0b0100000, 0b0111110 }, // E
56  { 0b0111110, 0b0100000, 0b0111100, 0b0100000, 0b0100000 }, // F
57  { 0b0111110, 0b0100000, 0b0101110, 0b0100010, 0b0111110 }, // G
58  { 0b0100010, 0b0100010, 0b0111110, 0b0100010, 0b0100010 }, // H
59  { 0b0011100, 0b0001000, 0b0001000, 0b0001000, 0b0011100 }, // I
60  { 0b0111100, 0b0001000, 0b0001000, 0b0101000, 0b0111000 }, // J
61  { 0b0100100, 0b0101000, 0b0110000, 0b0101000, 0b0100100 }, // K
62  { 0b0100000, 0b0100000, 0b0100000, 0b0100000, 0b0111100 }, // L
63  { 0b0100010, 0b0110110, 0b0101010, 0b0100010, 0b0100010 }, // M
64  { 0b0100010, 0b0110010, 0b0101010, 0b0100110, 0b0100010 }, // N
65  { 0b0011100, 0b0100010, 0b0100010, 0b0100010, 0b0011100 }, // O
66  { 0b0111110, 0b0100010, 0b0111110, 0b0100000, 0b0100000 }, // P
67  { 0b0111110, 0b0100010, 0b0100010, 0b0100110, 0b0111110 }, // Q
68  { 0b0111110, 0b0100010, 0b0111110, 0b0100100, 0b0100010 }, // R
69  { 0b0111110, 0b0100000, 0b0111110, 0b0000010, 0b0111110 }, // S
70  { 0b0111110, 0b0001000, 0b0001000, 0b0001000, 0b0001000 }, // T
71  { 0b0100010, 0b0100010, 0b0100010, 0b0100010, 0b0111110 }, // U
72  { 0b0100010, 0b0100010, 0b0010100, 0b0010100, 0b0001000 }, // V
73  { 0b0100010, 0b0100010, 0b0101010, 0b0110110, 0b0100010 }, // W
74  { 0b0100010, 0b0010100, 0b0001000, 0b0010100, 0b0100010 }, // X
75  { 0b0100010, 0b0010100, 0b0001000, 0b0001000, 0b0001000 }, // Y
76  { 0b0111110, 0b0000100, 0b0001000, 0b0010000, 0b0111110 }, // Z
77  { 0b0001100, 0b0001000, 0b0001000, 0b0001000, 0b0001100 }, // [
78  { 0b0100000, 0b0010000, 0b0001000, 0b0000100, 0b0000010 }, // backslash
79  { 0b0011000, 0b0001000, 0b0001000, 0b0001000, 0b0011000 }, // ]
80  { 0b0001000, 0b0010100, 0b0000000, 0b0000000, 0b0000000 }, // ^
81  { 0b0000000, 0b0000000, 0b0000000, 0b0000000, 0b0111110 } // _
82 };
83 
89 class HellClient {
90  public:
96  explicit HellClient(PhysicalLayer* phy);
97 
98  #if !defined(RADIOLIB_EXCLUDE_AFSK)
99 
104  explicit HellClient(AFSKClient* audio);
105  #endif
106 
107  // basic methods
108 
116  int16_t begin(float base, float rate = 122.5);
117 
123  size_t printGlyph(uint8_t* buff);
124 
125  size_t write(const char* str);
126  size_t write(uint8_t* buff, size_t len);
127  size_t write(uint8_t b);
128 
129  size_t print(__FlashStringHelper*);
130  size_t print(const String &);
131  size_t print(const char[]);
132  size_t print(char);
133  size_t print(unsigned char, int = DEC);
134  size_t print(int, int = DEC);
135  size_t print(unsigned int, int = DEC);
136  size_t print(long, int = DEC);
137  size_t print(unsigned long, int = DEC);
138  size_t print(double, int = 2);
139 
140  size_t println(void);
141  size_t println(__FlashStringHelper*);
142  size_t println(const String &);
143  size_t println(const char[]);
144  size_t println(char);
145  size_t println(unsigned char, int = DEC);
146  size_t println(int, int = DEC);
147  size_t println(unsigned int, int = DEC);
148  size_t println(long, int = DEC);
149  size_t println(unsigned long, int = DEC);
150  size_t println(double, int = 2);
151 
152 #ifndef RADIOLIB_GODMODE
153  private:
154 #endif
155  PhysicalLayer* _phy;
156  #if !defined(RADIOLIB_EXCLUDE_AFSK)
157  AFSKClient* _audio;
158  #endif
159 
160  uint32_t _base = 0, _baseHz = 0;
161  uint32_t _pixelDuration = 0;
162 
163  size_t printNumber(unsigned long, uint8_t);
164  size_t printFloat(double, uint8_t);
165 
166  int16_t transmitDirect(uint32_t freq = 0, uint32_t freqHz = 0);
167  int16_t standby();
168 };
169 
170 #endif
171 
172 #endif
Client for audio-based transmissions. Requires Arduino tone() function, and a module capable of direc...
Definition: AFSK.h:17
-
HellClient(PhysicalLayer *phy)
Constructor for 2-FSK mode.
Definition: Hellschreiber.cpp:4
-
Client for Hellschreiber transmissions.
Definition: Hellschreiber.h:89
-
Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN...
Definition: PhysicalLayer.h:13
-
int16_t begin(float base, float rate=122.5)
Initialization method.
Definition: Hellschreiber.cpp:19
-
size_t printGlyph(uint8_t *buff)
Method to "print" a buffer of pixels, this is exposed to allow users to send custom characters...
Definition: Hellschreiber.cpp:31
+
1 #if !defined(_RADIOLIB_HELLSCHREIBER_H)
+
2 #define _RADIOLIB_HELLSCHREIBER_H
+
3 
+
4 #include "../../TypeDef.h"
+
5 
+
6 #if !defined(RADIOLIB_EXCLUDE_HELLSCHREIBER)
+
7 
+
8 #include "../PhysicalLayer/PhysicalLayer.h"
+
9 #include "../AFSK/AFSK.h"
+
10 
+
11 #define HELL_FONT_WIDTH 7
+
12 #define HELL_FONT_HEIGHT 7
+
13 
+
14 // font definition: characters are stored in rows,
+
15 // least significant byte of each character is the first row
+
16 // Hellschreiber use 7x7 characters, but this simplified font uses only 5x5 - the extra bytes aren't stored
+
17 static const uint8_t HellFont[64][HELL_FONT_WIDTH - 2] RADIOLIB_PROGMEM = {
+
18  { 0b0000000, 0b0000000, 0b0000000, 0b0000000, 0b0000000 }, // space
+
19  { 0b0001000, 0b0001000, 0b0001000, 0b0000000, 0b0001000 }, // !
+
20  { 0b0010100, 0b0010100, 0b0000000, 0b0000000, 0b0000000 }, // "
+
21  { 0b0010100, 0b0111110, 0b0010100, 0b0111110, 0b0010100 }, // #
+
22  { 0b0111110, 0b0101000, 0b0111110, 0b0001010, 0b0111110 }, // $
+
23  { 0b0110010, 0b0110100, 0b0001000, 0b0010110, 0b0100110 }, // %
+
24  { 0b0010000, 0b0101000, 0b0010000, 0b0101000, 0b0110100 }, // &
+
25  { 0b0001000, 0b0001000, 0b0000000, 0b0000000, 0b0000000 }, // '
+
26  { 0b0000100, 0b0001000, 0b0001000, 0b0001000, 0b0000100 }, // (
+
27  { 0b0010000, 0b0001000, 0b0001000, 0b0001000, 0b0010000 }, // )
+
28  { 0b0010100, 0b0001000, 0b0010100, 0b0000000, 0b0000000 }, // *
+
29  { 0b0001000, 0b0001000, 0b0111110, 0b0001000, 0b0001000 }, // +
+
30  { 0b0001000, 0b0010000, 0b0000000, 0b0000000, 0b0000000 }, // ´
+
31  { 0b0000000, 0b0000000, 0b0111110, 0b0000000, 0b0000000 }, // -
+
32  { 0b0000000, 0b0000000, 0b0000000, 0b0000000, 0b0001000 }, // .
+
33  { 0b0000010, 0b0000100, 0b0001000, 0b0010000, 0b0100000 }, // /
+
34  { 0b0011100, 0b0100110, 0b0101010, 0b0110010, 0b0011100 }, // 0
+
35  { 0b0011000, 0b0001000, 0b0001000, 0b0001000, 0b0001000 }, // 1
+
36  { 0b0011000, 0b0100100, 0b0001000, 0b0010000, 0b0111100 }, // 2
+
37  { 0b0111100, 0b0000100, 0b0011100, 0b0000100, 0b0111100 }, // 3
+
38  { 0b0100100, 0b0100100, 0b0111100, 0b0000100, 0b0000100 }, // 4
+
39  { 0b0011100, 0b0100000, 0b0111100, 0b0000100, 0b0111100 }, // 5
+
40  { 0b0111100, 0b0100000, 0b0111100, 0b0100100, 0b0111100 }, // 6
+
41  { 0b0111100, 0b0000100, 0b0001000, 0b0010000, 0b0100000 }, // 7
+
42  { 0b0111100, 0b0100100, 0b0011000, 0b0100100, 0b0111100 }, // 8
+
43  { 0b0111100, 0b0100100, 0b0111100, 0b0000100, 0b0111100 }, // 9
+
44  { 0b0000000, 0b0001000, 0b0000000, 0b0000000, 0b0001000 }, // :
+
45  { 0b0000000, 0b0001000, 0b0000000, 0b0001000, 0b0001000 }, // ;
+
46  { 0b0000100, 0b0001000, 0b0010000, 0b0001000, 0b0000100 }, // <
+
47  { 0b0000000, 0b0111110, 0b0000000, 0b0111110, 0b0000000 }, // =
+
48  { 0b0010000, 0b0001000, 0b0000100, 0b0001000, 0b0010000 }, // >
+
49  { 0b0011100, 0b0000100, 0b0001000, 0b0000000, 0b0001000 }, // ?
+
50  { 0b0011100, 0b0100010, 0b0101110, 0b0101010, 0b0001100 }, // @
+
51  { 0b0111110, 0b0100010, 0b0111110, 0b0100010, 0b0100010 }, // A
+
52  { 0b0111100, 0b0010010, 0b0011110, 0b0010010, 0b0111100 }, // B
+
53  { 0b0011110, 0b0110000, 0b0100000, 0b0110000, 0b0011110 }, // C
+
54  { 0b0111100, 0b0100010, 0b0100010, 0b0100010, 0b0111100 }, // D
+
55  { 0b0111110, 0b0100000, 0b0111100, 0b0100000, 0b0111110 }, // E
+
56  { 0b0111110, 0b0100000, 0b0111100, 0b0100000, 0b0100000 }, // F
+
57  { 0b0111110, 0b0100000, 0b0101110, 0b0100010, 0b0111110 }, // G
+
58  { 0b0100010, 0b0100010, 0b0111110, 0b0100010, 0b0100010 }, // H
+
59  { 0b0011100, 0b0001000, 0b0001000, 0b0001000, 0b0011100 }, // I
+
60  { 0b0111100, 0b0001000, 0b0001000, 0b0101000, 0b0111000 }, // J
+
61  { 0b0100100, 0b0101000, 0b0110000, 0b0101000, 0b0100100 }, // K
+
62  { 0b0100000, 0b0100000, 0b0100000, 0b0100000, 0b0111100 }, // L
+
63  { 0b0100010, 0b0110110, 0b0101010, 0b0100010, 0b0100010 }, // M
+
64  { 0b0100010, 0b0110010, 0b0101010, 0b0100110, 0b0100010 }, // N
+
65  { 0b0011100, 0b0100010, 0b0100010, 0b0100010, 0b0011100 }, // O
+
66  { 0b0111110, 0b0100010, 0b0111110, 0b0100000, 0b0100000 }, // P
+
67  { 0b0111110, 0b0100010, 0b0100010, 0b0100110, 0b0111110 }, // Q
+
68  { 0b0111110, 0b0100010, 0b0111110, 0b0100100, 0b0100010 }, // R
+
69  { 0b0111110, 0b0100000, 0b0111110, 0b0000010, 0b0111110 }, // S
+
70  { 0b0111110, 0b0001000, 0b0001000, 0b0001000, 0b0001000 }, // T
+
71  { 0b0100010, 0b0100010, 0b0100010, 0b0100010, 0b0111110 }, // U
+
72  { 0b0100010, 0b0100010, 0b0010100, 0b0010100, 0b0001000 }, // V
+
73  { 0b0100010, 0b0100010, 0b0101010, 0b0110110, 0b0100010 }, // W
+
74  { 0b0100010, 0b0010100, 0b0001000, 0b0010100, 0b0100010 }, // X
+
75  { 0b0100010, 0b0010100, 0b0001000, 0b0001000, 0b0001000 }, // Y
+
76  { 0b0111110, 0b0000100, 0b0001000, 0b0010000, 0b0111110 }, // Z
+
77  { 0b0001100, 0b0001000, 0b0001000, 0b0001000, 0b0001100 }, // [
+
78  { 0b0100000, 0b0010000, 0b0001000, 0b0000100, 0b0000010 }, // backslash
+
79  { 0b0011000, 0b0001000, 0b0001000, 0b0001000, 0b0011000 }, // ]
+
80  { 0b0001000, 0b0010100, 0b0000000, 0b0000000, 0b0000000 }, // ^
+
81  { 0b0000000, 0b0000000, 0b0000000, 0b0000000, 0b0111110 } // _
+
82 };
+
83 
+
89 class HellClient {
+
90  public:
+
96  explicit HellClient(PhysicalLayer* phy);
+
97 
+
98  #if !defined(RADIOLIB_EXCLUDE_AFSK)
+
99 
+
104  explicit HellClient(AFSKClient* audio);
+
105  #endif
+
106 
+
107  // basic methods
+
108 
+
116  int16_t begin(float base, float rate = 122.5);
+
117 
+
123  size_t printGlyph(uint8_t* buff);
+
124 
+
125  size_t write(const char* str);
+
126  size_t write(uint8_t* buff, size_t len);
+
127  size_t write(uint8_t b);
+
128 
+
129  size_t print(__FlashStringHelper*);
+
130  size_t print(const String &);
+
131  size_t print(const char[]);
+
132  size_t print(char);
+
133  size_t print(unsigned char, int = DEC);
+
134  size_t print(int, int = DEC);
+
135  size_t print(unsigned int, int = DEC);
+
136  size_t print(long, int = DEC);
+
137  size_t print(unsigned long, int = DEC);
+
138  size_t print(double, int = 2);
+
139 
+
140  size_t println(void);
+
141  size_t println(__FlashStringHelper*);
+
142  size_t println(const String &);
+
143  size_t println(const char[]);
+
144  size_t println(char);
+
145  size_t println(unsigned char, int = DEC);
+
146  size_t println(int, int = DEC);
+
147  size_t println(unsigned int, int = DEC);
+
148  size_t println(long, int = DEC);
+
149  size_t println(unsigned long, int = DEC);
+
150  size_t println(double, int = 2);
+
151 
+
152 #ifndef RADIOLIB_GODMODE
+
153  private:
+
154 #endif
+
155  PhysicalLayer* _phy;
+
156  #if !defined(RADIOLIB_EXCLUDE_AFSK)
+
157  AFSKClient* _audio;
+
158  #endif
+
159 
+
160  uint32_t _base = 0, _baseHz = 0;
+
161  uint32_t _pixelDuration = 0;
+
162 
+
163  size_t printNumber(unsigned long, uint8_t);
+
164  size_t printFloat(double, uint8_t);
+
165 
+
166  int16_t transmitDirect(uint32_t freq = 0, uint32_t freqHz = 0);
+
167  int16_t standby();
+
168 };
+
169 
+
170 #endif
+
171 
+
172 #endif
+
HellClient(PhysicalLayer *phy)
Constructor for 2-FSK mode.
Definition: Hellschreiber.cpp:4
+
Client for Hellschreiber transmissions.
Definition: Hellschreiber.h:89
+
Client for audio-based transmissions. Requires Arduino tone() function, and a module capable of direc...
Definition: AFSK.h:17
+
size_t printGlyph(uint8_t *buff)
Method to "print" a buffer of pixels, this is exposed to allow users to send custom characters.
Definition: Hellschreiber.cpp:31
+
int16_t begin(float base, float rate=122.5)
Initialization method.
Definition: Hellschreiber.cpp:19
+
Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN....
Definition: PhysicalLayer.h:13
diff --git a/_i_serial_8h_source.html b/_i_serial_8h_source.html index 535b4c1f..b9e86b10 100644 --- a/_i_serial_8h_source.html +++ b/_i_serial_8h_source.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/ISerial.h Source File @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -84,17 +86,70 @@ $(document).ready(function(){initNavTree('_i_serial_8h_source.html','');});
ISerial.h
-
1 #ifndef _RADIOLIB_ISERIAL_H
2 #define _RADIOLIB_ISERIAL_H
3 
4 #include "Module.h"
5 
11 class ISerial {
12  public:
13  explicit ISerial(Module* mod);
14 
15  void begin(long);
16  void end();
17  int peek();
18  size_t write(uint8_t);
19  int read();
20  int available();
21  void flush();
22 
23  #ifndef ARDUINO_ARCH_MEGAAVR
24  size_t print(const __FlashStringHelper *);
25  #endif
26  size_t print(const String &);
27  size_t print(const char[]);
28  size_t print(char);
29  size_t print(unsigned char, int = DEC);
30  size_t print(int, int = DEC);
31  size_t print(unsigned int, int = DEC);
32  size_t print(long, int = DEC);
33  size_t print(unsigned long, int = DEC);
34  size_t print(double, int = 2);
35  size_t print(const Printable&);
36 
37  #ifndef ARDUINO_ARCH_MEGAAVR
38  size_t println(const __FlashStringHelper *);
39  #endif
40  size_t println(const String &s);
41  size_t println(const char[]);
42  size_t println(char);
43  size_t println(unsigned char, int = DEC);
44  size_t println(int, int = DEC);
45  size_t println(unsigned int, int = DEC);
46  size_t println(long, int = DEC);
47  size_t println(unsigned long, int = DEC);
48  size_t println(double, int = 2);
49  size_t println(const Printable&);
50  size_t println(void);
51 
52 #ifndef RADIOLIB_GODMODE
53  protected:
54 #endif
55  Module* _mod;
56 };
57 
58 #endif
Implements all common low-level SPI/UART/I2C methods to control the wireless module. Every module class contains one private instance of this class.
Definition: Module.h:17
-
Interface class for Arduino Serial. Only calls the appropriate methods for the active UART interface...
Definition: ISerial.h:11
+
1 #if !defined(_RADIOLIB_ISERIAL_H)
+
2 #define _RADIOLIB_ISERIAL_H
+
3 
+
4 #include "Module.h"
+
5 
+
11 class ISerial {
+
12  public:
+
13  explicit ISerial(Module* mod);
+
14 
+
15  void begin(long);
+
16  void end();
+
17  int peek();
+
18  size_t write(uint8_t);
+
19  int read();
+
20  int available();
+
21  void flush();
+
22 
+
23  #if !defined(ARDUINO_ARCH_MEGAAVR)
+
24  size_t print(const __FlashStringHelper *);
+
25  #endif
+
26  size_t print(const String &);
+
27  size_t print(const char[]);
+
28  size_t print(char);
+
29  size_t print(unsigned char, int = DEC);
+
30  size_t print(int, int = DEC);
+
31  size_t print(unsigned int, int = DEC);
+
32  size_t print(long, int = DEC);
+
33  size_t print(unsigned long, int = DEC);
+
34  size_t print(double, int = 2);
+
35  size_t print(const Printable&);
+
36 
+
37  #if !defined(ARDUINO_ARCH_MEGAAVR)
+
38  size_t println(const __FlashStringHelper *);
+
39  #endif
+
40  size_t println(const String &s);
+
41  size_t println(const char[]);
+
42  size_t println(char);
+
43  size_t println(unsigned char, int = DEC);
+
44  size_t println(int, int = DEC);
+
45  size_t println(unsigned int, int = DEC);
+
46  size_t println(long, int = DEC);
+
47  size_t println(unsigned long, int = DEC);
+
48  size_t println(double, int = 2);
+
49  size_t println(const Printable&);
+
50  size_t println(void);
+
51 
+
52 #if !(defined(RADIOLIB_LOW_LEVEL) || defined(RADIOLIB_GODMODE))
+
53  protected:
+
54 #endif
+
55  Module* _mod;
+
56 };
+
57 
+
58 #endif
+
Interface class for Arduino Serial. Only calls the appropriate methods for the active UART interface.
Definition: ISerial.h:11
+
Implements all common low-level SPI/UART/I2C methods to control the wireless module....
Definition: Module.h:17
diff --git a/_j_d_y08_8h_source.html b/_j_d_y08_8h_source.html index ec3d9b93..b57470fc 100644 --- a/_j_d_y08_8h_source.html +++ b/_j_d_y08_8h_source.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/modules/JDY08/JDY08.h Source File @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -84,20 +86,33 @@ $(document).ready(function(){initNavTree('_j_d_y08_8h_source.html','');});
JDY08.h
-
1 #if !defined(_RADIOLIB_JDY08_H) && !defined(RADIOLIB_EXCLUDE_JDY08)
2 #define _RADIOLIB_JDY08_H
3 
4 #include "../../ISerial.h"
5 
12 class JDY08: public ISerial {
13  public:
19  JDY08(Module* mod);
20 
26  void begin(long speed);
27 };
28 
29 #endif
Control class for JDY08 module. Most methods supported by this module are implemented in ISerial inte...
Definition: JDY08.h:12
-
void begin(long speed)
Initialization method.
Definition: JDY08.cpp:8
-
JDY08(Module *mod)
Default constructor.
Definition: JDY08.cpp:4
-
Implements all common low-level SPI/UART/I2C methods to control the wireless module. Every module class contains one private instance of this class.
Definition: Module.h:17
-
Interface class for Arduino Serial. Only calls the appropriate methods for the active UART interface...
Definition: ISerial.h:11
+
1 #if !defined(_RADIOLIB_JDY08_H) && !defined(RADIOLIB_EXCLUDE_JDY08)
+
2 #define _RADIOLIB_JDY08_H
+
3 
+
4 #include "../../ISerial.h"
+
5 
+
12 class JDY08: public ISerial {
+
13  public:
+
19  JDY08(Module* mod);
+
20 
+
26  void begin(long speed);
+
27 };
+
28 
+
29 #endif
+
JDY08(Module *mod)
Default constructor.
Definition: JDY08.cpp:4
+
Control class for JDY08 module. Most methods supported by this module are implemented in ISerial inte...
Definition: JDY08.h:12
+
Interface class for Arduino Serial. Only calls the appropriate methods for the active UART interface.
Definition: ISerial.h:11
+
Implements all common low-level SPI/UART/I2C methods to control the wireless module....
Definition: Module.h:17
+
void begin(long speed)
Initialization method.
Definition: JDY08.cpp:8
diff --git a/_m_q_t_t_8h_source.html b/_m_q_t_t_8h_source.html index 0bba6efd..64889013 100644 --- a/_m_q_t_t_8h_source.html +++ b/_m_q_t_t_8h_source.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/protocols/MQTT/MQTT.h Source File @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -84,25 +86,94 @@ $(document).ready(function(){initNavTree('_m_q_t_t_8h_source.html','');});
MQTT.h
-
1 #if !defined(_RADIOLIB_MQTT_H)
2 #define _RADIOLIB_MQTT_H
3 
4 #include "../../TypeDef.h"
5 
6 #if !defined(RADIOLIB_EXCLUDE_MQTT)
7 
8 #include "../TransportLayer/TransportLayer.h"
9 
10 // MQTT packet types
11 #define MQTT_CONNECT 0x01
12 #define MQTT_CONNACK 0x02
13 #define MQTT_PUBLISH 0x03
14 #define MQTT_PUBACK 0x04
15 #define MQTT_PUBREC 0x05
16 #define MQTT_PUBREL 0x06
17 #define MQTT_PUBCOMP 0x07
18 #define MQTT_SUBSCRIBE 0x08
19 #define MQTT_SUBACK 0x09
20 #define MQTT_UNSUBSCRIBE 0x0A
21 #define MQTT_UNSUBACK 0x0B
22 #define MQTT_PINGREQ 0x0C
23 #define MQTT_PINGRESP 0x0D
24 #define MQTT_DISCONNECT 0x0E
25 
26 // MQTT CONNECT flags
27 #define MQTT_CONNECT_USER_NAME_FLAG 0b10000000
28 #define MQTT_CONNECT_PASSWORD_FLAG 0b01000000
29 #define MQTT_CONNECT_WILL_RETAIN 0b00100000
30 #define MQTT_CONNECT_WILL_FLAG 0b00000100
31 #define MQTT_CONNECT_CLEAN_SESSION 0b00000010
32 
38 class MQTTClient {
39  public:
45  explicit MQTTClient(TransportLayer* tl, uint16_t port = 1883);
46 
47  // basic methods
48 
70  int16_t connect(const char* host, const char* clientId, const char* userName = "", const char* password = "", uint16_t keepAlive = 60, bool cleanSession = true, const char* willTopic = "", const char* willMessage = "");
71 
77  int16_t disconnect();
78 
88  int16_t publish(String& topic, String& message);
89 
99  int16_t publish(const char* topic, const char* message);
100 
108  int16_t subscribe(const char* topicFilter);
109 
117  int16_t unsubscribe(const char* topicFilter);
118 
124  int16_t ping();
125 
131  int16_t check(void (*func)(const char*, const char*));
132 
133 #ifndef RADIOLIB_GODMODE
134  private:
135 #endif
136  TransportLayer* _tl;
137 
138  uint16_t _port;
139  uint16_t _packetId;
140 
141  static size_t encodeLength(uint32_t len, uint8_t* encoded);
142  static uint32_t decodeLength(uint8_t* encoded, uint8_t& numBytes);
143 };
144 
145 #endif
146 
147 #endif
int16_t subscribe(const char *topicFilter)
Subscribe to MQTT topic.
Definition: MQTT.cpp:211
-
Provides common interface for protocols that run on modules with Internet connectivity, such as HTTP or MQTT. Because this class is used mainly as interface, all of its virtual members must be implemented in the module class.
Definition: TransportLayer.h:12
-
int16_t ping()
Ping MQTT broker. This method can be used to keep connection open.
Definition: MQTT.cpp:356
-
int16_t disconnect()
Disconnect from MQTT broker.
Definition: MQTT.cpp:146
-
MQTTClient(TransportLayer *tl, uint16_t port=1883)
Default constructor.
Definition: MQTT.cpp:4
-
int16_t connect(const char *host, const char *clientId, const char *userName="", const char *password="", uint16_t keepAlive=60, bool cleanSession=true, const char *willTopic="", const char *willMessage="")
Connects to MQTT broker (/server).
Definition: MQTT.cpp:10
-
int16_t publish(String &topic, String &message)
Publish MQTT message.
Definition: MQTT.cpp:164
-
int16_t check(void(*func)(const char *, const char *))
Set function to be called when checking new messages in subscribed topics.
Definition: MQTT.cpp:396
-
int16_t unsubscribe(const char *topicFilter)
Unsubscribe from MQTT topic.
Definition: MQTT.cpp:285
-
Client for simple MQTT communication.
Definition: MQTT.h:38
+
1 #if !defined(_RADIOLIB_MQTT_H)
+
2 #define _RADIOLIB_MQTT_H
+
3 
+
4 #include "../../TypeDef.h"
+
5 
+
6 #if !defined(RADIOLIB_EXCLUDE_MQTT)
+
7 
+
8 #include "../TransportLayer/TransportLayer.h"
+
9 
+
10 // MQTT packet types
+
11 #define MQTT_CONNECT 0x01
+
12 #define MQTT_CONNACK 0x02
+
13 #define MQTT_PUBLISH 0x03
+
14 #define MQTT_PUBACK 0x04
+
15 #define MQTT_PUBREC 0x05
+
16 #define MQTT_PUBREL 0x06
+
17 #define MQTT_PUBCOMP 0x07
+
18 #define MQTT_SUBSCRIBE 0x08
+
19 #define MQTT_SUBACK 0x09
+
20 #define MQTT_UNSUBSCRIBE 0x0A
+
21 #define MQTT_UNSUBACK 0x0B
+
22 #define MQTT_PINGREQ 0x0C
+
23 #define MQTT_PINGRESP 0x0D
+
24 #define MQTT_DISCONNECT 0x0E
+
25 
+
26 // MQTT CONNECT flags
+
27 #define MQTT_CONNECT_USER_NAME_FLAG 0b10000000
+
28 #define MQTT_CONNECT_PASSWORD_FLAG 0b01000000
+
29 #define MQTT_CONNECT_WILL_RETAIN 0b00100000
+
30 #define MQTT_CONNECT_WILL_FLAG 0b00000100
+
31 #define MQTT_CONNECT_CLEAN_SESSION 0b00000010
+
32 
+
38 class MQTTClient {
+
39  public:
+
45  explicit MQTTClient(TransportLayer* tl, uint16_t port = 1883);
+
46 
+
47  // basic methods
+
48 
+
70  int16_t connect(const char* host, const char* clientId, const char* userName = "", const char* password = "", uint16_t keepAlive = 60, bool cleanSession = true, const char* willTopic = "", const char* willMessage = "");
+
71 
+
77  int16_t disconnect();
+
78 
+
88  int16_t publish(String& topic, String& message);
+
89 
+
99  int16_t publish(const char* topic, const char* message);
+
100 
+
108  int16_t subscribe(const char* topicFilter);
+
109 
+
117  int16_t unsubscribe(const char* topicFilter);
+
118 
+
124  int16_t ping();
+
125 
+
131  int16_t check(void (*func)(const char*, const char*));
+
132 
+
133 #ifndef RADIOLIB_GODMODE
+
134  private:
+
135 #endif
+
136  TransportLayer* _tl;
+
137 
+
138  uint16_t _port;
+
139  uint16_t _packetId;
+
140 
+
141  static size_t encodeLength(uint32_t len, uint8_t* encoded);
+
142  static uint32_t decodeLength(uint8_t* encoded, uint8_t& numBytes);
+
143 };
+
144 
+
145 #endif
+
146 
+
147 #endif
+
int16_t disconnect()
Disconnect from MQTT broker.
Definition: MQTT.cpp:146
+
int16_t publish(String &topic, String &message)
Publish MQTT message.
Definition: MQTT.cpp:164
+
int16_t check(void(*func)(const char *, const char *))
Set function to be called when checking new messages in subscribed topics.
Definition: MQTT.cpp:396
+
MQTTClient(TransportLayer *tl, uint16_t port=1883)
Default constructor.
Definition: MQTT.cpp:4
+
int16_t unsubscribe(const char *topicFilter)
Unsubscribe from MQTT topic.
Definition: MQTT.cpp:285
+
int16_t subscribe(const char *topicFilter)
Subscribe to MQTT topic.
Definition: MQTT.cpp:211
+
int16_t ping()
Ping MQTT broker. This method can be used to keep connection open.
Definition: MQTT.cpp:356
+
int16_t connect(const char *host, const char *clientId, const char *userName="", const char *password="", uint16_t keepAlive=60, bool cleanSession=true, const char *willTopic="", const char *willMessage="")
Connects to MQTT broker (/server).
Definition: MQTT.cpp:10
+
Client for simple MQTT communication.
Definition: MQTT.h:38
+
Provides common interface for protocols that run on modules with Internet connectivity,...
Definition: TransportLayer.h:12
diff --git a/_module_8h_source.html b/_module_8h_source.html index 97efe2e2..8669b2a8 100644 --- a/_module_8h_source.html +++ b/_module_8h_source.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/Module.h Source File @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -84,58 +86,212 @@ $(document).ready(function(){initNavTree('_module_8h_source.html','');});
Module.h
-
1 #ifndef _RADIOLIB_MODULE_H
2 #define _RADIOLIB_MODULE_H
3 
4 #include "TypeDef.h"
5 
6 #include <SPI.h>
7 #ifndef RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED
8 #include <SoftwareSerial.h>
9 #endif
10 
17 class Module {
18  public:
19 
31 #ifdef RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED
32  Module(RADIOLIB_PIN_TYPE rx, RADIOLIB_PIN_TYPE tx, HardwareSerial* serial = &RADIOLIB_HARDWARE_SERIAL_PORT, RADIOLIB_PIN_TYPE rst = RADIOLIB_NC);
33 #else
34  Module(RADIOLIB_PIN_TYPE rx, RADIOLIB_PIN_TYPE tx, HardwareSerial* serial = nullptr, RADIOLIB_PIN_TYPE rst = RADIOLIB_NC);
35 #endif
36 
46  Module(RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst);
47 
59  Module(RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE gpio);
60 
74  Module(RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, SPIClass& spi, SPISettings spiSettings);
75 
91  Module(RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE gpio, SPIClass& spi, SPISettings spiSettings = SPISettings(2000000, MSBFIRST, SPI_MODE0));
92 
112 #ifdef RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED
113  Module(RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE rx, RADIOLIB_PIN_TYPE tx, SPIClass& spi = RADIOLIB_DEFAULT_SPI, SPISettings spiSettings = SPISettings(2000000, MSBFIRST, SPI_MODE0), HardwareSerial* serial = &RADIOLIB_HARDWARE_SERIAL_PORT);
114 #else
115  Module(RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE rx, RADIOLIB_PIN_TYPE tx, SPIClass& spi = RADIOLIB_DEFAULT_SPI, SPISettings spiSettings = SPISettings(2000000, MSBFIRST, SPI_MODE0), HardwareSerial* serial = nullptr);
116 #endif
117 
123  Module(const Module& mod);
124 
130  Module& operator=(const Module& mod);
131 
132  // public member variables
133 
137 #ifdef RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED
138  HardwareSerial* ModuleSerial;
139 #else
140  SoftwareSerial* ModuleSerial;
141 #endif
142 
146  uint32_t baudrate = 9600;
147 
151  char AtLineFeed[3] = {'\r', '\n'};
152 
156  uint8_t SPIreadCommand = 0b00000000;
157 
161  uint8_t SPIwriteCommand = 0b10000000;
162 
163  // basic methods
164 
170  void init(uint8_t interface);
171 
177  void term(uint8_t interface);
178 
179  // AT methods
180 
184  void ATemptyBuffer();
185 
191  bool ATgetResponse();
192 
200  bool ATsendCommand(const char* cmd);
201 
211  bool ATsendData(uint8_t* data, uint32_t len);
212 
213  // SPI methods
214 
226  int16_t SPIgetRegValue(uint8_t reg, uint8_t msb = 7, uint8_t lsb = 0);
227 
243  int16_t SPIsetRegValue(uint8_t reg, uint8_t value, uint8_t msb = 7, uint8_t lsb = 0, uint8_t checkInterval = 2);
244 
254  void SPIreadRegisterBurst(uint8_t reg, uint8_t numBytes, uint8_t* inBytes);
255 
263  uint8_t SPIreadRegister(uint8_t reg);
264 
274  void SPIwriteRegisterBurst(uint8_t reg, uint8_t* data, uint8_t numBytes);
275 
283  void SPIwriteRegister(uint8_t reg, uint8_t data);
284 
298  void SPItransfer(uint8_t cmd, uint8_t reg, uint8_t* dataOut, uint8_t* dataIn, uint8_t numBytes);
299 
300  // pin number access methods
301 
307  RADIOLIB_PIN_TYPE getCs() const { return(_cs); }
308 
314  RADIOLIB_PIN_TYPE getIrq() const { return(_irq); }
315 
321  RADIOLIB_PIN_TYPE getRst() const { return(_rst); }
322 
328  RADIOLIB_PIN_TYPE getGpio() const { return(_rx); }
329 
335  RADIOLIB_PIN_TYPE getRx() const { return(_rx); }
336 
342  RADIOLIB_PIN_TYPE getTx() const { return(_tx); }
343 
349  SPIClass* getSpi() const { return(_spi); }
350 
356  SPISettings getSpiSettings() const { return(_spiSettings); }
357 
366  void setRfSwitchPins(RADIOLIB_PIN_TYPE rxEn, RADIOLIB_PIN_TYPE txEn);
367 
375  void setRfSwitchState(RADIOLIB_PIN_STATUS rxPinState, RADIOLIB_PIN_STATUS txPinState);
376 
377  // Arduino core overrides
378 
386  static void pinMode(RADIOLIB_PIN_TYPE pin, RADIOLIB_PIN_MODE mode);
387 
395  static void digitalWrite(RADIOLIB_PIN_TYPE pin, RADIOLIB_PIN_STATUS value);
396 
404  static RADIOLIB_PIN_STATUS digitalRead(RADIOLIB_PIN_TYPE pin);
405 
413  static void tone(RADIOLIB_PIN_TYPE pin, uint16_t value);
414 
420  static void noTone(RADIOLIB_PIN_TYPE pin);
421 
431  static void attachInterrupt(RADIOLIB_PIN_TYPE interruptNum, void (*userFunc)(void), RADIOLIB_INTERRUPT_STATUS mode);
432 
438  static void detachInterrupt(RADIOLIB_PIN_TYPE interruptNum);
439 
443  static void yield();
444 
450  static void delay(uint32_t ms);
451 
457  static void delayMicroseconds(uint32_t us);
458 
462  static uint32_t millis();
463 
467  static uint32_t micros();
468 
469 #ifndef RADIOLIB_GODMODE
470  private:
471 #endif
472  RADIOLIB_PIN_TYPE _cs = RADIOLIB_NC;
473  RADIOLIB_PIN_TYPE _irq = RADIOLIB_NC;
474  RADIOLIB_PIN_TYPE _rst = RADIOLIB_NC;
475  RADIOLIB_PIN_TYPE _rx = RADIOLIB_NC;
476  RADIOLIB_PIN_TYPE _tx = RADIOLIB_NC;
477 
478  SPISettings _spiSettings = SPISettings(2000000, MSBFIRST, SPI_MODE0);
479 
480  bool _initInterface = false;
481  SPIClass* _spi = NULL;
482 
483  bool _useRfSwitch = false;
484  RADIOLIB_PIN_TYPE _rxEn = RADIOLIB_NC, _txEn = RADIOLIB_NC;
485 
486  uint32_t _ATtimeout = 15000;
487 };
488 
489 #endif
static void pinMode(RADIOLIB_PIN_TYPE pin, RADIOLIB_PIN_MODE mode)
Arduino core pinMode override that checks RADIOLIB_NC as alias for unused pin.
Definition: Module.cpp:323
-
char AtLineFeed[3]
Line feed to be used when sending AT commands. Defaults to CR+LF.
Definition: Module.h:151
-
Module & operator=(const Module &mod)
Overload for assignment operator.
Definition: Module.cpp:96
-
SPISettings getSpiSettings() const
Access method to get the SPI interface settings.
Definition: Module.h:356
-
void SPIwriteRegisterBurst(uint8_t reg, uint8_t *data, uint8_t numBytes)
SPI burst write method.
Definition: Module.cpp:268
-
static RADIOLIB_PIN_STATUS digitalRead(RADIOLIB_PIN_TYPE pin)
Arduino core digitalWrite override that checks RADIOLIB_NC as alias for unused pin.
Definition: Module.cpp:335
-
RADIOLIB_PIN_TYPE getIrq() const
Access method to get the pin number of interrupt/GPIO.
Definition: Module.h:314
-
RADIOLIB_PIN_TYPE getTx() const
Access method to get the pin number of UART Rx.
Definition: Module.h:342
-
SoftwareSerial * ModuleSerial
Internal SoftwareSerial instance.
Definition: Module.h:140
-
void SPItransfer(uint8_t cmd, uint8_t reg, uint8_t *dataOut, uint8_t *dataIn, uint8_t numBytes)
SPI single transfer method.
Definition: Module.cpp:276
-
RADIOLIB_PIN_TYPE getGpio() const
Access method to get the pin number of second interrupt/GPIO.
Definition: Module.h:328
-
static void delay(uint32_t ms)
Arduino core delay override.
Definition: Module.cpp:385
-
RADIOLIB_PIN_TYPE getRx() const
Access method to get the pin number of UART Rx.
Definition: Module.h:335
-
static void yield()
Arduino core yield override.
Definition: Module.cpp:381
-
static void digitalWrite(RADIOLIB_PIN_TYPE pin, RADIOLIB_PIN_STATUS value)
Arduino core digitalWrite override that checks RADIOLIB_NC as alias for unused pin.
Definition: Module.cpp:329
-
uint8_t SPIreadCommand
Basic SPI read command. Defaults to 0x00.
Definition: Module.h:156
-
uint32_t baudrate
Baud rate of SoftwareSerial UART communication. Defaults to 9600 baud.
Definition: Module.h:146
-
void term(uint8_t interface)
Terminate low-level module control.
Definition: Module.cpp:137
-
RADIOLIB_PIN_TYPE getCs() const
Access method to get the pin number of SPI chip select.
Definition: Module.h:307
-
static void delayMicroseconds(uint32_t us)
Arduino core delayMicroseconds override.
Definition: Module.cpp:389
-
void init(uint8_t interface)
Initialize low-level module control.
Definition: Module.cpp:113
-
void ATemptyBuffer()
Empty internal AT buffer.
Definition: Module.cpp:152
-
static void tone(RADIOLIB_PIN_TYPE pin, uint16_t value)
Arduino core tone override that checks RADIOLIB_NC as alias for unused pin and RADIOLIB_TONE_UNSUPPOR...
Definition: Module.cpp:342
-
void setRfSwitchState(RADIOLIB_PIN_STATUS rxPinState, RADIOLIB_PIN_STATUS txPinState)
Set RF switch state.
Definition: Module.cpp:409
-
bool ATgetResponse()
Get response after sending AT command.
Definition: Module.cpp:175
-
Implements all common low-level SPI/UART/I2C methods to control the wireless module. Every module class contains one private instance of this class.
Definition: Module.h:17
-
bool ATsendData(uint8_t *data, uint32_t len)
Send raw AT data. Will also call ATgetResponse.
Definition: Module.cpp:165
-
int16_t SPIgetRegValue(uint8_t reg, uint8_t msb=7, uint8_t lsb=0)
SPI read method that automatically masks unused bits. This method is the preferred SPI read mechanism...
Definition: Module.cpp:199
-
static uint32_t millis()
Arduino core millis override.
Definition: Module.cpp:393
-
void SPIwriteRegister(uint8_t reg, uint8_t data)
SPI basic write method. Use of this method is reserved for special cases, SPIsetRegValue should be us...
Definition: Module.cpp:272
-
uint8_t SPIreadRegister(uint8_t reg)
SPI basic read method. Use of this method is reserved for special cases, SPIgetRegValue should be use...
Definition: Module.cpp:262
-
static void noTone(RADIOLIB_PIN_TYPE pin)
Arduino core noTone override that checks RADIOLIB_NC as alias for unused pin and RADIOLIB_TONE_UNSUPP...
Definition: Module.cpp:358
-
Module(RADIOLIB_PIN_TYPE rx, RADIOLIB_PIN_TYPE tx, HardwareSerial *serial=nullptr, RADIOLIB_PIN_TYPE rst=RADIOLIB_NC)
UART-based module constructor.
Definition: Module.cpp:29
-
static void detachInterrupt(RADIOLIB_PIN_TYPE interruptNum)
Arduino core detachInterrupt override.
Definition: Module.cpp:377
-
bool ATsendCommand(const char *cmd)
Send AT command. Will also call ATgetResponse.
Definition: Module.cpp:158
-
static void attachInterrupt(RADIOLIB_PIN_TYPE interruptNum, void(*userFunc)(void), RADIOLIB_INTERRUPT_STATUS mode)
Arduino core attachInterrupt override.
Definition: Module.cpp:373
-
uint8_t SPIwriteCommand
Basic SPI write command. Defaults to 0x80.
Definition: Module.h:161
-
void SPIreadRegisterBurst(uint8_t reg, uint8_t numBytes, uint8_t *inBytes)
SPI burst read method.
Definition: Module.cpp:258
-
RADIOLIB_PIN_TYPE getRst() const
Access method to get the pin number of hardware reset pin.
Definition: Module.h:321
-
SPIClass * getSpi() const
Access method to get the SPI interface.
Definition: Module.h:349
-
int16_t SPIsetRegValue(uint8_t reg, uint8_t value, uint8_t msb=7, uint8_t lsb=0, uint8_t checkInterval=2)
Overwrite-safe SPI write method with verification. This method is the preferred SPI write mechanism...
Definition: Module.cpp:209
-
static uint32_t micros()
Arduino core micros override.
Definition: Module.cpp:397
-
void setRfSwitchPins(RADIOLIB_PIN_TYPE rxEn, RADIOLIB_PIN_TYPE txEn)
Some modules contain external RF switch controlled by two pins. This function gives RadioLib control ...
Definition: Module.cpp:401
+
1 #ifndef _RADIOLIB_MODULE_H
+
2 #define _RADIOLIB_MODULE_H
+
3 
+
4 #include "TypeDef.h"
+
5 
+
6 #include <SPI.h>
+
7 #ifndef RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED
+
8 #include <SoftwareSerial.h>
+
9 #endif
+
10 
+
17 class Module {
+
18  public:
+
19 
+
31 #ifdef RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED
+
32  Module(RADIOLIB_PIN_TYPE rx, RADIOLIB_PIN_TYPE tx, HardwareSerial* serial = &RADIOLIB_HARDWARE_SERIAL_PORT, RADIOLIB_PIN_TYPE rst = RADIOLIB_NC);
+
33 #else
+
34  Module(RADIOLIB_PIN_TYPE rx, RADIOLIB_PIN_TYPE tx, HardwareSerial* serial = nullptr, RADIOLIB_PIN_TYPE rst = RADIOLIB_NC);
+
35 #endif
+
36 
+
46  Module(RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst);
+
47 
+
59  Module(RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE gpio);
+
60 
+
74  Module(RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, SPIClass& spi, SPISettings spiSettings);
+
75 
+
91  Module(RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE gpio, SPIClass& spi, SPISettings spiSettings = SPISettings(2000000, MSBFIRST, SPI_MODE0));
+
92 
+
112 #ifdef RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED
+
113  Module(RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE rx, RADIOLIB_PIN_TYPE tx, SPIClass& spi = RADIOLIB_DEFAULT_SPI, SPISettings spiSettings = SPISettings(2000000, MSBFIRST, SPI_MODE0), HardwareSerial* serial = &RADIOLIB_HARDWARE_SERIAL_PORT);
+
114 #else
+
115  Module(RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE rx, RADIOLIB_PIN_TYPE tx, SPIClass& spi = RADIOLIB_DEFAULT_SPI, SPISettings spiSettings = SPISettings(2000000, MSBFIRST, SPI_MODE0), HardwareSerial* serial = nullptr);
+
116 #endif
+
117 
+
123  Module(const Module& mod);
+
124 
+
130  Module& operator=(const Module& mod);
+
131 
+
132  // public member variables
+
133 
+
137 #ifdef RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED
+
138  HardwareSerial* ModuleSerial;
+
139 #else
+
140  SoftwareSerial* ModuleSerial;
+
141 #endif
+
142 
+
146  uint32_t baudrate = 9600;
+
147 
+
151  char AtLineFeed[3] = {'\r', '\n'};
+
152 
+
156  uint8_t SPIreadCommand = 0b00000000;
+
157 
+
161  uint8_t SPIwriteCommand = 0b10000000;
+
162 
+
163  // basic methods
+
164 
+
170  void init(uint8_t interface);
+
171 
+
177  void term(uint8_t interface);
+
178 
+
179  // AT methods
+
180 
+
184  void ATemptyBuffer();
+
185 
+
191  bool ATgetResponse();
+
192 
+
200  bool ATsendCommand(const char* cmd);
+
201 
+
211  bool ATsendData(uint8_t* data, uint32_t len);
+
212 
+
213  // SPI methods
+
214 
+
226  int16_t SPIgetRegValue(uint8_t reg, uint8_t msb = 7, uint8_t lsb = 0);
+
227 
+
243  int16_t SPIsetRegValue(uint8_t reg, uint8_t value, uint8_t msb = 7, uint8_t lsb = 0, uint8_t checkInterval = 2);
+
244 
+
254  void SPIreadRegisterBurst(uint8_t reg, uint8_t numBytes, uint8_t* inBytes);
+
255 
+
263  uint8_t SPIreadRegister(uint8_t reg);
+
264 
+
274  void SPIwriteRegisterBurst(uint8_t reg, uint8_t* data, uint8_t numBytes);
+
275 
+
283  void SPIwriteRegister(uint8_t reg, uint8_t data);
+
284 
+
298  void SPItransfer(uint8_t cmd, uint8_t reg, uint8_t* dataOut, uint8_t* dataIn, uint8_t numBytes);
+
299 
+
300  // pin number access methods
+
301 
+
307  RADIOLIB_PIN_TYPE getCs() const { return(_cs); }
+
308 
+
314  RADIOLIB_PIN_TYPE getIrq() const { return(_irq); }
+
315 
+
321  RADIOLIB_PIN_TYPE getRst() const { return(_rst); }
+
322 
+
328  RADIOLIB_PIN_TYPE getGpio() const { return(_rx); }
+
329 
+
335  RADIOLIB_PIN_TYPE getRx() const { return(_rx); }
+
336 
+
342  RADIOLIB_PIN_TYPE getTx() const { return(_tx); }
+
343 
+
349  SPIClass* getSpi() const { return(_spi); }
+
350 
+
356  SPISettings getSpiSettings() const { return(_spiSettings); }
+
357 
+
366  void setRfSwitchPins(RADIOLIB_PIN_TYPE rxEn, RADIOLIB_PIN_TYPE txEn);
+
367 
+
375  void setRfSwitchState(RADIOLIB_PIN_STATUS rxPinState, RADIOLIB_PIN_STATUS txPinState);
+
376 
+
377  // Arduino core overrides
+
378 
+
386  static void pinMode(RADIOLIB_PIN_TYPE pin, RADIOLIB_PIN_MODE mode);
+
387 
+
395  static void digitalWrite(RADIOLIB_PIN_TYPE pin, RADIOLIB_PIN_STATUS value);
+
396 
+
404  static RADIOLIB_PIN_STATUS digitalRead(RADIOLIB_PIN_TYPE pin);
+
405 
+
413  static void tone(RADIOLIB_PIN_TYPE pin, uint16_t value);
+
414 
+
420  static void noTone(RADIOLIB_PIN_TYPE pin);
+
421 
+
431  static void attachInterrupt(RADIOLIB_PIN_TYPE interruptNum, void (*userFunc)(void), RADIOLIB_INTERRUPT_STATUS mode);
+
432 
+
438  static void detachInterrupt(RADIOLIB_PIN_TYPE interruptNum);
+
439 
+
443  static void yield();
+
444 
+
450  static void delay(uint32_t ms);
+
451 
+
457  static void delayMicroseconds(uint32_t us);
+
458 
+
462  static uint32_t millis();
+
463 
+
467  static uint32_t micros();
+
468 
+
469 #ifndef RADIOLIB_GODMODE
+
470  private:
+
471 #endif
+
472  RADIOLIB_PIN_TYPE _cs = RADIOLIB_NC;
+
473  RADIOLIB_PIN_TYPE _irq = RADIOLIB_NC;
+
474  RADIOLIB_PIN_TYPE _rst = RADIOLIB_NC;
+
475  RADIOLIB_PIN_TYPE _rx = RADIOLIB_NC;
+
476  RADIOLIB_PIN_TYPE _tx = RADIOLIB_NC;
+
477 
+
478  SPISettings _spiSettings = SPISettings(2000000, MSBFIRST, SPI_MODE0);
+
479 
+
480  bool _initInterface = false;
+
481  SPIClass* _spi = NULL;
+
482 
+
483  bool _useRfSwitch = false;
+
484  RADIOLIB_PIN_TYPE _rxEn = RADIOLIB_NC, _txEn = RADIOLIB_NC;
+
485 
+
486  uint32_t _ATtimeout = 15000;
+
487 };
+
488 
+
489 #endif
+
Module(RADIOLIB_PIN_TYPE rx, RADIOLIB_PIN_TYPE tx, HardwareSerial *serial=nullptr, RADIOLIB_PIN_TYPE rst=RADIOLIB_NC)
UART-based module constructor.
Definition: Module.cpp:29
+
static void pinMode(RADIOLIB_PIN_TYPE pin, RADIOLIB_PIN_MODE mode)
Arduino core pinMode override that checks RADIOLIB_NC as alias for unused pin.
Definition: Module.cpp:323
+
RADIOLIB_PIN_TYPE getIrq() const
Access method to get the pin number of interrupt/GPIO.
Definition: Module.h:314
+
RADIOLIB_PIN_TYPE getRx() const
Access method to get the pin number of UART Rx.
Definition: Module.h:335
+
static RADIOLIB_PIN_STATUS digitalRead(RADIOLIB_PIN_TYPE pin)
Arduino core digitalWrite override that checks RADIOLIB_NC as alias for unused pin.
Definition: Module.cpp:335
+
void SPItransfer(uint8_t cmd, uint8_t reg, uint8_t *dataOut, uint8_t *dataIn, uint8_t numBytes)
SPI single transfer method.
Definition: Module.cpp:276
+
int16_t SPIgetRegValue(uint8_t reg, uint8_t msb=7, uint8_t lsb=0)
SPI read method that automatically masks unused bits. This method is the preferred SPI read mechanism...
Definition: Module.cpp:199
+
SPIClass * getSpi() const
Access method to get the SPI interface.
Definition: Module.h:349
+
SoftwareSerial * ModuleSerial
Internal SoftwareSerial instance.
Definition: Module.h:140
+
char AtLineFeed[3]
Line feed to be used when sending AT commands. Defaults to CR+LF.
Definition: Module.h:151
+
bool ATgetResponse()
Get response after sending AT command.
Definition: Module.cpp:175
+
RADIOLIB_PIN_TYPE getRst() const
Access method to get the pin number of hardware reset pin.
Definition: Module.h:321
+
uint8_t SPIwriteCommand
Basic SPI write command. Defaults to 0x80.
Definition: Module.h:161
+
bool ATsendData(uint8_t *data, uint32_t len)
Send raw AT data. Will also call ATgetResponse.
Definition: Module.cpp:165
+
static void delay(uint32_t ms)
Arduino core delay override.
Definition: Module.cpp:385
+
static void yield()
Arduino core yield override.
Definition: Module.cpp:381
+
static void digitalWrite(RADIOLIB_PIN_TYPE pin, RADIOLIB_PIN_STATUS value)
Arduino core digitalWrite override that checks RADIOLIB_NC as alias for unused pin.
Definition: Module.cpp:329
+
static uint32_t micros()
Arduino core micros override.
Definition: Module.cpp:397
+
RADIOLIB_PIN_TYPE getCs() const
Access method to get the pin number of SPI chip select.
Definition: Module.h:307
+
void ATemptyBuffer()
Empty internal AT buffer.
Definition: Module.cpp:152
+
void SPIwriteRegister(uint8_t reg, uint8_t data)
SPI basic write method. Use of this method is reserved for special cases, SPIsetRegValue should be us...
Definition: Module.cpp:272
+
void term(uint8_t interface)
Terminate low-level module control.
Definition: Module.cpp:137
+
static void noTone(RADIOLIB_PIN_TYPE pin)
Arduino core noTone override that checks RADIOLIB_NC as alias for unused pin and RADIOLIB_TONE_UNSUPP...
Definition: Module.cpp:358
+
int16_t SPIsetRegValue(uint8_t reg, uint8_t value, uint8_t msb=7, uint8_t lsb=0, uint8_t checkInterval=2)
Overwrite-safe SPI write method with verification. This method is the preferred SPI write mechanism.
Definition: Module.cpp:209
+
void setRfSwitchPins(RADIOLIB_PIN_TYPE rxEn, RADIOLIB_PIN_TYPE txEn)
Some modules contain external RF switch controlled by two pins. This function gives RadioLib control ...
Definition: Module.cpp:401
+
RADIOLIB_PIN_TYPE getTx() const
Access method to get the pin number of UART Rx.
Definition: Module.h:342
+
RADIOLIB_PIN_TYPE getGpio() const
Access method to get the pin number of second interrupt/GPIO.
Definition: Module.h:328
+
uint8_t SPIreadRegister(uint8_t reg)
SPI basic read method. Use of this method is reserved for special cases, SPIgetRegValue should be use...
Definition: Module.cpp:262
+
Implements all common low-level SPI/UART/I2C methods to control the wireless module....
Definition: Module.h:17
+
Module & operator=(const Module &mod)
Overload for assignment operator.
Definition: Module.cpp:96
+
void init(uint8_t interface)
Initialize low-level module control.
Definition: Module.cpp:113
+
uint8_t SPIreadCommand
Basic SPI read command. Defaults to 0x00.
Definition: Module.h:156
+
static void detachInterrupt(RADIOLIB_PIN_TYPE interruptNum)
Arduino core detachInterrupt override.
Definition: Module.cpp:377
+
SPISettings getSpiSettings() const
Access method to get the SPI interface settings.
Definition: Module.h:356
+
void setRfSwitchState(RADIOLIB_PIN_STATUS rxPinState, RADIOLIB_PIN_STATUS txPinState)
Set RF switch state.
Definition: Module.cpp:409
+
void SPIreadRegisterBurst(uint8_t reg, uint8_t numBytes, uint8_t *inBytes)
SPI burst read method.
Definition: Module.cpp:258
+
static void tone(RADIOLIB_PIN_TYPE pin, uint16_t value)
Arduino core tone override that checks RADIOLIB_NC as alias for unused pin and RADIOLIB_TONE_UNSUPPOR...
Definition: Module.cpp:342
+
uint32_t baudrate
Baud rate of SoftwareSerial UART communication. Defaults to 9600 baud.
Definition: Module.h:146
+
static uint32_t millis()
Arduino core millis override.
Definition: Module.cpp:393
+
bool ATsendCommand(const char *cmd)
Send AT command. Will also call ATgetResponse.
Definition: Module.cpp:158
+
static void delayMicroseconds(uint32_t us)
Arduino core delayMicroseconds override.
Definition: Module.cpp:389
+
static void attachInterrupt(RADIOLIB_PIN_TYPE interruptNum, void(*userFunc)(void), RADIOLIB_INTERRUPT_STATUS mode)
Arduino core attachInterrupt override.
Definition: Module.cpp:373
+
void SPIwriteRegisterBurst(uint8_t reg, uint8_t *data, uint8_t numBytes)
SPI burst write method.
Definition: Module.cpp:268
diff --git a/_morse_8h_source.html b/_morse_8h_source.html index 9f5146ed..750cca4f 100644 --- a/_morse_8h_source.html +++ b/_morse_8h_source.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/protocols/Morse/Morse.h Source File @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -84,21 +86,165 @@ $(document).ready(function(){initNavTree('_morse_8h_source.html','');});
Morse.h
-
1 #if !defined(_RADIOLIB_MORSE_H) && !defined(RADIOLIB_EXCLUDE_MORSE)
2 #define _RADIOLIB_MORSE_H
3 
4 #include "../../TypeDef.h"
5 #include "../PhysicalLayer/PhysicalLayer.h"
6 #include "../AFSK/AFSK.h"
7 
8 #define MORSE_DOT 0b0
9 #define MORSE_DASH 0b1
10 #define MORSE_GUARDBIT 0b1
11 #define MORSE_UNSUPORTED 0xFF
12 
13 // Morse character table: - using codes defined in ITU-R M.1677-1
14 // - Morse code representation is saved LSb first, using additional bit as guard
15 // - position in array corresponds ASCII code minus MORSE_ASCII_OFFSET
16 // - ASCII characters marked MORSE_UNSUPORTED do not have ITU-R M.1677-1 equivalent
17 static const uint8_t MorseTable[] RADIOLIB_PROGMEM = {
18  0b00, // space
19  0b110101, // ! (unsupported)
20  0b1010010, // "
21  MORSE_UNSUPORTED, // # (unsupported)
22  MORSE_UNSUPORTED, // $ (unsupported)
23  MORSE_UNSUPORTED, // % (unsupported)
24  MORSE_UNSUPORTED, // & (unsupported)
25  0b1011110, // '
26  0b101101, // (
27  0b1101101, // )
28  MORSE_UNSUPORTED, // * (unsupported)
29  0b101010, // +
30  0b1110011, // ,
31  0b1100001, // -
32  0b1101010, // .
33  0b101001, // /
34  0b111111, // 0
35  0b111110, // 1
36  0b111100, // 2
37  0b111000, // 3
38  0b110000, // 4
39  0b100000, // 5
40  0b100001, // 6
41  0b100011, // 7
42  0b100111, // 8
43  0b101111, // 9
44  0b1000111, // :
45  MORSE_UNSUPORTED, // ; (unsupported)
46  MORSE_UNSUPORTED, // < (unsupported)
47  0b110001, // =
48  MORSE_UNSUPORTED, // > (unsupported)
49  0b1001100, // ?
50  0b1010110, // @
51  0b110, // A
52  0b10001, // B
53  0b10101, // C
54  0b1001, // D
55  0b10, // E
56  0b10100, // F
57  0b1011, // G
58  0b10000, // H
59  0b100, // I
60  0b11110, // J
61  0b1101, // K
62  0b10010, // L
63  0b111, // M
64  0b101, // N
65  0b1111, // O
66  0b10110, // P
67  0b11011, // Q
68  0b1010, // R
69  0b1000, // S
70  0b11, // T
71  0b1100, // U
72  0b11000, // V
73  0b1110, // W
74  0b11001, // X
75  0b11101, // Y
76  0b10011, // Z
77  MORSE_UNSUPORTED, // [ (unsupported)
78  MORSE_UNSUPORTED, // \ (unsupported)
79  MORSE_UNSUPORTED, // ] (unsupported)
80  0b1101000, // ^ (unsupported, used as alias for end of work)
81  0b110101 // _ (unsupported, used as alias for starting signal)
82 };
83 
89 class MorseClient {
90  public:
96  explicit MorseClient(PhysicalLayer* phy);
97 
98  #if !defined(RADIOLIB_EXCLUDE_AFSK)
99 
104  explicit MorseClient(AFSKClient* audio);
105  #endif
106 
107  // basic methods
108 
118  int16_t begin(float base, uint8_t speed = 20);
119 
125  size_t startSignal();
126 
127  size_t write(const char* str);
128  size_t write(uint8_t* buff, size_t len);
129  size_t write(uint8_t b);
130 
131  size_t print(__FlashStringHelper*);
132  size_t print(const String &);
133  size_t print(const char[]);
134  size_t print(char);
135  size_t print(unsigned char, int = DEC);
136  size_t print(int, int = DEC);
137  size_t print(unsigned int, int = DEC);
138  size_t print(long, int = DEC);
139  size_t print(unsigned long, int = DEC);
140  size_t print(double, int = 2);
141 
142  size_t println(void);
143  size_t println(__FlashStringHelper*);
144  size_t println(const String &);
145  size_t println(const char[]);
146  size_t println(char);
147  size_t println(unsigned char, int = DEC);
148  size_t println(int, int = DEC);
149  size_t println(unsigned int, int = DEC);
150  size_t println(long, int = DEC);
151  size_t println(unsigned long, int = DEC);
152  size_t println(double, int = 2);
153 
154 #ifndef RADIOLIB_GODMODE
155  private:
156 #endif
157  PhysicalLayer* _phy;
158  #if !defined(RADIOLIB_EXCLUDE_AFSK)
159  AFSKClient* _audio;
160  #endif
161 
162  uint32_t _base = 0, _baseHz = 0;
163  uint16_t _dotLength = 0;
164 
165  size_t printNumber(unsigned long, uint8_t);
166  size_t printFloat(double, uint8_t);
167 
168  int16_t transmitDirect(uint32_t freq = 0, uint32_t freqHz = 0);
169  int16_t standby();
170 };
171 
172 #endif
Client for audio-based transmissions. Requires Arduino tone() function, and a module capable of direc...
Definition: AFSK.h:17
-
int16_t begin(float base, uint8_t speed=20)
Initialization method.
Definition: Morse.cpp:18
-
Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN...
Definition: PhysicalLayer.h:13
-
MorseClient(PhysicalLayer *phy)
Constructor for 2-FSK mode.
Definition: Morse.cpp:4
-
size_t startSignal()
Send start signal.
Definition: Morse.cpp:30
-
Client for Morse Code communication. The public interface is the same as Arduino Serial.
Definition: Morse.h:89
+
1 #if !defined(_RADIOLIB_MORSE_H) && !defined(RADIOLIB_EXCLUDE_MORSE)
+
2 #define _RADIOLIB_MORSE_H
+
3 
+
4 #include "../../TypeDef.h"
+
5 #include "../PhysicalLayer/PhysicalLayer.h"
+
6 #include "../AFSK/AFSK.h"
+
7 
+
8 #define MORSE_DOT 0b0
+
9 #define MORSE_DASH 0b1
+
10 #define MORSE_GUARDBIT 0b1
+
11 #define MORSE_UNSUPORTED 0xFF
+
12 
+
13 // Morse character table: - using codes defined in ITU-R M.1677-1
+
14 // - Morse code representation is saved LSb first, using additional bit as guard
+
15 // - position in array corresponds ASCII code minus MORSE_ASCII_OFFSET
+
16 // - ASCII characters marked MORSE_UNSUPORTED do not have ITU-R M.1677-1 equivalent
+
17 static const uint8_t MorseTable[] RADIOLIB_PROGMEM = {
+
18  0b00, // space
+
19  0b110101, // ! (unsupported)
+
20  0b1010010, // "
+
21  MORSE_UNSUPORTED, // # (unsupported)
+
22  MORSE_UNSUPORTED, // $ (unsupported)
+
23  MORSE_UNSUPORTED, // % (unsupported)
+
24  MORSE_UNSUPORTED, // & (unsupported)
+
25  0b1011110, // '
+
26  0b101101, // (
+
27  0b1101101, // )
+
28  MORSE_UNSUPORTED, // * (unsupported)
+
29  0b101010, // +
+
30  0b1110011, // ,
+
31  0b1100001, // -
+
32  0b1101010, // .
+
33  0b101001, // /
+
34  0b111111, // 0
+
35  0b111110, // 1
+
36  0b111100, // 2
+
37  0b111000, // 3
+
38  0b110000, // 4
+
39  0b100000, // 5
+
40  0b100001, // 6
+
41  0b100011, // 7
+
42  0b100111, // 8
+
43  0b101111, // 9
+
44  0b1000111, // :
+
45  MORSE_UNSUPORTED, // ; (unsupported)
+
46  MORSE_UNSUPORTED, // < (unsupported)
+
47  0b110001, // =
+
48  MORSE_UNSUPORTED, // > (unsupported)
+
49  0b1001100, // ?
+
50  0b1010110, // @
+
51  0b110, // A
+
52  0b10001, // B
+
53  0b10101, // C
+
54  0b1001, // D
+
55  0b10, // E
+
56  0b10100, // F
+
57  0b1011, // G
+
58  0b10000, // H
+
59  0b100, // I
+
60  0b11110, // J
+
61  0b1101, // K
+
62  0b10010, // L
+
63  0b111, // M
+
64  0b101, // N
+
65  0b1111, // O
+
66  0b10110, // P
+
67  0b11011, // Q
+
68  0b1010, // R
+
69  0b1000, // S
+
70  0b11, // T
+
71  0b1100, // U
+
72  0b11000, // V
+
73  0b1110, // W
+
74  0b11001, // X
+
75  0b11101, // Y
+
76  0b10011, // Z
+
77  MORSE_UNSUPORTED, // [ (unsupported)
+
78  MORSE_UNSUPORTED, // \ (unsupported)
+
79  MORSE_UNSUPORTED, // ] (unsupported)
+
80  0b1101000, // ^ (unsupported, used as alias for end of work)
+
81  0b110101 // _ (unsupported, used as alias for starting signal)
+
82 };
+
83 
+
89 class MorseClient {
+
90  public:
+
96  explicit MorseClient(PhysicalLayer* phy);
+
97 
+
98  #if !defined(RADIOLIB_EXCLUDE_AFSK)
+
99 
+
104  explicit MorseClient(AFSKClient* audio);
+
105  #endif
+
106 
+
107  // basic methods
+
108 
+
118  int16_t begin(float base, uint8_t speed = 20);
+
119 
+
125  size_t startSignal();
+
126 
+
127  size_t write(const char* str);
+
128  size_t write(uint8_t* buff, size_t len);
+
129  size_t write(uint8_t b);
+
130 
+
131  size_t print(__FlashStringHelper*);
+
132  size_t print(const String &);
+
133  size_t print(const char[]);
+
134  size_t print(char);
+
135  size_t print(unsigned char, int = DEC);
+
136  size_t print(int, int = DEC);
+
137  size_t print(unsigned int, int = DEC);
+
138  size_t print(long, int = DEC);
+
139  size_t print(unsigned long, int = DEC);
+
140  size_t print(double, int = 2);
+
141 
+
142  size_t println(void);
+
143  size_t println(__FlashStringHelper*);
+
144  size_t println(const String &);
+
145  size_t println(const char[]);
+
146  size_t println(char);
+
147  size_t println(unsigned char, int = DEC);
+
148  size_t println(int, int = DEC);
+
149  size_t println(unsigned int, int = DEC);
+
150  size_t println(long, int = DEC);
+
151  size_t println(unsigned long, int = DEC);
+
152  size_t println(double, int = 2);
+
153 
+
154 #ifndef RADIOLIB_GODMODE
+
155  private:
+
156 #endif
+
157  PhysicalLayer* _phy;
+
158  #if !defined(RADIOLIB_EXCLUDE_AFSK)
+
159  AFSKClient* _audio;
+
160  #endif
+
161 
+
162  uint32_t _base = 0, _baseHz = 0;
+
163  uint16_t _dotLength = 0;
+
164 
+
165  size_t printNumber(unsigned long, uint8_t);
+
166  size_t printFloat(double, uint8_t);
+
167 
+
168  int16_t transmitDirect(uint32_t freq = 0, uint32_t freqHz = 0);
+
169  int16_t standby();
+
170 };
+
171 
+
172 #endif
+
Client for audio-based transmissions. Requires Arduino tone() function, and a module capable of direc...
Definition: AFSK.h:17
+
Client for Morse Code communication. The public interface is the same as Arduino Serial.
Definition: Morse.h:89
+
MorseClient(PhysicalLayer *phy)
Constructor for 2-FSK mode.
Definition: Morse.cpp:4
+
Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN....
Definition: PhysicalLayer.h:13
+
int16_t begin(float base, uint8_t speed=20)
Initialization method.
Definition: Morse.cpp:18
+
size_t startSignal()
Send start signal.
Definition: Morse.cpp:30
diff --git a/_physical_layer_8h_source.html b/_physical_layer_8h_source.html index ffb0f00c..6198eec1 100644 --- a/_physical_layer_8h_source.html +++ b/_physical_layer_8h_source.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/protocols/PhysicalLayer/PhysicalLayer.h Source File @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -84,31 +86,101 @@ $(document).ready(function(){initNavTree('_physical_layer_8h_source.html','');})
PhysicalLayer.h
-
1 #ifndef _RADIOLIB_PHYSICAL_LAYER_H
2 #define _RADIOLIB_PHYSICAL_LAYER_H
3 
4 #include "../../TypeDef.h"
5 
14  public:
15 
16  // constructor
17 
25  PhysicalLayer(float freqStep, size_t maxPacketLength);
26 
27  // basic methods
28 
38  int16_t transmit(__FlashStringHelper* fstr, uint8_t addr = 0);
39 
49  int16_t transmit(String& str, uint8_t addr = 0);
50 
60  int16_t transmit(const char* str, uint8_t addr = 0);
61 
73  virtual int16_t transmit(uint8_t* data, size_t len, uint8_t addr = 0) = 0;
74 
84  int16_t receive(String& str, size_t len = 0);
85 
91  virtual int16_t standby() = 0;
92 
102  virtual int16_t receive(uint8_t* data, size_t len) = 0;
103 
114  int16_t startTransmit(String& str, uint8_t addr = 0);
115 
126  int16_t startTransmit(const char* str, uint8_t addr = 0);
127 
139  virtual int16_t startTransmit(uint8_t* data, size_t len, uint8_t addr = 0) = 0;
140 
150  int16_t readData(String& str, size_t len = 0);
151 
161  virtual int16_t readData(uint8_t* data, size_t len) = 0;
162 
171  virtual int16_t transmitDirect(uint32_t frf = 0) = 0;
172 
179  virtual int16_t receiveDirect() = 0;
180 
181  // configuration methods
182 
191  virtual int16_t setFrequencyDeviation(float freqDev) = 0;
192 
200  virtual int16_t setDataShaping(uint8_t sh) = 0;
201 
209  virtual int16_t setEncoding(uint8_t encoding) = 0;
210 
216  float getFreqStep() const;
217 
225  virtual size_t getPacketLength(bool update = true) = 0;
226 
234  int32_t random(int32_t max);
235 
245  int32_t random(int32_t min, int32_t max);
246 
252  virtual uint8_t random() = 0;
253 
259  int16_t startDirect();
260 
261 #ifndef RADIOLIB_GODMODE
262  private:
263 #endif
264  float _freqStep;
265  size_t _maxPacketLength;
266 };
267 
268 #endif
virtual int16_t setEncoding(uint8_t encoding)=0
Sets FSK data encoding. Only available in FSK mode. Must be implemented in module class...
-
float getFreqStep() const
Gets the module frequency step size that was set in constructor.
Definition: PhysicalLayer.cpp:143
-
int16_t startTransmit(String &str, uint8_t addr=0)
Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes.
Definition: PhysicalLayer.cpp:49
-
virtual uint8_t random()=0
Get one truly random byte from RSSI noise. Must be implemented in module class.
-
virtual size_t getPacketLength(bool update=true)=0
Query modem for the packet length of received payload. Must be implemented in module class...
-
virtual int16_t transmitDirect(uint32_t frf=0)=0
Enables direct transmission mode on pins DIO1 (clock) and DIO2 (data). Must be implemented in module ...
-
virtual int16_t receiveDirect()=0
Enables direct reception mode on pins DIO1 (clock) and DIO2 (data). Must be implemented in module cla...
-
PhysicalLayer(float freqStep, size_t maxPacketLength)
Default constructor.
Definition: PhysicalLayer.cpp:3
-
virtual int16_t setDataShaping(uint8_t sh)=0
Sets GFSK data shaping. Only available in FSK mode. Must be implemented in module class...
-
virtual int16_t standby()=0
Sets module to standby.
-
int16_t startDirect()
Configure module parameters for direct modes. Must be called prior to "ham" modes like RTTY or AX...
Definition: PhysicalLayer.cpp:171
-
int16_t transmit(__FlashStringHelper *fstr, uint8_t addr=0)
Arduino Flash String transmit method.
Definition: PhysicalLayer.cpp:8
-
int16_t receive(String &str, size_t len=0)
Arduino String receive method.
Definition: PhysicalLayer.cpp:98
-
Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN...
Definition: PhysicalLayer.h:13
-
virtual int16_t setFrequencyDeviation(float freqDev)=0
Sets FSK frequency deviation from carrier frequency. Allowed values depend on bit rate setting and mu...
-
int16_t readData(String &str, size_t len=0)
Reads data that was received after calling startReceive method.
Definition: PhysicalLayer.cpp:57
+
1 #ifndef _RADIOLIB_PHYSICAL_LAYER_H
+
2 #define _RADIOLIB_PHYSICAL_LAYER_H
+
3 
+
4 #include "../../TypeDef.h"
+
5 
+ +
14  public:
+
15 
+
16  // constructor
+
17 
+
25  PhysicalLayer(float freqStep, size_t maxPacketLength);
+
26 
+
27  // basic methods
+
28 
+
38  int16_t transmit(__FlashStringHelper* fstr, uint8_t addr = 0);
+
39 
+
49  int16_t transmit(String& str, uint8_t addr = 0);
+
50 
+
60  int16_t transmit(const char* str, uint8_t addr = 0);
+
61 
+
73  virtual int16_t transmit(uint8_t* data, size_t len, uint8_t addr = 0) = 0;
+
74 
+
84  int16_t receive(String& str, size_t len = 0);
+
85 
+
91  virtual int16_t standby() = 0;
+
92 
+
102  virtual int16_t receive(uint8_t* data, size_t len) = 0;
+
103 
+
114  int16_t startTransmit(String& str, uint8_t addr = 0);
+
115 
+
126  int16_t startTransmit(const char* str, uint8_t addr = 0);
+
127 
+
139  virtual int16_t startTransmit(uint8_t* data, size_t len, uint8_t addr = 0) = 0;
+
140 
+
150  int16_t readData(String& str, size_t len = 0);
+
151 
+
161  virtual int16_t readData(uint8_t* data, size_t len) = 0;
+
162 
+
171  virtual int16_t transmitDirect(uint32_t frf = 0) = 0;
+
172 
+
179  virtual int16_t receiveDirect() = 0;
+
180 
+
181  // configuration methods
+
182 
+
191  virtual int16_t setFrequencyDeviation(float freqDev) = 0;
+
192 
+
200  virtual int16_t setDataShaping(uint8_t sh) = 0;
+
201 
+
209  virtual int16_t setEncoding(uint8_t encoding) = 0;
+
210 
+
216  float getFreqStep() const;
+
217 
+
225  virtual size_t getPacketLength(bool update = true) = 0;
+
226 
+
234  int32_t random(int32_t max);
+
235 
+
245  int32_t random(int32_t min, int32_t max);
+
246 
+
252  virtual uint8_t random() = 0;
+
253 
+
259  int16_t startDirect();
+
260 
+
261 #ifndef RADIOLIB_GODMODE
+
262  private:
+
263 #endif
+
264  float _freqStep;
+
265  size_t _maxPacketLength;
+
266 };
+
267 
+
268 #endif
+
int16_t transmit(__FlashStringHelper *fstr, uint8_t addr=0)
Arduino Flash String transmit method.
Definition: PhysicalLayer.cpp:8
+
virtual int16_t standby()=0
Sets module to standby.
+
virtual int16_t setFrequencyDeviation(float freqDev)=0
Sets FSK frequency deviation from carrier frequency. Allowed values depend on bit rate setting and mu...
+
virtual int16_t setEncoding(uint8_t encoding)=0
Sets FSK data encoding. Only available in FSK mode. Must be implemented in module class.
+
virtual int16_t transmitDirect(uint32_t frf=0)=0
Enables direct transmission mode on pins DIO1 (clock) and DIO2 (data). Must be implemented in module ...
+
int16_t readData(String &str, size_t len=0)
Reads data that was received after calling startReceive method.
Definition: PhysicalLayer.cpp:57
+
virtual int16_t receiveDirect()=0
Enables direct reception mode on pins DIO1 (clock) and DIO2 (data). Must be implemented in module cla...
+
PhysicalLayer(float freqStep, size_t maxPacketLength)
Default constructor.
Definition: PhysicalLayer.cpp:3
+
int16_t startDirect()
Configure module parameters for direct modes. Must be called prior to "ham" modes like RTTY or AX....
Definition: PhysicalLayer.cpp:171
+
virtual uint8_t random()=0
Get one truly random byte from RSSI noise. Must be implemented in module class.
+
Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN....
Definition: PhysicalLayer.h:13
+
int16_t receive(String &str, size_t len=0)
Arduino String receive method.
Definition: PhysicalLayer.cpp:98
+
virtual size_t getPacketLength(bool update=true)=0
Query modem for the packet length of received payload. Must be implemented in module class.
+
float getFreqStep() const
Gets the module frequency step size that was set in constructor.
Definition: PhysicalLayer.cpp:143
+
virtual int16_t setDataShaping(uint8_t sh)=0
Sets GFSK data shaping. Only available in FSK mode. Must be implemented in module class.
+
int16_t startTransmit(String &str, uint8_t addr=0)
Interrupt-driven Arduino String transmit method. Unlike the standard transmit method,...
Definition: PhysicalLayer.cpp:49
diff --git a/_r_f69_8h_source.html b/_r_f69_8h_source.html index fb2419bb..5acbab65 100644 --- a/_r_f69_8h_source.html +++ b/_r_f69_8h_source.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/modules/RF69/RF69.h Source File @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -84,67 +86,636 @@ $(document).ready(function(){initNavTree('_r_f69_8h_source.html','');});
RF69.h
-
1 #if !defined(_RADIOLIB_RF69_H)
2 #define _RADIOLIB_RF69_H
3 
4 #include "../../TypeDef.h"
5 
6 #if !defined(RADIOLIB_EXCLUDE_RF69)
7 
8 #include "../../Module.h"
9 
10 #include "../../protocols/PhysicalLayer/PhysicalLayer.h"
11 
12 // RF69 physical layer properties
13 #define RF69_FREQUENCY_STEP_SIZE 61.03515625
14 #define RF69_MAX_PACKET_LENGTH 64
15 #define RF69_CRYSTAL_FREQ 32.0
16 #define RF69_DIV_EXPONENT 19
17 
18 // RF69 register map
19 #define RF69_REG_FIFO 0x00
20 #define RF69_REG_OP_MODE 0x01
21 #define RF69_REG_DATA_MODUL 0x02
22 #define RF69_REG_BITRATE_MSB 0x03
23 #define RF69_REG_BITRATE_LSB 0x04
24 #define RF69_REG_FDEV_MSB 0x05
25 #define RF69_REG_FDEV_LSB 0x06
26 #define RF69_REG_FRF_MSB 0x07
27 #define RF69_REG_FRF_MID 0x08
28 #define RF69_REG_FRF_LSB 0x09
29 #define RF69_REG_OSC_1 0x0A
30 #define RF69_REG_AFC_CTRL 0x0B
31 #define RF69_REG_LISTEN_1 0x0D
32 #define RF69_REG_LISTEN_2 0x0E
33 #define RF69_REG_LISTEN_3 0x0F
34 #define RF69_REG_VERSION 0x10
35 #define RF69_REG_PA_LEVEL 0x11
36 #define RF69_REG_PA_RAMP 0x12
37 #define RF69_REG_OCP 0x13
38 #define RF69_REG_LNA 0x18
39 #define RF69_REG_RX_BW 0x19
40 #define RF69_REG_AFC_BW 0x1A
41 #define RF69_REG_OOK_PEAK 0x1B
42 #define RF69_REG_OOK_AVG 0x1C
43 #define RF69_REG_OOK_FIX 0x1D
44 #define RF69_REG_AFC_FEI 0x1E
45 #define RF69_REG_AFC_MSB 0x1F
46 #define RF69_REG_AFC_LSB 0x20
47 #define RF69_REG_FEI_MSB 0x21
48 #define RF69_REG_FEI_LSB 0x22
49 #define RF69_REG_RSSI_CONFIG 0x23
50 #define RF69_REG_RSSI_VALUE 0x24
51 #define RF69_REG_DIO_MAPPING_1 0x25
52 #define RF69_REG_DIO_MAPPING_2 0x26
53 #define RF69_REG_IRQ_FLAGS_1 0x27
54 #define RF69_REG_IRQ_FLAGS_2 0x28
55 #define RF69_REG_RSSI_THRESH 0x29
56 #define RF69_REG_RX_TIMEOUT_1 0x2A
57 #define RF69_REG_RX_TIMEOUT_2 0x2B
58 #define RF69_REG_PREAMBLE_MSB 0x2C
59 #define RF69_REG_PREAMBLE_LSB 0x2D
60 #define RF69_REG_SYNC_CONFIG 0x2E
61 #define RF69_REG_SYNC_VALUE_1 0x2F
62 #define RF69_REG_SYNC_VALUE_2 0x30
63 #define RF69_REG_SYNC_VALUE_3 0x31
64 #define RF69_REG_SYNC_VALUE_4 0x32
65 #define RF69_REG_SYNC_VALUE_5 0x33
66 #define RF69_REG_SYNC_VALUE_6 0x34
67 #define RF69_REG_SYNC_VALUE_7 0x35
68 #define RF69_REG_SYNC_VALUE_8 0x36
69 #define RF69_REG_PACKET_CONFIG_1 0x37
70 #define RF69_REG_PAYLOAD_LENGTH 0x38
71 #define RF69_REG_NODE_ADRS 0x39
72 #define RF69_REG_BROADCAST_ADRS 0x3A
73 #define RF69_REG_AUTO_MODES 0x3B
74 #define RF69_REG_FIFO_THRESH 0x3C
75 #define RF69_REG_PACKET_CONFIG_2 0x3D
76 #define RF69_REG_AES_KEY_1 0x3E
77 #define RF69_REG_AES_KEY_2 0x3F
78 #define RF69_REG_AES_KEY_3 0x40
79 #define RF69_REG_AES_KEY_4 0x41
80 #define RF69_REG_AES_KEY_5 0x42
81 #define RF69_REG_AES_KEY_6 0x43
82 #define RF69_REG_AES_KEY_7 0x44
83 #define RF69_REG_AES_KEY_8 0x45
84 #define RF69_REG_AES_KEY_9 0x46
85 #define RF69_REG_AES_KEY_10 0x47
86 #define RF69_REG_AES_KEY_11 0x48
87 #define RF69_REG_AES_KEY_12 0x49
88 #define RF69_REG_AES_KEY_13 0x4A
89 #define RF69_REG_AES_KEY_14 0x4B
90 #define RF69_REG_AES_KEY_15 0x4C
91 #define RF69_REG_AES_KEY_16 0x4D
92 #define RF69_REG_TEMP_1 0x4E
93 #define RF69_REG_TEMP_2 0x4F
94 #define RF69_REG_TEST_PA1 0x5A
95 #define RF69_REG_TEST_PA2 0x5C
96 #define RF69_REG_TEST_DAGC 0x6F
97 
98 // RF69 modem settings
99 // RF69_REG_OP_MODE MSB LSB DESCRIPTION
100 #define RF69_SEQUENCER_OFF 0b00000000 // 7 7 disable automatic sequencer
101 #define RF69_SEQUENCER_ON 0b10000000 // 7 7 enable automatic sequencer
102 #define RF69_LISTEN_OFF 0b00000000 // 6 6 disable Listen mode
103 #define RF69_LISTEN_ON 0b01000000 // 6 6 enable Listen mode
104 #define RF69_LISTEN_ABORT 0b00100000 // 5 5 abort Listen mode (has to be set together with RF69_LISTEN_OFF)
105 #define RF69_SLEEP 0b00000000 // 4 2 sleep
106 #define RF69_STANDBY 0b00000100 // 4 2 standby
107 #define RF69_FS 0b00001000 // 4 2 frequency synthesis
108 #define RF69_TX 0b00001100 // 4 2 transmit
109 #define RF69_RX 0b00010000 // 4 2 receive
110 
111 // RF69_REG_DATA_MODUL
112 #define RF69_PACKET_MODE 0b00000000 // 6 5 packet mode (default)
113 #define RF69_CONTINUOUS_MODE_WITH_SYNC 0b01000000 // 6 5 continuous mode with bit synchronizer
114 #define RF69_CONTINUOUS_MODE 0b01100000 // 6 5 continuous mode without bit synchronizer
115 #define RF69_FSK 0b00000000 // 4 3 modulation: FSK (default)
116 #define RF69_OOK 0b00001000 // 4 3 OOK
117 #define RF69_NO_SHAPING 0b00000000 // 1 0 modulation shaping: no shaping (default)
118 #define RF69_FSK_GAUSSIAN_1_0 0b00000001 // 1 0 FSK modulation Gaussian filter, BT = 1.0
119 #define RF69_FSK_GAUSSIAN_0_5 0b00000010 // 1 0 FSK modulation Gaussian filter, BT = 0.5
120 #define RF69_FSK_GAUSSIAN_0_3 0b00000011 // 1 0 FSK modulation Gaussian filter, BT = 0.3
121 #define RF69_OOK_FILTER_BR 0b00000001 // 1 0 OOK modulation filter, f_cutoff = BR
122 #define RF69_OOK_FILTER_2BR 0b00000010 // 1 0 OOK modulation filter, f_cutoff = 2*BR
123 
124 // RF69_REG_BITRATE_MSB + REG_BITRATE_LSB
125 #define RF69_BITRATE_MSB 0x1A // 7 0 bit rate setting: rate = F(XOSC) / BITRATE
126 #define RF69_BITRATE_LSB 0x0B // 7 0 default value: 4.8 kbps 0x40 // 7 0
127 
128 // RF69_REG_FDEV_MSB + REG_FDEV_LSB
129 #define RF69_FDEV_MSB 0x00 // 5 0 frequency deviation: f_dev = f_step * FDEV
130 #define RF69_FDEV_LSB 0x52 // 7 0 default value: 5 kHz
131 
132 // RF69_REG_FRF_MSB + REG_FRF_MID + REG_FRF_LSB
133 #define RF69_FRF_MSB 0xE4 // 7 0 carrier frequency setting: f_RF = (F(XOSC) * FRF)/2^19
134 #define RF69_FRF_MID 0xC0 // 7 0 where F(XOSC) = 32 MHz
135 #define RF69_FRF_LSB 0x00 // 7 0 default value: 915 MHz
136 
137 // RF69_REG_OSC_1
138 #define RF69_RC_CAL_START 0b10000000 // 7 7 force RC oscillator calibration
139 #define RF69_RC_CAL_RUNNING 0b00000000 // 6 6 RC oscillator calibration is still running
140 #define RF69_RC_CAL_DONE 0b00000000 // 5 5 RC oscillator calibration has finished
141 
142 // RF69_REG_AFC_CTRL
143 #define RF69_AFC_LOW_BETA_OFF 0b00000000 // 5 5 standard AFC routine
144 #define RF69_AFC_LOW_BETA_ON 0b00100000 // 5 5 improved AFC routine for signals with modulation index less than 2
145 
146 // RF69_REG_LISTEN_1
147 #define RF69_LISTEN_RES_IDLE_64_US 0b01000000 // 7 6 resolution of Listen mode idle time: 64 us
148 #define RF69_LISTEN_RES_IDLE_4_1_MS 0b10000000 // 7 6 4.1 ms (default)
149 #define RF69_LISTEN_RES_IDLE_262_MS 0b11000000 // 7 6 262 ms
150 #define RF69_LISTEN_RES_RX_64_US 0b00010000 // 5 4 resolution of Listen mode rx time: 64 us (default)
151 #define RF69_LISTEN_RES_RX_4_1_MS 0b00100000 // 5 4 4.1 ms
152 #define RF69_LISTEN_RES_RX_262_MS 0b00110000 // 5 4 262 ms
153 #define RF69_LISTEN_ACCEPT_ABOVE_RSSI_THRESH 0b00000000 // 3 3 packet acceptance criteria: RSSI above threshold
154 #define RF69_LISTEN_ACCEPT_MATCH_SYNC_ADDRESS 0b00001000 // 3 3 RSSI above threshold AND sync address matched
155 #define RF69_LISTEN_END_KEEP_RX 0b00000000 // 2 1 action after packet acceptance: stay in Rx mode
156 #define RF69_LISTEN_END_KEEP_RX_TIMEOUT 0b00000010 // 2 1 stay in Rx mode until timeout (default)
157 #define RF69_LISTEN_END_KEEP_RX_TIMEOUT_RESUME 0b00000100 // 2 1 stay in Rx mode until timeout, Listen mode will resume
158 
159 // RF69_REG_LISTEN_2
160 #define RF69_LISTEN_COEF_IDLE 0xF5 // 7 0 duration of idle phase in Listen mode
161 
162 // RF69_REG_LISTEN_3
163 #define RF69_LISTEN_COEF_RX 0x20 // 7 0 duration of Rx phase in Listen mode
164 
165 // RF69_REG_VERSION
166 #define RF69_CHIP_VERSION 0x24 // 7 0
167 
168 // RF69_REG_PA_LEVEL
169 #define RF69_PA0_OFF 0b00000000 // 7 7 PA0 disabled
170 #define RF69_PA0_ON 0b10000000 // 7 7 PA0 enabled (default)
171 #define RF69_PA1_OFF 0b00000000 // 6 6 PA1 disabled (default)
172 #define RF69_PA1_ON 0b01000000 // 6 6 PA1 enabled
173 #define RF69_PA2_OFF 0b00000000 // 5 5 PA2 disabled (default)
174 #define RF69_PA2_ON 0b00100000 // 5 5 PA2 enabled
175 #define RF69_OUTPUT_POWER 0b00011111 // 4 0 output power: P_out = -18 + OUTPUT_POWER
176 
177 // RF69_REG_PA_RAMP
178 #define RF69_PA_RAMP_3_4_MS 0b00000000 // 3 0 PA ramp rise/fall time: 3.4 ms
179 #define RF69_PA_RAMP_2_MS 0b00000001 // 3 0 2 ms
180 #define RF69_PA_RAMP_1_MS 0b00000010 // 3 0 1 ms
181 #define RF69_PA_RAMP_500_US 0b00000011 // 3 0 500 us
182 #define RF69_PA_RAMP_250_US 0b00000100 // 3 0 250 us
183 #define RF69_PA_RAMP_125_US 0b00000101 // 3 0 125 us
184 #define RF69_PA_RAMP_100_US 0b00000110 // 3 0 100 us
185 #define RF69_PA_RAMP_62_US 0b00000111 // 3 0 62 us
186 #define RF69_PA_RAMP_50_US 0b00001000 // 3 0 50 us
187 #define RF69_PA_RAMP_40_US 0b00001001 // 3 0 40 us (default)
188 #define RF69_PA_RAMP_31_US 0b00001010 // 3 0 31 us
189 #define RF69_PA_RAMP_25_US 0b00001011 // 3 0 25 us
190 #define RF69_PA_RAMP_20_US 0b00001100 // 3 0 20 us
191 #define RF69_PA_RAMP_15_US 0b00001101 // 3 0 15 us
192 #define RF69_PA_RAMP_12_US 0b00001110 // 3 0 12 us
193 #define RF69_PA_RAMP_10_US 0b00001111 // 3 0 10 us
194 
195 // RF69_REG_OCP
196 #define RF69_OCP_OFF 0b00000000 // 4 4 PA overload current protection disabled
197 #define RF69_OCP_ON 0b00010000 // 4 4 PA overload current protection enabled
198 #define RF69_OCP_TRIM 0b00001010 // 3 0 OCP current: I_max(OCP_TRIM = 0b1010) = 95 mA
199 
200 // RF69_REG_LNA
201 #define RF69_LNA_Z_IN_50_OHM 0b00000000 // 7 7 LNA input impedance: 50 ohm
202 #define RF69_LNA_Z_IN_200_OHM 0b10000000 // 7 7 200 ohm
203 #define RF69_LNA_CURRENT_GAIN 0b00001000 // 5 3 manually set LNA current gain
204 #define RF69_LNA_GAIN_AUTO 0b00000000 // 2 0 LNA gain setting: set automatically by AGC
205 #define RF69_LNA_GAIN_MAX 0b00000001 // 2 0 max gain
206 #define RF69_LNA_GAIN_MAX_6_DB 0b00000010 // 2 0 max gain - 6 dB
207 #define RF69_LNA_GAIN_MAX_12_DB 0b00000011 // 2 0 max gain - 12 dB
208 #define RF69_LNA_GAIN_MAX_24_DB 0b00000100 // 2 0 max gain - 24 dB
209 #define RF69_LNA_GAIN_MAX_36_DB 0b00000101 // 2 0 max gain - 36 dB
210 #define RF69_LNA_GAIN_MAX_48_DB 0b00000110 // 2 0 max gain - 48 dB
211 
212 // RF69_REG_RX_BW
213 #define RF69_DCC_FREQ 0b01000000 // 7 5 DC offset canceller cutoff frequency (4% Rx BW by default)
214 #define RF69_RX_BW_MANT_16 0b00000000 // 4 3 Channel filter bandwidth FSK: RxBw = F(XOSC)/(RxBwMant * 2^(RxBwExp + 2))
215 #define RF69_RX_BW_MANT_20 0b00001000 // 4 3 OOK: RxBw = F(XOSC)/(RxBwMant * 2^(RxBwExp + 3))
216 #define RF69_RX_BW_MANT_24 0b00010000 // 4 3
217 #define RF69_RX_BW_EXP 0b00000101 // 2 0 default RxBwExp value = 5
218 
219 // RF69_REG_AFC_BW
220 #define RF69_DCC_FREQ_AFC 0b10000000 // 7 5 default DccFreq parameter for AFC
221 #define RF69_DCC_RX_BW_MANT_AFC 0b00001000 // 4 3 default RxBwMant parameter for AFC
222 #define RF69_DCC_RX_BW_EXP_AFC 0b00000011 // 2 0 default RxBwExp parameter for AFC
223 
224 // RF69_REG_OOK_PEAK
225 #define RF69_OOK_THRESH_FIXED 0b00000000 // 7 6 OOK threshold type: fixed
226 #define RF69_OOK_THRESH_PEAK 0b01000000 // 7 6 peak (default)
227 #define RF69_OOK_THRESH_AVERAGE 0b10000000 // 7 6 average
228 #define RF69_OOK_PEAK_THRESH_STEP_0_5_DB 0b00000000 // 5 3 OOK demodulator step size: 0.5 dB (default)
229 #define RF69_OOK_PEAK_THRESH_STEP_1_0_DB 0b00001000 // 5 3 1.0 dB
230 #define RF69_OOK_PEAK_THRESH_STEP_1_5_DB 0b00010000 // 5 3 1.5 dB
231 #define RF69_OOK_PEAK_THRESH_STEP_2_0_DB 0b00011000 // 5 3 2.0 dB
232 #define RF69_OOK_PEAK_THRESH_STEP_3_0_DB 0b00100000 // 5 3 3.0 dB
233 #define RF69_OOK_PEAK_THRESH_STEP_4_0_DB 0b00101000 // 5 3 4.0 dB
234 #define RF69_OOK_PEAK_THRESH_STEP_5_0_DB 0b00110000 // 5 3 5.0 dB
235 #define RF69_OOK_PEAK_THRESH_STEP_6_0_DB 0b00111000 // 5 3 6.0 dB
236 #define RF69_OOK_PEAK_THRESH_DEC_1_1_CHIP 0b00000000 // 2 0 OOK demodulator step period: once per chip (default)
237 #define RF69_OOK_PEAK_THRESH_DEC_1_2_CHIP 0b00000001 // 2 0 once every 2 chips
238 #define RF69_OOK_PEAK_THRESH_DEC_1_4_CHIP 0b00000010 // 2 0 once every 4 chips
239 #define RF69_OOK_PEAK_THRESH_DEC_1_8_CHIP 0b00000011 // 2 0 once every 8 chips
240 #define RF69_OOK_PEAK_THRESH_DEC_2_1_CHIP 0b00000100 // 2 0 2 times per chip
241 #define RF69_OOK_PEAK_THRESH_DEC_4_1_CHIP 0b00000101 // 2 0 4 times per chip
242 #define RF69_OOK_PEAK_THRESH_DEC_8_1_CHIP 0b00000110 // 2 0 8 times per chip
243 #define RF69_OOK_PEAK_THRESH_DEC_16_1_CHIP 0b00000111 // 2 0 16 times per chip
244 
245 // RF69_REG_OOK_AVG
246 #define RF69_OOK_AVG_THRESH_FILT_32_PI 0b00000000 // 7 6 OOK average filter coefficient: chip rate / 32*pi
247 #define RF69_OOK_AVG_THRESH_FILT_8_PI 0b01000000 // 7 6 chip rate / 8*pi
248 #define RF69_OOK_AVG_THRESH_FILT_4_PI 0b10000000 // 7 6 chip rate / 4*pi (default)
249 #define RF69_OOK_AVG_THRESH_FILT_2_PI 0b11000000 // 7 6 chip rate / 2*pi
250 
251 // RF69_REG_OOK_FIX
252 #define RF69_OOK_FIXED_THRESH 0b00000110 // 7 0 default OOK fixed threshold (6 dB)
253 
254 // RF69_REG_AFC_FEI
255 #define RF69_FEI_RUNNING 0b00000000 // 6 6 FEI status: on-going
256 #define RF69_FEI_DONE 0b01000000 // 6 6 done
257 #define RF69_FEI_START 0b00100000 // 5 5 force new FEI measurement
258 #define RF69_AFC_RUNNING 0b00000000 // 4 4 AFC status: on-going
259 #define RF69_AFC_DONE 0b00010000 // 4 4 done
260 #define RF69_AFC_AUTOCLEAR_OFF 0b00000000 // 3 3 AFC register autoclear disabled
261 #define RF69_AFC_AUTOCLEAR_ON 0b00001000 // 3 3 AFC register autoclear enabled
262 #define RF69_AFC_AUTO_OFF 0b00000000 // 2 2 perform AFC only manually
263 #define RF69_AFC_AUTO_ON 0b00000100 // 2 2 perform AFC each time Rx mode is started
264 #define RF69_AFC_CLEAR 0b00000010 // 1 1 clear AFC register
265 #define RF69_AFC_START 0b00000001 // 0 0 start AFC
266 
267 // RF69_REG_RSSI_CONFIG
268 #define RF69_RSSI_RUNNING 0b00000000 // 1 1 RSSI status: on-going
269 #define RF69_RSSI_DONE 0b00000010 // 1 1 done
270 #define RF69_RSSI_START 0b00000001 // 0 0 start RSSI measurement
271 
272 // RF69_REG_DIO_MAPPING_1
273 #define RF69_DIO0_CONT_MODE_READY 0b11000000 // 7 6
274 #define RF69_DIO0_CONT_PLL_LOCK 0b00000000 // 7 6
275 #define RF69_DIO0_CONT_SYNC_ADDRESS 0b00000000 // 7 6
276 #define RF69_DIO0_CONT_TIMEOUT 0b01000000 // 7 6
277 #define RF69_DIO0_CONT_RSSI 0b10000000 // 7 6
278 #define RF69_DIO0_CONT_TX_READY 0b01000000 // 7 6
279 #define RF69_DIO0_PACK_PLL_LOCK 0b11000000 // 7 6
280 #define RF69_DIO0_PACK_CRC_OK 0b00000000 // 7 6
281 #define RF69_DIO0_PACK_PAYLOAD_READY 0b01000000 // 7 6
282 #define RF69_DIO0_PACK_SYNC_ADDRESS 0b10000000 // 7 6
283 #define RF69_DIO0_PACK_RSSI 0b11000000 // 7 6
284 #define RF69_DIO0_PACK_PACKET_SENT 0b00000000 // 7 6
285 #define RF69_DIO0_PACK_TX_READY 0b01000000 // 7 6
286 #define RF69_DIO1_CONT_PLL_LOCK 0b00110000 // 5 4
287 #define RF69_DIO1_CONT_DCLK 0b00000000 // 5 4
288 #define RF69_DIO1_CONT_RX_READY 0b00010000 // 5 4
289 #define RF69_DIO1_CONT_SYNC_ADDRESS 0b00110000 // 5 4
290 #define RF69_DIO1_CONT_TX_READY 0b00010000 // 5 4
291 #define RF69_DIO1_PACK_FIFO_LEVEL 0b00000000 // 5 4
292 #define RF69_DIO1_PACK_FIFO_FULL 0b00010000 // 5 4
293 #define RF69_DIO1_PACK_FIFO_NOT_EMPTY 0b00100000 // 5 4
294 #define RF69_DIO1_PACK_PLL_LOCK 0b00110000 // 5 4
295 #define RF69_DIO1_PACK_TIMEOUT 0b00110000 // 5 4
296 #define RF69_DIO2_CONT_DATA 0b00000000 // 3 2
297 
298 // RF69_REG_DIO_MAPPING_2
299 #define RF69_CLK_OUT_FXOSC 0b00000000 // 2 0 ClkOut frequency: F(XOSC)
300 #define RF69_CLK_OUT_FXOSC_2 0b00000001 // 2 0 F(XOSC) / 2
301 #define RF69_CLK_OUT_FXOSC_4 0b00000010 // 2 0 F(XOSC) / 4
302 #define RF69_CLK_OUT_FXOSC_8 0b00000011 // 2 0 F(XOSC) / 8
303 #define RF69_CLK_OUT_FXOSC_16 0b00000100 // 2 0 F(XOSC) / 16
304 #define RF69_CLK_OUT_FXOSC_32 0b00000101 // 2 0 F(XOSC) / 31
305 #define RF69_CLK_OUT_RC 0b00000110 // 2 0 RC
306 #define RF69_CLK_OUT_OFF 0b00000111 // 2 0 disabled (default)
307 
308 // RF69_REG_IRQ_FLAGS_1
309 #define RF69_IRQ_MODE_READY 0b10000000 // 7 7 requested mode was set
310 #define RF69_IRQ_RX_READY 0b01000000 // 6 6 Rx mode ready
311 #define RF69_IRQ_TX_READY 0b00100000 // 5 5 Tx mode ready
312 #define RF69_IRQ_PLL_LOCK 0b00010000 // 4 4 PLL is locked
313 #define RF69_IRQ_RSSI 0b00001000 // 3 3 RSSI value exceeded RssiThreshold
314 #define RF69_IRQ_TIMEOUT 0b00000100 // 2 2 timeout occurred
315 #define RF69_IRQ_AUTO_MODE 0b00000010 // 1 1 entered intermediate mode
316 #define RF69_SYNC_ADDRESS_MATCH 0b00000001 // 0 0 sync address detected
317 
318 // RF69_REG_IRQ_FLAGS_2
319 #define RF69_IRQ_FIFO_FULL 0b10000000 // 7 7 FIFO is full
320 #define RF69_IRQ_FIFO_NOT_EMPTY 0b01000000 // 6 6 FIFO contains at least 1 byte
321 #define RF69_IRQ_FIFO_LEVEL 0b00100000 // 5 5 FIFO contains more than FifoThreshold bytes
322 #define RF69_IRQ_FIFO_OVERRUN 0b00010000 // 4 4 FIFO overrun occurred
323 #define RF69_IRQ_PACKET_SENT 0b00001000 // 3 3 packet was sent
324 #define RF69_IRQ_PAYLOAD_READY 0b00000100 // 2 2 last payload byte received and CRC check passed
325 #define RF69_IRQ_CRC_OK 0b00000010 // 1 1 CRC check passed
326 
327 // RF69_REG_RSSI_THRESH
328 #define RF69_RSSI_THRESHOLD 0xE4 // 7 0 RSSI threshold level (2 dB by default)
329 
330 // RF69_REG_RX_TIMEOUT_1
331 #define RF69_TIMEOUT_RX_START_OFF 0x00 // 7 0 RSSI interrupt timeout disabled (default)
332 #define RF69_TIMEOUT_RX_START 0xFF // 7 0 timeout will occur if RSSI interrupt is not received
333 
334 // RF69_REG_RX_TIMEOUT_2
335 #define RF69_TIMEOUT_RSSI_THRESH_OFF 0x00 // 7 0 PayloadReady interrupt timeout disabled (default)
336 #define RF69_TIMEOUT_RSSI_THRESH 0xFF // 7 0 timeout will occur if PayloadReady interrupt is not received
337 
338 // RF69_REG_PREAMBLE_MSB + REG_PREAMBLE_MSB
339 #define RF69_PREAMBLE_MSB 0x00 // 7 0 2-byte preamble size value
340 #define RF69_PREAMBLE_LSB 0x03 // 7 0
341 
342 // RF69_REG_SYNC_CONFIG
343 #define RF69_SYNC_OFF 0b00000000 // 7 7 sync word detection off
344 #define RF69_SYNC_ON 0b10000000 // 7 7 sync word detection on (default)
345 #define RF69_FIFO_FILL_CONDITION_SYNC 0b00000000 // 6 6 FIFO fill condition: on SyncAddress interrupt (default)
346 #define RF69_FIFO_FILL_CONDITION 0b01000000 // 6 6 as long as the bit is set
347 #define RF69_SYNC_SIZE 0b00001000 // 5 3 size of sync word: SyncSize + 1 bytes
348 #define RF69_SYNC_TOL 0b00000000 // 2 0 number of tolerated errors in sync word
349 
350 // RF69_REG_SYNC_VALUE_1 - SYNC_VALUE_8
351 #define RF69_SYNC_BYTE_1 0x01 // 7 0 sync word: 1st byte (MSB)
352 #define RF69_SYNC_BYTE_2 0x01 // 7 0 2nd byte
353 #define RF69_SYNC_BYTE_3 0x01 // 7 0 3rd byte
354 #define RF69_SYNC_BYTE_4 0x01 // 7 0 4th byte
355 #define RF69_SYNC_BYTE_5 0x01 // 7 0 5th byte
356 #define RF69_SYNC_BYTE_6 0x01 // 7 0 6th byte
357 #define RF69_SYNC_BYTE_7 0x01 // 7 0 7th byte
358 #define RF69_SYNC_BYTE_8 0x01 // 7 0 8th byte (LSB)
359 
360 // RF69_REG_PACKET_CONFIG_1
361 #define RF69_PACKET_FORMAT_FIXED 0b00000000 // 7 7 fixed packet length (default)
362 #define RF69_PACKET_FORMAT_VARIABLE 0b10000000 // 7 7 variable packet length
363 #define RF69_DC_FREE_NONE 0b00000000 // 6 5 DC-free encoding: none (default)
364 #define RF69_DC_FREE_MANCHESTER 0b00100000 // 6 5 Manchester
365 #define RF69_DC_FREE_WHITENING 0b01000000 // 6 5 Whitening
366 #define RF69_CRC_OFF 0b00000000 // 4 4 CRC disabled
367 #define RF69_CRC_ON 0b00010000 // 4 4 CRC enabled (default)
368 #define RF69_CRC_AUTOCLEAR_ON 0b00000000 // 3 3 discard packet when CRC check fails (default)
369 #define RF69_CRC_AUTOCLEAR_OFF 0b00001000 // 3 3 keep packet when CRC check fails
370 #define RF69_ADDRESS_FILTERING_OFF 0b00000000 // 2 1 address filtering: none (default)
371 #define RF69_ADDRESS_FILTERING_NODE 0b00000010 // 2 1 node
372 #define RF69_ADDRESS_FILTERING_NODE_BROADCAST 0b00000100 // 2 1 node or broadcast
373 
374 // RF69_REG_PAYLOAD_LENGTH
375 #define RF69_PAYLOAD_LENGTH 0xFF // 7 0 payload length
376 
377 // RF69_REG_AUTO_MODES
378 #define RF69_ENTER_COND_NONE 0b00000000 // 7 5 condition for entering intermediate mode: none, AutoModes disabled (default)
379 #define RF69_ENTER_COND_FIFO_NOT_EMPTY 0b00100000 // 7 5 FifoNotEmpty rising edge
380 #define RF69_ENTER_COND_FIFO_LEVEL 0b01000000 // 7 5 FifoLevel rising edge
381 #define RF69_ENTER_COND_CRC_OK 0b01100000 // 7 5 CrcOk rising edge
382 #define RF69_ENTER_COND_PAYLOAD_READY 0b10000000 // 7 5 PayloadReady rising edge
383 #define RF69_ENTER_COND_SYNC_ADDRESS 0b10100000 // 7 5 SyncAddress rising edge
384 #define RF69_ENTER_COND_PACKET_SENT 0b11000000 // 7 5 PacketSent rising edge
385 #define RF69_ENTER_COND_FIFO_EMPTY 0b11100000 // 7 5 FifoNotEmpty falling edge
386 #define RF69_EXIT_COND_NONE 0b00000000 // 4 2 condition for exiting intermediate mode: none, AutoModes disabled (default)
387 #define RF69_EXIT_COND_FIFO_EMPTY 0b00100000 // 4 2 FifoNotEmpty falling edge
388 #define RF69_EXIT_COND_FIFO_LEVEL 0b01000000 // 4 2 FifoLevel rising edge
389 #define RF69_EXIT_COND_CRC_OK 0b01100000 // 4 2 CrcOk rising edge
390 #define RF69_EXIT_COND_PAYLOAD_READY 0b10000000 // 4 2 PayloadReady rising edge
391 #define RF69_EXIT_COND_SYNC_ADDRESS 0b10100000 // 4 2 SyncAddress rising edge
392 #define RF69_EXIT_COND_PACKET_SENT 0b11000000 // 4 2 PacketSent rising edge
393 #define RF69_EXIT_COND_TIMEOUT 0b11100000 // 4 2 timeout rising edge
394 #define RF69_INTER_MODE_SLEEP 0b00000000 // 1 0 intermediate mode: sleep (default)
395 #define RF69_INTER_MODE_STANDBY 0b00000001 // 1 0 standby
396 #define RF69_INTER_MODE_RX 0b00000010 // 1 0 Rx
397 #define RF69_INTER_MODE_TX 0b00000011 // 1 0 Tx
398 
399 // RF69_REG_FIFO_THRESH
400 #define RF69_TX_START_CONDITION_FIFO_LEVEL 0b00000000 // 7 7 packet transmission start condition: FifoLevel
401 #define RF69_TX_START_CONDITION_FIFO_NOT_EMPTY 0b10000000 // 7 7 FifoNotEmpty (default)
402 #define RF69_FIFO_THRESHOLD 0b00001111 // 6 0 default threshold to trigger FifoLevel interrupt
403 
404 // RF69_REG_PACKET_CONFIG_2
405 #define RF69_INTER_PACKET_RX_DELAY 0b00000000 // 7 4 delay between FIFO empty and start of new RSSI phase
406 #define RF69_RESTART_RX 0b00000100 // 2 2 force receiver into wait mode
407 #define RF69_AUTO_RX_RESTART_OFF 0b00000000 // 1 1 auto Rx restart disabled
408 #define RF69_AUTO_RX_RESTART_ON 0b00000010 // 1 1 auto Rx restart enabled (default)
409 #define RF69_AES_OFF 0b00000000 // 0 0 AES encryption disabled (default)
410 #define RF69_AES_ON 0b00000001 // 0 0 AES encryption enabled, payload size limited to 66 bytes
411 
412 // RF69_REG_TEMP_1
413 #define RF69_TEMP_MEAS_START 0b00001000 // 3 3 trigger temperature measurement
414 #define RF69_TEMP_MEAS_RUNNING 0b00000100 // 2 2 temperature measurement status: on-going
415 #define RF69_TEMP_MEAS_DONE 0b00000000 // 2 2 done
416 
417 // RF69_REG_TEST_DAGC
418 #define RF69_CONTINUOUS_DAGC_NORMAL 0x00 // 7 0 fading margin improvement: normal mode
419 #define RF69_CONTINUOUS_DAGC_LOW_BETA_ON 0x20 // 7 0 improved mode for AfcLowBetaOn
420 #define RF69_CONTINUOUS_DAGC_LOW_BETA_OFF 0x30 // 7 0 improved mode for AfcLowBetaOff (default)
421 
422 // RF69_REG_TEST_PA1
423 #define RF69_PA1_NORMAL 0x55 // 7 0 PA_BOOST: none
424 #define RF69_PA1_20_DBM 0x5D // 7 0 +20 dBm
425 
426 // RF69_REG_TEST_PA2
427 #define RF69_PA2_NORMAL 0x70 // 7 0 PA_BOOST: none
428 #define RF69_PA2_20_DBM 0x7C // 7 0 +20 dBm
429 
435 class RF69: public PhysicalLayer {
436  public:
437  // introduce PhysicalLayer overloads
442 
448  RF69(Module* module);
449 
450  // basic methods
451 
469  int16_t begin(float freq = 434.0, float br = 48.0, float freqDev = 50.0, float rxBw = 125.0, int8_t power = 10, uint8_t preambleLen = 16);
470 
474  void reset();
475 
488  int16_t transmit(uint8_t* data, size_t len, uint8_t addr = 0) override;
489 
500  int16_t receive(uint8_t* data, size_t len) override;
501 
507  int16_t sleep();
508 
514  int16_t standby() override;
515 
523  int16_t transmitDirect(uint32_t frf = 0) override;
524 
530  int16_t receiveDirect() override;
531 
535  int16_t packetMode();
536 
537  // hardware AES support
538 
544  void setAESKey(uint8_t* key);
545 
551  int16_t enableAES();
552 
558  int16_t disableAES();
559 
560  // interrupt methods
561 
567  void setDio0Action(void (*func)(void));
568 
572  void clearDio0Action();
573 
579  void setDio1Action(void (*func)(void));
580 
584  void clearDio1Action();
585 
598  int16_t startTransmit(uint8_t* data, size_t len, uint8_t addr = 0) override;
599 
605  int16_t startReceive();
606 
616  int16_t readData(uint8_t* data, size_t len) override;
617 
618  // configuration methods
619 
627  int16_t setFrequency(float freq);
628 
636  int16_t setBitRate(float br);
637 
645  int16_t setRxBandwidth(float rxBw);
646 
654  int16_t setFrequencyDeviation(float freqDev) override;
655 
665  int16_t setOutputPower(int8_t power, bool highPower = false);
666 
676  int16_t setSyncWord(uint8_t* syncWord, size_t len, uint8_t maxErrBits = 0);
677 
685  int16_t setPreambleLength(uint8_t preambleLen);
686 
694  int16_t setNodeAddress(uint8_t nodeAddr);
695 
703  int16_t setBroadcastAddress(uint8_t broadAddr);
704 
710  int16_t disableAddressFiltering();
711 
712  // measurement methods
713 
719  void setAmbientTemperature(int16_t tempAmbient);
720 
726  int16_t getTemperature();
727 
735  size_t getPacketLength(bool update = true) override;
736 
744  int16_t fixedPacketLengthMode(uint8_t len = RF69_MAX_PACKET_LENGTH);
745 
753  int16_t variablePacketLengthMode(uint8_t maxLen = RF69_MAX_PACKET_LENGTH);
754 
762  int16_t enableSyncWordFiltering(uint8_t maxErrBits = 0);
763 
769  int16_t disableSyncWordFiltering();
770 
778  int16_t setCrcFiltering(bool crcOn = true);
779 
787  int16_t setPromiscuousMode(bool promiscuous = true);
788 
797  int16_t setDataShaping(uint8_t sh) override;
798 
807  int16_t setEncoding(uint8_t encoding) override;
808 
814  float getRSSI();
815 
824  void setRfSwitchPins(RADIOLIB_PIN_TYPE rxEn, RADIOLIB_PIN_TYPE txEn);
825 
831  uint8_t random();
832 
838  int16_t getChipVersion();
839 
840 #ifndef RADIOLIB_GODMODE
841  protected:
842 #endif
843  Module* _mod;
844 
845  float _br = 0;
846  float _rxBw = 0;
847  int16_t _tempOffset = 0;
848  int8_t _power = 0;
849 
850  size_t _packetLength = 0;
851  bool _packetLengthQueried = false;
852  uint8_t _packetLengthConfig = RF69_PACKET_FORMAT_VARIABLE;
853 
854  bool _promiscuous = false;
855 
856  uint8_t _syncWordLength = 2;
857 
858  int16_t config();
859  int16_t directMode();
860  int16_t setPacketMode(uint8_t mode, uint8_t len);
861 
862 #ifndef RADIOLIB_GODMODE
863  private:
864 #endif
865  int16_t setMode(uint8_t mode);
866  void clearIRQFlags();
867 };
868 
869 #endif
870 
871 #endif
int16_t setFrequencyDeviation(float freqDev) override
Sets frequency deviation.
Definition: RF69.cpp:507
-
int16_t disableAddressFiltering()
Disables address filtering. Calling this method will also erase previously set addresses.
Definition: RF69.cpp:621
-
int16_t setSyncWord(uint8_t *syncWord, size_t len, uint8_t maxErrBits=0)
Sets sync word. Up to 8 bytes can be set as sync word.
Definition: RF69.cpp:569
-
int16_t setPromiscuousMode(bool promiscuous=true)
Set modem in "sniff" mode: no packet filtering (e.g., no preamble, sync word, address, CRC).
Definition: RF69.cpp:701
-
int16_t standby() override
Sets the module to standby mode.
Definition: RF69.cpp:171
-
int16_t disableSyncWordFiltering()
Disable preamble and sync word filtering and generation.
Definition: RF69.cpp:681
-
size_t getPacketLength(bool update=true) override
Query modem for the packet length of received payload.
Definition: RF69.cpp:655
-
int16_t startTransmit(String &str, uint8_t addr=0)
Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes.
Definition: PhysicalLayer.cpp:49
-
int16_t startReceive()
Interrupt-driven receive method. GDO0 will be activated when full packet is received.
Definition: RF69.cpp:241
-
int16_t setNodeAddress(uint8_t nodeAddr)
Sets node address. Calling this method will also enable address filtering for node address only...
Definition: RF69.cpp:603
-
void setRfSwitchPins(RADIOLIB_PIN_TYPE rxEn, RADIOLIB_PIN_TYPE txEn)
Some modules contain external RF switch controlled by two pins. This function gives RadioLib control ...
Definition: RF69.cpp:769
-
int16_t setBitRate(float br)
Sets bit rate. Allowed values range from 1.2 to 300.0 kbps.
Definition: RF69.cpp:391
-
int16_t receive(uint8_t *data, size_t len) override
Blocking binary receive method. Overloads for string-based transmissions are implemented in PhysicalL...
Definition: RF69.cpp:139
-
void clearDio0Action()
Clears interrupt service routine to call when DIO0 activates.
Definition: RF69.cpp:273
-
void setAmbientTemperature(int16_t tempAmbient)
Sets ambient temperature. Required to correct values from on-board temperature sensor.
Definition: RF69.cpp:634
-
int16_t transmitDirect(uint32_t frf=0) override
Starts direct mode transmission.
Definition: RF69.cpp:179
-
int16_t setPreambleLength(uint8_t preambleLen)
Sets preamble length.
Definition: RF69.cpp:592
-
int16_t sleep()
Sets the module to sleep mode.
Definition: RF69.cpp:163
-
int16_t disableAES()
Disables AES encryption.
Definition: RF69.cpp:237
-
int16_t variablePacketLengthMode(uint8_t maxLen=RF69_MAX_PACKET_LENGTH)
Set modem in variable packet length mode.
Definition: RF69.cpp:672
-
Control class for RF69 module. Also serves as base class for SX1231.
Definition: RF69.h:435
-
int16_t transmit(uint8_t *data, size_t len, uint8_t addr=0) override
Blocking binary transmit method. Overloads for string-based transmissions are implemented in Physical...
Definition: RF69.cpp:110
-
void clearDio1Action()
Clears interrupt service routine to call when DIO1 activates.
Definition: RF69.cpp:285
-
int16_t setDataShaping(uint8_t sh) override
Sets Gaussian filter bandwidth-time product that will be used for data shaping. Allowed values are RA...
Definition: RF69.cpp:727
-
int16_t setCrcFiltering(bool crcOn=true)
Enable CRC filtering and generation.
Definition: RF69.cpp:693
-
int16_t begin(float freq=434.0, float br=48.0, float freqDev=50.0, float rxBw=125.0, int8_t power=10, uint8_t preambleLen=16)
Initialization method.
Definition: RF69.cpp:8
-
void setDio0Action(void(*func)(void))
Sets interrupt service routine to call when DIO0 activates.
Definition: RF69.cpp:269
-
Implements all common low-level SPI/UART/I2C methods to control the wireless module. Every module class contains one private instance of this class.
Definition: Module.h:17
-
int16_t transmit(__FlashStringHelper *fstr, uint8_t addr=0)
Arduino Flash String transmit method.
Definition: PhysicalLayer.cpp:8
-
int16_t setEncoding(uint8_t encoding) override
Sets transmission encoding. Allowed values are RADIOLIB_ENCODING_NRZ, RADIOLIB_ENCODING_MANCHESTER an...
Definition: RF69.cpp:747
-
int16_t setBroadcastAddress(uint8_t broadAddr)
Sets broadcast address. Calling this method will also enable address filtering for node and broadcast...
Definition: RF69.cpp:612
-
void setDio1Action(void(*func)(void))
Sets interrupt service routine to call when DIO1 activates.
Definition: RF69.cpp:277
-
int16_t receive(String &str, size_t len=0)
Arduino String receive method.
Definition: PhysicalLayer.cpp:98
-
int16_t readData(uint8_t *data, size_t len) override
Reads data received after calling startReceive method.
Definition: RF69.cpp:343
-
float getRSSI()
Gets RSSI (Recorded Signal Strength Indicator) of the last received packet.
Definition: RF69.cpp:765
-
int16_t enableAES()
Enables AES encryption.
Definition: RF69.cpp:233
-
int16_t setFrequency(float freq)
Sets carrier frequency. Allowed values are in bands 290.0 to 340.0 MHz, 431.0 to 510.0 MHz and 862.0 to 1020.0 MHz.
Definition: RF69.cpp:372
-
Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN...
Definition: PhysicalLayer.h:13
-
int16_t fixedPacketLengthMode(uint8_t len=RF69_MAX_PACKET_LENGTH)
Set modem in fixed packet length mode.
Definition: RF69.cpp:668
-
void setAESKey(uint8_t *key)
Sets AES key.
Definition: RF69.cpp:229
-
int16_t setRxBandwidth(float rxBw)
Sets receiver bandwidth. Allowed values are 2.6, 3.1, 3.9, 5.2, 6.3, 7.8, 10.4, 12.5, 15.6, 20.8, 25.0, 31.3, 41.7, 50.0, 62.5, 83.3, 100.0, 125.0, 166.7, 200.0, 250.0, 333.3, 400.0 and 500.0 kHz.
Definition: RF69.cpp:412
-
void reset()
Reset method. Will reset the chip to the default state using RST pin.
Definition: RF69.cpp:102
-
uint8_t random()
Get one truly random byte from RSSI noise.
Definition: RF69.cpp:773
-
int16_t setOutputPower(int8_t power, bool highPower=false)
Sets output power. Allowed values range from -18 to 13 dBm for low power modules (RF69C/CW) or -2 to ...
Definition: RF69.cpp:531
-
int16_t packetMode()
Stops direct mode. It is required to call this method to switch from direct transmissions to packet-b...
Definition: RF69.cpp:225
-
RF69(Module *module)
Default constructor.
Definition: RF69.cpp:4
-
int16_t receiveDirect() override
Starts direct mode reception.
Definition: RF69.cpp:200
-
int16_t readData(String &str, size_t len=0)
Reads data that was received after calling startReceive method.
Definition: PhysicalLayer.cpp:57
-
int16_t getChipVersion()
Read version SPI register. Should return RF69_CHIP_VERSION (0x24) if SX127x is connected and working...
Definition: RF69.cpp:792
-
int16_t enableSyncWordFiltering(uint8_t maxErrBits=0)
Enable sync word filtering and generation.
Definition: RF69.cpp:676
-
int16_t startTransmit(uint8_t *data, size_t len, uint8_t addr=0) override
Interrupt-driven binary transmit method. Overloads for string-based transmissions are implemented in ...
Definition: RF69.cpp:292
-
int16_t getTemperature()
Measures temperature.
Definition: RF69.cpp:638
+
1 #if !defined(_RADIOLIB_RF69_H)
+
2 #define _RADIOLIB_RF69_H
+
3 
+
4 #include "../../TypeDef.h"
+
5 
+
6 #if !defined(RADIOLIB_EXCLUDE_RF69)
+
7 
+
8 #include "../../Module.h"
+
9 
+
10 #include "../../protocols/PhysicalLayer/PhysicalLayer.h"
+
11 
+
12 // RF69 physical layer properties
+
13 #define RF69_FREQUENCY_STEP_SIZE 61.03515625
+
14 #define RF69_MAX_PACKET_LENGTH 64
+
15 #define RF69_CRYSTAL_FREQ 32.0
+
16 #define RF69_DIV_EXPONENT 19
+
17 
+
18 // RF69 register map
+
19 #define RF69_REG_FIFO 0x00
+
20 #define RF69_REG_OP_MODE 0x01
+
21 #define RF69_REG_DATA_MODUL 0x02
+
22 #define RF69_REG_BITRATE_MSB 0x03
+
23 #define RF69_REG_BITRATE_LSB 0x04
+
24 #define RF69_REG_FDEV_MSB 0x05
+
25 #define RF69_REG_FDEV_LSB 0x06
+
26 #define RF69_REG_FRF_MSB 0x07
+
27 #define RF69_REG_FRF_MID 0x08
+
28 #define RF69_REG_FRF_LSB 0x09
+
29 #define RF69_REG_OSC_1 0x0A
+
30 #define RF69_REG_AFC_CTRL 0x0B
+
31 #define RF69_REG_LISTEN_1 0x0D
+
32 #define RF69_REG_LISTEN_2 0x0E
+
33 #define RF69_REG_LISTEN_3 0x0F
+
34 #define RF69_REG_VERSION 0x10
+
35 #define RF69_REG_PA_LEVEL 0x11
+
36 #define RF69_REG_PA_RAMP 0x12
+
37 #define RF69_REG_OCP 0x13
+
38 #define RF69_REG_LNA 0x18
+
39 #define RF69_REG_RX_BW 0x19
+
40 #define RF69_REG_AFC_BW 0x1A
+
41 #define RF69_REG_OOK_PEAK 0x1B
+
42 #define RF69_REG_OOK_AVG 0x1C
+
43 #define RF69_REG_OOK_FIX 0x1D
+
44 #define RF69_REG_AFC_FEI 0x1E
+
45 #define RF69_REG_AFC_MSB 0x1F
+
46 #define RF69_REG_AFC_LSB 0x20
+
47 #define RF69_REG_FEI_MSB 0x21
+
48 #define RF69_REG_FEI_LSB 0x22
+
49 #define RF69_REG_RSSI_CONFIG 0x23
+
50 #define RF69_REG_RSSI_VALUE 0x24
+
51 #define RF69_REG_DIO_MAPPING_1 0x25
+
52 #define RF69_REG_DIO_MAPPING_2 0x26
+
53 #define RF69_REG_IRQ_FLAGS_1 0x27
+
54 #define RF69_REG_IRQ_FLAGS_2 0x28
+
55 #define RF69_REG_RSSI_THRESH 0x29
+
56 #define RF69_REG_RX_TIMEOUT_1 0x2A
+
57 #define RF69_REG_RX_TIMEOUT_2 0x2B
+
58 #define RF69_REG_PREAMBLE_MSB 0x2C
+
59 #define RF69_REG_PREAMBLE_LSB 0x2D
+
60 #define RF69_REG_SYNC_CONFIG 0x2E
+
61 #define RF69_REG_SYNC_VALUE_1 0x2F
+
62 #define RF69_REG_SYNC_VALUE_2 0x30
+
63 #define RF69_REG_SYNC_VALUE_3 0x31
+
64 #define RF69_REG_SYNC_VALUE_4 0x32
+
65 #define RF69_REG_SYNC_VALUE_5 0x33
+
66 #define RF69_REG_SYNC_VALUE_6 0x34
+
67 #define RF69_REG_SYNC_VALUE_7 0x35
+
68 #define RF69_REG_SYNC_VALUE_8 0x36
+
69 #define RF69_REG_PACKET_CONFIG_1 0x37
+
70 #define RF69_REG_PAYLOAD_LENGTH 0x38
+
71 #define RF69_REG_NODE_ADRS 0x39
+
72 #define RF69_REG_BROADCAST_ADRS 0x3A
+
73 #define RF69_REG_AUTO_MODES 0x3B
+
74 #define RF69_REG_FIFO_THRESH 0x3C
+
75 #define RF69_REG_PACKET_CONFIG_2 0x3D
+
76 #define RF69_REG_AES_KEY_1 0x3E
+
77 #define RF69_REG_AES_KEY_2 0x3F
+
78 #define RF69_REG_AES_KEY_3 0x40
+
79 #define RF69_REG_AES_KEY_4 0x41
+
80 #define RF69_REG_AES_KEY_5 0x42
+
81 #define RF69_REG_AES_KEY_6 0x43
+
82 #define RF69_REG_AES_KEY_7 0x44
+
83 #define RF69_REG_AES_KEY_8 0x45
+
84 #define RF69_REG_AES_KEY_9 0x46
+
85 #define RF69_REG_AES_KEY_10 0x47
+
86 #define RF69_REG_AES_KEY_11 0x48
+
87 #define RF69_REG_AES_KEY_12 0x49
+
88 #define RF69_REG_AES_KEY_13 0x4A
+
89 #define RF69_REG_AES_KEY_14 0x4B
+
90 #define RF69_REG_AES_KEY_15 0x4C
+
91 #define RF69_REG_AES_KEY_16 0x4D
+
92 #define RF69_REG_TEMP_1 0x4E
+
93 #define RF69_REG_TEMP_2 0x4F
+
94 #define RF69_REG_TEST_PA1 0x5A
+
95 #define RF69_REG_TEST_PA2 0x5C
+
96 #define RF69_REG_TEST_DAGC 0x6F
+
97 
+
98 // RF69 modem settings
+
99 // RF69_REG_OP_MODE MSB LSB DESCRIPTION
+
100 #define RF69_SEQUENCER_OFF 0b00000000 // 7 7 disable automatic sequencer
+
101 #define RF69_SEQUENCER_ON 0b10000000 // 7 7 enable automatic sequencer
+
102 #define RF69_LISTEN_OFF 0b00000000 // 6 6 disable Listen mode
+
103 #define RF69_LISTEN_ON 0b01000000 // 6 6 enable Listen mode
+
104 #define RF69_LISTEN_ABORT 0b00100000 // 5 5 abort Listen mode (has to be set together with RF69_LISTEN_OFF)
+
105 #define RF69_SLEEP 0b00000000 // 4 2 sleep
+
106 #define RF69_STANDBY 0b00000100 // 4 2 standby
+
107 #define RF69_FS 0b00001000 // 4 2 frequency synthesis
+
108 #define RF69_TX 0b00001100 // 4 2 transmit
+
109 #define RF69_RX 0b00010000 // 4 2 receive
+
110 
+
111 // RF69_REG_DATA_MODUL
+
112 #define RF69_PACKET_MODE 0b00000000 // 6 5 packet mode (default)
+
113 #define RF69_CONTINUOUS_MODE_WITH_SYNC 0b01000000 // 6 5 continuous mode with bit synchronizer
+
114 #define RF69_CONTINUOUS_MODE 0b01100000 // 6 5 continuous mode without bit synchronizer
+
115 #define RF69_FSK 0b00000000 // 4 3 modulation: FSK (default)
+
116 #define RF69_OOK 0b00001000 // 4 3 OOK
+
117 #define RF69_NO_SHAPING 0b00000000 // 1 0 modulation shaping: no shaping (default)
+
118 #define RF69_FSK_GAUSSIAN_1_0 0b00000001 // 1 0 FSK modulation Gaussian filter, BT = 1.0
+
119 #define RF69_FSK_GAUSSIAN_0_5 0b00000010 // 1 0 FSK modulation Gaussian filter, BT = 0.5
+
120 #define RF69_FSK_GAUSSIAN_0_3 0b00000011 // 1 0 FSK modulation Gaussian filter, BT = 0.3
+
121 #define RF69_OOK_FILTER_BR 0b00000001 // 1 0 OOK modulation filter, f_cutoff = BR
+
122 #define RF69_OOK_FILTER_2BR 0b00000010 // 1 0 OOK modulation filter, f_cutoff = 2*BR
+
123 
+
124 // RF69_REG_BITRATE_MSB + REG_BITRATE_LSB
+
125 #define RF69_BITRATE_MSB 0x1A // 7 0 bit rate setting: rate = F(XOSC) / BITRATE
+
126 #define RF69_BITRATE_LSB 0x0B // 7 0 default value: 4.8 kbps 0x40 // 7 0
+
127 
+
128 // RF69_REG_FDEV_MSB + REG_FDEV_LSB
+
129 #define RF69_FDEV_MSB 0x00 // 5 0 frequency deviation: f_dev = f_step * FDEV
+
130 #define RF69_FDEV_LSB 0x52 // 7 0 default value: 5 kHz
+
131 
+
132 // RF69_REG_FRF_MSB + REG_FRF_MID + REG_FRF_LSB
+
133 #define RF69_FRF_MSB 0xE4 // 7 0 carrier frequency setting: f_RF = (F(XOSC) * FRF)/2^19
+
134 #define RF69_FRF_MID 0xC0 // 7 0 where F(XOSC) = 32 MHz
+
135 #define RF69_FRF_LSB 0x00 // 7 0 default value: 915 MHz
+
136 
+
137 // RF69_REG_OSC_1
+
138 #define RF69_RC_CAL_START 0b10000000 // 7 7 force RC oscillator calibration
+
139 #define RF69_RC_CAL_RUNNING 0b00000000 // 6 6 RC oscillator calibration is still running
+
140 #define RF69_RC_CAL_DONE 0b00000000 // 5 5 RC oscillator calibration has finished
+
141 
+
142 // RF69_REG_AFC_CTRL
+
143 #define RF69_AFC_LOW_BETA_OFF 0b00000000 // 5 5 standard AFC routine
+
144 #define RF69_AFC_LOW_BETA_ON 0b00100000 // 5 5 improved AFC routine for signals with modulation index less than 2
+
145 
+
146 // RF69_REG_LISTEN_1
+
147 #define RF69_LISTEN_RES_IDLE_64_US 0b01000000 // 7 6 resolution of Listen mode idle time: 64 us
+
148 #define RF69_LISTEN_RES_IDLE_4_1_MS 0b10000000 // 7 6 4.1 ms (default)
+
149 #define RF69_LISTEN_RES_IDLE_262_MS 0b11000000 // 7 6 262 ms
+
150 #define RF69_LISTEN_RES_RX_64_US 0b00010000 // 5 4 resolution of Listen mode rx time: 64 us (default)
+
151 #define RF69_LISTEN_RES_RX_4_1_MS 0b00100000 // 5 4 4.1 ms
+
152 #define RF69_LISTEN_RES_RX_262_MS 0b00110000 // 5 4 262 ms
+
153 #define RF69_LISTEN_ACCEPT_ABOVE_RSSI_THRESH 0b00000000 // 3 3 packet acceptance criteria: RSSI above threshold
+
154 #define RF69_LISTEN_ACCEPT_MATCH_SYNC_ADDRESS 0b00001000 // 3 3 RSSI above threshold AND sync address matched
+
155 #define RF69_LISTEN_END_KEEP_RX 0b00000000 // 2 1 action after packet acceptance: stay in Rx mode
+
156 #define RF69_LISTEN_END_KEEP_RX_TIMEOUT 0b00000010 // 2 1 stay in Rx mode until timeout (default)
+
157 #define RF69_LISTEN_END_KEEP_RX_TIMEOUT_RESUME 0b00000100 // 2 1 stay in Rx mode until timeout, Listen mode will resume
+
158 
+
159 // RF69_REG_LISTEN_2
+
160 #define RF69_LISTEN_COEF_IDLE 0xF5 // 7 0 duration of idle phase in Listen mode
+
161 
+
162 // RF69_REG_LISTEN_3
+
163 #define RF69_LISTEN_COEF_RX 0x20 // 7 0 duration of Rx phase in Listen mode
+
164 
+
165 // RF69_REG_VERSION
+
166 #define RF69_CHIP_VERSION 0x24 // 7 0
+
167 
+
168 // RF69_REG_PA_LEVEL
+
169 #define RF69_PA0_OFF 0b00000000 // 7 7 PA0 disabled
+
170 #define RF69_PA0_ON 0b10000000 // 7 7 PA0 enabled (default)
+
171 #define RF69_PA1_OFF 0b00000000 // 6 6 PA1 disabled (default)
+
172 #define RF69_PA1_ON 0b01000000 // 6 6 PA1 enabled
+
173 #define RF69_PA2_OFF 0b00000000 // 5 5 PA2 disabled (default)
+
174 #define RF69_PA2_ON 0b00100000 // 5 5 PA2 enabled
+
175 #define RF69_OUTPUT_POWER 0b00011111 // 4 0 output power: P_out = -18 + OUTPUT_POWER
+
176 
+
177 // RF69_REG_PA_RAMP
+
178 #define RF69_PA_RAMP_3_4_MS 0b00000000 // 3 0 PA ramp rise/fall time: 3.4 ms
+
179 #define RF69_PA_RAMP_2_MS 0b00000001 // 3 0 2 ms
+
180 #define RF69_PA_RAMP_1_MS 0b00000010 // 3 0 1 ms
+
181 #define RF69_PA_RAMP_500_US 0b00000011 // 3 0 500 us
+
182 #define RF69_PA_RAMP_250_US 0b00000100 // 3 0 250 us
+
183 #define RF69_PA_RAMP_125_US 0b00000101 // 3 0 125 us
+
184 #define RF69_PA_RAMP_100_US 0b00000110 // 3 0 100 us
+
185 #define RF69_PA_RAMP_62_US 0b00000111 // 3 0 62 us
+
186 #define RF69_PA_RAMP_50_US 0b00001000 // 3 0 50 us
+
187 #define RF69_PA_RAMP_40_US 0b00001001 // 3 0 40 us (default)
+
188 #define RF69_PA_RAMP_31_US 0b00001010 // 3 0 31 us
+
189 #define RF69_PA_RAMP_25_US 0b00001011 // 3 0 25 us
+
190 #define RF69_PA_RAMP_20_US 0b00001100 // 3 0 20 us
+
191 #define RF69_PA_RAMP_15_US 0b00001101 // 3 0 15 us
+
192 #define RF69_PA_RAMP_12_US 0b00001110 // 3 0 12 us
+
193 #define RF69_PA_RAMP_10_US 0b00001111 // 3 0 10 us
+
194 
+
195 // RF69_REG_OCP
+
196 #define RF69_OCP_OFF 0b00000000 // 4 4 PA overload current protection disabled
+
197 #define RF69_OCP_ON 0b00010000 // 4 4 PA overload current protection enabled
+
198 #define RF69_OCP_TRIM 0b00001010 // 3 0 OCP current: I_max(OCP_TRIM = 0b1010) = 95 mA
+
199 
+
200 // RF69_REG_LNA
+
201 #define RF69_LNA_Z_IN_50_OHM 0b00000000 // 7 7 LNA input impedance: 50 ohm
+
202 #define RF69_LNA_Z_IN_200_OHM 0b10000000 // 7 7 200 ohm
+
203 #define RF69_LNA_CURRENT_GAIN 0b00001000 // 5 3 manually set LNA current gain
+
204 #define RF69_LNA_GAIN_AUTO 0b00000000 // 2 0 LNA gain setting: set automatically by AGC
+
205 #define RF69_LNA_GAIN_MAX 0b00000001 // 2 0 max gain
+
206 #define RF69_LNA_GAIN_MAX_6_DB 0b00000010 // 2 0 max gain - 6 dB
+
207 #define RF69_LNA_GAIN_MAX_12_DB 0b00000011 // 2 0 max gain - 12 dB
+
208 #define RF69_LNA_GAIN_MAX_24_DB 0b00000100 // 2 0 max gain - 24 dB
+
209 #define RF69_LNA_GAIN_MAX_36_DB 0b00000101 // 2 0 max gain - 36 dB
+
210 #define RF69_LNA_GAIN_MAX_48_DB 0b00000110 // 2 0 max gain - 48 dB
+
211 
+
212 // RF69_REG_RX_BW
+
213 #define RF69_DCC_FREQ 0b01000000 // 7 5 DC offset canceller cutoff frequency (4% Rx BW by default)
+
214 #define RF69_RX_BW_MANT_16 0b00000000 // 4 3 Channel filter bandwidth FSK: RxBw = F(XOSC)/(RxBwMant * 2^(RxBwExp + 2))
+
215 #define RF69_RX_BW_MANT_20 0b00001000 // 4 3 OOK: RxBw = F(XOSC)/(RxBwMant * 2^(RxBwExp + 3))
+
216 #define RF69_RX_BW_MANT_24 0b00010000 // 4 3
+
217 #define RF69_RX_BW_EXP 0b00000101 // 2 0 default RxBwExp value = 5
+
218 
+
219 // RF69_REG_AFC_BW
+
220 #define RF69_DCC_FREQ_AFC 0b10000000 // 7 5 default DccFreq parameter for AFC
+
221 #define RF69_DCC_RX_BW_MANT_AFC 0b00001000 // 4 3 default RxBwMant parameter for AFC
+
222 #define RF69_DCC_RX_BW_EXP_AFC 0b00000011 // 2 0 default RxBwExp parameter for AFC
+
223 
+
224 // RF69_REG_OOK_PEAK
+
225 #define RF69_OOK_THRESH_FIXED 0b00000000 // 7 6 OOK threshold type: fixed
+
226 #define RF69_OOK_THRESH_PEAK 0b01000000 // 7 6 peak (default)
+
227 #define RF69_OOK_THRESH_AVERAGE 0b10000000 // 7 6 average
+
228 #define RF69_OOK_PEAK_THRESH_STEP_0_5_DB 0b00000000 // 5 3 OOK demodulator step size: 0.5 dB (default)
+
229 #define RF69_OOK_PEAK_THRESH_STEP_1_0_DB 0b00001000 // 5 3 1.0 dB
+
230 #define RF69_OOK_PEAK_THRESH_STEP_1_5_DB 0b00010000 // 5 3 1.5 dB
+
231 #define RF69_OOK_PEAK_THRESH_STEP_2_0_DB 0b00011000 // 5 3 2.0 dB
+
232 #define RF69_OOK_PEAK_THRESH_STEP_3_0_DB 0b00100000 // 5 3 3.0 dB
+
233 #define RF69_OOK_PEAK_THRESH_STEP_4_0_DB 0b00101000 // 5 3 4.0 dB
+
234 #define RF69_OOK_PEAK_THRESH_STEP_5_0_DB 0b00110000 // 5 3 5.0 dB
+
235 #define RF69_OOK_PEAK_THRESH_STEP_6_0_DB 0b00111000 // 5 3 6.0 dB
+
236 #define RF69_OOK_PEAK_THRESH_DEC_1_1_CHIP 0b00000000 // 2 0 OOK demodulator step period: once per chip (default)
+
237 #define RF69_OOK_PEAK_THRESH_DEC_1_2_CHIP 0b00000001 // 2 0 once every 2 chips
+
238 #define RF69_OOK_PEAK_THRESH_DEC_1_4_CHIP 0b00000010 // 2 0 once every 4 chips
+
239 #define RF69_OOK_PEAK_THRESH_DEC_1_8_CHIP 0b00000011 // 2 0 once every 8 chips
+
240 #define RF69_OOK_PEAK_THRESH_DEC_2_1_CHIP 0b00000100 // 2 0 2 times per chip
+
241 #define RF69_OOK_PEAK_THRESH_DEC_4_1_CHIP 0b00000101 // 2 0 4 times per chip
+
242 #define RF69_OOK_PEAK_THRESH_DEC_8_1_CHIP 0b00000110 // 2 0 8 times per chip
+
243 #define RF69_OOK_PEAK_THRESH_DEC_16_1_CHIP 0b00000111 // 2 0 16 times per chip
+
244 
+
245 // RF69_REG_OOK_AVG
+
246 #define RF69_OOK_AVG_THRESH_FILT_32_PI 0b00000000 // 7 6 OOK average filter coefficient: chip rate / 32*pi
+
247 #define RF69_OOK_AVG_THRESH_FILT_8_PI 0b01000000 // 7 6 chip rate / 8*pi
+
248 #define RF69_OOK_AVG_THRESH_FILT_4_PI 0b10000000 // 7 6 chip rate / 4*pi (default)
+
249 #define RF69_OOK_AVG_THRESH_FILT_2_PI 0b11000000 // 7 6 chip rate / 2*pi
+
250 
+
251 // RF69_REG_OOK_FIX
+
252 #define RF69_OOK_FIXED_THRESH 0b00000110 // 7 0 default OOK fixed threshold (6 dB)
+
253 
+
254 // RF69_REG_AFC_FEI
+
255 #define RF69_FEI_RUNNING 0b00000000 // 6 6 FEI status: on-going
+
256 #define RF69_FEI_DONE 0b01000000 // 6 6 done
+
257 #define RF69_FEI_START 0b00100000 // 5 5 force new FEI measurement
+
258 #define RF69_AFC_RUNNING 0b00000000 // 4 4 AFC status: on-going
+
259 #define RF69_AFC_DONE 0b00010000 // 4 4 done
+
260 #define RF69_AFC_AUTOCLEAR_OFF 0b00000000 // 3 3 AFC register autoclear disabled
+
261 #define RF69_AFC_AUTOCLEAR_ON 0b00001000 // 3 3 AFC register autoclear enabled
+
262 #define RF69_AFC_AUTO_OFF 0b00000000 // 2 2 perform AFC only manually
+
263 #define RF69_AFC_AUTO_ON 0b00000100 // 2 2 perform AFC each time Rx mode is started
+
264 #define RF69_AFC_CLEAR 0b00000010 // 1 1 clear AFC register
+
265 #define RF69_AFC_START 0b00000001 // 0 0 start AFC
+
266 
+
267 // RF69_REG_RSSI_CONFIG
+
268 #define RF69_RSSI_RUNNING 0b00000000 // 1 1 RSSI status: on-going
+
269 #define RF69_RSSI_DONE 0b00000010 // 1 1 done
+
270 #define RF69_RSSI_START 0b00000001 // 0 0 start RSSI measurement
+
271 
+
272 // RF69_REG_DIO_MAPPING_1
+
273 #define RF69_DIO0_CONT_MODE_READY 0b11000000 // 7 6
+
274 #define RF69_DIO0_CONT_PLL_LOCK 0b00000000 // 7 6
+
275 #define RF69_DIO0_CONT_SYNC_ADDRESS 0b00000000 // 7 6
+
276 #define RF69_DIO0_CONT_TIMEOUT 0b01000000 // 7 6
+
277 #define RF69_DIO0_CONT_RSSI 0b10000000 // 7 6
+
278 #define RF69_DIO0_CONT_TX_READY 0b01000000 // 7 6
+
279 #define RF69_DIO0_PACK_PLL_LOCK 0b11000000 // 7 6
+
280 #define RF69_DIO0_PACK_CRC_OK 0b00000000 // 7 6
+
281 #define RF69_DIO0_PACK_PAYLOAD_READY 0b01000000 // 7 6
+
282 #define RF69_DIO0_PACK_SYNC_ADDRESS 0b10000000 // 7 6
+
283 #define RF69_DIO0_PACK_RSSI 0b11000000 // 7 6
+
284 #define RF69_DIO0_PACK_PACKET_SENT 0b00000000 // 7 6
+
285 #define RF69_DIO0_PACK_TX_READY 0b01000000 // 7 6
+
286 #define RF69_DIO1_CONT_PLL_LOCK 0b00110000 // 5 4
+
287 #define RF69_DIO1_CONT_DCLK 0b00000000 // 5 4
+
288 #define RF69_DIO1_CONT_RX_READY 0b00010000 // 5 4
+
289 #define RF69_DIO1_CONT_SYNC_ADDRESS 0b00110000 // 5 4
+
290 #define RF69_DIO1_CONT_TX_READY 0b00010000 // 5 4
+
291 #define RF69_DIO1_PACK_FIFO_LEVEL 0b00000000 // 5 4
+
292 #define RF69_DIO1_PACK_FIFO_FULL 0b00010000 // 5 4
+
293 #define RF69_DIO1_PACK_FIFO_NOT_EMPTY 0b00100000 // 5 4
+
294 #define RF69_DIO1_PACK_PLL_LOCK 0b00110000 // 5 4
+
295 #define RF69_DIO1_PACK_TIMEOUT 0b00110000 // 5 4
+
296 #define RF69_DIO2_CONT_DATA 0b00000000 // 3 2
+
297 
+
298 // RF69_REG_DIO_MAPPING_2
+
299 #define RF69_CLK_OUT_FXOSC 0b00000000 // 2 0 ClkOut frequency: F(XOSC)
+
300 #define RF69_CLK_OUT_FXOSC_2 0b00000001 // 2 0 F(XOSC) / 2
+
301 #define RF69_CLK_OUT_FXOSC_4 0b00000010 // 2 0 F(XOSC) / 4
+
302 #define RF69_CLK_OUT_FXOSC_8 0b00000011 // 2 0 F(XOSC) / 8
+
303 #define RF69_CLK_OUT_FXOSC_16 0b00000100 // 2 0 F(XOSC) / 16
+
304 #define RF69_CLK_OUT_FXOSC_32 0b00000101 // 2 0 F(XOSC) / 31
+
305 #define RF69_CLK_OUT_RC 0b00000110 // 2 0 RC
+
306 #define RF69_CLK_OUT_OFF 0b00000111 // 2 0 disabled (default)
+
307 
+
308 // RF69_REG_IRQ_FLAGS_1
+
309 #define RF69_IRQ_MODE_READY 0b10000000 // 7 7 requested mode was set
+
310 #define RF69_IRQ_RX_READY 0b01000000 // 6 6 Rx mode ready
+
311 #define RF69_IRQ_TX_READY 0b00100000 // 5 5 Tx mode ready
+
312 #define RF69_IRQ_PLL_LOCK 0b00010000 // 4 4 PLL is locked
+
313 #define RF69_IRQ_RSSI 0b00001000 // 3 3 RSSI value exceeded RssiThreshold
+
314 #define RF69_IRQ_TIMEOUT 0b00000100 // 2 2 timeout occurred
+
315 #define RF69_IRQ_AUTO_MODE 0b00000010 // 1 1 entered intermediate mode
+
316 #define RF69_SYNC_ADDRESS_MATCH 0b00000001 // 0 0 sync address detected
+
317 
+
318 // RF69_REG_IRQ_FLAGS_2
+
319 #define RF69_IRQ_FIFO_FULL 0b10000000 // 7 7 FIFO is full
+
320 #define RF69_IRQ_FIFO_NOT_EMPTY 0b01000000 // 6 6 FIFO contains at least 1 byte
+
321 #define RF69_IRQ_FIFO_LEVEL 0b00100000 // 5 5 FIFO contains more than FifoThreshold bytes
+
322 #define RF69_IRQ_FIFO_OVERRUN 0b00010000 // 4 4 FIFO overrun occurred
+
323 #define RF69_IRQ_PACKET_SENT 0b00001000 // 3 3 packet was sent
+
324 #define RF69_IRQ_PAYLOAD_READY 0b00000100 // 2 2 last payload byte received and CRC check passed
+
325 #define RF69_IRQ_CRC_OK 0b00000010 // 1 1 CRC check passed
+
326 
+
327 // RF69_REG_RSSI_THRESH
+
328 #define RF69_RSSI_THRESHOLD 0xE4 // 7 0 RSSI threshold level (2 dB by default)
+
329 
+
330 // RF69_REG_RX_TIMEOUT_1
+
331 #define RF69_TIMEOUT_RX_START_OFF 0x00 // 7 0 RSSI interrupt timeout disabled (default)
+
332 #define RF69_TIMEOUT_RX_START 0xFF // 7 0 timeout will occur if RSSI interrupt is not received
+
333 
+
334 // RF69_REG_RX_TIMEOUT_2
+
335 #define RF69_TIMEOUT_RSSI_THRESH_OFF 0x00 // 7 0 PayloadReady interrupt timeout disabled (default)
+
336 #define RF69_TIMEOUT_RSSI_THRESH 0xFF // 7 0 timeout will occur if PayloadReady interrupt is not received
+
337 
+
338 // RF69_REG_PREAMBLE_MSB + REG_PREAMBLE_MSB
+
339 #define RF69_PREAMBLE_MSB 0x00 // 7 0 2-byte preamble size value
+
340 #define RF69_PREAMBLE_LSB 0x03 // 7 0
+
341 
+
342 // RF69_REG_SYNC_CONFIG
+
343 #define RF69_SYNC_OFF 0b00000000 // 7 7 sync word detection off
+
344 #define RF69_SYNC_ON 0b10000000 // 7 7 sync word detection on (default)
+
345 #define RF69_FIFO_FILL_CONDITION_SYNC 0b00000000 // 6 6 FIFO fill condition: on SyncAddress interrupt (default)
+
346 #define RF69_FIFO_FILL_CONDITION 0b01000000 // 6 6 as long as the bit is set
+
347 #define RF69_SYNC_SIZE 0b00001000 // 5 3 size of sync word: SyncSize + 1 bytes
+
348 #define RF69_SYNC_TOL 0b00000000 // 2 0 number of tolerated errors in sync word
+
349 
+
350 // RF69_REG_SYNC_VALUE_1 - SYNC_VALUE_8
+
351 #define RF69_SYNC_BYTE_1 0x01 // 7 0 sync word: 1st byte (MSB)
+
352 #define RF69_SYNC_BYTE_2 0x01 // 7 0 2nd byte
+
353 #define RF69_SYNC_BYTE_3 0x01 // 7 0 3rd byte
+
354 #define RF69_SYNC_BYTE_4 0x01 // 7 0 4th byte
+
355 #define RF69_SYNC_BYTE_5 0x01 // 7 0 5th byte
+
356 #define RF69_SYNC_BYTE_6 0x01 // 7 0 6th byte
+
357 #define RF69_SYNC_BYTE_7 0x01 // 7 0 7th byte
+
358 #define RF69_SYNC_BYTE_8 0x01 // 7 0 8th byte (LSB)
+
359 
+
360 // RF69_REG_PACKET_CONFIG_1
+
361 #define RF69_PACKET_FORMAT_FIXED 0b00000000 // 7 7 fixed packet length (default)
+
362 #define RF69_PACKET_FORMAT_VARIABLE 0b10000000 // 7 7 variable packet length
+
363 #define RF69_DC_FREE_NONE 0b00000000 // 6 5 DC-free encoding: none (default)
+
364 #define RF69_DC_FREE_MANCHESTER 0b00100000 // 6 5 Manchester
+
365 #define RF69_DC_FREE_WHITENING 0b01000000 // 6 5 Whitening
+
366 #define RF69_CRC_OFF 0b00000000 // 4 4 CRC disabled
+
367 #define RF69_CRC_ON 0b00010000 // 4 4 CRC enabled (default)
+
368 #define RF69_CRC_AUTOCLEAR_ON 0b00000000 // 3 3 discard packet when CRC check fails (default)
+
369 #define RF69_CRC_AUTOCLEAR_OFF 0b00001000 // 3 3 keep packet when CRC check fails
+
370 #define RF69_ADDRESS_FILTERING_OFF 0b00000000 // 2 1 address filtering: none (default)
+
371 #define RF69_ADDRESS_FILTERING_NODE 0b00000010 // 2 1 node
+
372 #define RF69_ADDRESS_FILTERING_NODE_BROADCAST 0b00000100 // 2 1 node or broadcast
+
373 
+
374 // RF69_REG_PAYLOAD_LENGTH
+
375 #define RF69_PAYLOAD_LENGTH 0xFF // 7 0 payload length
+
376 
+
377 // RF69_REG_AUTO_MODES
+
378 #define RF69_ENTER_COND_NONE 0b00000000 // 7 5 condition for entering intermediate mode: none, AutoModes disabled (default)
+
379 #define RF69_ENTER_COND_FIFO_NOT_EMPTY 0b00100000 // 7 5 FifoNotEmpty rising edge
+
380 #define RF69_ENTER_COND_FIFO_LEVEL 0b01000000 // 7 5 FifoLevel rising edge
+
381 #define RF69_ENTER_COND_CRC_OK 0b01100000 // 7 5 CrcOk rising edge
+
382 #define RF69_ENTER_COND_PAYLOAD_READY 0b10000000 // 7 5 PayloadReady rising edge
+
383 #define RF69_ENTER_COND_SYNC_ADDRESS 0b10100000 // 7 5 SyncAddress rising edge
+
384 #define RF69_ENTER_COND_PACKET_SENT 0b11000000 // 7 5 PacketSent rising edge
+
385 #define RF69_ENTER_COND_FIFO_EMPTY 0b11100000 // 7 5 FifoNotEmpty falling edge
+
386 #define RF69_EXIT_COND_NONE 0b00000000 // 4 2 condition for exiting intermediate mode: none, AutoModes disabled (default)
+
387 #define RF69_EXIT_COND_FIFO_EMPTY 0b00100000 // 4 2 FifoNotEmpty falling edge
+
388 #define RF69_EXIT_COND_FIFO_LEVEL 0b01000000 // 4 2 FifoLevel rising edge
+
389 #define RF69_EXIT_COND_CRC_OK 0b01100000 // 4 2 CrcOk rising edge
+
390 #define RF69_EXIT_COND_PAYLOAD_READY 0b10000000 // 4 2 PayloadReady rising edge
+
391 #define RF69_EXIT_COND_SYNC_ADDRESS 0b10100000 // 4 2 SyncAddress rising edge
+
392 #define RF69_EXIT_COND_PACKET_SENT 0b11000000 // 4 2 PacketSent rising edge
+
393 #define RF69_EXIT_COND_TIMEOUT 0b11100000 // 4 2 timeout rising edge
+
394 #define RF69_INTER_MODE_SLEEP 0b00000000 // 1 0 intermediate mode: sleep (default)
+
395 #define RF69_INTER_MODE_STANDBY 0b00000001 // 1 0 standby
+
396 #define RF69_INTER_MODE_RX 0b00000010 // 1 0 Rx
+
397 #define RF69_INTER_MODE_TX 0b00000011 // 1 0 Tx
+
398 
+
399 // RF69_REG_FIFO_THRESH
+
400 #define RF69_TX_START_CONDITION_FIFO_LEVEL 0b00000000 // 7 7 packet transmission start condition: FifoLevel
+
401 #define RF69_TX_START_CONDITION_FIFO_NOT_EMPTY 0b10000000 // 7 7 FifoNotEmpty (default)
+
402 #define RF69_FIFO_THRESHOLD 0b00001111 // 6 0 default threshold to trigger FifoLevel interrupt
+
403 
+
404 // RF69_REG_PACKET_CONFIG_2
+
405 #define RF69_INTER_PACKET_RX_DELAY 0b00000000 // 7 4 delay between FIFO empty and start of new RSSI phase
+
406 #define RF69_RESTART_RX 0b00000100 // 2 2 force receiver into wait mode
+
407 #define RF69_AUTO_RX_RESTART_OFF 0b00000000 // 1 1 auto Rx restart disabled
+
408 #define RF69_AUTO_RX_RESTART_ON 0b00000010 // 1 1 auto Rx restart enabled (default)
+
409 #define RF69_AES_OFF 0b00000000 // 0 0 AES encryption disabled (default)
+
410 #define RF69_AES_ON 0b00000001 // 0 0 AES encryption enabled, payload size limited to 66 bytes
+
411 
+
412 // RF69_REG_TEMP_1
+
413 #define RF69_TEMP_MEAS_START 0b00001000 // 3 3 trigger temperature measurement
+
414 #define RF69_TEMP_MEAS_RUNNING 0b00000100 // 2 2 temperature measurement status: on-going
+
415 #define RF69_TEMP_MEAS_DONE 0b00000000 // 2 2 done
+
416 
+
417 // RF69_REG_TEST_DAGC
+
418 #define RF69_CONTINUOUS_DAGC_NORMAL 0x00 // 7 0 fading margin improvement: normal mode
+
419 #define RF69_CONTINUOUS_DAGC_LOW_BETA_ON 0x20 // 7 0 improved mode for AfcLowBetaOn
+
420 #define RF69_CONTINUOUS_DAGC_LOW_BETA_OFF 0x30 // 7 0 improved mode for AfcLowBetaOff (default)
+
421 
+
422 // RF69_REG_TEST_PA1
+
423 #define RF69_PA1_NORMAL 0x55 // 7 0 PA_BOOST: none
+
424 #define RF69_PA1_20_DBM 0x5D // 7 0 +20 dBm
+
425 
+
426 // RF69_REG_TEST_PA2
+
427 #define RF69_PA2_NORMAL 0x70 // 7 0 PA_BOOST: none
+
428 #define RF69_PA2_20_DBM 0x7C // 7 0 +20 dBm
+
429 
+
435 class RF69: public PhysicalLayer {
+
436  public:
+
437  // introduce PhysicalLayer overloads
+ + + + +
442 
+
448  RF69(Module* module);
+
449 
+
450  // basic methods
+
451 
+
469  int16_t begin(float freq = 434.0, float br = 48.0, float freqDev = 50.0, float rxBw = 125.0, int8_t power = 10, uint8_t preambleLen = 16);
+
470 
+
474  void reset();
+
475 
+
488  int16_t transmit(uint8_t* data, size_t len, uint8_t addr = 0) override;
+
489 
+
500  int16_t receive(uint8_t* data, size_t len) override;
+
501 
+
507  int16_t sleep();
+
508 
+
514  int16_t standby() override;
+
515 
+
523  int16_t transmitDirect(uint32_t frf = 0) override;
+
524 
+
530  int16_t receiveDirect() override;
+
531 
+
535  int16_t packetMode();
+
536 
+
537  // hardware AES support
+
538 
+
544  void setAESKey(uint8_t* key);
+
545 
+
551  int16_t enableAES();
+
552 
+
558  int16_t disableAES();
+
559 
+
560  // interrupt methods
+
561 
+
567  void setDio0Action(void (*func)(void));
+
568 
+
572  void clearDio0Action();
+
573 
+
579  void setDio1Action(void (*func)(void));
+
580 
+
584  void clearDio1Action();
+
585 
+
598  int16_t startTransmit(uint8_t* data, size_t len, uint8_t addr = 0) override;
+
599 
+
605  int16_t startReceive();
+
606 
+
616  int16_t readData(uint8_t* data, size_t len) override;
+
617 
+
618  // configuration methods
+
619 
+
627  int16_t setFrequency(float freq);
+
628 
+
636  int16_t setBitRate(float br);
+
637 
+
645  int16_t setRxBandwidth(float rxBw);
+
646 
+
654  int16_t setFrequencyDeviation(float freqDev) override;
+
655 
+
665  int16_t setOutputPower(int8_t power, bool highPower = false);
+
666 
+
676  int16_t setSyncWord(uint8_t* syncWord, size_t len, uint8_t maxErrBits = 0);
+
677 
+
685  int16_t setPreambleLength(uint8_t preambleLen);
+
686 
+
694  int16_t setNodeAddress(uint8_t nodeAddr);
+
695 
+
703  int16_t setBroadcastAddress(uint8_t broadAddr);
+
704 
+
710  int16_t disableAddressFiltering();
+
711 
+
712  // measurement methods
+
713 
+
719  void setAmbientTemperature(int16_t tempAmbient);
+
720 
+
726  int16_t getTemperature();
+
727 
+
735  size_t getPacketLength(bool update = true) override;
+
736 
+
744  int16_t fixedPacketLengthMode(uint8_t len = RF69_MAX_PACKET_LENGTH);
+
745 
+
753  int16_t variablePacketLengthMode(uint8_t maxLen = RF69_MAX_PACKET_LENGTH);
+
754 
+
762  int16_t enableSyncWordFiltering(uint8_t maxErrBits = 0);
+
763 
+
769  int16_t disableSyncWordFiltering();
+
770 
+
778  int16_t setCrcFiltering(bool crcOn = true);
+
779 
+
787  int16_t setPromiscuousMode(bool promiscuous = true);
+
788 
+
797  int16_t setDataShaping(uint8_t sh) override;
+
798 
+
807  int16_t setEncoding(uint8_t encoding) override;
+
808 
+
814  float getRSSI();
+
815 
+
824  void setRfSwitchPins(RADIOLIB_PIN_TYPE rxEn, RADIOLIB_PIN_TYPE txEn);
+
825 
+
831  uint8_t random();
+
832 
+
838  int16_t getChipVersion();
+
839 
+
840 #ifndef RADIOLIB_GODMODE
+
841  protected:
+
842 #endif
+
843  Module* _mod;
+
844 
+
845  float _br = 0;
+
846  float _rxBw = 0;
+
847  int16_t _tempOffset = 0;
+
848  int8_t _power = 0;
+
849 
+
850  size_t _packetLength = 0;
+
851  bool _packetLengthQueried = false;
+
852  uint8_t _packetLengthConfig = RF69_PACKET_FORMAT_VARIABLE;
+
853 
+
854  bool _promiscuous = false;
+
855 
+
856  uint8_t _syncWordLength = 2;
+
857 
+
858  int16_t config();
+
859  int16_t directMode();
+
860  int16_t setPacketMode(uint8_t mode, uint8_t len);
+
861 
+
862 #ifndef RADIOLIB_GODMODE
+
863  private:
+
864 #endif
+
865  int16_t setMode(uint8_t mode);
+
866  void clearIRQFlags();
+
867 };
+
868 
+
869 #endif
+
870 
+
871 #endif
+
int16_t setCrcFiltering(bool crcOn=true)
Enable CRC filtering and generation.
Definition: RF69.cpp:693
+
void setDio0Action(void(*func)(void))
Sets interrupt service routine to call when DIO0 activates.
Definition: RF69.cpp:269
+
void clearDio1Action()
Clears interrupt service routine to call when DIO1 activates.
Definition: RF69.cpp:285
+
int16_t transmit(__FlashStringHelper *fstr, uint8_t addr=0)
Arduino Flash String transmit method.
Definition: PhysicalLayer.cpp:8
+
int16_t setBroadcastAddress(uint8_t broadAddr)
Sets broadcast address. Calling this method will also enable address filtering for node and broadcast...
Definition: RF69.cpp:612
+
int16_t receiveDirect() override
Starts direct mode reception.
Definition: RF69.cpp:200
+
void setRfSwitchPins(RADIOLIB_PIN_TYPE rxEn, RADIOLIB_PIN_TYPE txEn)
Some modules contain external RF switch controlled by two pins. This function gives RadioLib control ...
Definition: RF69.cpp:769
+
int16_t readData(uint8_t *data, size_t len) override
Reads data received after calling startReceive method.
Definition: RF69.cpp:343
+
int16_t setPromiscuousMode(bool promiscuous=true)
Set modem in "sniff" mode: no packet filtering (e.g., no preamble, sync word, address,...
Definition: RF69.cpp:701
+
int16_t receive(uint8_t *data, size_t len) override
Blocking binary receive method. Overloads for string-based transmissions are implemented in PhysicalL...
Definition: RF69.cpp:139
+
void clearDio0Action()
Clears interrupt service routine to call when DIO0 activates.
Definition: RF69.cpp:273
+
size_t getPacketLength(bool update=true) override
Query modem for the packet length of received payload.
Definition: RF69.cpp:655
+
Control class for RF69 module. Also serves as base class for SX1231.
Definition: RF69.h:435
+
void setDio1Action(void(*func)(void))
Sets interrupt service routine to call when DIO1 activates.
Definition: RF69.cpp:277
+
int16_t startReceive()
Interrupt-driven receive method. GDO0 will be activated when full packet is received.
Definition: RF69.cpp:241
+
int16_t setFrequency(float freq)
Sets carrier frequency. Allowed values are in bands 290.0 to 340.0 MHz, 431.0 to 510....
Definition: RF69.cpp:372
+
int16_t fixedPacketLengthMode(uint8_t len=RF69_MAX_PACKET_LENGTH)
Set modem in fixed packet length mode.
Definition: RF69.cpp:668
+
int16_t setNodeAddress(uint8_t nodeAddr)
Sets node address. Calling this method will also enable address filtering for node address only.
Definition: RF69.cpp:603
+
int16_t enableAES()
Enables AES encryption.
Definition: RF69.cpp:233
+
int16_t setPreambleLength(uint8_t preambleLen)
Sets preamble length.
Definition: RF69.cpp:592
+
void reset()
Reset method. Will reset the chip to the default state using RST pin.
Definition: RF69.cpp:102
+
int16_t transmit(uint8_t *data, size_t len, uint8_t addr=0) override
Blocking binary transmit method. Overloads for string-based transmissions are implemented in Physical...
Definition: RF69.cpp:110
+
int16_t setRxBandwidth(float rxBw)
Sets receiver bandwidth. Allowed values are 2.6, 3.1, 3.9, 5.2, 6.3, 7.8, 10.4, 12....
Definition: RF69.cpp:412
+
int16_t readData(String &str, size_t len=0)
Reads data that was received after calling startReceive method.
Definition: PhysicalLayer.cpp:57
+
int16_t setBitRate(float br)
Sets bit rate. Allowed values range from 1.2 to 300.0 kbps.
Definition: RF69.cpp:391
+
int16_t disableAES()
Disables AES encryption.
Definition: RF69.cpp:237
+
RF69(Module *module)
Default constructor.
Definition: RF69.cpp:4
+
int16_t setDataShaping(uint8_t sh) override
Sets Gaussian filter bandwidth-time product that will be used for data shaping. Allowed values are RA...
Definition: RF69.cpp:727
+
int16_t standby() override
Sets the module to standby mode.
Definition: RF69.cpp:171
+
int16_t getTemperature()
Measures temperature.
Definition: RF69.cpp:638
+
int16_t setFrequencyDeviation(float freqDev) override
Sets frequency deviation.
Definition: RF69.cpp:507
+
int16_t disableAddressFiltering()
Disables address filtering. Calling this method will also erase previously set addresses.
Definition: RF69.cpp:621
+
int16_t setSyncWord(uint8_t *syncWord, size_t len, uint8_t maxErrBits=0)
Sets sync word. Up to 8 bytes can be set as sync word.
Definition: RF69.cpp:569
+
int16_t disableSyncWordFiltering()
Disable preamble and sync word filtering and generation.
Definition: RF69.cpp:681
+
float getRSSI()
Gets RSSI (Recorded Signal Strength Indicator) of the last received packet.
Definition: RF69.cpp:765
+
Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN....
Definition: PhysicalLayer.h:13
+
int16_t receive(String &str, size_t len=0)
Arduino String receive method.
Definition: PhysicalLayer.cpp:98
+
int16_t setEncoding(uint8_t encoding) override
Sets transmission encoding. Allowed values are RADIOLIB_ENCODING_NRZ, RADIOLIB_ENCODING_MANCHESTER an...
Definition: RF69.cpp:747
+
void setAESKey(uint8_t *key)
Sets AES key.
Definition: RF69.cpp:229
+
Implements all common low-level SPI/UART/I2C methods to control the wireless module....
Definition: Module.h:17
+
int16_t transmitDirect(uint32_t frf=0) override
Starts direct mode transmission.
Definition: RF69.cpp:179
+
int16_t setOutputPower(int8_t power, bool highPower=false)
Sets output power. Allowed values range from -18 to 13 dBm for low power modules (RF69C/CW) or -2 to ...
Definition: RF69.cpp:531
+
int16_t packetMode()
Stops direct mode. It is required to call this method to switch from direct transmissions to packet-b...
Definition: RF69.cpp:225
+
void setAmbientTemperature(int16_t tempAmbient)
Sets ambient temperature. Required to correct values from on-board temperature sensor.
Definition: RF69.cpp:634
+
int16_t sleep()
Sets the module to sleep mode.
Definition: RF69.cpp:163
+
int16_t getChipVersion()
Read version SPI register. Should return RF69_CHIP_VERSION (0x24) if SX127x is connected and working.
Definition: RF69.cpp:792
+
int16_t enableSyncWordFiltering(uint8_t maxErrBits=0)
Enable sync word filtering and generation.
Definition: RF69.cpp:676
+
int16_t variablePacketLengthMode(uint8_t maxLen=RF69_MAX_PACKET_LENGTH)
Set modem in variable packet length mode.
Definition: RF69.cpp:672
+
int16_t startTransmit(uint8_t *data, size_t len, uint8_t addr=0) override
Interrupt-driven binary transmit method. Overloads for string-based transmissions are implemented in ...
Definition: RF69.cpp:292
+
uint8_t random()
Get one truly random byte from RSSI noise.
Definition: RF69.cpp:773
+
int16_t begin(float freq=434.0, float br=48.0, float freqDev=50.0, float rxBw=125.0, int8_t power=10, uint8_t preambleLen=16)
Initialization method.
Definition: RF69.cpp:8
+
int16_t startTransmit(String &str, uint8_t addr=0)
Interrupt-driven Arduino String transmit method. Unlike the standard transmit method,...
Definition: PhysicalLayer.cpp:49
diff --git a/_r_f_m22_8h_source.html b/_r_f_m22_8h_source.html index 86a5199a..37527b77 100644 --- a/_r_f_m22_8h_source.html +++ b/_r_f_m22_8h_source.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/modules/RFM2x/RFM22.h Source File @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -84,17 +86,33 @@ $(document).ready(function(){initNavTree('_r_f_m22_8h_source.html','');});
RFM22.h
-
1 #if !defined(_RADIOLIB_RFM22_H)
2 #define _RADIOLIB_RFM22_H
3 
4 #include "../../TypeDef.h"
5 
6 #if !defined(RADIOLIB_EXCLUDE_RFM2X)
7 
8 #include "../../Module.h"
9 #include "../Si443x/Si443x.h"
10 #include "../Si443x/Si4432.h"
11 
17 using RFM22 = Si4432;
18 
19 #endif
20 
21 #endif
Only exists as alias for Si4432, since there seems to be no difference between RFM22 and Si4432 modul...
-
Derived class for Si4432 modules.
Definition: Si4432.h:16
+
1 #if !defined(_RADIOLIB_RFM22_H)
+
2 #define _RADIOLIB_RFM22_H
+
3 
+
4 #include "../../TypeDef.h"
+
5 
+
6 #if !defined(RADIOLIB_EXCLUDE_RFM2X)
+
7 
+
8 #include "../../Module.h"
+
9 #include "../Si443x/Si443x.h"
+
10 #include "../Si443x/Si4432.h"
+
11 
+
17 using RFM22 = Si4432;
+
18 
+
19 #endif
+
20 
+
21 #endif
+
Derived class for Si4432 modules.
Definition: Si4432.h:16
+
Only exists as alias for Si4432, since there seems to be no difference between RFM22 and Si4432 modul...
diff --git a/_r_f_m23_8h_source.html b/_r_f_m23_8h_source.html index 40dd86bf..525845b5 100644 --- a/_r_f_m23_8h_source.html +++ b/_r_f_m23_8h_source.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/modules/RFM2x/RFM23.h Source File @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -84,17 +86,33 @@ $(document).ready(function(){initNavTree('_r_f_m23_8h_source.html','');});
RFM23.h
-
1 #if !defined(_RADIOLIB_RFM23_H)
2 #define _RADIOLIB_RFM23_H
3 
4 #include "../../TypeDef.h"
5 
6 #if !defined(RADIOLIB_EXCLUDE_RFM2X)
7 
8 #include "../../Module.h"
9 #include "../Si443x/Si443x.h"
10 #include "../Si443x/Si4431.h"
11 
17 using RFM23 = Si4431;
18 
19 #endif
20 
21 #endif
Derived class for Si4431 modules.
Definition: Si4431.h:16
-
Only exists as alias for Si4431, since there seems to be no difference between RFM23 and Si4431 modul...
+
1 #if !defined(_RADIOLIB_RFM23_H)
+
2 #define _RADIOLIB_RFM23_H
+
3 
+
4 #include "../../TypeDef.h"
+
5 
+
6 #if !defined(RADIOLIB_EXCLUDE_RFM2X)
+
7 
+
8 #include "../../Module.h"
+
9 #include "../Si443x/Si443x.h"
+
10 #include "../Si443x/Si4431.h"
+
11 
+
17 using RFM23 = Si4431;
+
18 
+
19 #endif
+
20 
+
21 #endif
+
Derived class for Si4431 modules.
Definition: Si4431.h:16
+
Only exists as alias for Si4431, since there seems to be no difference between RFM23 and Si4431 modul...
diff --git a/_r_f_m95_8h_source.html b/_r_f_m95_8h_source.html index 0d09656c..37e8e42d 100644 --- a/_r_f_m95_8h_source.html +++ b/_r_f_m95_8h_source.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/modules/RFM9x/RFM95.h Source File @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -84,21 +86,60 @@ $(document).ready(function(){initNavTree('_r_f_m95_8h_source.html','');});
RFM95.h
-
1 #if !defined(_RADIOLIB_RFM95_H)
2 #define _RADIOLIB_RFM95_H
3 
4 #include "../../TypeDef.h"
5 
6 #if !defined(RADIOLIB_EXCLUDE_RFM9X)
7 
8 #include "../../Module.h"
9 #include "../SX127x/SX127x.h"
10 #include "../SX127x/SX1278.h"
11 
12 // SX127X_REG_VERSION
13 #define RFM9X_CHIP_VERSION_OFFICIAL 0x11
14 #define RFM9X_CHIP_VERSION_UNOFFICIAL 0x12 // according to datasheet, only 0x11 should be possible, but some modules seem to have 0x12
15 
21 class RFM95: public SX1278 {
22  public:
23 
24  // constructor
25 
31  RFM95(Module* mod);
32 
33  // basic methods
34 
58  int16_t begin(float freq = 915.0, float bw = 125.0, uint8_t sf = 9, uint8_t cr = 7, uint8_t syncWord = SX127X_SYNC_WORD, int8_t power = 10, uint16_t preambleLength = 8, uint8_t gain = 0);
59 
60  // configuration methods
61 
69  int16_t setFrequency(float freq);
70 
71 #ifndef RADIOLIB_GODMODE
72  private:
73 #endif
74 
75 };
76 
77 #endif
78 
79 #endif
int16_t begin(float freq=915.0, float bw=125.0, uint8_t sf=9, uint8_t cr=7, uint8_t syncWord=SX127X_SYNC_WORD, int8_t power=10, uint16_t preambleLength=8, uint8_t gain=0)
LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the ...
Definition: RFM95.cpp:8
-
Implements all common low-level SPI/UART/I2C methods to control the wireless module. Every module class contains one private instance of this class.
Definition: Module.h:17
-
Derived class for SX1278 modules. Also used as base class for SX1276, SX1277, SX1279, RFM95 and RFM96. All of these modules use the same basic hardware and only differ in parameter ranges (and names).
Definition: SX1278.h:104
-
int16_t setFrequency(float freq)
Sets carrier frequency. Allowed values range from 868.0 MHz to 915.0 MHz.
Definition: RFM95.cpp:43
-
RFM95(Module *mod)
Default constructor. Called from Arduino sketch when creating new LoRa instance.
Definition: RFM95.cpp:4
-
Derived class for RFM95 modules. Overrides some methods from SX1278 due to different parameter ranges...
Definition: RFM95.h:21
+
1 #if !defined(_RADIOLIB_RFM95_H)
+
2 #define _RADIOLIB_RFM95_H
+
3 
+
4 #include "../../TypeDef.h"
+
5 
+
6 #if !defined(RADIOLIB_EXCLUDE_RFM9X)
+
7 
+
8 #include "../../Module.h"
+
9 #include "../SX127x/SX127x.h"
+
10 #include "../SX127x/SX1278.h"
+
11 
+
12 // SX127X_REG_VERSION
+
13 #define RFM9X_CHIP_VERSION_OFFICIAL 0x11
+
14 #define RFM9X_CHIP_VERSION_UNOFFICIAL 0x12 // according to datasheet, only 0x11 should be possible, but some modules seem to have 0x12
+
15 
+
21 class RFM95: public SX1278 {
+
22  public:
+
23 
+
24  // constructor
+
25 
+
31  RFM95(Module* mod);
+
32 
+
33  // basic methods
+
34 
+
58  int16_t begin(float freq = 915.0, float bw = 125.0, uint8_t sf = 9, uint8_t cr = 7, uint8_t syncWord = SX127X_SYNC_WORD, int8_t power = 10, uint16_t preambleLength = 8, uint8_t gain = 0);
+
59 
+
60  // configuration methods
+
61 
+
69  int16_t setFrequency(float freq);
+
70 
+
71 #ifndef RADIOLIB_GODMODE
+
72  private:
+
73 #endif
+
74 
+
75 };
+
76 
+
77 #endif
+
78 
+
79 #endif
+
int16_t begin(float freq=915.0, float bw=125.0, uint8_t sf=9, uint8_t cr=7, uint8_t syncWord=SX127X_SYNC_WORD, int8_t power=10, uint16_t preambleLength=8, uint8_t gain=0)
LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the ...
Definition: RFM95.cpp:8
+
Derived class for SX1278 modules. Also used as base class for SX1276, SX1277, SX1279,...
Definition: SX1278.h:104
+
Derived class for RFM95 modules. Overrides some methods from SX1278 due to different parameter ranges...
Definition: RFM95.h:21
+
RFM95(Module *mod)
Default constructor. Called from Arduino sketch when creating new LoRa instance.
Definition: RFM95.cpp:4
+
int16_t setFrequency(float freq)
Sets carrier frequency. Allowed values range from 868.0 MHz to 915.0 MHz.
Definition: RFM95.cpp:43
+
Implements all common low-level SPI/UART/I2C methods to control the wireless module....
Definition: Module.h:17
diff --git a/_r_f_m96_8h_source.html b/_r_f_m96_8h_source.html index 81c63aee..c6d54f9d 100644 --- a/_r_f_m96_8h_source.html +++ b/_r_f_m96_8h_source.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/modules/RFM9x/RFM96.h Source File @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -84,22 +86,63 @@ $(document).ready(function(){initNavTree('_r_f_m96_8h_source.html','');});
RFM96.h
-
1 #if !defined(_RADIOLIB_RFM96_H)
2 #define _RADIOLIB_RFM96_H
3 
4 #include "../../TypeDef.h"
5 
6 #if !defined(RADIOLIB_EXCLUDE_RFM9X)
7 
8 #include "../../Module.h"
9 #include "../SX127x/SX127x.h"
10 #include "../SX127x/SX1278.h"
11 
12 // SX127X_REG_VERSION
13 #define RFM9X_CHIP_VERSION_OFFICIAL 0x11
14 #define RFM9X_CHIP_VERSION_UNOFFICIAL 0x12 // according to datasheet, only 0x11 should be possible, but some modules seem to have 0x12
15 
21 class RFM96: public SX1278 {
22  public:
23 
24  // constructor
25 
31  RFM96(Module* mod);
32 
33  // basic methods
34 
58  int16_t begin(float freq = 434.0, float bw = 125.0, uint8_t sf = 9, uint8_t cr = 7, uint8_t syncWord = SX127X_SYNC_WORD, int8_t power = 10, uint16_t preambleLength = 8, uint8_t gain = 0);
59 
60  // configuration methods
61 
69  int16_t setFrequency(float freq);
70 
71 #ifndef RADIOLIB_GODMODE
72  private:
73 #endif
74 
75 };
76 
82 using RFM98 = RFM96;
83 
84 #endif
85 
86 #endif
int16_t setFrequency(float freq)
Sets carrier frequency. Allowed values range from 433.0 MHz to 470.0 MHz.
Definition: RFM96.cpp:44
-
Only exists as alias for RFM96, since there seems to be no difference between RFM96 and RFM98 modules...
-
RFM96(Module *mod)
Default constructor. Called from Arduino sketch when creating new LoRa instance.
Definition: RFM96.cpp:4
-
Implements all common low-level SPI/UART/I2C methods to control the wireless module. Every module class contains one private instance of this class.
Definition: Module.h:17
-
int16_t begin(float freq=434.0, float bw=125.0, uint8_t sf=9, uint8_t cr=7, uint8_t syncWord=SX127X_SYNC_WORD, int8_t power=10, uint16_t preambleLength=8, uint8_t gain=0)
LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the ...
Definition: RFM96.cpp:8
-
Derived class for RFM96 modules. Overrides some methods from SX1278 due to different parameter ranges...
Definition: RFM96.h:21
-
Derived class for SX1278 modules. Also used as base class for SX1276, SX1277, SX1279, RFM95 and RFM96. All of these modules use the same basic hardware and only differ in parameter ranges (and names).
Definition: SX1278.h:104
+
1 #if !defined(_RADIOLIB_RFM96_H)
+
2 #define _RADIOLIB_RFM96_H
+
3 
+
4 #include "../../TypeDef.h"
+
5 
+
6 #if !defined(RADIOLIB_EXCLUDE_RFM9X)
+
7 
+
8 #include "../../Module.h"
+
9 #include "../SX127x/SX127x.h"
+
10 #include "../SX127x/SX1278.h"
+
11 
+
12 // SX127X_REG_VERSION
+
13 #define RFM9X_CHIP_VERSION_OFFICIAL 0x11
+
14 #define RFM9X_CHIP_VERSION_UNOFFICIAL 0x12 // according to datasheet, only 0x11 should be possible, but some modules seem to have 0x12
+
15 
+
21 class RFM96: public SX1278 {
+
22  public:
+
23 
+
24  // constructor
+
25 
+
31  RFM96(Module* mod);
+
32 
+
33  // basic methods
+
34 
+
58  int16_t begin(float freq = 434.0, float bw = 125.0, uint8_t sf = 9, uint8_t cr = 7, uint8_t syncWord = SX127X_SYNC_WORD, int8_t power = 10, uint16_t preambleLength = 8, uint8_t gain = 0);
+
59 
+
60  // configuration methods
+
61 
+
69  int16_t setFrequency(float freq);
+
70 
+
71 #ifndef RADIOLIB_GODMODE
+
72  private:
+
73 #endif
+
74 
+
75 };
+
76 
+
82 using RFM98 = RFM96;
+
83 
+
84 #endif
+
85 
+
86 #endif
+
int16_t setFrequency(float freq)
Sets carrier frequency. Allowed values range from 433.0 MHz to 470.0 MHz.
Definition: RFM96.cpp:44
+
Derived class for RFM96 modules. Overrides some methods from SX1278 due to different parameter ranges...
Definition: RFM96.h:21
+
Derived class for SX1278 modules. Also used as base class for SX1276, SX1277, SX1279,...
Definition: SX1278.h:104
+
RFM96(Module *mod)
Default constructor. Called from Arduino sketch when creating new LoRa instance.
Definition: RFM96.cpp:4
+
int16_t begin(float freq=434.0, float bw=125.0, uint8_t sf=9, uint8_t cr=7, uint8_t syncWord=SX127X_SYNC_WORD, int8_t power=10, uint16_t preambleLength=8, uint8_t gain=0)
LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the ...
Definition: RFM96.cpp:8
+
Implements all common low-level SPI/UART/I2C methods to control the wireless module....
Definition: Module.h:17
+
Only exists as alias for RFM96, since there seems to be no difference between RFM96 and RFM98 modules...
diff --git a/_r_f_m97_8h_source.html b/_r_f_m97_8h_source.html index 15e557db..2a3ee636 100644 --- a/_r_f_m97_8h_source.html +++ b/_r_f_m97_8h_source.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/modules/RFM9x/RFM97.h Source File @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -84,20 +86,52 @@ $(document).ready(function(){initNavTree('_r_f_m97_8h_source.html','');});
RFM97.h
-
1 #if !defined(_RADIOLIB_RFM97_H)
2 #define _RADIOLIB_RFM97_H
3 
4 #include "../../TypeDef.h"
5 
6 #if !defined(RADIOLIB_EXCLUDE_RFM9X)
7 
8 #include "../../Module.h"
9 #include "../SX127x/SX127x.h"
10 #include "../SX127x/SX1278.h"
11 #include "RFM95.h"
12 
18 class RFM97: public RFM95 {
19  public:
20 
21  // constructor
22 
28  RFM97(Module* mod);
29 
30  // configuration methods
31 
39  int16_t setSpreadingFactor(uint8_t sf);
40 
41 #ifndef RADIOLIB_GODMODE
42  private:
43 #endif
44 
45 };
46 
47 #endif
48 
49 #endif
RFM97(Module *mod)
Default constructor. Called from Arduino sketch when creating new LoRa instance.
Definition: RFM97.cpp:4
-
Derived class for RFM97 modules. Overrides some methods from RFM95 due to different parameter ranges...
Definition: RFM97.h:18
-
int16_t setSpreadingFactor(uint8_t sf)
Sets LoRa link spreading factor. Allowed values range from 6 to 9. Only available in LoRa mode...
Definition: RFM97.cpp:8
-
Implements all common low-level SPI/UART/I2C methods to control the wireless module. Every module class contains one private instance of this class.
Definition: Module.h:17
-
Derived class for RFM95 modules. Overrides some methods from SX1278 due to different parameter ranges...
Definition: RFM95.h:21
+
1 #if !defined(_RADIOLIB_RFM97_H)
+
2 #define _RADIOLIB_RFM97_H
+
3 
+
4 #include "../../TypeDef.h"
+
5 
+
6 #if !defined(RADIOLIB_EXCLUDE_RFM9X)
+
7 
+
8 #include "../../Module.h"
+
9 #include "../SX127x/SX127x.h"
+
10 #include "../SX127x/SX1278.h"
+
11 #include "RFM95.h"
+
12 
+
18 class RFM97: public RFM95 {
+
19  public:
+
20 
+
21  // constructor
+
22 
+
28  RFM97(Module* mod);
+
29 
+
30  // configuration methods
+
31 
+
39  int16_t setSpreadingFactor(uint8_t sf);
+
40 
+
41 #ifndef RADIOLIB_GODMODE
+
42  private:
+
43 #endif
+
44 
+
45 };
+
46 
+
47 #endif
+
48 
+
49 #endif
+
RFM97(Module *mod)
Default constructor. Called from Arduino sketch when creating new LoRa instance.
Definition: RFM97.cpp:4
+
Derived class for RFM95 modules. Overrides some methods from SX1278 due to different parameter ranges...
Definition: RFM95.h:21
+
int16_t setSpreadingFactor(uint8_t sf)
Sets LoRa link spreading factor. Allowed values range from 6 to 9. Only available in LoRa mode.
Definition: RFM97.cpp:8
+
Implements all common low-level SPI/UART/I2C methods to control the wireless module....
Definition: Module.h:17
+
Derived class for RFM97 modules. Overrides some methods from RFM95 due to different parameter ranges.
Definition: RFM97.h:18
diff --git a/_r_t_t_y_8h_source.html b/_r_t_t_y_8h_source.html index b4e5f670..a25ab877 100644 --- a/_r_t_t_y_8h_source.html +++ b/_r_t_t_y_8h_source.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/protocols/RTTY/RTTY.h Source File @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -84,23 +86,151 @@ $(document).ready(function(){initNavTree('_r_t_t_y_8h_source.html','');});
RTTY.h
-
1 #if !defined(_RADIOLIB_RTTY_H)
2 #define _RADIOLIB_RTTY_H
3 
4 #include "../../TypeDef.h"
5 
6 #if !defined(RADIOLIB_EXCLUDE_RTTY)
7 
8 #include "../PhysicalLayer/PhysicalLayer.h"
9 #include "../AFSK/AFSK.h"
10 
11 #define ITA2_FIGS 0x1B
12 #define ITA2_LTRS 0x1F
13 #define ITA2_LENGTH 32
14 
15 // ITA2 character table: - position in array corresponds to 5-bit ITA2 code
16 // - characters to the left are in letters shift, characters to the right in figures shift
17 // - characters marked 0x7F do not have ASCII equivalent
18 static const char ITA2Table[ITA2_LENGTH][2] RADIOLIB_PROGMEM = {{'\0', '\0'}, {'E', '3'}, {'\n', '\n'}, {'A', '-'}, {' ', ' '}, {'S', '\''}, {'I', '8'}, {'U', '7'},
19  {'\r', '\r'}, {'D', 0x05}, {'R', '4'}, {'J', '\a'}, {'N', ','}, {'F', '!'}, {'C', ':'}, {'K', '('},
20  {'T', '5'}, {'Z', '+'}, {'L', ')'}, {'W', '2'}, {'H', 0x7F}, {'Y', '6'}, {'P', '0'}, {'Q', '1'},
21  {'O', '9'}, {'B', '?'}, {'G', '&'}, {0x7F, 0x7F}, {'M', '.'}, {'X', '/'}, {'V', ';'}, {0x7F, 0x7F}};
22 
28 class ITA2String {
29  public:
35  explicit ITA2String(char c);
36 
42  explicit ITA2String(const char* str);
43 
47  ~ITA2String();
48 
54  size_t length();
55 
62  uint8_t* byteArr();
63 
64 #ifndef RADIOLIB_GODMODE
65  private:
66 #endif
67  #ifdef RADIOLIB_STATIC_ONLY
68  char _str[RADIOLIB_STATIC_ARRAY_SIZE];
69  #else
70  char* _str = new char[1];
71  #endif
72  size_t _len;
73  size_t _ita2Len;
74 
75  static uint16_t getBits(char c);
76 };
77 
78 // supported encoding schemes
79 #define ASCII 0
80 #define ASCII_EXTENDED 1
81 #define ITA2 2
82 
88 class RTTYClient {
89  public:
95  explicit RTTYClient(PhysicalLayer* phy);
96 
97  #if !defined(RADIOLIB_EXCLUDE_AFSK)
98 
103  explicit RTTYClient(AFSKClient* audio);
104  #endif
105 
106  // basic methods
107 
123  int16_t begin(float base, uint32_t shift, uint16_t rate, uint8_t encoding = ASCII, uint8_t stopBits = 1);
124 
128  void idle();
129 
130  size_t write(const char* str);
131  size_t write(uint8_t* buff, size_t len);
132  size_t write(uint8_t b);
133 
134  size_t print(__FlashStringHelper*);
135  size_t print(ITA2String &);
136  size_t print(const String &);
137  size_t print(const char[]);
138  size_t print(char);
139  size_t print(unsigned char, int = DEC);
140  size_t print(int, int = DEC);
141  size_t print(unsigned int, int = DEC);
142  size_t print(long, int = DEC);
143  size_t print(unsigned long, int = DEC);
144  size_t print(double, int = 2);
145 
146  size_t println(void);
147  size_t println(__FlashStringHelper*);
148  size_t println(ITA2String &);
149  size_t println(const String &);
150  size_t println(const char[]);
151  size_t println(char);
152  size_t println(unsigned char, int = DEC);
153  size_t println(int, int = DEC);
154  size_t println(unsigned int, int = DEC);
155  size_t println(long, int = DEC);
156  size_t println(unsigned long, int = DEC);
157  size_t println(double, int = 2);
158 
159 #ifndef RADIOLIB_GODMODE
160  private:
161 #endif
162  PhysicalLayer* _phy;
163  #if !defined(RADIOLIB_EXCLUDE_AFSK)
164  AFSKClient* _audio;
165  #endif
166 
167  uint8_t _encoding = ASCII;
168  uint32_t _base = 0, _baseHz = 0;
169  uint32_t _shift = 0, _shiftHz = 0;
170  uint32_t _bitDuration = 0;
171  uint8_t _dataBits = 0;
172  uint8_t _stopBits = 0;
173 
174  void mark();
175  void space();
176 
177  size_t printNumber(unsigned long, uint8_t);
178  size_t printFloat(double, uint8_t);
179 
180  int16_t transmitDirect(uint32_t freq = 0, uint32_t freqHz = 0);
181  int16_t standby();
182 };
183 
184 #endif
185 
186 #endif
Client for audio-based transmissions. Requires Arduino tone() function, and a module capable of direc...
Definition: AFSK.h:17
-
ITA2String(char c)
Default single-character constructor.
Definition: RTTY.cpp:4
-
size_t length()
Gets the length of the ITA2 string. This number is not the same as the length of ASCII-encoded string...
Definition: RTTY.cpp:22
-
Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN...
Definition: PhysicalLayer.h:13
-
Client for RTTY communication. The public interface is the same as Arduino Serial.
Definition: RTTY.h:88
-
~ITA2String()
Default destructor.
Definition: RTTY.cpp:16
-
uint8_t * byteArr()
Gets the ITA2 representation of the ASCII string set in constructor.
Definition: RTTY.cpp:34
-
ITA2-encoded string.
Definition: RTTY.h:28
+
1 #if !defined(_RADIOLIB_RTTY_H)
+
2 #define _RADIOLIB_RTTY_H
+
3 
+
4 #include "../../TypeDef.h"
+
5 
+
6 #if !defined(RADIOLIB_EXCLUDE_RTTY)
+
7 
+
8 #include "../PhysicalLayer/PhysicalLayer.h"
+
9 #include "../AFSK/AFSK.h"
+
10 
+
11 #define ITA2_FIGS 0x1B
+
12 #define ITA2_LTRS 0x1F
+
13 #define ITA2_LENGTH 32
+
14 
+
15 // ITA2 character table: - position in array corresponds to 5-bit ITA2 code
+
16 // - characters to the left are in letters shift, characters to the right in figures shift
+
17 // - characters marked 0x7F do not have ASCII equivalent
+
18 static const char ITA2Table[ITA2_LENGTH][2] RADIOLIB_PROGMEM = {{'\0', '\0'}, {'E', '3'}, {'\n', '\n'}, {'A', '-'}, {' ', ' '}, {'S', '\''}, {'I', '8'}, {'U', '7'},
+
19  {'\r', '\r'}, {'D', 0x05}, {'R', '4'}, {'J', '\a'}, {'N', ','}, {'F', '!'}, {'C', ':'}, {'K', '('},
+
20  {'T', '5'}, {'Z', '+'}, {'L', ')'}, {'W', '2'}, {'H', 0x7F}, {'Y', '6'}, {'P', '0'}, {'Q', '1'},
+
21  {'O', '9'}, {'B', '?'}, {'G', '&'}, {0x7F, 0x7F}, {'M', '.'}, {'X', '/'}, {'V', ';'}, {0x7F, 0x7F}};
+
22 
+
28 class ITA2String {
+
29  public:
+
35  explicit ITA2String(char c);
+
36 
+
42  explicit ITA2String(const char* str);
+
43 
+
47  ~ITA2String();
+
48 
+
54  size_t length();
+
55 
+
62  uint8_t* byteArr();
+
63 
+
64 #ifndef RADIOLIB_GODMODE
+
65  private:
+
66 #endif
+
67  #ifdef RADIOLIB_STATIC_ONLY
+
68  char _str[RADIOLIB_STATIC_ARRAY_SIZE];
+
69  #else
+
70  char* _str = new char[1];
+
71  #endif
+
72  size_t _len;
+
73  size_t _ita2Len;
+
74 
+
75  static uint16_t getBits(char c);
+
76 };
+
77 
+
78 // supported encoding schemes
+
79 #define ASCII 0
+
80 #define ASCII_EXTENDED 1
+
81 #define ITA2 2
+
82 
+
88 class RTTYClient {
+
89  public:
+
95  explicit RTTYClient(PhysicalLayer* phy);
+
96 
+
97  #if !defined(RADIOLIB_EXCLUDE_AFSK)
+
98 
+
103  explicit RTTYClient(AFSKClient* audio);
+
104  #endif
+
105 
+
106  // basic methods
+
107 
+
123  int16_t begin(float base, uint32_t shift, uint16_t rate, uint8_t encoding = ASCII, uint8_t stopBits = 1);
+
124 
+
128  void idle();
+
129 
+
130  size_t write(const char* str);
+
131  size_t write(uint8_t* buff, size_t len);
+
132  size_t write(uint8_t b);
+
133 
+
134  size_t print(__FlashStringHelper*);
+
135  size_t print(ITA2String &);
+
136  size_t print(const String &);
+
137  size_t print(const char[]);
+
138  size_t print(char);
+
139  size_t print(unsigned char, int = DEC);
+
140  size_t print(int, int = DEC);
+
141  size_t print(unsigned int, int = DEC);
+
142  size_t print(long, int = DEC);
+
143  size_t print(unsigned long, int = DEC);
+
144  size_t print(double, int = 2);
+
145 
+
146  size_t println(void);
+
147  size_t println(__FlashStringHelper*);
+
148  size_t println(ITA2String &);
+
149  size_t println(const String &);
+
150  size_t println(const char[]);
+
151  size_t println(char);
+
152  size_t println(unsigned char, int = DEC);
+
153  size_t println(int, int = DEC);
+
154  size_t println(unsigned int, int = DEC);
+
155  size_t println(long, int = DEC);
+
156  size_t println(unsigned long, int = DEC);
+
157  size_t println(double, int = 2);
+
158 
+
159 #ifndef RADIOLIB_GODMODE
+
160  private:
+
161 #endif
+
162  PhysicalLayer* _phy;
+
163  #if !defined(RADIOLIB_EXCLUDE_AFSK)
+
164  AFSKClient* _audio;
+
165  #endif
+
166 
+
167  uint8_t _encoding = ASCII;
+
168  uint32_t _base = 0, _baseHz = 0;
+
169  uint32_t _shift = 0, _shiftHz = 0;
+
170  uint32_t _bitDuration = 0;
+
171  uint8_t _dataBits = 0;
+
172  uint8_t _stopBits = 0;
+
173 
+
174  void mark();
+
175  void space();
+
176 
+
177  size_t printNumber(unsigned long, uint8_t);
+
178  size_t printFloat(double, uint8_t);
+
179 
+
180  int16_t transmitDirect(uint32_t freq = 0, uint32_t freqHz = 0);
+
181  int16_t standby();
+
182 };
+
183 
+
184 #endif
+
185 
+
186 #endif
+
size_t length()
Gets the length of the ITA2 string. This number is not the same as the length of ASCII-encoded string...
Definition: RTTY.cpp:22
+
void idle()
Send out idle condition (RF tone at mark frequency).
Definition: RTTY.cpp:168
+
Client for audio-based transmissions. Requires Arduino tone() function, and a module capable of direc...
Definition: AFSK.h:17
+
ITA2String(char c)
Default single-character constructor.
Definition: RTTY.cpp:4
+
~ITA2String()
Default destructor.
Definition: RTTY.cpp:16
+
ITA2-encoded string.
Definition: RTTY.h:28
+
uint8_t * byteArr()
Gets the ITA2 representation of the ASCII string set in constructor.
Definition: RTTY.cpp:34
+
RTTYClient(PhysicalLayer *phy)
Constructor for 2-FSK mode.
Definition: RTTY.cpp:108
+
int16_t begin(float base, uint32_t shift, uint16_t rate, uint8_t encoding=ASCII, uint8_t stopBits=1)
Initialization method.
Definition: RTTY.cpp:122
+
Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN....
Definition: PhysicalLayer.h:13
+
Client for RTTY communication. The public interface is the same as Arduino Serial.
Definition: RTTY.h:88
diff --git a/_radio_lib_8h_source.html b/_radio_lib_8h_source.html index 80183fd7..6b46887c 100644 --- a/_radio_lib_8h_source.html +++ b/_radio_lib_8h_source.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/RadioLib.h Source File @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -84,16 +86,116 @@ $(document).ready(function(){initNavTree('_radio_lib_8h_source.html','');});
RadioLib.h
-
1 #ifndef _RADIOLIB_H
2 #define _RADIOLIB_H
3 
43 #include "TypeDef.h"
44 #include "Module.h"
45 
46 // warnings are printed in this file since BuildOpt.h is compiled in multiple places
47 
48 // check God mode
49 #ifdef RADIOLIB_GODMODE
50  #warning "God mode active, I hope it was intentional. Buckle up, lads."
51 #endif
52 
53 // print debug info
54 #ifdef RADIOLIB_DEBUG
55  #pragma message "RADIOLIB_PLATFORM: " RADIOLIB_PLATFORM
56 #endif
57 
58 // check unknown/unsupported platform
59 #ifdef RADIOLIB_UNKNOWN_PLATFORM
60  #warning "RadioLib might not be compatible with this Arduino board - check supported platforms at https://github.com/jgromes/RadioLib!"
61 #endif
62 
63 #include "modules/CC1101/CC1101.h"
64 #include "modules/ESP8266/ESP8266.h"
65 #include "modules/HC05/HC05.h"
66 #include "modules/JDY08/JDY08.h"
67 #include "modules/nRF24/nRF24.h"
68 #include "modules/RF69/RF69.h"
69 #include "modules/RFM2x/RFM22.h"
70 #include "modules/RFM2x/RFM23.h"
71 #include "modules/RFM9x/RFM95.h"
72 #include "modules/RFM9x/RFM96.h"
73 #include "modules/RFM9x/RFM97.h"
74 #include "modules/Si443x/Si4430.h"
75 #include "modules/Si443x/Si4431.h"
76 #include "modules/Si443x/Si4432.h"
77 #include "modules/SX1231/SX1231.h"
78 #include "modules/SX126x/SX1261.h"
79 #include "modules/SX126x/SX1262.h"
80 #include "modules/SX126x/SX1268.h"
81 #include "modules/SX127x/SX1272.h"
82 #include "modules/SX127x/SX1273.h"
83 #include "modules/SX127x/SX1276.h"
84 #include "modules/SX127x/SX1277.h"
85 #include "modules/SX127x/SX1278.h"
86 #include "modules/SX127x/SX1279.h"
87 #include "modules/SX128x/SX1280.h"
88 #include "modules/SX128x/SX1281.h"
89 #include "modules/SX128x/SX1282.h"
90 #include "modules/XBee/XBee.h"
91 
92 // physical layer protocols
93 #include "protocols/PhysicalLayer/PhysicalLayer.h"
94 #include "protocols/AFSK/AFSK.h"
95 #include "protocols/AX25/AX25.h"
96 #include "protocols/Hellschreiber/Hellschreiber.h"
97 #include "protocols/Morse/Morse.h"
98 #include "protocols/RTTY/RTTY.h"
99 #include "protocols/SSTV/SSTV.h"
100 
101 // transport layer protocols
102 #include "protocols/TransportLayer/TransportLayer.h"
103 #include "protocols/HTTP/HTTP.h"
104 #include "protocols/MQTT/MQTT.h"
105 
106 // only create Radio class when using RadioShield
107 #ifdef RADIOLIB_RADIOSHIELD
108 
109 // RadioShield pin definitions
110 #define RADIOSHIELD_CS_A 10
111 #define RADIOSHIELD_RX_A 9
112 #define RADIOSHIELD_TX_A 8
113 #define RADIOSHIELD_CS_B 5
114 #define RADIOSHIELD_RX_B 7
115 #define RADIOSHIELD_TX_B 6
116 #define RADIOSHIELD_INT_0 2
117 #define RADIOSHIELD_INT_1 3
118 
125 class Radio {
126  public:
127 
128  Module* ModuleA;
129  Module* ModuleB;
130 
134  Radio() {
135  ModuleA = new Module(RADIOSHIELD_CS_A, RADIOSHIELD_INT_0, RADIOSHIELD_INT_1, RADIOSHIELD_RX_A, RADIOSHIELD_TX_A, SPI, SPISettings(2000000, MSBFIRST, SPI_MODE0), nullptr);
136  ModuleB = new Module(RADIOSHIELD_CS_B, RADIOSHIELD_INT_0, RADIOSHIELD_INT_1, RADIOSHIELD_RX_B, RADIOSHIELD_TX_B, SPI, SPISettings(2000000, MSBFIRST, SPI_MODE0), nullptr);
137  }
138 
139 #ifndef RADIOLIB_GODMODE
140  private:
141 #endif
142 
143 };
144 
145 Radio RadioShield;
146 #endif
147 
148 #endif
Implements all common low-level SPI/UART/I2C methods to control the wireless module. Every module class contains one private instance of this class.
Definition: Module.h:17
+
1 #if !defined(_RADIOLIB_H)
+
2 #define _RADIOLIB_H
+
3 
+
43 #include "TypeDef.h"
+
44 #include "Module.h"
+
45 
+
46 // warnings are printed in this file since BuildOpt.h is compiled in multiple places
+
47 
+
48 // check God mode
+
49 #ifdef RADIOLIB_GODMODE
+
50  #warning "God mode active, I hope it was intentional. Buckle up, lads."
+
51 #endif
+
52 
+
53 // print debug info
+
54 #ifdef RADIOLIB_DEBUG
+
55  #pragma message "RADIOLIB_PLATFORM: " RADIOLIB_PLATFORM
+
56 #endif
+
57 
+
58 // check unknown/unsupported platform
+
59 #ifdef RADIOLIB_UNKNOWN_PLATFORM
+
60  #warning "RadioLib might not be compatible with this Arduino board - check supported platforms at https://github.com/jgromes/RadioLib!"
+
61 #endif
+
62 
+
63 #include "modules/CC1101/CC1101.h"
+
64 #include "modules/ESP8266/ESP8266.h"
+
65 #include "modules/HC05/HC05.h"
+
66 #include "modules/JDY08/JDY08.h"
+
67 #include "modules/nRF24/nRF24.h"
+
68 #include "modules/RF69/RF69.h"
+
69 #include "modules/RFM2x/RFM22.h"
+
70 #include "modules/RFM2x/RFM23.h"
+
71 #include "modules/RFM9x/RFM95.h"
+
72 #include "modules/RFM9x/RFM96.h"
+
73 #include "modules/RFM9x/RFM97.h"
+
74 #include "modules/Si443x/Si4430.h"
+
75 #include "modules/Si443x/Si4431.h"
+
76 #include "modules/Si443x/Si4432.h"
+
77 #include "modules/SX1231/SX1231.h"
+
78 #include "modules/SX126x/SX1261.h"
+
79 #include "modules/SX126x/SX1262.h"
+
80 #include "modules/SX126x/SX1268.h"
+
81 #include "modules/SX127x/SX1272.h"
+
82 #include "modules/SX127x/SX1273.h"
+
83 #include "modules/SX127x/SX1276.h"
+
84 #include "modules/SX127x/SX1277.h"
+
85 #include "modules/SX127x/SX1278.h"
+
86 #include "modules/SX127x/SX1279.h"
+
87 #include "modules/SX128x/SX1280.h"
+
88 #include "modules/SX128x/SX1281.h"
+
89 #include "modules/SX128x/SX1282.h"
+
90 #include "modules/XBee/XBee.h"
+
91 
+
92 // physical layer protocols
+
93 #include "protocols/PhysicalLayer/PhysicalLayer.h"
+
94 #include "protocols/AFSK/AFSK.h"
+
95 #include "protocols/AX25/AX25.h"
+
96 #include "protocols/Hellschreiber/Hellschreiber.h"
+
97 #include "protocols/Morse/Morse.h"
+
98 #include "protocols/RTTY/RTTY.h"
+
99 #include "protocols/SSTV/SSTV.h"
+
100 
+
101 // transport layer protocols
+
102 #include "protocols/TransportLayer/TransportLayer.h"
+
103 #include "protocols/HTTP/HTTP.h"
+
104 #include "protocols/MQTT/MQTT.h"
+
105 
+
106 // only create Radio class when using RadioShield
+
107 #ifdef RADIOLIB_RADIOSHIELD
+
108 
+
109 // RadioShield pin definitions
+
110 #define RADIOSHIELD_CS_A 10
+
111 #define RADIOSHIELD_RX_A 9
+
112 #define RADIOSHIELD_TX_A 8
+
113 #define RADIOSHIELD_CS_B 5
+
114 #define RADIOSHIELD_RX_B 7
+
115 #define RADIOSHIELD_TX_B 6
+
116 #define RADIOSHIELD_INT_0 2
+
117 #define RADIOSHIELD_INT_1 3
+
118 
+
125 class Radio {
+
126  public:
+
127 
+
128  Module* ModuleA;
+
129  Module* ModuleB;
+
130 
+
134  Radio() {
+
135  ModuleA = new Module(RADIOSHIELD_CS_A, RADIOSHIELD_INT_0, RADIOSHIELD_INT_1, RADIOSHIELD_RX_A, RADIOSHIELD_TX_A, SPI, SPISettings(2000000, MSBFIRST, SPI_MODE0), nullptr);
+
136  ModuleB = new Module(RADIOSHIELD_CS_B, RADIOSHIELD_INT_0, RADIOSHIELD_INT_1, RADIOSHIELD_RX_B, RADIOSHIELD_TX_B, SPI, SPISettings(2000000, MSBFIRST, SPI_MODE0), nullptr);
+
137  }
+
138 
+
139 #ifndef RADIOLIB_GODMODE
+
140  private:
+
141 #endif
+
142 
+
143 };
+
144 
+
145 Radio RadioShield;
+
146 #endif
+
147 
+
148 #endif
+
Implements all common low-level SPI/UART/I2C methods to control the wireless module....
Definition: Module.h:17
diff --git a/_s_s_t_v_8h_source.html b/_s_s_t_v_8h_source.html index 81a3f575..2a349c87 100644 --- a/_s_s_t_v_8h_source.html +++ b/_s_s_t_v_8h_source.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/protocols/SSTV/SSTV.h Source File @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -84,28 +86,156 @@ $(document).ready(function(){initNavTree('_s_s_t_v_8h_source.html','');});
SSTV.h
-
1 #if !defined(_RADIOLIB_SSTV_H)
2 #define _RADIOLIB_SSTV_H
3 
4 #include "../../TypeDef.h"
5 
6 #if !defined(RADIOLIB_EXCLUDE_SSTV)
7 
8 #include "../PhysicalLayer/PhysicalLayer.h"
9 #include "../AFSK/AFSK.h"
10 
11 // the following implementation is based on information from
12 // http://www.barberdsp.com/downloads/Dayton%20Paper.pdf
13 
14 // VIS codes
15 #define SSTV_SCOTTIE_1 60
16 #define SSTV_SCOTTIE_2 56
17 #define SSTV_SCOTTIE_DX 76
18 #define SSTV_MARTIN_1 44
19 #define SSTV_MARTIN_2 40
20 #define SSTV_WRASSE_SC2_180 55
21 #define SSTV_PASOKON_P3 113
22 #define SSTV_PASOKON_P5 114
23 #define SSTV_PASOKON_P7 115
24 
25 // SSTV tones in Hz
26 #define SSTV_TONE_LEADER 1900
27 #define SSTV_TONE_BREAK 1200
28 #define SSTV_TONE_VIS_1 1100
29 #define SSTV_TONE_VIS_0 1300
30 #define SSTV_TONE_BRIGHTNESS_MIN 1500
31 #define SSTV_TONE_BRIGHTNESS_MAX 2300
32 
33 // calibration header timing in us
34 #define SSTV_HEADER_LEADER_LENGTH 300000
35 #define SSTV_HEADER_BREAK_LENGTH 10000
36 #define SSTV_HEADER_BIT_LENGTH 30000
37 
43 struct tone_t {
44 
48  enum {
49  GENERIC = 0,
50  SCAN_GREEN,
51  SCAN_BLUE,
52  SCAN_RED
53  } type;
54 
58  uint32_t len;
59 
63  uint16_t freq;
64 };
65 
71 struct SSTVMode_t {
72 
76  uint8_t visCode;
77 
81  uint16_t width;
82 
86  uint16_t height;
87 
91  uint16_t scanPixelLen;
92 
96  uint8_t numTones;
97 
101  tone_t tones[8];
102 };
103 
104 // all currently supported SSTV modes
105 extern const SSTVMode_t Scottie1;
106 extern const SSTVMode_t Scottie2;
107 extern const SSTVMode_t ScottieDX;
108 extern const SSTVMode_t Martin1;
109 extern const SSTVMode_t Martin2;
110 extern const SSTVMode_t Wrasse;
111 extern const SSTVMode_t PasokonP3;
112 extern const SSTVMode_t PasokonP5;
113 extern const SSTVMode_t PasokonP7;
114 
120 class SSTVClient {
121  public:
127  explicit SSTVClient(PhysicalLayer* phy);
128 
129  #if !defined(RADIOLIB_EXCLUDE_AFSK)
130 
135  explicit SSTVClient(AFSKClient* audio);
136  #endif
137 
138  // basic methods
139 
151  int16_t begin(float base, const SSTVMode_t& mode, float correction = 1.0);
152 
153  #if !defined(RADIOLIB_EXCLUDE_AFSK)
154 
163  int16_t begin(const SSTVMode_t& mode, float correction = 1.0);
164  #endif
165 
169  void idle();
170 
174  void sendHeader();
175 
181  void sendLine(uint32_t* imgLine);
182 
188  uint16_t getPictureHeight() const;
189 
190 #ifndef RADIOLIB_GODMODE
191  private:
192 #endif
193  PhysicalLayer* _phy;
194  #if !defined(RADIOLIB_EXCLUDE_AFSK)
195  AFSKClient* _audio;
196  #endif
197 
198  uint32_t _base = 0;
199  SSTVMode_t _mode = Scottie1;
200  bool _firstLine = true;
201 
202  void tone(float freq, uint32_t len = 0);
203 };
204 
205 #endif
206 
207 #endif
uint8_t visCode
Unique VIS code of the SSTV mode.
Definition: SSTV.h:76
-
uint16_t width
Picture width in pixels.
Definition: SSTV.h:81
-
uint16_t freq
Frequency of tone in Hz, set to 0 for picture scan tones.
Definition: SSTV.h:63
-
Structure to save data about tone.
Definition: SSTV.h:43
-
Client for audio-based transmissions. Requires Arduino tone() function, and a module capable of direc...
Definition: AFSK.h:17
-
uint16_t height
Picture height in pixels.
Definition: SSTV.h:86
-
Structure to save data about supported SSTV modes.
Definition: SSTV.h:71
-
enum tone_t::@0 type
Tone type: GENERIC for sync and porch tones, SCAN_GREEN, SCAN_BLUE and SCAN_RED for scan lines...
-
uint16_t scanPixelLen
Pixel scan length in us.
Definition: SSTV.h:91
-
uint8_t numTones
Number of tones in each transmission line. Picture scan data is considered single tone...
Definition: SSTV.h:96
-
Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN...
Definition: PhysicalLayer.h:13
-
Client for SSTV transmissions.
Definition: SSTV.h:120
-
uint32_t len
Length of tone in us, set to 0 for picture scan tones.
Definition: SSTV.h:58
+
1 #if !defined(_RADIOLIB_SSTV_H)
+
2 #define _RADIOLIB_SSTV_H
+
3 
+
4 #include "../../TypeDef.h"
+
5 
+
6 #if !defined(RADIOLIB_EXCLUDE_SSTV)
+
7 
+
8 #include "../PhysicalLayer/PhysicalLayer.h"
+
9 #include "../AFSK/AFSK.h"
+
10 
+
11 // the following implementation is based on information from
+
12 // http://www.barberdsp.com/downloads/Dayton%20Paper.pdf
+
13 
+
14 // VIS codes
+
15 #define SSTV_SCOTTIE_1 60
+
16 #define SSTV_SCOTTIE_2 56
+
17 #define SSTV_SCOTTIE_DX 76
+
18 #define SSTV_MARTIN_1 44
+
19 #define SSTV_MARTIN_2 40
+
20 #define SSTV_WRASSE_SC2_180 55
+
21 #define SSTV_PASOKON_P3 113
+
22 #define SSTV_PASOKON_P5 114
+
23 #define SSTV_PASOKON_P7 115
+
24 
+
25 // SSTV tones in Hz
+
26 #define SSTV_TONE_LEADER 1900
+
27 #define SSTV_TONE_BREAK 1200
+
28 #define SSTV_TONE_VIS_1 1100
+
29 #define SSTV_TONE_VIS_0 1300
+
30 #define SSTV_TONE_BRIGHTNESS_MIN 1500
+
31 #define SSTV_TONE_BRIGHTNESS_MAX 2300
+
32 
+
33 // calibration header timing in us
+
34 #define SSTV_HEADER_LEADER_LENGTH 300000
+
35 #define SSTV_HEADER_BREAK_LENGTH 10000
+
36 #define SSTV_HEADER_BIT_LENGTH 30000
+
37 
+
43 struct tone_t {
+
44 
+
48  enum {
+
49  GENERIC = 0,
+
50  SCAN_GREEN,
+
51  SCAN_BLUE,
+
52  SCAN_RED
+
53  } type;
+
54 
+
58  uint32_t len;
+
59 
+
63  uint16_t freq;
+
64 };
+
65 
+
71 struct SSTVMode_t {
+
72 
+
76  uint8_t visCode;
+
77 
+
81  uint16_t width;
+
82 
+
86  uint16_t height;
+
87 
+
91  uint16_t scanPixelLen;
+
92 
+
96  uint8_t numTones;
+
97 
+ +
102 };
+
103 
+
104 // all currently supported SSTV modes
+
105 extern const SSTVMode_t Scottie1;
+
106 extern const SSTVMode_t Scottie2;
+
107 extern const SSTVMode_t ScottieDX;
+
108 extern const SSTVMode_t Martin1;
+
109 extern const SSTVMode_t Martin2;
+
110 extern const SSTVMode_t Wrasse;
+
111 extern const SSTVMode_t PasokonP3;
+
112 extern const SSTVMode_t PasokonP5;
+
113 extern const SSTVMode_t PasokonP7;
+
114 
+
120 class SSTVClient {
+
121  public:
+
127  explicit SSTVClient(PhysicalLayer* phy);
+
128 
+
129  #if !defined(RADIOLIB_EXCLUDE_AFSK)
+
130 
+
135  explicit SSTVClient(AFSKClient* audio);
+
136  #endif
+
137 
+
138  // basic methods
+
139 
+
151  int16_t begin(float base, const SSTVMode_t& mode, float correction = 1.0);
+
152 
+
153  #if !defined(RADIOLIB_EXCLUDE_AFSK)
+
154 
+
163  int16_t begin(const SSTVMode_t& mode, float correction = 1.0);
+
164  #endif
+
165 
+
169  void idle();
+
170 
+
174  void sendHeader();
+
175 
+
181  void sendLine(uint32_t* imgLine);
+
182 
+
188  uint16_t getPictureHeight() const;
+
189 
+
190 #ifndef RADIOLIB_GODMODE
+
191  private:
+
192 #endif
+
193  PhysicalLayer* _phy;
+
194  #if !defined(RADIOLIB_EXCLUDE_AFSK)
+
195  AFSKClient* _audio;
+
196  #endif
+
197 
+
198  uint32_t _base = 0;
+
199  SSTVMode_t _mode = Scottie1;
+
200  bool _firstLine = true;
+
201 
+
202  void tone(float freq, uint32_t len = 0);
+
203 };
+
204 
+
205 #endif
+
206 
+
207 #endif
+
void sendHeader()
Sends synchronization header for the SSTV mode set in begin method.
Definition: SSTV.cpp:204
+
uint16_t height
Picture height in pixels.
Definition: SSTV.h:86
+
uint16_t width
Picture width in pixels.
Definition: SSTV.h:81
+
Structure to save data about supported SSTV modes.
Definition: SSTV.h:71
+
uint8_t visCode
Unique VIS code of the SSTV mode.
Definition: SSTV.h:76
+
Client for audio-based transmissions. Requires Arduino tone() function, and a module capable of direc...
Definition: AFSK.h:17
+
Structure to save data about tone.
Definition: SSTV.h:43
+
void sendLine(uint32_t *imgLine)
Sends single picture line in the currently configured SSTV mode.
Definition: SSTV.cpp:241
+
uint16_t scanPixelLen
Pixel scan length in us.
Definition: SSTV.h:91
+
uint16_t freq
Frequency of tone in Hz, set to 0 for picture scan tones.
Definition: SSTV.h:63
+
SSTVClient(PhysicalLayer *phy)
Constructor for 2-FSK mode.
Definition: SSTV.cpp:157
+
uint8_t numTones
Number of tones in each transmission line. Picture scan data is considered single tone.
Definition: SSTV.h:96
+
uint32_t len
Length of tone in us, set to 0 for picture scan tones.
Definition: SSTV.h:58
+
tone_t tones[8]
Sequence of tones in each transmission line. This is used to create the correct encoding sequence.
Definition: SSTV.h:101
+
void idle()
Sends out tone at 1900 Hz.
Definition: SSTV.cpp:199
+
Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN....
Definition: PhysicalLayer.h:13
+
int16_t begin(float base, const SSTVMode_t &mode, float correction=1.0)
Initialization method for 2-FSK.
Definition: SSTV.cpp:182
+
Client for SSTV transmissions.
Definition: SSTV.h:120
+
uint16_t getPictureHeight() const
Get picture height of the currently configured SSTV mode.
Definition: SSTV.cpp:280
+
enum tone_t::@0 type
Tone type: GENERIC for sync and porch tones, SCAN_GREEN, SCAN_BLUE and SCAN_RED for scan lines.
diff --git a/_s_x1231_8h_source.html b/_s_x1231_8h_source.html index 95a5a19e..95ffe219 100644 --- a/_s_x1231_8h_source.html +++ b/_s_x1231_8h_source.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/modules/SX1231/SX1231.h Source File @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -84,20 +86,55 @@ $(document).ready(function(){initNavTree('_s_x1231_8h_source.html','');});
SX1231.h
-
1 #if !defined(_RADIOLIB_SX1231_H)
2 #define _RADIOLIB_SX1231_H
3 
4 #include "../../TypeDef.h"
5 
6 #if !defined(RADIOLIB_EXCLUDE_SX1231)
7 
8 #include "../../Module.h"
9 #include "../RF69/RF69.h"
10 
11 #define SX1231_CHIP_REVISION_2_A 0x21
12 #define SX1231_CHIP_REVISION_2_B 0x22
13 #define SX1231_CHIP_REVISION_2_C 0x23
14 
15 //SX1231 specific register map
16 #define SX1231_REG_TEST_OOK 0x6E
17 
18 //SX1231_REG_TEST_OOK
19 #define SX1231_OOK_DELTA_THRESHOLD 0x0C
20 
26 class SX1231: public RF69 {
27  public:
33  SX1231(Module* mod);
34 
52  int16_t begin(float freq = 434.0, float br = 48.0, float rxBw = 125.0, float freqDev = 50.0, int8_t power = 10, uint8_t preambleLen = 16);
53 
54 #ifndef RADIOLIB_GODMODE
55  private:
56 #endif
57  uint8_t _chipRevision = 0;
58 };
59 
60 #endif
61 
62 #endif
Control class for RF69 module. Also serves as base class for SX1231.
Definition: RF69.h:435
-
Implements all common low-level SPI/UART/I2C methods to control the wireless module. Every module class contains one private instance of this class.
Definition: Module.h:17
-
Control class for SX1231 module. Overrides some methods from RF69 due to different register values...
Definition: SX1231.h:26
-
int16_t begin(float freq=434.0, float br=48.0, float rxBw=125.0, float freqDev=50.0, int8_t power=10, uint8_t preambleLen=16)
Initialization method.
Definition: SX1231.cpp:8
-
SX1231(Module *mod)
Default constructor.
Definition: SX1231.cpp:4
+
1 #if !defined(_RADIOLIB_SX1231_H)
+
2 #define _RADIOLIB_SX1231_H
+
3 
+
4 #include "../../TypeDef.h"
+
5 
+
6 #if !defined(RADIOLIB_EXCLUDE_SX1231)
+
7 
+
8 #include "../../Module.h"
+
9 #include "../RF69/RF69.h"
+
10 
+
11 #define SX1231_CHIP_REVISION_2_A 0x21
+
12 #define SX1231_CHIP_REVISION_2_B 0x22
+
13 #define SX1231_CHIP_REVISION_2_C 0x23
+
14 
+
15 //SX1231 specific register map
+
16 #define SX1231_REG_TEST_OOK 0x6E
+
17 
+
18 //SX1231_REG_TEST_OOK
+
19 #define SX1231_OOK_DELTA_THRESHOLD 0x0C
+
20 
+
26 class SX1231: public RF69 {
+
27  public:
+
33  SX1231(Module* mod);
+
34 
+
52  int16_t begin(float freq = 434.0, float br = 48.0, float rxBw = 125.0, float freqDev = 50.0, int8_t power = 10, uint8_t preambleLen = 16);
+
53 
+
54 #ifndef RADIOLIB_GODMODE
+
55  private:
+
56 #endif
+
57  uint8_t _chipRevision = 0;
+
58 };
+
59 
+
60 #endif
+
61 
+
62 #endif
+
SX1231(Module *mod)
Default constructor.
Definition: SX1231.cpp:4
+
Control class for SX1231 module. Overrides some methods from RF69 due to different register values.
Definition: SX1231.h:26
+
Control class for RF69 module. Also serves as base class for SX1231.
Definition: RF69.h:435
+
int16_t begin(float freq=434.0, float br=48.0, float rxBw=125.0, float freqDev=50.0, int8_t power=10, uint8_t preambleLen=16)
Initialization method.
Definition: SX1231.cpp:8
+
Implements all common low-level SPI/UART/I2C methods to control the wireless module....
Definition: Module.h:17
diff --git a/_s_x1261_8h_source.html b/_s_x1261_8h_source.html index e714d901..bebb579a 100644 --- a/_s_x1261_8h_source.html +++ b/_s_x1261_8h_source.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/modules/SX126x/SX1261.h Source File @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -84,20 +86,49 @@ $(document).ready(function(){initNavTree('_s_x1261_8h_source.html','');});
SX1261.h
-
1 #if !defined(_RADIOLIB_SX1261_H)
2 #define _RADIOLIB_SX1261_H
3 
4 #include "../../TypeDef.h"
5 
6 #if !defined(RADIOLIB_EXCLUDE_SX126X)
7 
8 #include "../../Module.h"
9 #include "SX126x.h"
10 #include "SX1262.h"
11 
12 //SX126X_CMD_SET_PA_CONFIG
13 #define SX126X_PA_CONFIG_SX1261 0x01
14 
20 class SX1261 : public SX1262 {
21  public:
27  SX1261(Module* mod);
28 
36  int16_t setOutputPower(int8_t power);
37 
38 #ifndef RADIOLIB_GODMODE
39  private:
40 #endif
41 
42 };
43 
44 #endif
45 
46 #endif
Derived class for SX1261 modules.
Definition: SX1261.h:20
-
SX1261(Module *mod)
Default constructor.
Definition: SX1261.cpp:4
-
Derived class for SX1262 modules.
Definition: SX1262.h:19
-
Implements all common low-level SPI/UART/I2C methods to control the wireless module. Every module class contains one private instance of this class.
Definition: Module.h:17
-
int16_t setOutputPower(int8_t power)
Sets output power. Allowed values are in range from -17 to 14 dBm.
Definition: SX1261.cpp:8
+
1 #if !defined(_RADIOLIB_SX1261_H)
+
2 #define _RADIOLIB_SX1261_H
+
3 
+
4 #include "../../TypeDef.h"
+
5 
+
6 #if !defined(RADIOLIB_EXCLUDE_SX126X)
+
7 
+
8 #include "../../Module.h"
+
9 #include "SX126x.h"
+
10 #include "SX1262.h"
+
11 
+
12 //SX126X_CMD_SET_PA_CONFIG
+
13 #define SX126X_PA_CONFIG_SX1261 0x01
+
14 
+
20 class SX1261 : public SX1262 {
+
21  public:
+
27  SX1261(Module* mod);
+
28 
+
36  int16_t setOutputPower(int8_t power);
+
37 
+
38 #ifndef RADIOLIB_GODMODE
+
39  private:
+
40 #endif
+
41 
+
42 };
+
43 
+
44 #endif
+
45 
+
46 #endif
+
int16_t setOutputPower(int8_t power)
Sets output power. Allowed values are in range from -17 to 14 dBm.
Definition: SX1261.cpp:8
+
SX1261(Module *mod)
Default constructor.
Definition: SX1261.cpp:4
+
Derived class for SX1261 modules.
Definition: SX1261.h:20
+
Implements all common low-level SPI/UART/I2C methods to control the wireless module....
Definition: Module.h:17
+
Derived class for SX1262 modules.
Definition: SX1262.h:19
diff --git a/_s_x1262_8h_source.html b/_s_x1262_8h_source.html index af4be649..da696060 100644 --- a/_s_x1262_8h_source.html +++ b/_s_x1262_8h_source.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/modules/SX126x/SX1262.h Source File @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -84,23 +86,61 @@ $(document).ready(function(){initNavTree('_s_x1262_8h_source.html','');});
SX1262.h
-
1 #if !defined(_RADIOLIB_SX1262_H)
2 #define _RADIOLIB_SX1262_H
3 
4 #include "../../TypeDef.h"
5 
6 #if !defined(RADIOLIB_EXCLUDE_SX126X)
7 
8 #include "../../Module.h"
9 #include "SX126x.h"
10 
11 //SX126X_CMD_SET_PA_CONFIG
12 #define SX126X_PA_CONFIG_SX1262 0x00
13 
19 class SX1262: public SX126x {
20  public:
26  SX1262(Module* mod);
27 
28  // basic methods
29 
51  int16_t begin(float freq = 434.0, float bw = 125.0, uint8_t sf = 9, uint8_t cr = 7, uint8_t syncWord = SX126X_SYNC_WORD_PRIVATE, int8_t power = 10, uint16_t preambleLength = 8, float tcxoVoltage = 1.6, bool useRegulatorLDO = false);
52 
74  int16_t beginFSK(float freq = 434.0, float br = 48.0, float freqDev = 50.0, float rxBw = 156.2, int8_t power = 10, uint16_t preambleLength = 16, float tcxoVoltage = 1.6, bool useRegulatorLDO = false);
75 
76  // configuration methods
77 
87  int16_t setFrequency(float freq, bool calibrate = true);
88 
96  int16_t setOutputPower(int8_t power);
97 
98 #ifndef RADIOLIB_GODMODE
99  private:
100 #endif
101 
102 };
103 
104 #endif
105 
106 #endif
int16_t beginFSK(float freq=434.0, float br=48.0, float freqDev=50.0, float rxBw=156.2, int8_t power=10, uint16_t preambleLength=16, float tcxoVoltage=1.6, bool useRegulatorLDO=false)
Initialization method for FSK modem.
Definition: SX1262.cpp:26
-
int16_t setFrequency(float freq, bool calibrate=true)
Sets carrier frequency. Allowed values are in range from 150.0 to 960.0 MHz.
Definition: SX1262.cpp:44
-
Derived class for SX1262 modules.
Definition: SX1262.h:19
-
Base class for SX126x series. All derived classes for SX126x (e.g. SX1262 or SX1268) inherit from thi...
Definition: SX126x.h:342
-
int16_t begin(float freq=434.0, float bw=125.0, uint8_t sf=9, uint8_t cr=7, uint8_t syncWord=SX126X_SYNC_WORD_PRIVATE, int8_t power=10, uint16_t preambleLength=8, float tcxoVoltage=1.6, bool useRegulatorLDO=false)
Initialization method for LoRa modem.
Definition: SX1262.cpp:8
-
Implements all common low-level SPI/UART/I2C methods to control the wireless module. Every module class contains one private instance of this class.
Definition: Module.h:17
-
SX1262(Module *mod)
Default constructor.
Definition: SX1262.cpp:4
-
int16_t setOutputPower(int8_t power)
Sets output power. Allowed values are in range from -17 to 22 dBm.
Definition: SX1262.cpp:74
+
1 #if !defined(_RADIOLIB_SX1262_H)
+
2 #define _RADIOLIB_SX1262_H
+
3 
+
4 #include "../../TypeDef.h"
+
5 
+
6 #if !defined(RADIOLIB_EXCLUDE_SX126X)
+
7 
+
8 #include "../../Module.h"
+
9 #include "SX126x.h"
+
10 
+
11 //SX126X_CMD_SET_PA_CONFIG
+
12 #define SX126X_PA_CONFIG_SX1262 0x00
+
13 
+
19 class SX1262: public SX126x {
+
20  public:
+
26  SX1262(Module* mod);
+
27 
+
28  // basic methods
+
29 
+
51  int16_t begin(float freq = 434.0, float bw = 125.0, uint8_t sf = 9, uint8_t cr = 7, uint8_t syncWord = SX126X_SYNC_WORD_PRIVATE, int8_t power = 10, uint16_t preambleLength = 8, float tcxoVoltage = 1.6, bool useRegulatorLDO = false);
+
52 
+
74  int16_t beginFSK(float freq = 434.0, float br = 48.0, float freqDev = 50.0, float rxBw = 156.2, int8_t power = 10, uint16_t preambleLength = 16, float tcxoVoltage = 1.6, bool useRegulatorLDO = false);
+
75 
+
76  // configuration methods
+
77 
+
87  int16_t setFrequency(float freq, bool calibrate = true);
+
88 
+
96  int16_t setOutputPower(int8_t power);
+
97 
+
98 #ifndef RADIOLIB_GODMODE
+
99  private:
+
100 #endif
+
101 
+
102 };
+
103 
+
104 #endif
+
105 
+
106 #endif
+
SX1262(Module *mod)
Default constructor.
Definition: SX1262.cpp:4
+
int16_t beginFSK(float freq=434.0, float br=48.0, float freqDev=50.0, float rxBw=156.2, int8_t power=10, uint16_t preambleLength=16, float tcxoVoltage=1.6, bool useRegulatorLDO=false)
Initialization method for FSK modem.
Definition: SX1262.cpp:26
+
int16_t setFrequency(float freq, bool calibrate=true)
Sets carrier frequency. Allowed values are in range from 150.0 to 960.0 MHz.
Definition: SX1262.cpp:44
+
Implements all common low-level SPI/UART/I2C methods to control the wireless module....
Definition: Module.h:17
+
int16_t begin(float freq=434.0, float bw=125.0, uint8_t sf=9, uint8_t cr=7, uint8_t syncWord=SX126X_SYNC_WORD_PRIVATE, int8_t power=10, uint16_t preambleLength=8, float tcxoVoltage=1.6, bool useRegulatorLDO=false)
Initialization method for LoRa modem.
Definition: SX1262.cpp:8
+
int16_t setOutputPower(int8_t power)
Sets output power. Allowed values are in range from -17 to 22 dBm.
Definition: SX1262.cpp:74
+
Derived class for SX1262 modules.
Definition: SX1262.h:19
+
Base class for SX126x series. All derived classes for SX126x (e.g. SX1262 or SX1268) inherit from thi...
Definition: SX126x.h:342
diff --git a/_s_x1268_8h_source.html b/_s_x1268_8h_source.html index dd4ee793..6ba774fe 100644 --- a/_s_x1268_8h_source.html +++ b/_s_x1268_8h_source.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/modules/SX126x/SX1268.h Source File @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -84,23 +86,61 @@ $(document).ready(function(){initNavTree('_s_x1268_8h_source.html','');});
SX1268.h
-
1 #if !defined(_RADIOLIB_SX1268_H)
2 #define _RADIOLIB_SX1268_H
3 
4 #include "../../TypeDef.h"
5 
6 #if !defined(RADIOLIB_EXCLUDE_SX126X)
7 
8 #include "../../Module.h"
9 #include "SX126x.h"
10 
11 //SX126X_CMD_SET_PA_CONFIG
12 #define SX126X_PA_CONFIG_SX1268 0x00
13 
19 class SX1268: public SX126x {
20  public:
26  SX1268(Module* mod);
27 
28  // basic methods
29 
51  int16_t begin(float freq = 434.0, float bw = 125.0, uint8_t sf = 9, uint8_t cr = 7, uint8_t syncWord = SX126X_SYNC_WORD_PRIVATE, int8_t power = 10, uint16_t preambleLength = 8, float tcxoVoltage = 1.6, bool useRegulatorLDO = false);
52 
74  int16_t beginFSK(float freq = 434.0, float br = 48.0, float freqDev = 50.0, float rxBw = 156.2, int8_t power = 10, uint16_t preambleLength = 16, float tcxoVoltage = 1.6, bool useRegulatorLDO = false);
75 
76  // configuration methods
77 
87  int16_t setFrequency(float freq, bool calibrate = true);
88 
96  int16_t setOutputPower(int8_t power);
97 
98 #ifndef RADIOLIB_GODMODE
99  private:
100 #endif
101 
102 };
103 
104 #endif
105 
106 #endif
int16_t begin(float freq=434.0, float bw=125.0, uint8_t sf=9, uint8_t cr=7, uint8_t syncWord=SX126X_SYNC_WORD_PRIVATE, int8_t power=10, uint16_t preambleLength=8, float tcxoVoltage=1.6, bool useRegulatorLDO=false)
Initialization method for LoRa modem.
Definition: SX1268.cpp:8
-
Derived class for SX1268 modules.
Definition: SX1268.h:19
-
int16_t setOutputPower(int8_t power)
Sets output power. Allowed values are in range from -9 to 22 dBm.
Definition: SX1268.cpp:69
-
Base class for SX126x series. All derived classes for SX126x (e.g. SX1262 or SX1268) inherit from thi...
Definition: SX126x.h:342
-
Implements all common low-level SPI/UART/I2C methods to control the wireless module. Every module class contains one private instance of this class.
Definition: Module.h:17
-
int16_t setFrequency(float freq, bool calibrate=true)
Sets carrier frequency. Allowed values are in range from 410.0 to 810.0 MHz.
Definition: SX1268.cpp:45
-
SX1268(Module *mod)
Default constructor.
Definition: SX1268.cpp:4
-
int16_t beginFSK(float freq=434.0, float br=48.0, float freqDev=50.0, float rxBw=156.2, int8_t power=10, uint16_t preambleLength=16, float tcxoVoltage=1.6, bool useRegulatorLDO=false)
Initialization method for FSK modem.
Definition: SX1268.cpp:26
+
1 #if !defined(_RADIOLIB_SX1268_H)
+
2 #define _RADIOLIB_SX1268_H
+
3 
+
4 #include "../../TypeDef.h"
+
5 
+
6 #if !defined(RADIOLIB_EXCLUDE_SX126X)
+
7 
+
8 #include "../../Module.h"
+
9 #include "SX126x.h"
+
10 
+
11 //SX126X_CMD_SET_PA_CONFIG
+
12 #define SX126X_PA_CONFIG_SX1268 0x00
+
13 
+
19 class SX1268: public SX126x {
+
20  public:
+
26  SX1268(Module* mod);
+
27 
+
28  // basic methods
+
29 
+
51  int16_t begin(float freq = 434.0, float bw = 125.0, uint8_t sf = 9, uint8_t cr = 7, uint8_t syncWord = SX126X_SYNC_WORD_PRIVATE, int8_t power = 10, uint16_t preambleLength = 8, float tcxoVoltage = 1.6, bool useRegulatorLDO = false);
+
52 
+
74  int16_t beginFSK(float freq = 434.0, float br = 48.0, float freqDev = 50.0, float rxBw = 156.2, int8_t power = 10, uint16_t preambleLength = 16, float tcxoVoltage = 1.6, bool useRegulatorLDO = false);
+
75 
+
76  // configuration methods
+
77 
+
87  int16_t setFrequency(float freq, bool calibrate = true);
+
88 
+
96  int16_t setOutputPower(int8_t power);
+
97 
+
98 #ifndef RADIOLIB_GODMODE
+
99  private:
+
100 #endif
+
101 
+
102 };
+
103 
+
104 #endif
+
105 
+
106 #endif
+
int16_t setOutputPower(int8_t power)
Sets output power. Allowed values are in range from -9 to 22 dBm.
Definition: SX1268.cpp:69
+
int16_t begin(float freq=434.0, float bw=125.0, uint8_t sf=9, uint8_t cr=7, uint8_t syncWord=SX126X_SYNC_WORD_PRIVATE, int8_t power=10, uint16_t preambleLength=8, float tcxoVoltage=1.6, bool useRegulatorLDO=false)
Initialization method for LoRa modem.
Definition: SX1268.cpp:8
+
int16_t setFrequency(float freq, bool calibrate=true)
Sets carrier frequency. Allowed values are in range from 410.0 to 810.0 MHz.
Definition: SX1268.cpp:45
+
int16_t beginFSK(float freq=434.0, float br=48.0, float freqDev=50.0, float rxBw=156.2, int8_t power=10, uint16_t preambleLength=16, float tcxoVoltage=1.6, bool useRegulatorLDO=false)
Initialization method for FSK modem.
Definition: SX1268.cpp:26
+
Implements all common low-level SPI/UART/I2C methods to control the wireless module....
Definition: Module.h:17
+
Derived class for SX1268 modules.
Definition: SX1268.h:19
+
SX1268(Module *mod)
Default constructor.
Definition: SX1268.cpp:4
+
Base class for SX126x series. All derived classes for SX126x (e.g. SX1262 or SX1268) inherit from thi...
Definition: SX126x.h:342
diff --git a/_s_x126x_8h_source.html b/_s_x126x_8h_source.html index 6b8f3c4c..4bf8bb0c 100644 --- a/_s_x126x_8h_source.html +++ b/_s_x126x_8h_source.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/modules/SX126x/SX126x.h Source File @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -84,76 +86,612 @@ $(document).ready(function(){initNavTree('_s_x126x_8h_source.html','');});
SX126x.h
-
1 #if !defined(_RADIOLIB_SX126X_H)
2 #define _RADIOLIB_SX126X_H
3 
4 #include "../../TypeDef.h"
5 
6 #if !defined(RADIOLIB_EXCLUDE_SX126X)
7 
8 #include "../../Module.h"
9 
10 #include "../../protocols/PhysicalLayer/PhysicalLayer.h"
11 
12 // SX126X physical layer properties
13 #define SX126X_FREQUENCY_STEP_SIZE 0.9536743164
14 #define SX126X_MAX_PACKET_LENGTH 255
15 #define SX126X_CRYSTAL_FREQ 32.0
16 #define SX126X_DIV_EXPONENT 25
17 
18 // SX126X SPI commands
19 // operational modes commands
20 #define SX126X_CMD_NOP 0x00
21 #define SX126X_CMD_SET_SLEEP 0x84
22 #define SX126X_CMD_SET_STANDBY 0x80
23 #define SX126X_CMD_SET_FS 0xC1
24 #define SX126X_CMD_SET_TX 0x83
25 #define SX126X_CMD_SET_RX 0x82
26 #define SX126X_CMD_STOP_TIMER_ON_PREAMBLE 0x9F
27 #define SX126X_CMD_SET_RX_DUTY_CYCLE 0x94
28 #define SX126X_CMD_SET_CAD 0xC5
29 #define SX126X_CMD_SET_TX_CONTINUOUS_WAVE 0xD1
30 #define SX126X_CMD_SET_TX_INFINITE_PREAMBLE 0xD2
31 #define SX126X_CMD_SET_REGULATOR_MODE 0x96
32 #define SX126X_CMD_CALIBRATE 0x89
33 #define SX126X_CMD_CALIBRATE_IMAGE 0x98
34 #define SX126X_CMD_SET_PA_CONFIG 0x95
35 #define SX126X_CMD_SET_RX_TX_FALLBACK_MODE 0x93
36 
37 // register and buffer access commands
38 #define SX126X_CMD_WRITE_REGISTER 0x0D
39 #define SX126X_CMD_READ_REGISTER 0x1D
40 #define SX126X_CMD_WRITE_BUFFER 0x0E
41 #define SX126X_CMD_READ_BUFFER 0x1E
42 
43 // DIO and IRQ control
44 #define SX126X_CMD_SET_DIO_IRQ_PARAMS 0x08
45 #define SX126X_CMD_GET_IRQ_STATUS 0x12
46 #define SX126X_CMD_CLEAR_IRQ_STATUS 0x02
47 #define SX126X_CMD_SET_DIO2_AS_RF_SWITCH_CTRL 0x9D
48 #define SX126X_CMD_SET_DIO3_AS_TCXO_CTRL 0x97
49 
50 // RF, modulation and packet commands
51 #define SX126X_CMD_SET_RF_FREQUENCY 0x86
52 #define SX126X_CMD_SET_PACKET_TYPE 0x8A
53 #define SX126X_CMD_GET_PACKET_TYPE 0x11
54 #define SX126X_CMD_SET_TX_PARAMS 0x8E
55 #define SX126X_CMD_SET_MODULATION_PARAMS 0x8B
56 #define SX126X_CMD_SET_PACKET_PARAMS 0x8C
57 #define SX126X_CMD_SET_CAD_PARAMS 0x88
58 #define SX126X_CMD_SET_BUFFER_BASE_ADDRESS 0x8F
59 #define SX126X_CMD_SET_LORA_SYMB_NUM_TIMEOUT 0x0A
60 
61 // status commands
62 #define SX126X_CMD_GET_STATUS 0xC0
63 #define SX126X_CMD_GET_RSSI_INST 0x15
64 #define SX126X_CMD_GET_RX_BUFFER_STATUS 0x13
65 #define SX126X_CMD_GET_PACKET_STATUS 0x14
66 #define SX126X_CMD_GET_DEVICE_ERRORS 0x17
67 #define SX126X_CMD_CLEAR_DEVICE_ERRORS 0x07
68 #define SX126X_CMD_GET_STATS 0x10
69 #define SX126X_CMD_RESET_STATS 0x00
70 
71 
72 // SX126X register map
73 #define SX126X_REG_WHITENING_INITIAL_MSB 0x06B8
74 #define SX126X_REG_WHITENING_INITIAL_LSB 0x06B9
75 #define SX126X_REG_CRC_INITIAL_MSB 0x06BC
76 #define SX126X_REG_CRC_INITIAL_LSB 0x06BD
77 #define SX126X_REG_CRC_POLYNOMIAL_MSB 0x06BE
78 #define SX126X_REG_CRC_POLYNOMIAL_LSB 0x06BF
79 #define SX126X_REG_SYNC_WORD_0 0x06C0
80 #define SX126X_REG_SYNC_WORD_1 0x06C1
81 #define SX126X_REG_SYNC_WORD_2 0x06C2
82 #define SX126X_REG_SYNC_WORD_3 0x06C3
83 #define SX126X_REG_SYNC_WORD_4 0x06C4
84 #define SX126X_REG_SYNC_WORD_5 0x06C5
85 #define SX126X_REG_SYNC_WORD_6 0x06C6
86 #define SX126X_REG_SYNC_WORD_7 0x06C7
87 #define SX126X_REG_NODE_ADDRESS 0x06CD
88 #define SX126X_REG_BROADCAST_ADDRESS 0x06CE
89 #define SX126X_REG_LORA_SYNC_WORD_MSB 0x0740
90 #define SX126X_REG_LORA_SYNC_WORD_LSB 0x0741
91 #define SX126X_REG_RANDOM_NUMBER_0 0x0819
92 #define SX126X_REG_RANDOM_NUMBER_1 0x081A
93 #define SX126X_REG_RANDOM_NUMBER_2 0x081B
94 #define SX126X_REG_RANDOM_NUMBER_3 0x081C
95 #define SX126X_REG_RX_GAIN 0x08AC
96 #define SX126X_REG_OCP_CONFIGURATION 0x08E7
97 #define SX126X_REG_XTA_TRIM 0x0911
98 #define SX126X_REG_XTB_TRIM 0x0912
99 
100 // undocumented registers
101 #define SX126X_REG_SENSITIVITY_CONFIG 0x0889 // SX1268 datasheet v1.1, section 15.1
102 #define SX126X_REG_TX_CLAMP_CONFIG 0x08D8 // SX1268 datasheet v1.1, section 15.2
103 #define SX126X_REG_RTC_STOP 0x0920 // SX1268 datasheet v1.1, section 15.3
104 #define SX126X_REG_RTC_EVENT 0x0944 // SX1268 datasheet v1.1, section 15.3
105 #define SX126X_REG_IQ_CONFIG 0x0736 // SX1268 datasheet v1.1, section 15.4
106 #define SX126X_REG_RX_GAIN_RETENTION_0 0x029F // SX1268 datasheet v1.1, section 9.6
107 #define SX126X_REG_RX_GAIN_RETENTION_1 0x02A0 // SX1268 datasheet v1.1, section 9.6
108 #define SX126X_REG_RX_GAIN_RETENTION_2 0x02A1 // SX1268 datasheet v1.1, section 9.6
109 
110 
111 // SX126X SPI command variables
112 //SX126X_CMD_SET_SLEEP MSB LSB DESCRIPTION
113 #define SX126X_SLEEP_START_COLD 0b00000000 // 2 2 sleep mode: cold start, configuration is lost (default)
114 #define SX126X_SLEEP_START_WARM 0b00000100 // 2 2 warm start, configuration is retained
115 #define SX126X_SLEEP_RTC_OFF 0b00000000 // 0 0 wake on RTC timeout: disabled
116 #define SX126X_SLEEP_RTC_ON 0b00000001 // 0 0 enabled
117 
118 //SX126X_CMD_SET_STANDBY
119 #define SX126X_STANDBY_RC 0x00 // 7 0 standby mode: 13 MHz RC oscillator
120 #define SX126X_STANDBY_XOSC 0x01 // 7 0 32 MHz crystal oscillator
121 
122 //SX126X_CMD_SET_RX
123 #define SX126X_RX_TIMEOUT_NONE 0x000000 // 23 0 Rx timeout duration: no timeout (Rx single mode)
124 #define SX126X_RX_TIMEOUT_INF 0xFFFFFF // 23 0 infinite (Rx continuous mode)
125 
126 //SX126X_CMD_SET_TX
127 #define SX126X_TX_TIMEOUT_NONE 0x000000 // 23 0 Tx timeout duration: no timeout (Tx single mode)
128 
129 //SX126X_CMD_STOP_TIMER_ON_PREAMBLE
130 #define SX126X_STOP_ON_PREAMBLE_OFF 0x00 // 7 0 stop timer on: sync word or header (default)
131 #define SX126X_STOP_ON_PREAMBLE_ON 0x01 // 7 0 preamble detection
132 
133 //SX126X_CMD_SET_REGULATOR_MODE
134 #define SX126X_REGULATOR_LDO 0x00 // 7 0 set regulator mode: LDO (default)
135 #define SX126X_REGULATOR_DC_DC 0x01 // 7 0 DC-DC
136 
137 //SX126X_CMD_CALIBRATE
138 #define SX126X_CALIBRATE_IMAGE_OFF 0b00000000 // 6 6 image calibration: disabled
139 #define SX126X_CALIBRATE_IMAGE_ON 0b01000000 // 6 6 enabled
140 #define SX126X_CALIBRATE_ADC_BULK_P_OFF 0b00000000 // 5 5 ADC bulk P calibration: disabled
141 #define SX126X_CALIBRATE_ADC_BULK_P_ON 0b00100000 // 5 5 enabled
142 #define SX126X_CALIBRATE_ADC_BULK_N_OFF 0b00000000 // 4 4 ADC bulk N calibration: disabled
143 #define SX126X_CALIBRATE_ADC_BULK_N_ON 0b00010000 // 4 4 enabled
144 #define SX126X_CALIBRATE_ADC_PULSE_OFF 0b00000000 // 3 3 ADC pulse calibration: disabled
145 #define SX126X_CALIBRATE_ADC_PULSE_ON 0b00001000 // 3 3 enabled
146 #define SX126X_CALIBRATE_PLL_OFF 0b00000000 // 2 2 PLL calibration: disabled
147 #define SX126X_CALIBRATE_PLL_ON 0b00000100 // 2 2 enabled
148 #define SX126X_CALIBRATE_RC13M_OFF 0b00000000 // 1 1 13 MHz RC osc. calibration: disabled
149 #define SX126X_CALIBRATE_RC13M_ON 0b00000010 // 1 1 enabled
150 #define SX126X_CALIBRATE_RC64K_OFF 0b00000000 // 0 0 64 kHz RC osc. calibration: disabled
151 #define SX126X_CALIBRATE_RC64K_ON 0b00000001 // 0 0 enabled
152 #define SX126X_CALIBRATE_ALL 0b01111111 // 6 0 calibrate all blocks
153 
154 //SX126X_CMD_CALIBRATE_IMAGE
155 #define SX126X_CAL_IMG_430_MHZ_1 0x6B
156 #define SX126X_CAL_IMG_430_MHZ_2 0x6F
157 #define SX126X_CAL_IMG_470_MHZ_1 0x75
158 #define SX126X_CAL_IMG_470_MHZ_2 0x81
159 #define SX126X_CAL_IMG_779_MHZ_1 0xC1
160 #define SX126X_CAL_IMG_779_MHZ_2 0xC5
161 #define SX126X_CAL_IMG_863_MHZ_1 0xD7
162 #define SX126X_CAL_IMG_863_MHZ_2 0xDB
163 #define SX126X_CAL_IMG_902_MHZ_1 0xE1
164 #define SX126X_CAL_IMG_902_MHZ_2 0xE9
165 
166 //SX126X_CMD_SET_PA_CONFIG
167 #define SX126X_PA_CONFIG_HP_MAX 0x07
168 #define SX126X_PA_CONFIG_PA_LUT 0x01
169 #define SX126X_PA_CONFIG_SX1262_8 0x00
170 
171 //SX126X_CMD_SET_RX_TX_FALLBACK_MODE
172 #define SX126X_RX_TX_FALLBACK_MODE_FS 0x40 // 7 0 after Rx/Tx go to: FS mode
173 #define SX126X_RX_TX_FALLBACK_MODE_STDBY_XOSC 0x30 // 7 0 standby with crystal oscillator
174 #define SX126X_RX_TX_FALLBACK_MODE_STDBY_RC 0x20 // 7 0 standby with RC oscillator (default)
175 
176 //SX126X_CMD_SET_DIO_IRQ_PARAMS
177 #define SX126X_IRQ_TIMEOUT 0b1000000000 // 9 9 Rx or Tx timeout
178 #define SX126X_IRQ_CAD_DETECTED 0b0100000000 // 8 8 channel activity detected
179 #define SX126X_IRQ_CAD_DONE 0b0010000000 // 7 7 channel activity detection finished
180 #define SX126X_IRQ_CRC_ERR 0b0001000000 // 6 6 wrong CRC received
181 #define SX126X_IRQ_HEADER_ERR 0b0000100000 // 5 5 LoRa header CRC error
182 #define SX126X_IRQ_HEADER_VALID 0b0000010000 // 4 4 valid LoRa header received
183 #define SX126X_IRQ_SYNC_WORD_VALID 0b0000001000 // 3 3 valid sync word detected
184 #define SX126X_IRQ_PREAMBLE_DETECTED 0b0000000100 // 2 2 preamble detected
185 #define SX126X_IRQ_RX_DONE 0b0000000010 // 1 1 packet received
186 #define SX126X_IRQ_TX_DONE 0b0000000001 // 0 0 packet transmission completed
187 #define SX126X_IRQ_ALL 0b1111111111 // 9 0 all interrupts
188 #define SX126X_IRQ_NONE 0b0000000000 // 9 0 no interrupts
189 
190 //SX126X_CMD_SET_DIO2_AS_RF_SWITCH_CTRL
191 #define SX126X_DIO2_AS_IRQ 0x00 // 7 0 DIO2 configuration: IRQ
192 #define SX126X_DIO2_AS_RF_SWITCH 0x01 // 7 0 RF switch control
193 
194 //SX126X_CMD_SET_DIO3_AS_TCXO_CTRL
195 #define SX126X_DIO3_OUTPUT_1_6 0x00 // 7 0 DIO3 voltage output for TCXO: 1.6 V
196 #define SX126X_DIO3_OUTPUT_1_7 0x01 // 7 0 1.7 V
197 #define SX126X_DIO3_OUTPUT_1_8 0x02 // 7 0 1.8 V
198 #define SX126X_DIO3_OUTPUT_2_2 0x03 // 7 0 2.2 V
199 #define SX126X_DIO3_OUTPUT_2_4 0x04 // 7 0 2.4 V
200 #define SX126X_DIO3_OUTPUT_2_7 0x05 // 7 0 2.7 V
201 #define SX126X_DIO3_OUTPUT_3_0 0x06 // 7 0 3.0 V
202 #define SX126X_DIO3_OUTPUT_3_3 0x07 // 7 0 3.3 V
203 
204 //SX126X_CMD_SET_PACKET_TYPE
205 #define SX126X_PACKET_TYPE_GFSK 0x00 // 7 0 packet type: GFSK
206 #define SX126X_PACKET_TYPE_LORA 0x01 // 7 0 LoRa
207 
208 //SX126X_CMD_SET_TX_PARAMS
209 #define SX126X_PA_RAMP_10U 0x00 // 7 0 ramp time: 10 us
210 #define SX126X_PA_RAMP_20U 0x01 // 7 0 20 us
211 #define SX126X_PA_RAMP_40U 0x02 // 7 0 40 us
212 #define SX126X_PA_RAMP_80U 0x03 // 7 0 80 us
213 #define SX126X_PA_RAMP_200U 0x04 // 7 0 200 us
214 #define SX126X_PA_RAMP_800U 0x05 // 7 0 800 us
215 #define SX126X_PA_RAMP_1700U 0x06 // 7 0 1700 us
216 #define SX126X_PA_RAMP_3400U 0x07 // 7 0 3400 us
217 
218 //SX126X_CMD_SET_MODULATION_PARAMS
219 #define SX126X_GFSK_FILTER_NONE 0x00 // 7 0 GFSK filter: none
220 #define SX126X_GFSK_FILTER_GAUSS_0_3 0x08 // 7 0 Gaussian, BT = 0.3
221 #define SX126X_GFSK_FILTER_GAUSS_0_5 0x09 // 7 0 Gaussian, BT = 0.5
222 #define SX126X_GFSK_FILTER_GAUSS_0_7 0x0A // 7 0 Gaussian, BT = 0.7
223 #define SX126X_GFSK_FILTER_GAUSS_1 0x0B // 7 0 Gaussian, BT = 1
224 #define SX126X_GFSK_RX_BW_4_8 0x1F // 7 0 GFSK Rx bandwidth: 4.8 kHz
225 #define SX126X_GFSK_RX_BW_5_8 0x17 // 7 0 5.8 kHz
226 #define SX126X_GFSK_RX_BW_7_3 0x0F // 7 0 7.3 kHz
227 #define SX126X_GFSK_RX_BW_9_7 0x1E // 7 0 9.7 kHz
228 #define SX126X_GFSK_RX_BW_11_7 0x16 // 7 0 11.7 kHz
229 #define SX126X_GFSK_RX_BW_14_6 0x0E // 7 0 14.6 kHz
230 #define SX126X_GFSK_RX_BW_19_5 0x1D // 7 0 19.5 kHz
231 #define SX126X_GFSK_RX_BW_23_4 0x15 // 7 0 23.4 kHz
232 #define SX126X_GFSK_RX_BW_29_3 0x0D // 7 0 29.3 kHz
233 #define SX126X_GFSK_RX_BW_39_0 0x1C // 7 0 39.0 kHz
234 #define SX126X_GFSK_RX_BW_46_9 0x14 // 7 0 46.9 kHz
235 #define SX126X_GFSK_RX_BW_58_6 0x0C // 7 0 58.6 kHz
236 #define SX126X_GFSK_RX_BW_78_2 0x1B // 7 0 78.2 kHz
237 #define SX126X_GFSK_RX_BW_93_8 0x13 // 7 0 93.8 kHz
238 #define SX126X_GFSK_RX_BW_117_3 0x0B // 7 0 117.3 kHz
239 #define SX126X_GFSK_RX_BW_156_2 0x1A // 7 0 156.2 kHz
240 #define SX126X_GFSK_RX_BW_187_2 0x12 // 7 0 187.2 kHz
241 #define SX126X_GFSK_RX_BW_234_3 0x0A // 7 0 234.3 kHz
242 #define SX126X_GFSK_RX_BW_312_0 0x19 // 7 0 312.0 kHz
243 #define SX126X_GFSK_RX_BW_373_6 0x11 // 7 0 373.6 kHz
244 #define SX126X_GFSK_RX_BW_467_0 0x09 // 7 0 467.0 kHz
245 #define SX126X_LORA_BW_7_8 0x00 // 7 0 LoRa bandwidth: 7.8 kHz
246 #define SX126X_LORA_BW_10_4 0x08 // 7 0 10.4 kHz
247 #define SX126X_LORA_BW_15_6 0x01 // 7 0 15.6 kHz
248 #define SX126X_LORA_BW_20_8 0x09 // 7 0 20.8 kHz
249 #define SX126X_LORA_BW_31_25 0x02 // 7 0 31.25 kHz
250 #define SX126X_LORA_BW_41_7 0x0A // 7 0 41.7 kHz
251 #define SX126X_LORA_BW_62_5 0x03 // 7 0 62.5 kHz
252 #define SX126X_LORA_BW_125_0 0x04 // 7 0 125.0 kHz
253 #define SX126X_LORA_BW_250_0 0x05 // 7 0 250.0 kHz
254 #define SX126X_LORA_BW_500_0 0x06 // 7 0 500.0 kHz
255 #define SX126X_LORA_CR_4_5 0x01 // 7 0 LoRa coding rate: 4/5
256 #define SX126X_LORA_CR_4_6 0x02 // 7 0 4/6
257 #define SX126X_LORA_CR_4_7 0x03 // 7 0 4/7
258 #define SX126X_LORA_CR_4_8 0x04 // 7 0 4/8
259 #define SX126X_LORA_LOW_DATA_RATE_OPTIMIZE_OFF 0x00 // 7 0 LoRa low data rate optimization: disabled
260 #define SX126X_LORA_LOW_DATA_RATE_OPTIMIZE_ON 0x01 // 7 0 enabled
261 
262 //SX126X_CMD_SET_PACKET_PARAMS
263 #define SX126X_GFSK_PREAMBLE_DETECT_OFF 0x00 // 7 0 GFSK minimum preamble length before reception starts: detector disabled
264 #define SX126X_GFSK_PREAMBLE_DETECT_8 0x04 // 7 0 8 bits
265 #define SX126X_GFSK_PREAMBLE_DETECT_16 0x05 // 7 0 16 bits
266 #define SX126X_GFSK_PREAMBLE_DETECT_24 0x06 // 7 0 24 bits
267 #define SX126X_GFSK_PREAMBLE_DETECT_32 0x07 // 7 0 32 bits
268 #define SX126X_GFSK_ADDRESS_FILT_OFF 0x00 // 7 0 GFSK address filtering: disabled
269 #define SX126X_GFSK_ADDRESS_FILT_NODE 0x01 // 7 0 node only
270 #define SX126X_GFSK_ADDRESS_FILT_NODE_BROADCAST 0x02 // 7 0 node and broadcast
271 #define SX126X_GFSK_PACKET_FIXED 0x00 // 7 0 GFSK packet type: fixed (payload length known in advance to both sides)
272 #define SX126X_GFSK_PACKET_VARIABLE 0x01 // 7 0 variable (payload length added to packet)
273 #define SX126X_GFSK_CRC_OFF 0x01 // 7 0 GFSK packet CRC: disabled
274 #define SX126X_GFSK_CRC_1_BYTE 0x00 // 7 0 1 byte
275 #define SX126X_GFSK_CRC_2_BYTE 0x02 // 7 0 2 byte
276 #define SX126X_GFSK_CRC_1_BYTE_INV 0x04 // 7 0 1 byte, inverted
277 #define SX126X_GFSK_CRC_2_BYTE_INV 0x06 // 7 0 2 byte, inverted
278 #define SX126X_GFSK_WHITENING_OFF 0x00 // 7 0 GFSK data whitening: disabled
279 #define SX126X_GFSK_WHITENING_ON 0x01 // 7 0 enabled
280 #define SX126X_LORA_HEADER_EXPLICIT 0x00 // 7 0 LoRa header mode: explicit
281 #define SX126X_LORA_HEADER_IMPLICIT 0x01 // 7 0 implicit
282 #define SX126X_LORA_CRC_OFF 0x00 // 7 0 LoRa CRC mode: disabled
283 #define SX126X_LORA_CRC_ON 0x01 // 7 0 enabled
284 #define SX126X_LORA_IQ_STANDARD 0x00 // 7 0 LoRa IQ setup: standard
285 #define SX126X_LORA_IQ_INVERTED 0x01 // 7 0 inverted
286 
287 //SX126X_CMD_SET_CAD_PARAMS
288 #define SX126X_CAD_ON_1_SYMB 0x00 // 7 0 number of symbols used for CAD: 1
289 #define SX126X_CAD_ON_2_SYMB 0x01 // 7 0 2
290 #define SX126X_CAD_ON_4_SYMB 0x02 // 7 0 4
291 #define SX126X_CAD_ON_8_SYMB 0x03 // 7 0 8
292 #define SX126X_CAD_ON_16_SYMB 0x04 // 7 0 16
293 #define SX126X_CAD_GOTO_STDBY 0x00 // 7 0 after CAD is done, always go to STDBY_RC mode
294 #define SX126X_CAD_GOTO_RX 0x01 // 7 0 after CAD is done, go to Rx mode if activity is detected
295 
296 //SX126X_CMD_GET_STATUS
297 #define SX126X_STATUS_MODE_STDBY_RC 0b00100000 // 6 4 current chip mode: STDBY_RC
298 #define SX126X_STATUS_MODE_STDBY_XOSC 0b00110000 // 6 4 STDBY_XOSC
299 #define SX126X_STATUS_MODE_FS 0b01000000 // 6 4 FS
300 #define SX126X_STATUS_MODE_RX 0b01010000 // 6 4 RX
301 #define SX126X_STATUS_MODE_TX 0b01100000 // 6 4 TX
302 #define SX126X_STATUS_DATA_AVAILABLE 0b00000100 // 3 1 command status: packet received and data can be retrieved
303 #define SX126X_STATUS_CMD_TIMEOUT 0b00000110 // 3 1 SPI command timed out
304 #define SX126X_STATUS_CMD_INVALID 0b00001000 // 3 1 invalid SPI command
305 #define SX126X_STATUS_CMD_FAILED 0b00001010 // 3 1 SPI command failed to execute
306 #define SX126X_STATUS_TX_DONE 0b00001100 // 3 1 packet transmission done
307 #define SX126X_STATUS_SPI_FAILED 0b11111111 // 7 0 SPI transaction failed
308 
309 //SX126X_CMD_GET_PACKET_STATUS
310 #define SX126X_GFSK_RX_STATUS_PREAMBLE_ERR 0b10000000 // 7 7 GFSK Rx status: preamble error
311 #define SX126X_GFSK_RX_STATUS_SYNC_ERR 0b01000000 // 6 6 sync word error
312 #define SX126X_GFSK_RX_STATUS_ADRS_ERR 0b00100000 // 5 5 address error
313 #define SX126X_GFSK_RX_STATUS_CRC_ERR 0b00010000 // 4 4 CRC error
314 #define SX126X_GFSK_RX_STATUS_LENGTH_ERR 0b00001000 // 3 3 length error
315 #define SX126X_GFSK_RX_STATUS_ABORT_ERR 0b00000100 // 2 2 abort error
316 #define SX126X_GFSK_RX_STATUS_PACKET_RECEIVED 0b00000010 // 2 2 packet received
317 #define SX126X_GFSK_RX_STATUS_PACKET_SENT 0b00000001 // 2 2 packet sent
318 
319 //SX126X_CMD_GET_DEVICE_ERRORS
320 #define SX126X_PA_RAMP_ERR 0b100000000 // 8 8 device errors: PA ramping failed
321 #define SX126X_PLL_LOCK_ERR 0b001000000 // 6 6 PLL failed to lock
322 #define SX126X_XOSC_START_ERR 0b000100000 // 5 5 crystal oscillator failed to start
323 #define SX126X_IMG_CALIB_ERR 0b000010000 // 4 4 image calibration failed
324 #define SX126X_ADC_CALIB_ERR 0b000001000 // 3 3 ADC calibration failed
325 #define SX126X_PLL_CALIB_ERR 0b000000100 // 2 2 PLL calibration failed
326 #define SX126X_RC13M_CALIB_ERR 0b000000010 // 1 1 RC13M calibration failed
327 #define SX126X_RC64K_CALIB_ERR 0b000000001 // 0 0 RC64K calibration failed
328 
329 
330 // SX126X SPI register variables
331 //SX126X_REG_LORA_SYNC_WORD_MSB + LSB
332 #define SX126X_SYNC_WORD_PUBLIC 0x34 // actually 0x3444 NOTE: The low nibbles in each byte (0x_4_4) are masked out since apparently, they're reserved.
333 #define SX126X_SYNC_WORD_PRIVATE 0x12 // actually 0x1424 You couldn't make this up if you tried.
334 
335 
342 class SX126x: public PhysicalLayer {
343  public:
344  // introduce PhysicalLayer overloads
349 
355  SX126x(Module* mod);
356 
357  // basic methods
358 
378  int16_t begin(float bw, uint8_t sf, uint8_t cr, uint8_t syncWord, uint16_t preambleLength, float tcxoVoltage, bool useRegulatorLDO = false);
379 
397  int16_t beginFSK(float br, float freqDev, float rxBw, uint16_t preambleLength, float tcxoVoltage, bool useRegulatorLDO = false);
398 
407  int16_t reset(bool verify = true);
408 
421  int16_t transmit(uint8_t* data, size_t len, uint8_t addr = 0) override;
422 
433  int16_t receive(uint8_t* data, size_t len) override;
434 
442  int16_t transmitDirect(uint32_t frf = 0) override;
443 
450  int16_t receiveDirect() override;
451 
457  int16_t scanChannel();
458 
466  int16_t sleep(bool retainConfig = true);
467 
473  int16_t standby() override;
474 
482  int16_t standby(uint8_t mode);
483 
484  // interrupt methods
485 
491  void setDio1Action(void (*func)(void));
492 
496  void clearDio1Action();
497 
510  int16_t startTransmit(uint8_t* data, size_t len, uint8_t addr = 0) override;
511 
519  int16_t startReceive(uint32_t timeout = SX126X_RX_TIMEOUT_INF);
520 
531  int16_t startReceiveDutyCycle(uint32_t rxPeriod, uint32_t sleepPeriod);
532 
544  int16_t startReceiveDutyCycleAuto(uint16_t senderPreambleLength = 0, uint16_t minSymbols = 8);
545 
555  int16_t readData(uint8_t* data, size_t len) override;
556 
557  // configuration methods
558 
566  int16_t setBandwidth(float bw);
567 
575  int16_t setSpreadingFactor(uint8_t sf);
576 
584  int16_t setCodingRate(uint8_t cr);
585 
595  int16_t setSyncWord(uint8_t syncWord, uint8_t controlBits = 0x44);
596 
604  int16_t setCurrentLimit(float currentLimit);
605 
611  float getCurrentLimit();
612 
620  int16_t setPreambleLength(uint16_t preambleLength);
621 
629  int16_t setFrequencyDeviation(float freqDev) override;
630 
638  int16_t setBitRate(float br);
639 
647  int16_t setRxBandwidth(float rxBw);
648 
658  int16_t setDataShaping(uint8_t sh) override;
659 
669  int16_t setSyncWord(uint8_t* syncWord, uint8_t len);
670 
680  int16_t setSyncBits(uint8_t *syncWord, uint8_t bitsLen);
681 
689  int16_t setNodeAddress(uint8_t nodeAddr);
690 
698  int16_t setBroadcastAddress(uint8_t broadAddr);
699 
705  int16_t disableAddressFiltering();
706 
720  int16_t setCRC(uint8_t len, uint16_t initial = 0x1D0F, uint16_t polynomial = 0x1021, bool inverted = true);
721 
731  int16_t setWhitening(bool enabled, uint16_t initial = 0x0100);
732 
743  int16_t setTCXO(float voltage, uint32_t delay = 5000);
744 
750  int16_t setDio2AsRfSwitch(bool enable = true);
751 
757  float getDataRate() const;
758 
764  float getRSSI();
765 
771  float getSNR();
772 
780  size_t getPacketLength(bool update = true) override;
781 
789  int16_t fixedPacketLengthMode(uint8_t len = SX126X_MAX_PACKET_LENGTH);
790 
798  int16_t variablePacketLengthMode(uint8_t maxLen = SX126X_MAX_PACKET_LENGTH);
799 
807  uint32_t getTimeOnAir(size_t len);
808 
814  float getRSSIInst();
815 
821  int16_t implicitHeader(size_t len);
822 
830  int16_t explicitHeader();
831 
837  int16_t setRegulatorLDO();
838 
844  int16_t setRegulatorDCDC();
845 
853  int16_t setEncoding(uint8_t encoding) override;
854 
863  void setRfSwitchPins(RADIOLIB_PIN_TYPE rxEn, RADIOLIB_PIN_TYPE txEn);
864 
873  int16_t forceLDRO(bool enable);
874 
881  int16_t autoLDRO();
882 
888  uint8_t random();
889 
890 #ifndef RADIOLIB_GODMODE
891  protected:
892 #endif
893  // SX126x SPI command implementations
894  int16_t setTx(uint32_t timeout = 0);
895  int16_t setRx(uint32_t timeout);
896  int16_t setCad();
897  int16_t setPaConfig(uint8_t paDutyCycle, uint8_t deviceSel, uint8_t hpMax = SX126X_PA_CONFIG_HP_MAX, uint8_t paLut = SX126X_PA_CONFIG_PA_LUT);
898  int16_t writeRegister(uint16_t addr, uint8_t* data, uint8_t numBytes);
899  int16_t readRegister(uint16_t addr, uint8_t* data, uint8_t numBytes);
900  int16_t writeBuffer(uint8_t* data, uint8_t numBytes, uint8_t offset = 0x00);
901  int16_t readBuffer(uint8_t* data, uint8_t numBytes);
902  int16_t setDioIrqParams(uint16_t irqMask, uint16_t dio1Mask, uint16_t dio2Mask = SX126X_IRQ_NONE, uint16_t dio3Mask = SX126X_IRQ_NONE);
903  uint16_t getIrqStatus();
904  int16_t clearIrqStatus(uint16_t clearIrqParams = SX126X_IRQ_ALL);
905  int16_t setRfFrequency(uint32_t frf);
906  int16_t calibrateImage(uint8_t* data);
907  uint8_t getPacketType();
908  int16_t setTxParams(uint8_t power, uint8_t rampTime = SX126X_PA_RAMP_200U);
909  int16_t setModulationParams(uint8_t sf, uint8_t bw, uint8_t cr, uint8_t ldro);
910  int16_t setModulationParamsFSK(uint32_t br, uint8_t pulseShape, uint8_t rxBw, uint32_t freqDev);
911  int16_t setPacketParams(uint16_t preambleLength, uint8_t crcType, uint8_t payloadLength, uint8_t headerType, uint8_t invertIQ = SX126X_LORA_IQ_STANDARD);
912  int16_t setPacketParamsFSK(uint16_t preambleLength, uint8_t crcType, uint8_t syncWordLength, uint8_t addrComp, uint8_t whitening, uint8_t packetType = SX126X_GFSK_PACKET_VARIABLE, uint8_t payloadLength = 0xFF, uint8_t preambleDetectorLength = SX126X_GFSK_PREAMBLE_DETECT_16);
913  int16_t setBufferBaseAddress(uint8_t txBaseAddress = 0x00, uint8_t rxBaseAddress = 0x00);
914  int16_t setRegulatorMode(uint8_t mode);
915  uint8_t getStatus();
916  uint32_t getPacketStatus();
917  uint16_t getDeviceErrors();
918  int16_t clearDeviceErrors();
919 
920  int16_t startReceiveCommon();
921  int16_t setFrequencyRaw(float freq);
922  int16_t setPacketMode(uint8_t mode, uint8_t len);
923  int16_t setHeaderType(uint8_t headerType, size_t len = 0xFF);
924 
925  // fixes to errata
926  int16_t fixSensitivity();
927  int16_t fixPaClamping();
928  int16_t fixImplicitTimeout();
929  int16_t fixInvertedIQ(uint8_t iqConfig);
930 
931 #ifndef RADIOLIB_GODMODE
932  private:
933 #endif
934  Module* _mod;
935 
936  uint8_t _bw = 0, _sf = 0, _cr = 0, _ldro = 0, _crcType = 0, _headerType = 0;
937  uint16_t _preambleLength = 0;
938  float _bwKhz = 0;
939  bool _ldroAuto = true;
940 
941  uint32_t _br = 0, _freqDev = 0;
942  uint8_t _rxBw = 0, _pulseShape = 0, _crcTypeFSK = 0, _syncWordLength = 0, _addrComp = 0, _whitening = 0, _packetType = 0;
943  uint16_t _preambleLengthFSK = 0;
944  float _rxBwKhz = 0;
945 
946  float _dataRate = 0;
947 
948  uint32_t _tcxoDelay = 0;
949 
950  size_t _implicitLen = 0;
951 
952  int16_t config(uint8_t modem);
953 
954  // common low-level SPI interface
955  int16_t SPIwriteCommand(uint8_t cmd, uint8_t* data, uint8_t numBytes, bool waitForBusy = true);
956  int16_t SPIwriteCommand(uint8_t* cmd, uint8_t cmdLen, uint8_t* data, uint8_t numBytes, bool waitForBusy = true);
957  int16_t SPIreadCommand(uint8_t cmd, uint8_t* data, uint8_t numBytes, bool waitForBusy = true);
958  int16_t SPIreadCommand(uint8_t* cmd, uint8_t cmdLen, uint8_t* data, uint8_t numBytes, bool waitForBusy = true);
959  int16_t SPItransfer(uint8_t* cmd, uint8_t cmdLen, bool write, uint8_t* dataOut, uint8_t* dataIn, uint8_t numBytes, bool waitForBusy, uint32_t timeout = 5000);
960 };
961 
962 #endif
963 
964 #endif
void setRfSwitchPins(RADIOLIB_PIN_TYPE rxEn, RADIOLIB_PIN_TYPE txEn)
Some modules contain external RF switch controlled by two pins. This function gives RadioLib control ...
Definition: SX126x.cpp:1166
-
int16_t setBroadcastAddress(uint8_t broadAddr)
Sets broadcast address. Calling this method will also enable address filtering for node and broadcast...
Definition: SX126x.cpp:938
-
int16_t setSyncWord(uint8_t syncWord, uint8_t controlBits=0x44)
Sets LoRa sync word.
Definition: SX126x.cpp:684
-
float getCurrentLimit()
Reads current protection limit.
Definition: SX126x.cpp:708
-
int16_t startTransmit(String &str, uint8_t addr=0)
Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes.
Definition: PhysicalLayer.cpp:49
-
int16_t startReceiveDutyCycle(uint32_t rxPeriod, uint32_t sleepPeriod)
Interrupt-driven receive method where the device mostly sleeps and periodically wakes to listen...
Definition: SX126x.cpp:488
-
SX126x(Module *mod)
Default constructor.
Definition: SX126x.cpp:4
-
int16_t setSyncBits(uint8_t *syncWord, uint8_t bitsLen)
Sets FSK sync word in the form of array of up to 8 bytes.
Definition: SX126x.cpp:894
-
uint8_t random()
Get one truly random byte from RSSI noise.
Definition: SX126x.cpp:1191
-
int16_t readData(uint8_t *data, size_t len) override
Reads data received after calling startReceive method.
Definition: SX126x.cpp:576
-
int16_t setDio2AsRfSwitch(bool enable=true)
Set DIO2 to function as RF switch (default in Semtech example designs).
Definition: SX126x.cpp:1260
-
int16_t setDataShaping(uint8_t sh) override
Sets time-bandwidth product of Gaussian filter applied for shaping. Allowed values are RADIOLIB_SHAPI...
Definition: SX126x.cpp:841
-
int16_t explicitHeader()
Set explicit header mode for future reception/transmission.
Definition: SX126x.cpp:1150
-
int16_t setBitRate(float br)
Sets FSK bit rate. Allowed values range from 0.6 to 300.0 kbps.
Definition: SX126x.cpp:757
-
int16_t startReceiveDutyCycleAuto(uint16_t senderPreambleLength=0, uint16_t minSymbols=8)
Calls startReceiveDutyCycle with rxPeriod and sleepPeriod set so the unit shouldn&#39;t miss any messages...
Definition: SX126x.cpp:515
-
int16_t standby() override
Sets the module to standby mode (overload for PhysicalLayer compatibility, uses 13 MHz RC oscillator)...
Definition: SX126x.cpp:394
-
int16_t scanChannel()
Performs scan for LoRa transmission in the current channel. Detects both preamble and payload...
Definition: SX126x.cpp:333
-
int16_t variablePacketLengthMode(uint8_t maxLen=SX126X_MAX_PACKET_LENGTH)
Set modem in variable packet length mode. Available in FSK mode only.
Definition: SX126x.cpp:1100
-
float getDataRate() const
Gets effective data rate for the last transmitted packet. The value is calculated only for payload by...
Definition: SX126x.cpp:1062
-
void clearDio1Action()
Clears interrupt service routine to call when DIO1 activates.
Definition: SX126x.cpp:410
-
int16_t startTransmit(uint8_t *data, size_t len, uint8_t addr=0) override
Interrupt-driven binary transmit method. Overloads for string-based transmissions are implemented in ...
Definition: SX126x.cpp:414
-
int16_t reset(bool verify=true)
Reset method. Will reset the chip to the default state using RST pin.
Definition: SX126x.cpp:160
-
int16_t beginFSK(float br, float freqDev, float rxBw, uint16_t preambleLength, float tcxoVoltage, bool useRegulatorLDO=false)
Initialization method for FSK modem.
Definition: SX126x.cpp:79
-
int16_t begin(float bw, uint8_t sf, uint8_t cr, uint8_t syncWord, uint16_t preambleLength, float tcxoVoltage, bool useRegulatorLDO=false)
Initialization method for LoRa modem.
Definition: SX126x.cpp:8
-
Base class for SX126x series. All derived classes for SX126x (e.g. SX1262 or SX1268) inherit from thi...
Definition: SX126x.h:342
-
int16_t setWhitening(bool enabled, uint16_t initial=0x0100)
Sets FSK whitening parameters.
Definition: SX126x.cpp:1025
-
int16_t startReceive(uint32_t timeout=SX126X_RX_TIMEOUT_INF)
Interrupt-driven receive method. DIO1 will be activated when full packet is received.
Definition: SX126x.cpp:475
-
int16_t transmit(uint8_t *data, size_t len, uint8_t addr=0) override
Blocking binary transmit method. Overloads for string-based transmissions are implemented in Physical...
Definition: SX126x.cpp:193
-
float getRSSI()
Gets RSSI (Recorded Signal Strength Indicator) of the last received packet.
Definition: SX126x.cpp:1066
-
float getRSSIInst()
Get instantaneous RSSI value during recption of the packet. Should switch to FSK receive mode for LBT...
Definition: SX126x.cpp:1139
-
Implements all common low-level SPI/UART/I2C methods to control the wireless module. Every module class contains one private instance of this class.
Definition: Module.h:17
-
int16_t transmit(__FlashStringHelper *fstr, uint8_t addr=0)
Arduino Flash String transmit method.
Definition: PhysicalLayer.cpp:8
-
float getSNR()
Gets SNR (Signal to Noise Ratio) of the last received packet. Only available for LoRa modem...
Definition: SX126x.cpp:1073
-
int16_t setFrequencyDeviation(float freqDev) override
Sets FSK frequency deviation. Allowed values range from 0.0 to 200.0 kHz.
Definition: SX126x.cpp:730
-
int16_t setCurrentLimit(float currentLimit)
Sets current protection limit. Can be set in 0.25 mA steps.
Definition: SX126x.cpp:695
-
int16_t receive(String &str, size_t len=0)
Arduino String receive method.
Definition: PhysicalLayer.cpp:98
-
int16_t setRxBandwidth(float rxBw)
Sets FSK receiver bandwidth. Allowed values are 4.8, 5.8, 7.3, 9.7, 11.7, 14.6, 19.5, 23.4, 29.3, 39.0, 46.9, 58.6, 78.2, 93.8, 117.3, 156.2, 187.2, 234.3, 312.0, 373.6 and 467.0 kHz.
Definition: SX126x.cpp:778
-
void setDio1Action(void(*func)(void))
Sets interrupt service routine to call when DIO1 activates.
Definition: SX126x.cpp:406
-
int16_t autoLDRO()
Re-enables automatic LDRO configuration. Only available in LoRa mode. After calling this method...
Definition: SX126x.cpp:1182
-
int16_t setCodingRate(uint8_t cr)
Sets LoRa coding rate denominator. Allowed values range from 5 to 8.
Definition: SX126x.cpp:671
-
int16_t setEncoding(uint8_t encoding) override
Sets transmission encoding. Available in FSK mode only. Serves only as alias for PhysicalLayer compat...
Definition: SX126x.cpp:1162
-
int16_t transmitDirect(uint32_t frf=0) override
Starts direct mode transmission.
Definition: SX126x.cpp:309
-
Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN...
Definition: PhysicalLayer.h:13
-
uint32_t getTimeOnAir(size_t len)
Get expected time-on-air for a given size of payload.
Definition: SX126x.cpp:1104
-
int16_t setBandwidth(float bw)
Sets LoRa bandwidth. Allowed values are 7.8, 10.4, 15.6, 20.8, 31.25, 41.7, 62.5, 125...
Definition: SX126x.cpp:607
-
int16_t fixedPacketLengthMode(uint8_t len=SX126X_MAX_PACKET_LENGTH)
Set modem in fixed packet length mode. Available in FSK mode only.
Definition: SX126x.cpp:1096
-
int16_t setRegulatorDCDC()
Set regulator mode to DC-DC.
Definition: SX126x.cpp:1158
-
int16_t setNodeAddress(uint8_t nodeAddr)
Sets node address. Calling this method will also enable address filtering for node address only...
Definition: SX126x.cpp:921
-
int16_t receiveDirect() override
Starts direct mode reception. Only implemented for PhysicalLayer compatibility, as SX126x series does...
Definition: SX126x.cpp:325
-
int16_t setRegulatorLDO()
Set regulator mode to LDO.
Definition: SX126x.cpp:1154
-
int16_t setCRC(uint8_t len, uint16_t initial=0x1D0F, uint16_t polynomial=0x1021, bool inverted=true)
Sets CRC configuration.
Definition: SX126x.cpp:966
-
int16_t setPreambleLength(uint16_t preambleLength)
Sets preamble length for LoRa or FSK modem. Allowed values range from 1 to 65535. ...
Definition: SX126x.cpp:717
-
int16_t implicitHeader(size_t len)
Set implicit header mode for future reception/transmission.
Definition: SX126x.cpp:1146
-
int16_t sleep(bool retainConfig=true)
Sets the module to sleep mode.
Definition: SX126x.cpp:378
-
int16_t disableAddressFiltering()
Disables address filtering. Calling this method will also erase previously set addresses.
Definition: SX126x.cpp:955
-
int16_t setSpreadingFactor(uint8_t sf)
Sets LoRa spreading factor. Allowed values range from 5 to 12.
Definition: SX126x.cpp:658
-
int16_t setTCXO(float voltage, uint32_t delay=5000)
Sets TCXO (Temperature Compensated Crystal Oscillator) configuration.
Definition: SX126x.cpp:1212
-
int16_t receive(uint8_t *data, size_t len) override
Blocking binary receive method. Overloads for string-based transmissions are implemented in PhysicalL...
Definition: SX126x.cpp:252
-
int16_t forceLDRO(bool enable)
Forces LoRa low data rate optimization. Only available in LoRa mode. After calling this method...
Definition: SX126x.cpp:1170
-
int16_t readData(String &str, size_t len=0)
Reads data that was received after calling startReceive method.
Definition: PhysicalLayer.cpp:57
-
size_t getPacketLength(bool update=true) override
Query modem for the packet length of received payload.
Definition: SX126x.cpp:1089
+
1 #if !defined(_RADIOLIB_SX126X_H)
+
2 #define _RADIOLIB_SX126X_H
+
3 
+
4 #include "../../TypeDef.h"
+
5 
+
6 #if !defined(RADIOLIB_EXCLUDE_SX126X)
+
7 
+
8 #include "../../Module.h"
+
9 
+
10 #include "../../protocols/PhysicalLayer/PhysicalLayer.h"
+
11 
+
12 // SX126X physical layer properties
+
13 #define SX126X_FREQUENCY_STEP_SIZE 0.9536743164
+
14 #define SX126X_MAX_PACKET_LENGTH 255
+
15 #define SX126X_CRYSTAL_FREQ 32.0
+
16 #define SX126X_DIV_EXPONENT 25
+
17 
+
18 // SX126X SPI commands
+
19 // operational modes commands
+
20 #define SX126X_CMD_NOP 0x00
+
21 #define SX126X_CMD_SET_SLEEP 0x84
+
22 #define SX126X_CMD_SET_STANDBY 0x80
+
23 #define SX126X_CMD_SET_FS 0xC1
+
24 #define SX126X_CMD_SET_TX 0x83
+
25 #define SX126X_CMD_SET_RX 0x82
+
26 #define SX126X_CMD_STOP_TIMER_ON_PREAMBLE 0x9F
+
27 #define SX126X_CMD_SET_RX_DUTY_CYCLE 0x94
+
28 #define SX126X_CMD_SET_CAD 0xC5
+
29 #define SX126X_CMD_SET_TX_CONTINUOUS_WAVE 0xD1
+
30 #define SX126X_CMD_SET_TX_INFINITE_PREAMBLE 0xD2
+
31 #define SX126X_CMD_SET_REGULATOR_MODE 0x96
+
32 #define SX126X_CMD_CALIBRATE 0x89
+
33 #define SX126X_CMD_CALIBRATE_IMAGE 0x98
+
34 #define SX126X_CMD_SET_PA_CONFIG 0x95
+
35 #define SX126X_CMD_SET_RX_TX_FALLBACK_MODE 0x93
+
36 
+
37 // register and buffer access commands
+
38 #define SX126X_CMD_WRITE_REGISTER 0x0D
+
39 #define SX126X_CMD_READ_REGISTER 0x1D
+
40 #define SX126X_CMD_WRITE_BUFFER 0x0E
+
41 #define SX126X_CMD_READ_BUFFER 0x1E
+
42 
+
43 // DIO and IRQ control
+
44 #define SX126X_CMD_SET_DIO_IRQ_PARAMS 0x08
+
45 #define SX126X_CMD_GET_IRQ_STATUS 0x12
+
46 #define SX126X_CMD_CLEAR_IRQ_STATUS 0x02
+
47 #define SX126X_CMD_SET_DIO2_AS_RF_SWITCH_CTRL 0x9D
+
48 #define SX126X_CMD_SET_DIO3_AS_TCXO_CTRL 0x97
+
49 
+
50 // RF, modulation and packet commands
+
51 #define SX126X_CMD_SET_RF_FREQUENCY 0x86
+
52 #define SX126X_CMD_SET_PACKET_TYPE 0x8A
+
53 #define SX126X_CMD_GET_PACKET_TYPE 0x11
+
54 #define SX126X_CMD_SET_TX_PARAMS 0x8E
+
55 #define SX126X_CMD_SET_MODULATION_PARAMS 0x8B
+
56 #define SX126X_CMD_SET_PACKET_PARAMS 0x8C
+
57 #define SX126X_CMD_SET_CAD_PARAMS 0x88
+
58 #define SX126X_CMD_SET_BUFFER_BASE_ADDRESS 0x8F
+
59 #define SX126X_CMD_SET_LORA_SYMB_NUM_TIMEOUT 0x0A
+
60 
+
61 // status commands
+
62 #define SX126X_CMD_GET_STATUS 0xC0
+
63 #define SX126X_CMD_GET_RSSI_INST 0x15
+
64 #define SX126X_CMD_GET_RX_BUFFER_STATUS 0x13
+
65 #define SX126X_CMD_GET_PACKET_STATUS 0x14
+
66 #define SX126X_CMD_GET_DEVICE_ERRORS 0x17
+
67 #define SX126X_CMD_CLEAR_DEVICE_ERRORS 0x07
+
68 #define SX126X_CMD_GET_STATS 0x10
+
69 #define SX126X_CMD_RESET_STATS 0x00
+
70 
+
71 
+
72 // SX126X register map
+
73 #define SX126X_REG_WHITENING_INITIAL_MSB 0x06B8
+
74 #define SX126X_REG_WHITENING_INITIAL_LSB 0x06B9
+
75 #define SX126X_REG_CRC_INITIAL_MSB 0x06BC
+
76 #define SX126X_REG_CRC_INITIAL_LSB 0x06BD
+
77 #define SX126X_REG_CRC_POLYNOMIAL_MSB 0x06BE
+
78 #define SX126X_REG_CRC_POLYNOMIAL_LSB 0x06BF
+
79 #define SX126X_REG_SYNC_WORD_0 0x06C0
+
80 #define SX126X_REG_SYNC_WORD_1 0x06C1
+
81 #define SX126X_REG_SYNC_WORD_2 0x06C2
+
82 #define SX126X_REG_SYNC_WORD_3 0x06C3
+
83 #define SX126X_REG_SYNC_WORD_4 0x06C4
+
84 #define SX126X_REG_SYNC_WORD_5 0x06C5
+
85 #define SX126X_REG_SYNC_WORD_6 0x06C6
+
86 #define SX126X_REG_SYNC_WORD_7 0x06C7
+
87 #define SX126X_REG_NODE_ADDRESS 0x06CD
+
88 #define SX126X_REG_BROADCAST_ADDRESS 0x06CE
+
89 #define SX126X_REG_LORA_SYNC_WORD_MSB 0x0740
+
90 #define SX126X_REG_LORA_SYNC_WORD_LSB 0x0741
+
91 #define SX126X_REG_RANDOM_NUMBER_0 0x0819
+
92 #define SX126X_REG_RANDOM_NUMBER_1 0x081A
+
93 #define SX126X_REG_RANDOM_NUMBER_2 0x081B
+
94 #define SX126X_REG_RANDOM_NUMBER_3 0x081C
+
95 #define SX126X_REG_RX_GAIN 0x08AC
+
96 #define SX126X_REG_OCP_CONFIGURATION 0x08E7
+
97 #define SX126X_REG_XTA_TRIM 0x0911
+
98 #define SX126X_REG_XTB_TRIM 0x0912
+
99 
+
100 // undocumented registers
+
101 #define SX126X_REG_SENSITIVITY_CONFIG 0x0889 // SX1268 datasheet v1.1, section 15.1
+
102 #define SX126X_REG_TX_CLAMP_CONFIG 0x08D8 // SX1268 datasheet v1.1, section 15.2
+
103 #define SX126X_REG_RTC_STOP 0x0920 // SX1268 datasheet v1.1, section 15.3
+
104 #define SX126X_REG_RTC_EVENT 0x0944 // SX1268 datasheet v1.1, section 15.3
+
105 #define SX126X_REG_IQ_CONFIG 0x0736 // SX1268 datasheet v1.1, section 15.4
+
106 #define SX126X_REG_RX_GAIN_RETENTION_0 0x029F // SX1268 datasheet v1.1, section 9.6
+
107 #define SX126X_REG_RX_GAIN_RETENTION_1 0x02A0 // SX1268 datasheet v1.1, section 9.6
+
108 #define SX126X_REG_RX_GAIN_RETENTION_2 0x02A1 // SX1268 datasheet v1.1, section 9.6
+
109 
+
110 
+
111 // SX126X SPI command variables
+
112 //SX126X_CMD_SET_SLEEP MSB LSB DESCRIPTION
+
113 #define SX126X_SLEEP_START_COLD 0b00000000 // 2 2 sleep mode: cold start, configuration is lost (default)
+
114 #define SX126X_SLEEP_START_WARM 0b00000100 // 2 2 warm start, configuration is retained
+
115 #define SX126X_SLEEP_RTC_OFF 0b00000000 // 0 0 wake on RTC timeout: disabled
+
116 #define SX126X_SLEEP_RTC_ON 0b00000001 // 0 0 enabled
+
117 
+
118 //SX126X_CMD_SET_STANDBY
+
119 #define SX126X_STANDBY_RC 0x00 // 7 0 standby mode: 13 MHz RC oscillator
+
120 #define SX126X_STANDBY_XOSC 0x01 // 7 0 32 MHz crystal oscillator
+
121 
+
122 //SX126X_CMD_SET_RX
+
123 #define SX126X_RX_TIMEOUT_NONE 0x000000 // 23 0 Rx timeout duration: no timeout (Rx single mode)
+
124 #define SX126X_RX_TIMEOUT_INF 0xFFFFFF // 23 0 infinite (Rx continuous mode)
+
125 
+
126 //SX126X_CMD_SET_TX
+
127 #define SX126X_TX_TIMEOUT_NONE 0x000000 // 23 0 Tx timeout duration: no timeout (Tx single mode)
+
128 
+
129 //SX126X_CMD_STOP_TIMER_ON_PREAMBLE
+
130 #define SX126X_STOP_ON_PREAMBLE_OFF 0x00 // 7 0 stop timer on: sync word or header (default)
+
131 #define SX126X_STOP_ON_PREAMBLE_ON 0x01 // 7 0 preamble detection
+
132 
+
133 //SX126X_CMD_SET_REGULATOR_MODE
+
134 #define SX126X_REGULATOR_LDO 0x00 // 7 0 set regulator mode: LDO (default)
+
135 #define SX126X_REGULATOR_DC_DC 0x01 // 7 0 DC-DC
+
136 
+
137 //SX126X_CMD_CALIBRATE
+
138 #define SX126X_CALIBRATE_IMAGE_OFF 0b00000000 // 6 6 image calibration: disabled
+
139 #define SX126X_CALIBRATE_IMAGE_ON 0b01000000 // 6 6 enabled
+
140 #define SX126X_CALIBRATE_ADC_BULK_P_OFF 0b00000000 // 5 5 ADC bulk P calibration: disabled
+
141 #define SX126X_CALIBRATE_ADC_BULK_P_ON 0b00100000 // 5 5 enabled
+
142 #define SX126X_CALIBRATE_ADC_BULK_N_OFF 0b00000000 // 4 4 ADC bulk N calibration: disabled
+
143 #define SX126X_CALIBRATE_ADC_BULK_N_ON 0b00010000 // 4 4 enabled
+
144 #define SX126X_CALIBRATE_ADC_PULSE_OFF 0b00000000 // 3 3 ADC pulse calibration: disabled
+
145 #define SX126X_CALIBRATE_ADC_PULSE_ON 0b00001000 // 3 3 enabled
+
146 #define SX126X_CALIBRATE_PLL_OFF 0b00000000 // 2 2 PLL calibration: disabled
+
147 #define SX126X_CALIBRATE_PLL_ON 0b00000100 // 2 2 enabled
+
148 #define SX126X_CALIBRATE_RC13M_OFF 0b00000000 // 1 1 13 MHz RC osc. calibration: disabled
+
149 #define SX126X_CALIBRATE_RC13M_ON 0b00000010 // 1 1 enabled
+
150 #define SX126X_CALIBRATE_RC64K_OFF 0b00000000 // 0 0 64 kHz RC osc. calibration: disabled
+
151 #define SX126X_CALIBRATE_RC64K_ON 0b00000001 // 0 0 enabled
+
152 #define SX126X_CALIBRATE_ALL 0b01111111 // 6 0 calibrate all blocks
+
153 
+
154 //SX126X_CMD_CALIBRATE_IMAGE
+
155 #define SX126X_CAL_IMG_430_MHZ_1 0x6B
+
156 #define SX126X_CAL_IMG_430_MHZ_2 0x6F
+
157 #define SX126X_CAL_IMG_470_MHZ_1 0x75
+
158 #define SX126X_CAL_IMG_470_MHZ_2 0x81
+
159 #define SX126X_CAL_IMG_779_MHZ_1 0xC1
+
160 #define SX126X_CAL_IMG_779_MHZ_2 0xC5
+
161 #define SX126X_CAL_IMG_863_MHZ_1 0xD7
+
162 #define SX126X_CAL_IMG_863_MHZ_2 0xDB
+
163 #define SX126X_CAL_IMG_902_MHZ_1 0xE1
+
164 #define SX126X_CAL_IMG_902_MHZ_2 0xE9
+
165 
+
166 //SX126X_CMD_SET_PA_CONFIG
+
167 #define SX126X_PA_CONFIG_HP_MAX 0x07
+
168 #define SX126X_PA_CONFIG_PA_LUT 0x01
+
169 #define SX126X_PA_CONFIG_SX1262_8 0x00
+
170 
+
171 //SX126X_CMD_SET_RX_TX_FALLBACK_MODE
+
172 #define SX126X_RX_TX_FALLBACK_MODE_FS 0x40 // 7 0 after Rx/Tx go to: FS mode
+
173 #define SX126X_RX_TX_FALLBACK_MODE_STDBY_XOSC 0x30 // 7 0 standby with crystal oscillator
+
174 #define SX126X_RX_TX_FALLBACK_MODE_STDBY_RC 0x20 // 7 0 standby with RC oscillator (default)
+
175 
+
176 //SX126X_CMD_SET_DIO_IRQ_PARAMS
+
177 #define SX126X_IRQ_TIMEOUT 0b1000000000 // 9 9 Rx or Tx timeout
+
178 #define SX126X_IRQ_CAD_DETECTED 0b0100000000 // 8 8 channel activity detected
+
179 #define SX126X_IRQ_CAD_DONE 0b0010000000 // 7 7 channel activity detection finished
+
180 #define SX126X_IRQ_CRC_ERR 0b0001000000 // 6 6 wrong CRC received
+
181 #define SX126X_IRQ_HEADER_ERR 0b0000100000 // 5 5 LoRa header CRC error
+
182 #define SX126X_IRQ_HEADER_VALID 0b0000010000 // 4 4 valid LoRa header received
+
183 #define SX126X_IRQ_SYNC_WORD_VALID 0b0000001000 // 3 3 valid sync word detected
+
184 #define SX126X_IRQ_PREAMBLE_DETECTED 0b0000000100 // 2 2 preamble detected
+
185 #define SX126X_IRQ_RX_DONE 0b0000000010 // 1 1 packet received
+
186 #define SX126X_IRQ_TX_DONE 0b0000000001 // 0 0 packet transmission completed
+
187 #define SX126X_IRQ_ALL 0b1111111111 // 9 0 all interrupts
+
188 #define SX126X_IRQ_NONE 0b0000000000 // 9 0 no interrupts
+
189 
+
190 //SX126X_CMD_SET_DIO2_AS_RF_SWITCH_CTRL
+
191 #define SX126X_DIO2_AS_IRQ 0x00 // 7 0 DIO2 configuration: IRQ
+
192 #define SX126X_DIO2_AS_RF_SWITCH 0x01 // 7 0 RF switch control
+
193 
+
194 //SX126X_CMD_SET_DIO3_AS_TCXO_CTRL
+
195 #define SX126X_DIO3_OUTPUT_1_6 0x00 // 7 0 DIO3 voltage output for TCXO: 1.6 V
+
196 #define SX126X_DIO3_OUTPUT_1_7 0x01 // 7 0 1.7 V
+
197 #define SX126X_DIO3_OUTPUT_1_8 0x02 // 7 0 1.8 V
+
198 #define SX126X_DIO3_OUTPUT_2_2 0x03 // 7 0 2.2 V
+
199 #define SX126X_DIO3_OUTPUT_2_4 0x04 // 7 0 2.4 V
+
200 #define SX126X_DIO3_OUTPUT_2_7 0x05 // 7 0 2.7 V
+
201 #define SX126X_DIO3_OUTPUT_3_0 0x06 // 7 0 3.0 V
+
202 #define SX126X_DIO3_OUTPUT_3_3 0x07 // 7 0 3.3 V
+
203 
+
204 //SX126X_CMD_SET_PACKET_TYPE
+
205 #define SX126X_PACKET_TYPE_GFSK 0x00 // 7 0 packet type: GFSK
+
206 #define SX126X_PACKET_TYPE_LORA 0x01 // 7 0 LoRa
+
207 
+
208 //SX126X_CMD_SET_TX_PARAMS
+
209 #define SX126X_PA_RAMP_10U 0x00 // 7 0 ramp time: 10 us
+
210 #define SX126X_PA_RAMP_20U 0x01 // 7 0 20 us
+
211 #define SX126X_PA_RAMP_40U 0x02 // 7 0 40 us
+
212 #define SX126X_PA_RAMP_80U 0x03 // 7 0 80 us
+
213 #define SX126X_PA_RAMP_200U 0x04 // 7 0 200 us
+
214 #define SX126X_PA_RAMP_800U 0x05 // 7 0 800 us
+
215 #define SX126X_PA_RAMP_1700U 0x06 // 7 0 1700 us
+
216 #define SX126X_PA_RAMP_3400U 0x07 // 7 0 3400 us
+
217 
+
218 //SX126X_CMD_SET_MODULATION_PARAMS
+
219 #define SX126X_GFSK_FILTER_NONE 0x00 // 7 0 GFSK filter: none
+
220 #define SX126X_GFSK_FILTER_GAUSS_0_3 0x08 // 7 0 Gaussian, BT = 0.3
+
221 #define SX126X_GFSK_FILTER_GAUSS_0_5 0x09 // 7 0 Gaussian, BT = 0.5
+
222 #define SX126X_GFSK_FILTER_GAUSS_0_7 0x0A // 7 0 Gaussian, BT = 0.7
+
223 #define SX126X_GFSK_FILTER_GAUSS_1 0x0B // 7 0 Gaussian, BT = 1
+
224 #define SX126X_GFSK_RX_BW_4_8 0x1F // 7 0 GFSK Rx bandwidth: 4.8 kHz
+
225 #define SX126X_GFSK_RX_BW_5_8 0x17 // 7 0 5.8 kHz
+
226 #define SX126X_GFSK_RX_BW_7_3 0x0F // 7 0 7.3 kHz
+
227 #define SX126X_GFSK_RX_BW_9_7 0x1E // 7 0 9.7 kHz
+
228 #define SX126X_GFSK_RX_BW_11_7 0x16 // 7 0 11.7 kHz
+
229 #define SX126X_GFSK_RX_BW_14_6 0x0E // 7 0 14.6 kHz
+
230 #define SX126X_GFSK_RX_BW_19_5 0x1D // 7 0 19.5 kHz
+
231 #define SX126X_GFSK_RX_BW_23_4 0x15 // 7 0 23.4 kHz
+
232 #define SX126X_GFSK_RX_BW_29_3 0x0D // 7 0 29.3 kHz
+
233 #define SX126X_GFSK_RX_BW_39_0 0x1C // 7 0 39.0 kHz
+
234 #define SX126X_GFSK_RX_BW_46_9 0x14 // 7 0 46.9 kHz
+
235 #define SX126X_GFSK_RX_BW_58_6 0x0C // 7 0 58.6 kHz
+
236 #define SX126X_GFSK_RX_BW_78_2 0x1B // 7 0 78.2 kHz
+
237 #define SX126X_GFSK_RX_BW_93_8 0x13 // 7 0 93.8 kHz
+
238 #define SX126X_GFSK_RX_BW_117_3 0x0B // 7 0 117.3 kHz
+
239 #define SX126X_GFSK_RX_BW_156_2 0x1A // 7 0 156.2 kHz
+
240 #define SX126X_GFSK_RX_BW_187_2 0x12 // 7 0 187.2 kHz
+
241 #define SX126X_GFSK_RX_BW_234_3 0x0A // 7 0 234.3 kHz
+
242 #define SX126X_GFSK_RX_BW_312_0 0x19 // 7 0 312.0 kHz
+
243 #define SX126X_GFSK_RX_BW_373_6 0x11 // 7 0 373.6 kHz
+
244 #define SX126X_GFSK_RX_BW_467_0 0x09 // 7 0 467.0 kHz
+
245 #define SX126X_LORA_BW_7_8 0x00 // 7 0 LoRa bandwidth: 7.8 kHz
+
246 #define SX126X_LORA_BW_10_4 0x08 // 7 0 10.4 kHz
+
247 #define SX126X_LORA_BW_15_6 0x01 // 7 0 15.6 kHz
+
248 #define SX126X_LORA_BW_20_8 0x09 // 7 0 20.8 kHz
+
249 #define SX126X_LORA_BW_31_25 0x02 // 7 0 31.25 kHz
+
250 #define SX126X_LORA_BW_41_7 0x0A // 7 0 41.7 kHz
+
251 #define SX126X_LORA_BW_62_5 0x03 // 7 0 62.5 kHz
+
252 #define SX126X_LORA_BW_125_0 0x04 // 7 0 125.0 kHz
+
253 #define SX126X_LORA_BW_250_0 0x05 // 7 0 250.0 kHz
+
254 #define SX126X_LORA_BW_500_0 0x06 // 7 0 500.0 kHz
+
255 #define SX126X_LORA_CR_4_5 0x01 // 7 0 LoRa coding rate: 4/5
+
256 #define SX126X_LORA_CR_4_6 0x02 // 7 0 4/6
+
257 #define SX126X_LORA_CR_4_7 0x03 // 7 0 4/7
+
258 #define SX126X_LORA_CR_4_8 0x04 // 7 0 4/8
+
259 #define SX126X_LORA_LOW_DATA_RATE_OPTIMIZE_OFF 0x00 // 7 0 LoRa low data rate optimization: disabled
+
260 #define SX126X_LORA_LOW_DATA_RATE_OPTIMIZE_ON 0x01 // 7 0 enabled
+
261 
+
262 //SX126X_CMD_SET_PACKET_PARAMS
+
263 #define SX126X_GFSK_PREAMBLE_DETECT_OFF 0x00 // 7 0 GFSK minimum preamble length before reception starts: detector disabled
+
264 #define SX126X_GFSK_PREAMBLE_DETECT_8 0x04 // 7 0 8 bits
+
265 #define SX126X_GFSK_PREAMBLE_DETECT_16 0x05 // 7 0 16 bits
+
266 #define SX126X_GFSK_PREAMBLE_DETECT_24 0x06 // 7 0 24 bits
+
267 #define SX126X_GFSK_PREAMBLE_DETECT_32 0x07 // 7 0 32 bits
+
268 #define SX126X_GFSK_ADDRESS_FILT_OFF 0x00 // 7 0 GFSK address filtering: disabled
+
269 #define SX126X_GFSK_ADDRESS_FILT_NODE 0x01 // 7 0 node only
+
270 #define SX126X_GFSK_ADDRESS_FILT_NODE_BROADCAST 0x02 // 7 0 node and broadcast
+
271 #define SX126X_GFSK_PACKET_FIXED 0x00 // 7 0 GFSK packet type: fixed (payload length known in advance to both sides)
+
272 #define SX126X_GFSK_PACKET_VARIABLE 0x01 // 7 0 variable (payload length added to packet)
+
273 #define SX126X_GFSK_CRC_OFF 0x01 // 7 0 GFSK packet CRC: disabled
+
274 #define SX126X_GFSK_CRC_1_BYTE 0x00 // 7 0 1 byte
+
275 #define SX126X_GFSK_CRC_2_BYTE 0x02 // 7 0 2 byte
+
276 #define SX126X_GFSK_CRC_1_BYTE_INV 0x04 // 7 0 1 byte, inverted
+
277 #define SX126X_GFSK_CRC_2_BYTE_INV 0x06 // 7 0 2 byte, inverted
+
278 #define SX126X_GFSK_WHITENING_OFF 0x00 // 7 0 GFSK data whitening: disabled
+
279 #define SX126X_GFSK_WHITENING_ON 0x01 // 7 0 enabled
+
280 #define SX126X_LORA_HEADER_EXPLICIT 0x00 // 7 0 LoRa header mode: explicit
+
281 #define SX126X_LORA_HEADER_IMPLICIT 0x01 // 7 0 implicit
+
282 #define SX126X_LORA_CRC_OFF 0x00 // 7 0 LoRa CRC mode: disabled
+
283 #define SX126X_LORA_CRC_ON 0x01 // 7 0 enabled
+
284 #define SX126X_LORA_IQ_STANDARD 0x00 // 7 0 LoRa IQ setup: standard
+
285 #define SX126X_LORA_IQ_INVERTED 0x01 // 7 0 inverted
+
286 
+
287 //SX126X_CMD_SET_CAD_PARAMS
+
288 #define SX126X_CAD_ON_1_SYMB 0x00 // 7 0 number of symbols used for CAD: 1
+
289 #define SX126X_CAD_ON_2_SYMB 0x01 // 7 0 2
+
290 #define SX126X_CAD_ON_4_SYMB 0x02 // 7 0 4
+
291 #define SX126X_CAD_ON_8_SYMB 0x03 // 7 0 8
+
292 #define SX126X_CAD_ON_16_SYMB 0x04 // 7 0 16
+
293 #define SX126X_CAD_GOTO_STDBY 0x00 // 7 0 after CAD is done, always go to STDBY_RC mode
+
294 #define SX126X_CAD_GOTO_RX 0x01 // 7 0 after CAD is done, go to Rx mode if activity is detected
+
295 
+
296 //SX126X_CMD_GET_STATUS
+
297 #define SX126X_STATUS_MODE_STDBY_RC 0b00100000 // 6 4 current chip mode: STDBY_RC
+
298 #define SX126X_STATUS_MODE_STDBY_XOSC 0b00110000 // 6 4 STDBY_XOSC
+
299 #define SX126X_STATUS_MODE_FS 0b01000000 // 6 4 FS
+
300 #define SX126X_STATUS_MODE_RX 0b01010000 // 6 4 RX
+
301 #define SX126X_STATUS_MODE_TX 0b01100000 // 6 4 TX
+
302 #define SX126X_STATUS_DATA_AVAILABLE 0b00000100 // 3 1 command status: packet received and data can be retrieved
+
303 #define SX126X_STATUS_CMD_TIMEOUT 0b00000110 // 3 1 SPI command timed out
+
304 #define SX126X_STATUS_CMD_INVALID 0b00001000 // 3 1 invalid SPI command
+
305 #define SX126X_STATUS_CMD_FAILED 0b00001010 // 3 1 SPI command failed to execute
+
306 #define SX126X_STATUS_TX_DONE 0b00001100 // 3 1 packet transmission done
+
307 #define SX126X_STATUS_SPI_FAILED 0b11111111 // 7 0 SPI transaction failed
+
308 
+
309 //SX126X_CMD_GET_PACKET_STATUS
+
310 #define SX126X_GFSK_RX_STATUS_PREAMBLE_ERR 0b10000000 // 7 7 GFSK Rx status: preamble error
+
311 #define SX126X_GFSK_RX_STATUS_SYNC_ERR 0b01000000 // 6 6 sync word error
+
312 #define SX126X_GFSK_RX_STATUS_ADRS_ERR 0b00100000 // 5 5 address error
+
313 #define SX126X_GFSK_RX_STATUS_CRC_ERR 0b00010000 // 4 4 CRC error
+
314 #define SX126X_GFSK_RX_STATUS_LENGTH_ERR 0b00001000 // 3 3 length error
+
315 #define SX126X_GFSK_RX_STATUS_ABORT_ERR 0b00000100 // 2 2 abort error
+
316 #define SX126X_GFSK_RX_STATUS_PACKET_RECEIVED 0b00000010 // 2 2 packet received
+
317 #define SX126X_GFSK_RX_STATUS_PACKET_SENT 0b00000001 // 2 2 packet sent
+
318 
+
319 //SX126X_CMD_GET_DEVICE_ERRORS
+
320 #define SX126X_PA_RAMP_ERR 0b100000000 // 8 8 device errors: PA ramping failed
+
321 #define SX126X_PLL_LOCK_ERR 0b001000000 // 6 6 PLL failed to lock
+
322 #define SX126X_XOSC_START_ERR 0b000100000 // 5 5 crystal oscillator failed to start
+
323 #define SX126X_IMG_CALIB_ERR 0b000010000 // 4 4 image calibration failed
+
324 #define SX126X_ADC_CALIB_ERR 0b000001000 // 3 3 ADC calibration failed
+
325 #define SX126X_PLL_CALIB_ERR 0b000000100 // 2 2 PLL calibration failed
+
326 #define SX126X_RC13M_CALIB_ERR 0b000000010 // 1 1 RC13M calibration failed
+
327 #define SX126X_RC64K_CALIB_ERR 0b000000001 // 0 0 RC64K calibration failed
+
328 
+
329 
+
330 // SX126X SPI register variables
+
331 //SX126X_REG_LORA_SYNC_WORD_MSB + LSB
+
332 #define SX126X_SYNC_WORD_PUBLIC 0x34 // actually 0x3444 NOTE: The low nibbles in each byte (0x_4_4) are masked out since apparently, they're reserved.
+
333 #define SX126X_SYNC_WORD_PRIVATE 0x12 // actually 0x1424 You couldn't make this up if you tried.
+
334 
+
335 
+
342 class SX126x: public PhysicalLayer {
+
343  public:
+
344  // introduce PhysicalLayer overloads
+ + + + +
349 
+
355  SX126x(Module* mod);
+
356 
+
357  // basic methods
+
358 
+
378  int16_t begin(float bw, uint8_t sf, uint8_t cr, uint8_t syncWord, uint16_t preambleLength, float tcxoVoltage, bool useRegulatorLDO = false);
+
379 
+
397  int16_t beginFSK(float br, float freqDev, float rxBw, uint16_t preambleLength, float tcxoVoltage, bool useRegulatorLDO = false);
+
398 
+
407  int16_t reset(bool verify = true);
+
408 
+
421  int16_t transmit(uint8_t* data, size_t len, uint8_t addr = 0) override;
+
422 
+
433  int16_t receive(uint8_t* data, size_t len) override;
+
434 
+
442  int16_t transmitDirect(uint32_t frf = 0) override;
+
443 
+
450  int16_t receiveDirect() override;
+
451 
+
457  int16_t scanChannel();
+
458 
+
466  int16_t sleep(bool retainConfig = true);
+
467 
+
473  int16_t standby() override;
+
474 
+
482  int16_t standby(uint8_t mode);
+
483 
+
484  // interrupt methods
+
485 
+
491  void setDio1Action(void (*func)(void));
+
492 
+
496  void clearDio1Action();
+
497 
+
510  int16_t startTransmit(uint8_t* data, size_t len, uint8_t addr = 0) override;
+
511 
+
519  int16_t startReceive(uint32_t timeout = SX126X_RX_TIMEOUT_INF);
+
520 
+
531  int16_t startReceiveDutyCycle(uint32_t rxPeriod, uint32_t sleepPeriod);
+
532 
+
544  int16_t startReceiveDutyCycleAuto(uint16_t senderPreambleLength = 0, uint16_t minSymbols = 8);
+
545 
+
555  int16_t readData(uint8_t* data, size_t len) override;
+
556 
+
557  // configuration methods
+
558 
+
566  int16_t setBandwidth(float bw);
+
567 
+
575  int16_t setSpreadingFactor(uint8_t sf);
+
576 
+
584  int16_t setCodingRate(uint8_t cr);
+
585 
+
595  int16_t setSyncWord(uint8_t syncWord, uint8_t controlBits = 0x44);
+
596 
+
604  int16_t setCurrentLimit(float currentLimit);
+
605 
+
611  float getCurrentLimit();
+
612 
+
620  int16_t setPreambleLength(uint16_t preambleLength);
+
621 
+
629  int16_t setFrequencyDeviation(float freqDev) override;
+
630 
+
638  int16_t setBitRate(float br);
+
639 
+
647  int16_t setRxBandwidth(float rxBw);
+
648 
+
658  int16_t setDataShaping(uint8_t sh) override;
+
659 
+
669  int16_t setSyncWord(uint8_t* syncWord, uint8_t len);
+
670 
+
680  int16_t setSyncBits(uint8_t *syncWord, uint8_t bitsLen);
+
681 
+
689  int16_t setNodeAddress(uint8_t nodeAddr);
+
690 
+
698  int16_t setBroadcastAddress(uint8_t broadAddr);
+
699 
+
705  int16_t disableAddressFiltering();
+
706 
+
720  int16_t setCRC(uint8_t len, uint16_t initial = 0x1D0F, uint16_t polynomial = 0x1021, bool inverted = true);
+
721 
+
731  int16_t setWhitening(bool enabled, uint16_t initial = 0x0100);
+
732 
+
743  int16_t setTCXO(float voltage, uint32_t delay = 5000);
+
744 
+
750  int16_t setDio2AsRfSwitch(bool enable = true);
+
751 
+
757  float getDataRate() const;
+
758 
+
764  float getRSSI();
+
765 
+
771  float getSNR();
+
772 
+
780  size_t getPacketLength(bool update = true) override;
+
781 
+
789  int16_t fixedPacketLengthMode(uint8_t len = SX126X_MAX_PACKET_LENGTH);
+
790 
+
798  int16_t variablePacketLengthMode(uint8_t maxLen = SX126X_MAX_PACKET_LENGTH);
+
799 
+
807  uint32_t getTimeOnAir(size_t len);
+
808 
+
814  float getRSSIInst();
+
815 
+
821  int16_t implicitHeader(size_t len);
+
822 
+
830  int16_t explicitHeader();
+
831 
+
837  int16_t setRegulatorLDO();
+
838 
+
844  int16_t setRegulatorDCDC();
+
845 
+
853  int16_t setEncoding(uint8_t encoding) override;
+
854 
+
863  void setRfSwitchPins(RADIOLIB_PIN_TYPE rxEn, RADIOLIB_PIN_TYPE txEn);
+
864 
+
873  int16_t forceLDRO(bool enable);
+
874 
+
881  int16_t autoLDRO();
+
882 
+
888  uint8_t random();
+
889 
+
890 #ifndef RADIOLIB_GODMODE
+
891  protected:
+
892 #endif
+
893  // SX126x SPI command implementations
+
894  int16_t setTx(uint32_t timeout = 0);
+
895  int16_t setRx(uint32_t timeout);
+
896  int16_t setCad();
+
897  int16_t setPaConfig(uint8_t paDutyCycle, uint8_t deviceSel, uint8_t hpMax = SX126X_PA_CONFIG_HP_MAX, uint8_t paLut = SX126X_PA_CONFIG_PA_LUT);
+
898  int16_t writeRegister(uint16_t addr, uint8_t* data, uint8_t numBytes);
+
899  int16_t readRegister(uint16_t addr, uint8_t* data, uint8_t numBytes);
+
900  int16_t writeBuffer(uint8_t* data, uint8_t numBytes, uint8_t offset = 0x00);
+
901  int16_t readBuffer(uint8_t* data, uint8_t numBytes);
+
902  int16_t setDioIrqParams(uint16_t irqMask, uint16_t dio1Mask, uint16_t dio2Mask = SX126X_IRQ_NONE, uint16_t dio3Mask = SX126X_IRQ_NONE);
+
903  uint16_t getIrqStatus();
+
904  int16_t clearIrqStatus(uint16_t clearIrqParams = SX126X_IRQ_ALL);
+
905  int16_t setRfFrequency(uint32_t frf);
+
906  int16_t calibrateImage(uint8_t* data);
+
907  uint8_t getPacketType();
+
908  int16_t setTxParams(uint8_t power, uint8_t rampTime = SX126X_PA_RAMP_200U);
+
909  int16_t setModulationParams(uint8_t sf, uint8_t bw, uint8_t cr, uint8_t ldro);
+
910  int16_t setModulationParamsFSK(uint32_t br, uint8_t pulseShape, uint8_t rxBw, uint32_t freqDev);
+
911  int16_t setPacketParams(uint16_t preambleLength, uint8_t crcType, uint8_t payloadLength, uint8_t headerType, uint8_t invertIQ = SX126X_LORA_IQ_STANDARD);
+
912  int16_t setPacketParamsFSK(uint16_t preambleLength, uint8_t crcType, uint8_t syncWordLength, uint8_t addrComp, uint8_t whitening, uint8_t packetType = SX126X_GFSK_PACKET_VARIABLE, uint8_t payloadLength = 0xFF, uint8_t preambleDetectorLength = SX126X_GFSK_PREAMBLE_DETECT_16);
+
913  int16_t setBufferBaseAddress(uint8_t txBaseAddress = 0x00, uint8_t rxBaseAddress = 0x00);
+
914  int16_t setRegulatorMode(uint8_t mode);
+
915  uint8_t getStatus();
+
916  uint32_t getPacketStatus();
+
917  uint16_t getDeviceErrors();
+
918  int16_t clearDeviceErrors();
+
919 
+
920  int16_t startReceiveCommon();
+
921  int16_t setFrequencyRaw(float freq);
+
922  int16_t setPacketMode(uint8_t mode, uint8_t len);
+
923  int16_t setHeaderType(uint8_t headerType, size_t len = 0xFF);
+
924 
+
925  // fixes to errata
+
926  int16_t fixSensitivity();
+
927  int16_t fixPaClamping();
+
928  int16_t fixImplicitTimeout();
+
929  int16_t fixInvertedIQ(uint8_t iqConfig);
+
930 
+
931 #ifndef RADIOLIB_GODMODE
+
932  private:
+
933 #endif
+
934  Module* _mod;
+
935 
+
936  uint8_t _bw = 0, _sf = 0, _cr = 0, _ldro = 0, _crcType = 0, _headerType = 0;
+
937  uint16_t _preambleLength = 0;
+
938  float _bwKhz = 0;
+
939  bool _ldroAuto = true;
+
940 
+
941  uint32_t _br = 0, _freqDev = 0;
+
942  uint8_t _rxBw = 0, _pulseShape = 0, _crcTypeFSK = 0, _syncWordLength = 0, _addrComp = 0, _whitening = 0, _packetType = 0;
+
943  uint16_t _preambleLengthFSK = 0;
+
944  float _rxBwKhz = 0;
+
945 
+
946  float _dataRate = 0;
+
947 
+
948  uint32_t _tcxoDelay = 0;
+
949 
+
950  size_t _implicitLen = 0;
+
951 
+
952  int16_t config(uint8_t modem);
+
953 
+
954  // common low-level SPI interface
+
955  int16_t SPIwriteCommand(uint8_t cmd, uint8_t* data, uint8_t numBytes, bool waitForBusy = true);
+
956  int16_t SPIwriteCommand(uint8_t* cmd, uint8_t cmdLen, uint8_t* data, uint8_t numBytes, bool waitForBusy = true);
+
957  int16_t SPIreadCommand(uint8_t cmd, uint8_t* data, uint8_t numBytes, bool waitForBusy = true);
+
958  int16_t SPIreadCommand(uint8_t* cmd, uint8_t cmdLen, uint8_t* data, uint8_t numBytes, bool waitForBusy = true);
+
959  int16_t SPItransfer(uint8_t* cmd, uint8_t cmdLen, bool write, uint8_t* dataOut, uint8_t* dataIn, uint8_t numBytes, bool waitForBusy, uint32_t timeout = 5000);
+
960 };
+
961 
+
962 #endif
+
963 
+
964 #endif
+
int16_t transmit(__FlashStringHelper *fstr, uint8_t addr=0)
Arduino Flash String transmit method.
Definition: PhysicalLayer.cpp:8
+
int16_t transmit(uint8_t *data, size_t len, uint8_t addr=0) override
Blocking binary transmit method. Overloads for string-based transmissions are implemented in Physical...
Definition: SX126x.cpp:193
+
uint32_t getTimeOnAir(size_t len)
Get expected time-on-air for a given size of payload.
Definition: SX126x.cpp:1104
+
int16_t setBandwidth(float bw)
Sets LoRa bandwidth. Allowed values are 7.8, 10.4, 15.6, 20.8, 31.25, 41.7, 62.5, 125....
Definition: SX126x.cpp:607
+
int16_t sleep(bool retainConfig=true)
Sets the module to sleep mode.
Definition: SX126x.cpp:378
+
int16_t readData(uint8_t *data, size_t len) override
Reads data received after calling startReceive method.
Definition: SX126x.cpp:576
+
int16_t setSpreadingFactor(uint8_t sf)
Sets LoRa spreading factor. Allowed values range from 5 to 12.
Definition: SX126x.cpp:658
+
int16_t startReceiveDutyCycle(uint32_t rxPeriod, uint32_t sleepPeriod)
Interrupt-driven receive method where the device mostly sleeps and periodically wakes to listen....
Definition: SX126x.cpp:488
+
int16_t setRegulatorLDO()
Set regulator mode to LDO.
Definition: SX126x.cpp:1154
+
int16_t explicitHeader()
Set explicit header mode for future reception/transmission.
Definition: SX126x.cpp:1150
+
int16_t disableAddressFiltering()
Disables address filtering. Calling this method will also erase previously set addresses.
Definition: SX126x.cpp:955
+
int16_t setNodeAddress(uint8_t nodeAddr)
Sets node address. Calling this method will also enable address filtering for node address only.
Definition: SX126x.cpp:921
+
void setRfSwitchPins(RADIOLIB_PIN_TYPE rxEn, RADIOLIB_PIN_TYPE txEn)
Some modules contain external RF switch controlled by two pins. This function gives RadioLib control ...
Definition: SX126x.cpp:1166
+
int16_t receive(uint8_t *data, size_t len) override
Blocking binary receive method. Overloads for string-based transmissions are implemented in PhysicalL...
Definition: SX126x.cpp:252
+
float getCurrentLimit()
Reads current protection limit.
Definition: SX126x.cpp:708
+
void clearDio1Action()
Clears interrupt service routine to call when DIO1 activates.
Definition: SX126x.cpp:410
+
int16_t setSyncWord(uint8_t syncWord, uint8_t controlBits=0x44)
Sets LoRa sync word.
Definition: SX126x.cpp:684
+
int16_t setRegulatorDCDC()
Set regulator mode to DC-DC.
Definition: SX126x.cpp:1158
+
int16_t setPreambleLength(uint16_t preambleLength)
Sets preamble length for LoRa or FSK modem. Allowed values range from 1 to 65535.
Definition: SX126x.cpp:717
+
uint8_t random()
Get one truly random byte from RSSI noise.
Definition: SX126x.cpp:1191
+
int16_t setSyncBits(uint8_t *syncWord, uint8_t bitsLen)
Sets FSK sync word in the form of array of up to 8 bytes.
Definition: SX126x.cpp:894
+
float getRSSI()
Gets RSSI (Recorded Signal Strength Indicator) of the last received packet.
Definition: SX126x.cpp:1066
+
int16_t reset(bool verify=true)
Reset method. Will reset the chip to the default state using RST pin.
Definition: SX126x.cpp:160
+
size_t getPacketLength(bool update=true) override
Query modem for the packet length of received payload.
Definition: SX126x.cpp:1089
+
float getRSSIInst()
Get instantaneous RSSI value during recption of the packet. Should switch to FSK receive mode for LBT...
Definition: SX126x.cpp:1139
+
int16_t variablePacketLengthMode(uint8_t maxLen=SX126X_MAX_PACKET_LENGTH)
Set modem in variable packet length mode. Available in FSK mode only.
Definition: SX126x.cpp:1100
+
int16_t readData(String &str, size_t len=0)
Reads data that was received after calling startReceive method.
Definition: PhysicalLayer.cpp:57
+
int16_t beginFSK(float br, float freqDev, float rxBw, uint16_t preambleLength, float tcxoVoltage, bool useRegulatorLDO=false)
Initialization method for FSK modem.
Definition: SX126x.cpp:79
+
SX126x(Module *mod)
Default constructor.
Definition: SX126x.cpp:4
+
int16_t setWhitening(bool enabled, uint16_t initial=0x0100)
Sets FSK whitening parameters.
Definition: SX126x.cpp:1025
+
int16_t setCurrentLimit(float currentLimit)
Sets current protection limit. Can be set in 0.25 mA steps.
Definition: SX126x.cpp:695
+
int16_t implicitHeader(size_t len)
Set implicit header mode for future reception/transmission.
Definition: SX126x.cpp:1146
+
int16_t setRxBandwidth(float rxBw)
Sets FSK receiver bandwidth. Allowed values are 4.8, 5.8, 7.3, 9.7, 11.7, 14.6, 19....
Definition: SX126x.cpp:778
+
int16_t forceLDRO(bool enable)
Forces LoRa low data rate optimization. Only available in LoRa mode. After calling this method,...
Definition: SX126x.cpp:1170
+
int16_t scanChannel()
Performs scan for LoRa transmission in the current channel. Detects both preamble and payload.
Definition: SX126x.cpp:333
+
float getDataRate() const
Gets effective data rate for the last transmitted packet. The value is calculated only for payload by...
Definition: SX126x.cpp:1062
+
int16_t autoLDRO()
Re-enables automatic LDRO configuration. Only available in LoRa mode. After calling this method,...
Definition: SX126x.cpp:1182
+
void setDio1Action(void(*func)(void))
Sets interrupt service routine to call when DIO1 activates.
Definition: SX126x.cpp:406
+
int16_t setTCXO(float voltage, uint32_t delay=5000)
Sets TCXO (Temperature Compensated Crystal Oscillator) configuration.
Definition: SX126x.cpp:1212
+
int16_t startTransmit(uint8_t *data, size_t len, uint8_t addr=0) override
Interrupt-driven binary transmit method. Overloads for string-based transmissions are implemented in ...
Definition: SX126x.cpp:414
+
int16_t setCRC(uint8_t len, uint16_t initial=0x1D0F, uint16_t polynomial=0x1021, bool inverted=true)
Sets CRC configuration.
Definition: SX126x.cpp:966
+
int16_t fixedPacketLengthMode(uint8_t len=SX126X_MAX_PACKET_LENGTH)
Set modem in fixed packet length mode. Available in FSK mode only.
Definition: SX126x.cpp:1096
+
int16_t setDataShaping(uint8_t sh) override
Sets time-bandwidth product of Gaussian filter applied for shaping. Allowed values are RADIOLIB_SHAPI...
Definition: SX126x.cpp:841
+
Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN....
Definition: PhysicalLayer.h:13
+
int16_t receive(String &str, size_t len=0)
Arduino String receive method.
Definition: PhysicalLayer.cpp:98
+
int16_t setCodingRate(uint8_t cr)
Sets LoRa coding rate denominator. Allowed values range from 5 to 8.
Definition: SX126x.cpp:671
+
int16_t startReceiveDutyCycleAuto(uint16_t senderPreambleLength=0, uint16_t minSymbols=8)
Calls startReceiveDutyCycle with rxPeriod and sleepPeriod set so the unit shouldn't miss any messages...
Definition: SX126x.cpp:515
+
Implements all common low-level SPI/UART/I2C methods to control the wireless module....
Definition: Module.h:17
+
int16_t setFrequencyDeviation(float freqDev) override
Sets FSK frequency deviation. Allowed values range from 0.0 to 200.0 kHz.
Definition: SX126x.cpp:730
+
int16_t receiveDirect() override
Starts direct mode reception. Only implemented for PhysicalLayer compatibility, as SX126x series does...
Definition: SX126x.cpp:325
+
int16_t startReceive(uint32_t timeout=SX126X_RX_TIMEOUT_INF)
Interrupt-driven receive method. DIO1 will be activated when full packet is received.
Definition: SX126x.cpp:475
+
int16_t setDio2AsRfSwitch(bool enable=true)
Set DIO2 to function as RF switch (default in Semtech example designs).
Definition: SX126x.cpp:1260
+
int16_t setEncoding(uint8_t encoding) override
Sets transmission encoding. Available in FSK mode only. Serves only as alias for PhysicalLayer compat...
Definition: SX126x.cpp:1162
+
float getSNR()
Gets SNR (Signal to Noise Ratio) of the last received packet. Only available for LoRa modem.
Definition: SX126x.cpp:1073
+
int16_t standby() override
Sets the module to standby mode (overload for PhysicalLayer compatibility, uses 13 MHz RC oscillator)...
Definition: SX126x.cpp:394
+
int16_t transmitDirect(uint32_t frf=0) override
Starts direct mode transmission.
Definition: SX126x.cpp:309
+
Base class for SX126x series. All derived classes for SX126x (e.g. SX1262 or SX1268) inherit from thi...
Definition: SX126x.h:342
+
int16_t begin(float bw, uint8_t sf, uint8_t cr, uint8_t syncWord, uint16_t preambleLength, float tcxoVoltage, bool useRegulatorLDO=false)
Initialization method for LoRa modem.
Definition: SX126x.cpp:8
+
int16_t setBitRate(float br)
Sets FSK bit rate. Allowed values range from 0.6 to 300.0 kbps.
Definition: SX126x.cpp:757
+
int16_t startTransmit(String &str, uint8_t addr=0)
Interrupt-driven Arduino String transmit method. Unlike the standard transmit method,...
Definition: PhysicalLayer.cpp:49
+
int16_t setBroadcastAddress(uint8_t broadAddr)
Sets broadcast address. Calling this method will also enable address filtering for node and broadcast...
Definition: SX126x.cpp:938
diff --git a/_s_x1272_8h_source.html b/_s_x1272_8h_source.html index 9eb5f94c..297d4051 100644 --- a/_s_x1272_8h_source.html +++ b/_s_x1272_8h_source.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/modules/SX127x/SX1272.h Source File @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -84,36 +86,190 @@ $(document).ready(function(){initNavTree('_s_x1272_8h_source.html','');});
SX1272.h
-
1 #if !defined(_RADIOLIB_SX1272_H)
2 #define _RADIOLIB_SX1272_H
3 
4 #include "../../TypeDef.h"
5 
6 #if !defined(RADIOLIB_EXCLUDE_SX127X)
7 
8 #include "../../Module.h"
9 #include "SX127x.h"
10 
11 // SX1272 specific register map
12 #define SX1272_REG_AGC_REF 0x43
13 #define SX1272_REG_AGC_THRESH_1 0x44
14 #define SX1272_REG_AGC_THRESH_2 0x45
15 #define SX1272_REG_AGC_THRESH_3 0x46
16 #define SX1272_REG_PLL_HOP 0x4B
17 #define SX1272_REG_TCXO 0x58
18 #define SX1272_REG_PA_DAC 0x5A
19 #define SX1272_REG_PLL 0x5C
20 #define SX1272_REG_PLL_LOW_PN 0x5E
21 #define SX1272_REG_FORMER_TEMP 0x6C
22 #define SX1272_REG_BIT_RATE_FRAC 0x70
23 
24 // SX1272 LoRa modem settings
25 // SX1272_REG_FRF_MSB + REG_FRF_MID + REG_FRF_LSB
26 #define SX1272_FRF_MSB 0xE4 // 7 0 carrier frequency setting: f_RF = (F(XOSC) * FRF)/2^19
27 #define SX1272_FRF_MID 0xC0 // 7 0 where F(XOSC) = 32 MHz
28 #define SX1272_FRF_LSB 0x00 // 7 0 FRF = 3 byte value of FRF registers
29 
30 // SX127X_REG_MODEM_CONFIG_1
31 #define SX1272_BW_125_00_KHZ 0b00000000 // 7 6 bandwidth: 125 kHz
32 #define SX1272_BW_250_00_KHZ 0b01000000 // 7 6 250 kHz
33 #define SX1272_BW_500_00_KHZ 0b10000000 // 7 6 500 kHz
34 #define SX1272_CR_4_5 0b00001000 // 5 3 error coding rate: 4/5
35 #define SX1272_CR_4_6 0b00010000 // 5 3 4/6
36 #define SX1272_CR_4_7 0b00011000 // 5 3 4/7
37 #define SX1272_CR_4_8 0b00100000 // 5 3 4/8
38 #define SX1272_HEADER_EXPL_MODE 0b00000000 // 2 2 explicit header mode
39 #define SX1272_HEADER_IMPL_MODE 0b00000100 // 2 2 implicit header mode
40 #define SX1272_RX_CRC_MODE_OFF 0b00000000 // 1 1 CRC disabled
41 #define SX1272_RX_CRC_MODE_ON 0b00000010 // 1 1 CRC enabled
42 #define SX1272_LOW_DATA_RATE_OPT_OFF 0b00000000 // 0 0 low data rate optimization disabled
43 #define SX1272_LOW_DATA_RATE_OPT_ON 0b00000001 // 0 0 low data rate optimization enabled, mandatory for SF 11 and 12 with BW 125 kHz
44 
45 // SX127X_REG_MODEM_CONFIG_2
46 #define SX1272_AGC_AUTO_OFF 0b00000000 // 2 2 LNA gain set by REG_LNA
47 #define SX1272_AGC_AUTO_ON 0b00000100 // 2 2 LNA gain set by internal AGC loop
48 
49 // SX127X_REG_VERSION
50 #define SX1272_CHIP_VERSION 0x22
51 
52 // SX1272 FSK modem settings
53 // SX127X_REG_OP_MODE
54 #define SX1272_NO_SHAPING 0b00000000 // 4 3 data shaping: no shaping (default)
55 #define SX1272_FSK_GAUSSIAN_1_0 0b00001000 // 4 3 FSK modulation Gaussian filter, BT = 1.0
56 #define SX1272_FSK_GAUSSIAN_0_5 0b00010000 // 4 3 FSK modulation Gaussian filter, BT = 0.5
57 #define SX1272_FSK_GAUSSIAN_0_3 0b00011000 // 4 3 FSK modulation Gaussian filter, BT = 0.3
58 #define SX1272_OOK_FILTER_BR 0b00001000 // 4 3 OOK modulation filter, f_cutoff = BR
59 #define SX1272_OOK_FILTER_2BR 0b00010000 // 4 3 OOK modulation filter, f_cutoff = 2*BR
60 
61 // SX127X_REG_PA_RAMP
62 #define SX1272_LOW_PN_TX_PLL_OFF 0b00010000 // 4 4 use standard PLL in transmit mode (default)
63 #define SX1272_LOW_PN_TX_PLL_ON 0b00000000 // 4 4 use lower phase noise PLL in transmit mode
64 
65 // SX127X_REG_SYNC_CONFIG
66 #define SX1272_FIFO_FILL_CONDITION_SYNC_ADDRESS 0b00000000 // 3 3 FIFO will be filled when sync address interrupt occurs (default)
67 #define SX1272_FIFO_FILL_CONDITION_ALWAYS 0b00001000 // 3 3 FIFO will be filled as long as this bit is set
68 
69 // SX1272_REG_AGC_REF
70 #define SX1272_AGC_REFERENCE_LEVEL 0x13 // 5 0 floor reference for AGC thresholds: AgcRef = -174 + 10*log(2*RxBw) + 8 + AGC_REFERENCE_LEVEL [dBm]
71 
72 // SX1272_REG_AGC_THRESH_1
73 #define SX1272_AGC_STEP_1 0x0E // 4 0 1st AGC threshold
74 
75 // SX1272_REG_AGC_THRESH_2
76 #define SX1272_AGC_STEP_2 0x50 // 7 4 2nd AGC threshold
77 #define SX1272_AGC_STEP_3 0x0B // 4 0 3rd AGC threshold
78 
79 // SX1272_REG_AGC_THRESH_3
80 #define SX1272_AGC_STEP_4 0xD0 // 7 4 4th AGC threshold
81 #define SX1272_AGC_STEP_5 0x0B // 4 0 5th AGC threshold
82 
83 // SX1272_REG_PLL_LOW_PN
84 #define SX1272_PLL_LOW_PN_BANDWIDTH_75_KHZ 0b00000000 // 7 6 low phase noise PLL bandwidth: 75 kHz
85 #define SX1272_PLL_LOW_PN_BANDWIDTH_150_KHZ 0b01000000 // 7 6 150 kHz
86 #define SX1272_PLL_LOW_PN_BANDWIDTH_225_KHZ 0b10000000 // 7 6 225 kHz
87 #define SX1272_PLL_LOW_PN_BANDWIDTH_300_KHZ 0b11000000 // 7 6 300 kHz (default)
88 
95 class SX1272: public SX127x {
96  public:
97 
98  // constructor
99 
105  SX1272(Module* mod);
106 
107  // basic methods
108 
133  int16_t begin(float freq = 915.0, float bw = 125.0, uint8_t sf = 9, uint8_t cr = 7, uint8_t syncWord = SX127X_SYNC_WORD, int8_t power = 10, uint16_t preambleLength = 8, uint8_t gain = 0);
134 
155  int16_t beginFSK(float freq = 915.0, float br = 48.0, float rxBw = 125.0, float freqDev = 50.0, int8_t power = 10, uint16_t preambleLength = 16, bool enableOOK = false);
156 
160  void reset() override;
161 
162  // configuration methods
163 
171  int16_t setFrequency(float freq);
172 
180  int16_t setBandwidth(float bw);
181 
189  int16_t setSpreadingFactor(uint8_t sf);
190 
198  int16_t setCodingRate(uint8_t cr);
199 
207  int16_t setOutputPower(int8_t power);
208 
217  int16_t setGain(uint8_t gain);
218 
227  int16_t setDataShaping(uint8_t sh) override;
228 
238  int16_t setDataShapingOOK(uint8_t sh);
239 
245  float getRSSI();
246 
254  int16_t setCRC(bool enableCRC);
255 
264  int16_t forceLDRO(bool enable);
265 
272  int16_t autoLDRO();
273 
279  int16_t implicitHeader(size_t len);
280 
288  int16_t explicitHeader();
289 
290 #ifndef RADIOLIB_GODMODE
291  protected:
292 #endif
293  int16_t setBandwidthRaw(uint8_t newBandwidth);
294  int16_t setSpreadingFactorRaw(uint8_t newSpreadingFactor);
295  int16_t setCodingRateRaw(uint8_t newCodingRate);
296  int16_t setHeaderType(uint8_t headerType, size_t len = 0xFF);
297 
298  int16_t configFSK();
299 
300 #ifndef RADIOLIB_GODMODE
301  private:
302 #endif
303  bool _ldroAuto = true;
304  bool _ldroEnabled = false;
305 
306 };
307 
308 #endif
309 
310 #endif
Derived class for SX1272 modules. Also used as base class for SX1273. Both modules use the same basic...
Definition: SX1272.h:95
-
int16_t setFrequency(float freq)
Sets carrier frequency. Allowed values range from 860.0 MHz to 1020.0 MHz.
Definition: SX1272.cpp:70
-
Base class for SX127x series. All derived classes for SX127x (e.g. SX1278 or SX1272) inherit from thi...
Definition: SX127x.h:547
-
int16_t autoLDRO()
Re-enables automatic LDRO configuration. Only available in LoRa mode. After calling this method...
Definition: SX1272.cpp:389
-
int16_t setGain(uint8_t gain)
Sets gain of receiver LNA (low-noise amplifier). Can be set to any integer in range 1 to 6 where 1 is...
Definition: SX1272.cpp:240
-
int16_t begin(float freq=915.0, float bw=125.0, uint8_t sf=9, uint8_t cr=7, uint8_t syncWord=SX127X_SYNC_WORD, int8_t power=10, uint16_t preambleLength=8, uint8_t gain=0)
LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the ...
Definition: SX1272.cpp:8
-
int16_t setDataShapingOOK(uint8_t sh)
Sets filter cutoff frequency that will be used for data shaping. Allowed values are 1 for frequency e...
Definition: SX1272.cpp:295
-
int16_t setBandwidth(float bw)
Sets LoRa link bandwidth. Allowed values are 125, 250 and 500 kHz. Only available in LoRa mode...
Definition: SX1272.cpp:81
-
int16_t beginFSK(float freq=915.0, float br=48.0, float rxBw=125.0, float freqDev=50.0, int8_t power=10, uint16_t preambleLength=16, bool enableOOK=false)
FSK modem initialization method. Must be called at least once from Arduino sketch to initialize the m...
Definition: SX1272.cpp:40
-
float getRSSI()
Gets recorded signal strength indicator of the latest received packet for LoRa modem, or current RSSI level for FSK modem.
Definition: SX1272.cpp:328
-
int16_t setOutputPower(int8_t power)
Sets transmission output power. Allowed values range from 2 to 17 dBm.
Definition: SX1272.cpp:211
-
SX1272(Module *mod)
Default constructor. Called from Arduino sketch when creating new LoRa instance.
Definition: SX1272.cpp:4
-
int16_t setCRC(bool enableCRC)
Enables/disables CRC check of received packets.
Definition: SX1272.cpp:357
-
Implements all common low-level SPI/UART/I2C methods to control the wireless module. Every module class contains one private instance of this class.
Definition: Module.h:17
-
int16_t setCodingRate(uint8_t cr)
Sets LoRa link coding rate denominator. Allowed values range from 5 to 8. Only available in LoRa mode...
Definition: SX1272.cpp:177
-
int16_t setSpreadingFactor(uint8_t sf)
Sets LoRa link spreading factor. Allowed values range from 6 to 12. Only available in LoRa mode...
Definition: SX1272.cpp:121
-
int16_t setDataShaping(uint8_t sh) override
Sets Gaussian filter bandwidth-time product that will be used for data shaping. Only available in FSK...
Definition: SX1272.cpp:265
-
int16_t implicitHeader(size_t len)
Set implicit header mode for future reception/transmission.
Definition: SX1272.cpp:398
-
int16_t forceLDRO(bool enable)
Forces LoRa low data rate optimization. Only available in LoRa mode. After calling this method...
Definition: SX1272.cpp:376
-
void reset() override
Reset method. Will reset the chip to the default state using RST pin.
Definition: SX1272.cpp:62
-
int16_t explicitHeader()
Set explicit header mode for future reception/transmission.
Definition: SX1272.cpp:402
+
1 #if !defined(_RADIOLIB_SX1272_H)
+
2 #define _RADIOLIB_SX1272_H
+
3 
+
4 #include "../../TypeDef.h"
+
5 
+
6 #if !defined(RADIOLIB_EXCLUDE_SX127X)
+
7 
+
8 #include "../../Module.h"
+
9 #include "SX127x.h"
+
10 
+
11 // SX1272 specific register map
+
12 #define SX1272_REG_AGC_REF 0x43
+
13 #define SX1272_REG_AGC_THRESH_1 0x44
+
14 #define SX1272_REG_AGC_THRESH_2 0x45
+
15 #define SX1272_REG_AGC_THRESH_3 0x46
+
16 #define SX1272_REG_PLL_HOP 0x4B
+
17 #define SX1272_REG_TCXO 0x58
+
18 #define SX1272_REG_PA_DAC 0x5A
+
19 #define SX1272_REG_PLL 0x5C
+
20 #define SX1272_REG_PLL_LOW_PN 0x5E
+
21 #define SX1272_REG_FORMER_TEMP 0x6C
+
22 #define SX1272_REG_BIT_RATE_FRAC 0x70
+
23 
+
24 // SX1272 LoRa modem settings
+
25 // SX1272_REG_FRF_MSB + REG_FRF_MID + REG_FRF_LSB
+
26 #define SX1272_FRF_MSB 0xE4 // 7 0 carrier frequency setting: f_RF = (F(XOSC) * FRF)/2^19
+
27 #define SX1272_FRF_MID 0xC0 // 7 0 where F(XOSC) = 32 MHz
+
28 #define SX1272_FRF_LSB 0x00 // 7 0 FRF = 3 byte value of FRF registers
+
29 
+
30 // SX127X_REG_MODEM_CONFIG_1
+
31 #define SX1272_BW_125_00_KHZ 0b00000000 // 7 6 bandwidth: 125 kHz
+
32 #define SX1272_BW_250_00_KHZ 0b01000000 // 7 6 250 kHz
+
33 #define SX1272_BW_500_00_KHZ 0b10000000 // 7 6 500 kHz
+
34 #define SX1272_CR_4_5 0b00001000 // 5 3 error coding rate: 4/5
+
35 #define SX1272_CR_4_6 0b00010000 // 5 3 4/6
+
36 #define SX1272_CR_4_7 0b00011000 // 5 3 4/7
+
37 #define SX1272_CR_4_8 0b00100000 // 5 3 4/8
+
38 #define SX1272_HEADER_EXPL_MODE 0b00000000 // 2 2 explicit header mode
+
39 #define SX1272_HEADER_IMPL_MODE 0b00000100 // 2 2 implicit header mode
+
40 #define SX1272_RX_CRC_MODE_OFF 0b00000000 // 1 1 CRC disabled
+
41 #define SX1272_RX_CRC_MODE_ON 0b00000010 // 1 1 CRC enabled
+
42 #define SX1272_LOW_DATA_RATE_OPT_OFF 0b00000000 // 0 0 low data rate optimization disabled
+
43 #define SX1272_LOW_DATA_RATE_OPT_ON 0b00000001 // 0 0 low data rate optimization enabled, mandatory for SF 11 and 12 with BW 125 kHz
+
44 
+
45 // SX127X_REG_MODEM_CONFIG_2
+
46 #define SX1272_AGC_AUTO_OFF 0b00000000 // 2 2 LNA gain set by REG_LNA
+
47 #define SX1272_AGC_AUTO_ON 0b00000100 // 2 2 LNA gain set by internal AGC loop
+
48 
+
49 // SX127X_REG_VERSION
+
50 #define SX1272_CHIP_VERSION 0x22
+
51 
+
52 // SX1272 FSK modem settings
+
53 // SX127X_REG_OP_MODE
+
54 #define SX1272_NO_SHAPING 0b00000000 // 4 3 data shaping: no shaping (default)
+
55 #define SX1272_FSK_GAUSSIAN_1_0 0b00001000 // 4 3 FSK modulation Gaussian filter, BT = 1.0
+
56 #define SX1272_FSK_GAUSSIAN_0_5 0b00010000 // 4 3 FSK modulation Gaussian filter, BT = 0.5
+
57 #define SX1272_FSK_GAUSSIAN_0_3 0b00011000 // 4 3 FSK modulation Gaussian filter, BT = 0.3
+
58 #define SX1272_OOK_FILTER_BR 0b00001000 // 4 3 OOK modulation filter, f_cutoff = BR
+
59 #define SX1272_OOK_FILTER_2BR 0b00010000 // 4 3 OOK modulation filter, f_cutoff = 2*BR
+
60 
+
61 // SX127X_REG_PA_RAMP
+
62 #define SX1272_LOW_PN_TX_PLL_OFF 0b00010000 // 4 4 use standard PLL in transmit mode (default)
+
63 #define SX1272_LOW_PN_TX_PLL_ON 0b00000000 // 4 4 use lower phase noise PLL in transmit mode
+
64 
+
65 // SX127X_REG_SYNC_CONFIG
+
66 #define SX1272_FIFO_FILL_CONDITION_SYNC_ADDRESS 0b00000000 // 3 3 FIFO will be filled when sync address interrupt occurs (default)
+
67 #define SX1272_FIFO_FILL_CONDITION_ALWAYS 0b00001000 // 3 3 FIFO will be filled as long as this bit is set
+
68 
+
69 // SX1272_REG_AGC_REF
+
70 #define SX1272_AGC_REFERENCE_LEVEL 0x13 // 5 0 floor reference for AGC thresholds: AgcRef = -174 + 10*log(2*RxBw) + 8 + AGC_REFERENCE_LEVEL [dBm]
+
71 
+
72 // SX1272_REG_AGC_THRESH_1
+
73 #define SX1272_AGC_STEP_1 0x0E // 4 0 1st AGC threshold
+
74 
+
75 // SX1272_REG_AGC_THRESH_2
+
76 #define SX1272_AGC_STEP_2 0x50 // 7 4 2nd AGC threshold
+
77 #define SX1272_AGC_STEP_3 0x0B // 4 0 3rd AGC threshold
+
78 
+
79 // SX1272_REG_AGC_THRESH_3
+
80 #define SX1272_AGC_STEP_4 0xD0 // 7 4 4th AGC threshold
+
81 #define SX1272_AGC_STEP_5 0x0B // 4 0 5th AGC threshold
+
82 
+
83 // SX1272_REG_PLL_LOW_PN
+
84 #define SX1272_PLL_LOW_PN_BANDWIDTH_75_KHZ 0b00000000 // 7 6 low phase noise PLL bandwidth: 75 kHz
+
85 #define SX1272_PLL_LOW_PN_BANDWIDTH_150_KHZ 0b01000000 // 7 6 150 kHz
+
86 #define SX1272_PLL_LOW_PN_BANDWIDTH_225_KHZ 0b10000000 // 7 6 225 kHz
+
87 #define SX1272_PLL_LOW_PN_BANDWIDTH_300_KHZ 0b11000000 // 7 6 300 kHz (default)
+
88 
+
95 class SX1272: public SX127x {
+
96  public:
+
97 
+
98  // constructor
+
99 
+
105  SX1272(Module* mod);
+
106 
+
107  // basic methods
+
108 
+
133  int16_t begin(float freq = 915.0, float bw = 125.0, uint8_t sf = 9, uint8_t cr = 7, uint8_t syncWord = SX127X_SYNC_WORD, int8_t power = 10, uint16_t preambleLength = 8, uint8_t gain = 0);
+
134 
+
155  int16_t beginFSK(float freq = 915.0, float br = 48.0, float rxBw = 125.0, float freqDev = 50.0, int8_t power = 10, uint16_t preambleLength = 16, bool enableOOK = false);
+
156 
+
160  void reset() override;
+
161 
+
162  // configuration methods
+
163 
+
171  int16_t setFrequency(float freq);
+
172 
+
180  int16_t setBandwidth(float bw);
+
181 
+
189  int16_t setSpreadingFactor(uint8_t sf);
+
190 
+
198  int16_t setCodingRate(uint8_t cr);
+
199 
+
207  int16_t setOutputPower(int8_t power);
+
208 
+
217  int16_t setGain(uint8_t gain);
+
218 
+
227  int16_t setDataShaping(uint8_t sh) override;
+
228 
+
238  int16_t setDataShapingOOK(uint8_t sh);
+
239 
+
245  float getRSSI();
+
246 
+
254  int16_t setCRC(bool enableCRC);
+
255 
+
264  int16_t forceLDRO(bool enable);
+
265 
+
272  int16_t autoLDRO();
+
273 
+
279  int16_t implicitHeader(size_t len);
+
280 
+
288  int16_t explicitHeader();
+
289 
+
290 #ifndef RADIOLIB_GODMODE
+
291  protected:
+
292 #endif
+
293  int16_t setBandwidthRaw(uint8_t newBandwidth);
+
294  int16_t setSpreadingFactorRaw(uint8_t newSpreadingFactor);
+
295  int16_t setCodingRateRaw(uint8_t newCodingRate);
+
296  int16_t setHeaderType(uint8_t headerType, size_t len = 0xFF);
+
297 
+
298  int16_t configFSK();
+
299 
+
300 #ifndef RADIOLIB_GODMODE
+
301  private:
+
302 #endif
+
303  bool _ldroAuto = true;
+
304  bool _ldroEnabled = false;
+
305 
+
306 };
+
307 
+
308 #endif
+
309 
+
310 #endif
+
int16_t setFrequency(float freq)
Sets carrier frequency. Allowed values range from 860.0 MHz to 1020.0 MHz.
Definition: SX1272.cpp:70
+
int16_t begin(float freq=915.0, float bw=125.0, uint8_t sf=9, uint8_t cr=7, uint8_t syncWord=SX127X_SYNC_WORD, int8_t power=10, uint16_t preambleLength=8, uint8_t gain=0)
LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the ...
Definition: SX1272.cpp:8
+
int16_t setGain(uint8_t gain)
Sets gain of receiver LNA (low-noise amplifier). Can be set to any integer in range 1 to 6 where 1 is...
Definition: SX1272.cpp:240
+
int16_t setSpreadingFactor(uint8_t sf)
Sets LoRa link spreading factor. Allowed values range from 6 to 12. Only available in LoRa mode.
Definition: SX1272.cpp:121
+
int16_t forceLDRO(bool enable)
Forces LoRa low data rate optimization. Only available in LoRa mode. After calling this method,...
Definition: SX1272.cpp:376
+
Derived class for SX1272 modules. Also used as base class for SX1273. Both modules use the same basic...
Definition: SX1272.h:95
+
int16_t setDataShapingOOK(uint8_t sh)
Sets filter cutoff frequency that will be used for data shaping. Allowed values are 1 for frequency e...
Definition: SX1272.cpp:295
+
int16_t setCodingRate(uint8_t cr)
Sets LoRa link coding rate denominator. Allowed values range from 5 to 8. Only available in LoRa mode...
Definition: SX1272.cpp:177
+
Base class for SX127x series. All derived classes for SX127x (e.g. SX1278 or SX1272) inherit from thi...
Definition: SX127x.h:547
+
int16_t setCRC(bool enableCRC)
Enables/disables CRC check of received packets.
Definition: SX1272.cpp:357
+
int16_t setBandwidth(float bw)
Sets LoRa link bandwidth. Allowed values are 125, 250 and 500 kHz. Only available in LoRa mode.
Definition: SX1272.cpp:81
+
int16_t autoLDRO()
Re-enables automatic LDRO configuration. Only available in LoRa mode. After calling this method,...
Definition: SX1272.cpp:389
+
int16_t setDataShaping(uint8_t sh) override
Sets Gaussian filter bandwidth-time product that will be used for data shaping. Only available in FSK...
Definition: SX1272.cpp:265
+
int16_t beginFSK(float freq=915.0, float br=48.0, float rxBw=125.0, float freqDev=50.0, int8_t power=10, uint16_t preambleLength=16, bool enableOOK=false)
FSK modem initialization method. Must be called at least once from Arduino sketch to initialize the m...
Definition: SX1272.cpp:40
+
Implements all common low-level SPI/UART/I2C methods to control the wireless module....
Definition: Module.h:17
+
float getRSSI()
Gets recorded signal strength indicator of the latest received packet for LoRa modem,...
Definition: SX1272.cpp:328
+
void reset() override
Reset method. Will reset the chip to the default state using RST pin.
Definition: SX1272.cpp:62
+
SX1272(Module *mod)
Default constructor. Called from Arduino sketch when creating new LoRa instance.
Definition: SX1272.cpp:4
+
int16_t implicitHeader(size_t len)
Set implicit header mode for future reception/transmission.
Definition: SX1272.cpp:398
+
int16_t explicitHeader()
Set explicit header mode for future reception/transmission.
Definition: SX1272.cpp:402
+
int16_t setOutputPower(int8_t power)
Sets transmission output power. Allowed values range from 2 to 17 dBm.
Definition: SX1272.cpp:211
diff --git a/_s_x1273_8h_source.html b/_s_x1273_8h_source.html index d3fde7d1..2aaf67b1 100644 --- a/_s_x1273_8h_source.html +++ b/_s_x1273_8h_source.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/modules/SX127x/SX1273.h Source File @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -84,21 +86,54 @@ $(document).ready(function(){initNavTree('_s_x1273_8h_source.html','');});
SX1273.h
-
1 #if !defined(_RADIOLIB_SX1273_H)
2 #define _RADIOLIB_SX1273_H
3 
4 #include "../../TypeDef.h"
5 
6 #if !defined(RADIOLIB_EXCLUDE_SX127X)
7 
8 #include "SX1272.h"
9 
15 class SX1273: public SX1272 {
16  public:
17 
18  // constructor
19 
25  SX1273(Module* mod);
26 
27  // basic methods
28 
52  int16_t begin(float freq = 915.0, float bw = 125.0, uint8_t sf = 9, uint8_t cr = 7, uint8_t syncWord = SX127X_SYNC_WORD, int8_t power = 10, uint16_t preambleLength = 8, uint8_t gain = 0);
53 
54  // configuration methods
55 
63  int16_t setSpreadingFactor(uint8_t sf);
64 
65 #ifndef RADIOLIB_GODMODE
66  private:
67 #endif
68 
69 };
70 
71 #endif
72 
73 #endif
Derived class for SX1272 modules. Also used as base class for SX1273. Both modules use the same basic...
Definition: SX1272.h:95
-
Derived class for SX1273 modules. Overrides some methods from SX1272 due to different parameter range...
Definition: SX1273.h:15
-
Implements all common low-level SPI/UART/I2C methods to control the wireless module. Every module class contains one private instance of this class.
Definition: Module.h:17
-
int16_t begin(float freq=915.0, float bw=125.0, uint8_t sf=9, uint8_t cr=7, uint8_t syncWord=SX127X_SYNC_WORD, int8_t power=10, uint16_t preambleLength=8, uint8_t gain=0)
LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the ...
Definition: SX1273.cpp:8
-
int16_t setSpreadingFactor(uint8_t sf)
Sets LoRa link spreading factor. Allowed values range from 6 to 9. Only available in LoRa mode...
Definition: SX1273.cpp:40
-
SX1273(Module *mod)
Default constructor. Called from Arduino sketch when creating new LoRa instance.
Definition: SX1273.cpp:4
+
1 #if !defined(_RADIOLIB_SX1273_H)
+
2 #define _RADIOLIB_SX1273_H
+
3 
+
4 #include "../../TypeDef.h"
+
5 
+
6 #if !defined(RADIOLIB_EXCLUDE_SX127X)
+
7 
+
8 #include "SX1272.h"
+
9 
+
15 class SX1273: public SX1272 {
+
16  public:
+
17 
+
18  // constructor
+
19 
+
25  SX1273(Module* mod);
+
26 
+
27  // basic methods
+
28 
+
52  int16_t begin(float freq = 915.0, float bw = 125.0, uint8_t sf = 9, uint8_t cr = 7, uint8_t syncWord = SX127X_SYNC_WORD, int8_t power = 10, uint16_t preambleLength = 8, uint8_t gain = 0);
+
53 
+
54  // configuration methods
+
55 
+
63  int16_t setSpreadingFactor(uint8_t sf);
+
64 
+
65 #ifndef RADIOLIB_GODMODE
+
66  private:
+
67 #endif
+
68 
+
69 };
+
70 
+
71 #endif
+
72 
+
73 #endif
+
SX1273(Module *mod)
Default constructor. Called from Arduino sketch when creating new LoRa instance.
Definition: SX1273.cpp:4
+
Derived class for SX1273 modules. Overrides some methods from SX1272 due to different parameter range...
Definition: SX1273.h:15
+
int16_t setSpreadingFactor(uint8_t sf)
Sets LoRa link spreading factor. Allowed values range from 6 to 9. Only available in LoRa mode.
Definition: SX1273.cpp:40
+
int16_t begin(float freq=915.0, float bw=125.0, uint8_t sf=9, uint8_t cr=7, uint8_t syncWord=SX127X_SYNC_WORD, int8_t power=10, uint16_t preambleLength=8, uint8_t gain=0)
LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the ...
Definition: SX1273.cpp:8
+
Derived class for SX1272 modules. Also used as base class for SX1273. Both modules use the same basic...
Definition: SX1272.h:95
+
Implements all common low-level SPI/UART/I2C methods to control the wireless module....
Definition: Module.h:17
diff --git a/_s_x1276_8h_source.html b/_s_x1276_8h_source.html index caf78b57..294f908d 100644 --- a/_s_x1276_8h_source.html +++ b/_s_x1276_8h_source.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/modules/SX127x/SX1276.h Source File @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -84,22 +86,57 @@ $(document).ready(function(){initNavTree('_s_x1276_8h_source.html','');});
SX1276.h
-
1 #if !defined(_RADIOLIB_SX1276_H)
2 #define _RADIOLIB_SX1276_H
3 
4 #include "../../TypeDef.h"
5 
6 #if !defined(RADIOLIB_EXCLUDE_SX127X)
7 
8 #include "SX1278.h"
9 
15 class SX1276: public SX1278 {
16  public:
17 
18  // constructor
19 
25  SX1276(Module* mod);
26 
27  // basic methods
28 
52  int16_t begin(float freq = 434.0, float bw = 125.0, uint8_t sf = 9, uint8_t cr = 7, uint8_t syncWord = SX127X_SYNC_WORD, int8_t power = 10, uint16_t preambleLength = 8, uint8_t gain = 0);
53 
74  int16_t beginFSK(float freq = 434.0, float br = 48.0, float freqDev = 50.0, float rxBw = 125.0, int8_t power = 10, uint16_t preambleLength = 16, bool enableOOK = false);
75 
76  // configuration methods
77 
85  int16_t setFrequency(float freq);
86 
87 #ifndef RADIOLIB_GODMODE
88  private:
89 #endif
90 
91 };
92 
93 #endif
94 
95 #endif
Derived class for SX1276 modules. Overrides some methods from SX1278 due to different parameter range...
Definition: SX1276.h:15
-
SX1276(Module *mod)
Default constructor. Called from Arduino sketch when creating new LoRa instance.
Definition: SX1276.cpp:4
-
Implements all common low-level SPI/UART/I2C methods to control the wireless module. Every module class contains one private instance of this class.
Definition: Module.h:17
-
int16_t begin(float freq=434.0, float bw=125.0, uint8_t sf=9, uint8_t cr=7, uint8_t syncWord=SX127X_SYNC_WORD, int8_t power=10, uint16_t preambleLength=8, uint8_t gain=0)
LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the ...
Definition: SX1276.cpp:8
-
int16_t beginFSK(float freq=434.0, float br=48.0, float freqDev=50.0, float rxBw=125.0, int8_t power=10, uint16_t preambleLength=16, bool enableOOK=false)
FSK modem initialization method. Must be called at least once from Arduino sketch to initialize the m...
Definition: SX1276.cpp:35
-
int16_t setFrequency(float freq)
Sets carrier frequency. Allowed values range from 137.0 MHz to 1020.0 MHz.
Definition: SX1276.cpp:53
-
Derived class for SX1278 modules. Also used as base class for SX1276, SX1277, SX1279, RFM95 and RFM96. All of these modules use the same basic hardware and only differ in parameter ranges (and names).
Definition: SX1278.h:104
+
1 #if !defined(_RADIOLIB_SX1276_H)
+
2 #define _RADIOLIB_SX1276_H
+
3 
+
4 #include "../../TypeDef.h"
+
5 
+
6 #if !defined(RADIOLIB_EXCLUDE_SX127X)
+
7 
+
8 #include "SX1278.h"
+
9 
+
15 class SX1276: public SX1278 {
+
16  public:
+
17 
+
18  // constructor
+
19 
+
25  SX1276(Module* mod);
+
26 
+
27  // basic methods
+
28 
+
52  int16_t begin(float freq = 434.0, float bw = 125.0, uint8_t sf = 9, uint8_t cr = 7, uint8_t syncWord = SX127X_SYNC_WORD, int8_t power = 10, uint16_t preambleLength = 8, uint8_t gain = 0);
+
53 
+
74  int16_t beginFSK(float freq = 434.0, float br = 48.0, float freqDev = 50.0, float rxBw = 125.0, int8_t power = 10, uint16_t preambleLength = 16, bool enableOOK = false);
+
75 
+
76  // configuration methods
+
77 
+
85  int16_t setFrequency(float freq);
+
86 
+
87 #ifndef RADIOLIB_GODMODE
+
88  private:
+
89 #endif
+
90 
+
91 };
+
92 
+
93 #endif
+
94 
+
95 #endif
+
int16_t setFrequency(float freq)
Sets carrier frequency. Allowed values range from 137.0 MHz to 1020.0 MHz.
Definition: SX1276.cpp:53
+
int16_t begin(float freq=434.0, float bw=125.0, uint8_t sf=9, uint8_t cr=7, uint8_t syncWord=SX127X_SYNC_WORD, int8_t power=10, uint16_t preambleLength=8, uint8_t gain=0)
LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the ...
Definition: SX1276.cpp:8
+
Derived class for SX1278 modules. Also used as base class for SX1276, SX1277, SX1279,...
Definition: SX1278.h:104
+
Derived class for SX1276 modules. Overrides some methods from SX1278 due to different parameter range...
Definition: SX1276.h:15
+
Implements all common low-level SPI/UART/I2C methods to control the wireless module....
Definition: Module.h:17
+
int16_t beginFSK(float freq=434.0, float br=48.0, float freqDev=50.0, float rxBw=125.0, int8_t power=10, uint16_t preambleLength=16, bool enableOOK=false)
FSK modem initialization method. Must be called at least once from Arduino sketch to initialize the m...
Definition: SX1276.cpp:35
+
SX1276(Module *mod)
Default constructor. Called from Arduino sketch when creating new LoRa instance.
Definition: SX1276.cpp:4
diff --git a/_s_x1277_8h_source.html b/_s_x1277_8h_source.html index a7bbcb98..9c7001e2 100644 --- a/_s_x1277_8h_source.html +++ b/_s_x1277_8h_source.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/modules/SX127x/SX1277.h Source File @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -84,23 +86,60 @@ $(document).ready(function(){initNavTree('_s_x1277_8h_source.html','');});
SX1277.h
-
1 #if !defined(_RADIOLIB_SX1277_H)
2 #define _RADIOLIB_SX1277_H
3 
4 #include "../../TypeDef.h"
5 
6 #if !defined(RADIOLIB_EXCLUDE_SX127X)
7 
8 #include "SX1278.h"
9 
15 class SX1277: public SX1278 {
16  public:
17 
18  // constructor
19 
25  SX1277(Module* mod);
26 
27  // basic methods
28 
52  int16_t begin(float freq = 434.0, float bw = 125.0, uint8_t sf = 9, uint8_t cr = 7, uint8_t syncWord = SX127X_SYNC_WORD, int8_t power = 10, uint16_t preambleLength = 8, uint8_t gain = 0);
53 
74  int16_t beginFSK(float freq = 434.0, float br = 48.0, float freqDev = 50.0, float rxBw = 125.0, int8_t power = 10, uint16_t preambleLength = 16, bool enableOOK = false);
75 
76  // configuration methods
77 
85  int16_t setFrequency(float freq);
86 
94  int16_t setSpreadingFactor(uint8_t sf);
95 
96 #ifndef RADIOLIB_GODMODE
97  private:
98 #endif
99 
100 };
101 
102 #endif
103 
104 #endif
int16_t setFrequency(float freq)
Sets carrier frequency. Allowed values range from 137.0 MHz to 1020.0 MHz.
Definition: SX1277.cpp:53
-
int16_t begin(float freq=434.0, float bw=125.0, uint8_t sf=9, uint8_t cr=7, uint8_t syncWord=SX127X_SYNC_WORD, int8_t power=10, uint16_t preambleLength=8, uint8_t gain=0)
LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the ...
Definition: SX1277.cpp:8
-
int16_t setSpreadingFactor(uint8_t sf)
Sets LoRa link spreading factor. Allowed values range from 6 to 9. Only available in LoRa mode...
Definition: SX1277.cpp:127
-
int16_t beginFSK(float freq=434.0, float br=48.0, float freqDev=50.0, float rxBw=125.0, int8_t power=10, uint16_t preambleLength=16, bool enableOOK=false)
FSK modem initialization method. Must be called at least once from Arduino sketch to initialize the m...
Definition: SX1277.cpp:35
-
Implements all common low-level SPI/UART/I2C methods to control the wireless module. Every module class contains one private instance of this class.
Definition: Module.h:17
-
Derived class for SX1277 modules. Overrides some methods from SX1278 due to different parameter range...
Definition: SX1277.h:15
-
SX1277(Module *mod)
Default constructor. Called from Arduino sketch when creating new LoRa instance.
Definition: SX1277.cpp:4
-
Derived class for SX1278 modules. Also used as base class for SX1276, SX1277, SX1279, RFM95 and RFM96. All of these modules use the same basic hardware and only differ in parameter ranges (and names).
Definition: SX1278.h:104
+
1 #if !defined(_RADIOLIB_SX1277_H)
+
2 #define _RADIOLIB_SX1277_H
+
3 
+
4 #include "../../TypeDef.h"
+
5 
+
6 #if !defined(RADIOLIB_EXCLUDE_SX127X)
+
7 
+
8 #include "SX1278.h"
+
9 
+
15 class SX1277: public SX1278 {
+
16  public:
+
17 
+
18  // constructor
+
19 
+
25  SX1277(Module* mod);
+
26 
+
27  // basic methods
+
28 
+
52  int16_t begin(float freq = 434.0, float bw = 125.0, uint8_t sf = 9, uint8_t cr = 7, uint8_t syncWord = SX127X_SYNC_WORD, int8_t power = 10, uint16_t preambleLength = 8, uint8_t gain = 0);
+
53 
+
74  int16_t beginFSK(float freq = 434.0, float br = 48.0, float freqDev = 50.0, float rxBw = 125.0, int8_t power = 10, uint16_t preambleLength = 16, bool enableOOK = false);
+
75 
+
76  // configuration methods
+
77 
+
85  int16_t setFrequency(float freq);
+
86 
+
94  int16_t setSpreadingFactor(uint8_t sf);
+
95 
+
96 #ifndef RADIOLIB_GODMODE
+
97  private:
+
98 #endif
+
99 
+
100 };
+
101 
+
102 #endif
+
103 
+
104 #endif
+
SX1277(Module *mod)
Default constructor. Called from Arduino sketch when creating new LoRa instance.
Definition: SX1277.cpp:4
+
Derived class for SX1277 modules. Overrides some methods from SX1278 due to different parameter range...
Definition: SX1277.h:15
+
int16_t beginFSK(float freq=434.0, float br=48.0, float freqDev=50.0, float rxBw=125.0, int8_t power=10, uint16_t preambleLength=16, bool enableOOK=false)
FSK modem initialization method. Must be called at least once from Arduino sketch to initialize the m...
Definition: SX1277.cpp:35
+
int16_t begin(float freq=434.0, float bw=125.0, uint8_t sf=9, uint8_t cr=7, uint8_t syncWord=SX127X_SYNC_WORD, int8_t power=10, uint16_t preambleLength=8, uint8_t gain=0)
LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the ...
Definition: SX1277.cpp:8
+
int16_t setSpreadingFactor(uint8_t sf)
Sets LoRa link spreading factor. Allowed values range from 6 to 9. Only available in LoRa mode.
Definition: SX1277.cpp:127
+
Derived class for SX1278 modules. Also used as base class for SX1276, SX1277, SX1279,...
Definition: SX1278.h:104
+
int16_t setFrequency(float freq)
Sets carrier frequency. Allowed values range from 137.0 MHz to 1020.0 MHz.
Definition: SX1277.cpp:53
+
Implements all common low-level SPI/UART/I2C methods to control the wireless module....
Definition: Module.h:17
diff --git a/_s_x1278_8h_source.html b/_s_x1278_8h_source.html index f89ee7c3..680459df 100644 --- a/_s_x1278_8h_source.html +++ b/_s_x1278_8h_source.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/modules/SX127x/SX1278.h Source File @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -84,36 +86,199 @@ $(document).ready(function(){initNavTree('_s_x1278_8h_source.html','');});
SX1278.h
-
1 #if !defined(_RADIOLIB_SX1278_H)
2 #define _RADIOLIB_SX1278_H
3 
4 #include "../../TypeDef.h"
5 
6 #if !defined(RADIOLIB_EXCLUDE_SX127X)
7 
8 #include "../../Module.h"
9 #include "SX127x.h"
10 
11 // SX1278 specific register map
12 #define SX1278_REG_MODEM_CONFIG_3 0x26
13 #define SX1278_REG_PLL_HOP 0x44
14 #define SX1278_REG_TCXO 0x4B
15 #define SX1278_REG_PA_DAC 0x4D
16 #define SX1278_REG_FORMER_TEMP 0x5B
17 #define SX1278_REG_REG_BIT_RATE_FRAC 0x5D
18 #define SX1278_REG_AGC_REF 0x61
19 #define SX1278_REG_AGC_THRESH_1 0x62
20 #define SX1278_REG_AGC_THRESH_2 0x63
21 #define SX1278_REG_AGC_THRESH_3 0x64
22 #define SX1278_REG_PLL 0x70
23 
24 // SX1278 LoRa modem settings
25 // SX1278_REG_OP_MODE MSB LSB DESCRIPTION
26 #define SX1278_HIGH_FREQ 0b00000000 // 3 3 access HF test registers
27 #define SX1278_LOW_FREQ 0b00001000 // 3 3 access LF test registers
28 
29 // SX1278_REG_FRF_MSB + REG_FRF_MID + REG_FRF_LSB
30 #define SX1278_FRF_MSB 0x6C // 7 0 carrier frequency setting: f_RF = (F(XOSC) * FRF)/2^19
31 #define SX1278_FRF_MID 0x80 // 7 0 where F(XOSC) = 32 MHz
32 #define SX1278_FRF_LSB 0x00 // 7 0 FRF = 3 byte value of FRF registers
33 
34 // SX1278_REG_PA_CONFIG
35 #define SX1278_MAX_POWER 0b01110000 // 6 4 max power: P_max = 10.8 + 0.6*MAX_POWER [dBm]; P_max(MAX_POWER = 0b111) = 15 dBm
36 #define SX1278_LOW_POWER 0b00100000 // 6 4
37 
38 // SX1278_REG_LNA
39 #define SX1278_LNA_BOOST_LF_OFF 0b00000000 // 4 3 default LNA current
40 
41 // SX127X_REG_MODEM_CONFIG_1
42 #define SX1278_BW_7_80_KHZ 0b00000000 // 7 4 bandwidth: 7.80 kHz
43 #define SX1278_BW_10_40_KHZ 0b00010000 // 7 4 10.40 kHz
44 #define SX1278_BW_15_60_KHZ 0b00100000 // 7 4 15.60 kHz
45 #define SX1278_BW_20_80_KHZ 0b00110000 // 7 4 20.80 kHz
46 #define SX1278_BW_31_25_KHZ 0b01000000 // 7 4 31.25 kHz
47 #define SX1278_BW_41_70_KHZ 0b01010000 // 7 4 41.70 kHz
48 #define SX1278_BW_62_50_KHZ 0b01100000 // 7 4 62.50 kHz
49 #define SX1278_BW_125_00_KHZ 0b01110000 // 7 4 125.00 kHz
50 #define SX1278_BW_250_00_KHZ 0b10000000 // 7 4 250.00 kHz
51 #define SX1278_BW_500_00_KHZ 0b10010000 // 7 4 500.00 kHz
52 #define SX1278_CR_4_5 0b00000010 // 3 1 error coding rate: 4/5
53 #define SX1278_CR_4_6 0b00000100 // 3 1 4/6
54 #define SX1278_CR_4_7 0b00000110 // 3 1 4/7
55 #define SX1278_CR_4_8 0b00001000 // 3 1 4/8
56 #define SX1278_HEADER_EXPL_MODE 0b00000000 // 0 0 explicit header mode
57 #define SX1278_HEADER_IMPL_MODE 0b00000001 // 0 0 implicit header mode
58 
59 // SX127X_REG_MODEM_CONFIG_2
60 #define SX1278_RX_CRC_MODE_OFF 0b00000000 // 2 2 CRC disabled
61 #define SX1278_RX_CRC_MODE_ON 0b00000100 // 2 2 CRC enabled
62 
63 // SX1278_REG_MODEM_CONFIG_3
64 #define SX1278_LOW_DATA_RATE_OPT_OFF 0b00000000 // 3 3 low data rate optimization disabled
65 #define SX1278_LOW_DATA_RATE_OPT_ON 0b00001000 // 3 3 low data rate optimization enabled
66 #define SX1278_AGC_AUTO_OFF 0b00000000 // 2 2 LNA gain set by REG_LNA
67 #define SX1278_AGC_AUTO_ON 0b00000100 // 2 2 LNA gain set by internal AGC loop
68 
69 // SX127X_REG_VERSION
70 #define SX1278_CHIP_VERSION 0x12
71 
72 // SX1278 FSK modem settings
73 // SX127X_REG_PA_RAMP
74 #define SX1278_NO_SHAPING 0b00000000 // 6 5 data shaping: no shaping (default)
75 #define SX1278_FSK_GAUSSIAN_1_0 0b00100000 // 6 5 FSK modulation Gaussian filter, BT = 1.0
76 #define SX1278_FSK_GAUSSIAN_0_5 0b01000000 // 6 5 FSK modulation Gaussian filter, BT = 0.5
77 #define SX1278_FSK_GAUSSIAN_0_3 0b01100000 // 6 5 FSK modulation Gaussian filter, BT = 0.3
78 #define SX1278_OOK_FILTER_BR 0b00100000 // 6 5 OOK modulation filter, f_cutoff = BR
79 #define SX1278_OOK_FILTER_2BR 0b01000000 // 6 5 OOK modulation filter, f_cutoff = 2*BR
80 
81 // SX1278_REG_AGC_REF
82 #define SX1278_AGC_REFERENCE_LEVEL_LF 0x19 // 5 0 floor reference for AGC thresholds: AgcRef = -174 + 10*log(2*RxBw) + 8 + AGC_REFERENCE_LEVEL [dBm]: below 525 MHz
83 #define SX1278_AGC_REFERENCE_LEVEL_HF 0x1C // 5 0 above 779 MHz
84 
85 // SX1278_REG_AGC_THRESH_1
86 #define SX1278_AGC_STEP_1_LF 0x0C // 4 0 1st AGC threshold: below 525 MHz
87 #define SX1278_AGC_STEP_1_HF 0x0E // 4 0 above 779 MHz
88 
89 // SX1278_REG_AGC_THRESH_2
90 #define SX1278_AGC_STEP_2_LF 0x40 // 7 4 2nd AGC threshold: below 525 MHz
91 #define SX1278_AGC_STEP_2_HF 0x50 // 7 4 above 779 MHz
92 #define SX1278_AGC_STEP_3 0x0B // 3 0 3rd AGC threshold
93 
94 // SX1278_REG_AGC_THRESH_3
95 #define SX1278_AGC_STEP_4 0xC0 // 7 4 4th AGC threshold
96 #define SX1278_AGC_STEP_5 0x0C // 4 0 5th AGC threshold
97 
104 class SX1278: public SX127x {
105  public:
106 
107  // constructor
108 
114  SX1278(Module* mod);
115 
116  // basic methods
117 
141  int16_t begin(float freq = 434.0, float bw = 125.0, uint8_t sf = 9, uint8_t cr = 7, uint8_t syncWord = SX127X_SYNC_WORD, int8_t power = 10, uint16_t preambleLength = 8, uint8_t gain = 0);
142 
163  int16_t beginFSK(float freq = 434.0, float br = 48.0, float freqDev = 50.0, float rxBw = 125.0, int8_t power = 10, uint16_t preambleLength = 16, bool enableOOK = false);
164 
168  void reset() override;
169 
170  // configuration methods
171 
179  int16_t setFrequency(float freq);
180 
188  int16_t setBandwidth(float bw);
189 
197  int16_t setSpreadingFactor(uint8_t sf);
198 
206  int16_t setCodingRate(uint8_t cr);
207 
215  int16_t setOutputPower(int8_t power);
216 
225  int16_t setGain(uint8_t gain);
226 
235  int16_t setDataShaping(uint8_t sh) override;
236 
246  int16_t setDataShapingOOK(uint8_t sh);
247 
253  float getRSSI();
254 
262  int16_t setCRC(bool enableCRC);
263 
272  int16_t forceLDRO(bool enable);
273 
280  int16_t autoLDRO();
281 
287  int16_t implicitHeader(size_t len);
288 
296  int16_t explicitHeader();
297 
298 #ifndef RADIOLIB_GODMODE
299  protected:
300 #endif
301  int16_t setBandwidthRaw(uint8_t newBandwidth);
302  int16_t setSpreadingFactorRaw(uint8_t newSpreadingFactor);
303  int16_t setCodingRateRaw(uint8_t newCodingRate);
304  int16_t setHeaderType(uint8_t headerType, size_t len = 0xFF);
305 
306  int16_t configFSK();
307 
308 #ifndef RADIOLIB_GODMODE
309  private:
310 #endif
311  bool _ldroAuto = true;
312  bool _ldroEnabled = false;
313 
314 };
315 
316 #endif
317 
318 #endif
Base class for SX127x series. All derived classes for SX127x (e.g. SX1278 or SX1272) inherit from thi...
Definition: SX127x.h:547
-
int16_t setDataShaping(uint8_t sh) override
Sets Gaussian filter bandwidth-time product that will be used for data shaping. Only available in FSK...
Definition: SX1278.cpp:337
-
float getRSSI()
Gets recorded signal strength indicator of the latest received packet for LoRa modem, or current RSSI level for FSK modem.
Definition: SX1278.cpp:399
-
int16_t forceLDRO(bool enable)
Forces LoRa low data rate optimization. Only available in LoRa mode. After calling this method...
Definition: SX1278.cpp:454
-
int16_t implicitHeader(size_t len)
Set implicit header mode for future reception/transmission.
Definition: SX1278.cpp:476
-
int16_t setGain(uint8_t gain)
Sets gain of receiver LNA (low-noise amplifier). Can be set to any integer in range 1 to 6 where 1 is...
Definition: SX1278.cpp:312
-
int16_t autoLDRO()
Re-enables automatic LDRO configuration. Only available in LoRa mode. After calling this method...
Definition: SX1278.cpp:467
-
int16_t explicitHeader()
Set explicit header mode for future reception/transmission.
Definition: SX1278.cpp:480
-
int16_t setFrequency(float freq)
Sets carrier frequency. Allowed values range from 137.0 MHz to 525.0 MHz.
Definition: SX1278.cpp:65
-
int16_t setCRC(bool enableCRC)
Enables/disables CRC check of received packets.
Definition: SX1278.cpp:435
-
int16_t beginFSK(float freq=434.0, float br=48.0, float freqDev=50.0, float rxBw=125.0, int8_t power=10, uint16_t preambleLength=16, bool enableOOK=false)
FSK modem initialization method. Must be called at least once from Arduino sketch to initialize the m...
Definition: SX1278.cpp:35
-
int16_t setDataShapingOOK(uint8_t sh)
Sets filter cutoff frequency that will be used for data shaping. Allowed values are 1 for frequency e...
Definition: SX1278.cpp:367
-
Implements all common low-level SPI/UART/I2C methods to control the wireless module. Every module class contains one private instance of this class.
Definition: Module.h:17
-
void reset() override
Reset method. Will reset the chip to the default state using RST pin.
Definition: SX1278.cpp:57
-
SX1278(Module *mod)
Default constructor. Called from Arduino sketch when creating new LoRa instance.
Definition: SX1278.cpp:4
-
int16_t begin(float freq=434.0, float bw=125.0, uint8_t sf=9, uint8_t cr=7, uint8_t syncWord=SX127X_SYNC_WORD, int8_t power=10, uint16_t preambleLength=8, uint8_t gain=0)
LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the ...
Definition: SX1278.cpp:8
-
int16_t setSpreadingFactor(uint8_t sf)
Sets LoRa link spreading factor. Allowed values range from 6 to 12. Only available in LoRa mode...
Definition: SX1278.cpp:193
-
int16_t setBandwidth(float bw)
Sets LoRa link bandwidth. Allowed values are 10.4, 15.6, 20.8, 31.25, 41.7, 62.5, 125...
Definition: SX1278.cpp:139
-
Derived class for SX1278 modules. Also used as base class for SX1276, SX1277, SX1279, RFM95 and RFM96. All of these modules use the same basic hardware and only differ in parameter ranges (and names).
Definition: SX1278.h:104
-
int16_t setOutputPower(int8_t power)
Sets transmission output power. Allowed values range from 2 to 17 dBm.
Definition: SX1278.cpp:283
-
int16_t setCodingRate(uint8_t cr)
Sets LoRa link coding rate denominator. Allowed values range from 5 to 8. Only available in LoRa mode...
Definition: SX1278.cpp:249
+
1 #if !defined(_RADIOLIB_SX1278_H)
+
2 #define _RADIOLIB_SX1278_H
+
3 
+
4 #include "../../TypeDef.h"
+
5 
+
6 #if !defined(RADIOLIB_EXCLUDE_SX127X)
+
7 
+
8 #include "../../Module.h"
+
9 #include "SX127x.h"
+
10 
+
11 // SX1278 specific register map
+
12 #define SX1278_REG_MODEM_CONFIG_3 0x26
+
13 #define SX1278_REG_PLL_HOP 0x44
+
14 #define SX1278_REG_TCXO 0x4B
+
15 #define SX1278_REG_PA_DAC 0x4D
+
16 #define SX1278_REG_FORMER_TEMP 0x5B
+
17 #define SX1278_REG_REG_BIT_RATE_FRAC 0x5D
+
18 #define SX1278_REG_AGC_REF 0x61
+
19 #define SX1278_REG_AGC_THRESH_1 0x62
+
20 #define SX1278_REG_AGC_THRESH_2 0x63
+
21 #define SX1278_REG_AGC_THRESH_3 0x64
+
22 #define SX1278_REG_PLL 0x70
+
23 
+
24 // SX1278 LoRa modem settings
+
25 // SX1278_REG_OP_MODE MSB LSB DESCRIPTION
+
26 #define SX1278_HIGH_FREQ 0b00000000 // 3 3 access HF test registers
+
27 #define SX1278_LOW_FREQ 0b00001000 // 3 3 access LF test registers
+
28 
+
29 // SX1278_REG_FRF_MSB + REG_FRF_MID + REG_FRF_LSB
+
30 #define SX1278_FRF_MSB 0x6C // 7 0 carrier frequency setting: f_RF = (F(XOSC) * FRF)/2^19
+
31 #define SX1278_FRF_MID 0x80 // 7 0 where F(XOSC) = 32 MHz
+
32 #define SX1278_FRF_LSB 0x00 // 7 0 FRF = 3 byte value of FRF registers
+
33 
+
34 // SX1278_REG_PA_CONFIG
+
35 #define SX1278_MAX_POWER 0b01110000 // 6 4 max power: P_max = 10.8 + 0.6*MAX_POWER [dBm]; P_max(MAX_POWER = 0b111) = 15 dBm
+
36 #define SX1278_LOW_POWER 0b00100000 // 6 4
+
37 
+
38 // SX1278_REG_LNA
+
39 #define SX1278_LNA_BOOST_LF_OFF 0b00000000 // 4 3 default LNA current
+
40 
+
41 // SX127X_REG_MODEM_CONFIG_1
+
42 #define SX1278_BW_7_80_KHZ 0b00000000 // 7 4 bandwidth: 7.80 kHz
+
43 #define SX1278_BW_10_40_KHZ 0b00010000 // 7 4 10.40 kHz
+
44 #define SX1278_BW_15_60_KHZ 0b00100000 // 7 4 15.60 kHz
+
45 #define SX1278_BW_20_80_KHZ 0b00110000 // 7 4 20.80 kHz
+
46 #define SX1278_BW_31_25_KHZ 0b01000000 // 7 4 31.25 kHz
+
47 #define SX1278_BW_41_70_KHZ 0b01010000 // 7 4 41.70 kHz
+
48 #define SX1278_BW_62_50_KHZ 0b01100000 // 7 4 62.50 kHz
+
49 #define SX1278_BW_125_00_KHZ 0b01110000 // 7 4 125.00 kHz
+
50 #define SX1278_BW_250_00_KHZ 0b10000000 // 7 4 250.00 kHz
+
51 #define SX1278_BW_500_00_KHZ 0b10010000 // 7 4 500.00 kHz
+
52 #define SX1278_CR_4_5 0b00000010 // 3 1 error coding rate: 4/5
+
53 #define SX1278_CR_4_6 0b00000100 // 3 1 4/6
+
54 #define SX1278_CR_4_7 0b00000110 // 3 1 4/7
+
55 #define SX1278_CR_4_8 0b00001000 // 3 1 4/8
+
56 #define SX1278_HEADER_EXPL_MODE 0b00000000 // 0 0 explicit header mode
+
57 #define SX1278_HEADER_IMPL_MODE 0b00000001 // 0 0 implicit header mode
+
58 
+
59 // SX127X_REG_MODEM_CONFIG_2
+
60 #define SX1278_RX_CRC_MODE_OFF 0b00000000 // 2 2 CRC disabled
+
61 #define SX1278_RX_CRC_MODE_ON 0b00000100 // 2 2 CRC enabled
+
62 
+
63 // SX1278_REG_MODEM_CONFIG_3
+
64 #define SX1278_LOW_DATA_RATE_OPT_OFF 0b00000000 // 3 3 low data rate optimization disabled
+
65 #define SX1278_LOW_DATA_RATE_OPT_ON 0b00001000 // 3 3 low data rate optimization enabled
+
66 #define SX1278_AGC_AUTO_OFF 0b00000000 // 2 2 LNA gain set by REG_LNA
+
67 #define SX1278_AGC_AUTO_ON 0b00000100 // 2 2 LNA gain set by internal AGC loop
+
68 
+
69 // SX127X_REG_VERSION
+
70 #define SX1278_CHIP_VERSION 0x12
+
71 
+
72 // SX1278 FSK modem settings
+
73 // SX127X_REG_PA_RAMP
+
74 #define SX1278_NO_SHAPING 0b00000000 // 6 5 data shaping: no shaping (default)
+
75 #define SX1278_FSK_GAUSSIAN_1_0 0b00100000 // 6 5 FSK modulation Gaussian filter, BT = 1.0
+
76 #define SX1278_FSK_GAUSSIAN_0_5 0b01000000 // 6 5 FSK modulation Gaussian filter, BT = 0.5
+
77 #define SX1278_FSK_GAUSSIAN_0_3 0b01100000 // 6 5 FSK modulation Gaussian filter, BT = 0.3
+
78 #define SX1278_OOK_FILTER_BR 0b00100000 // 6 5 OOK modulation filter, f_cutoff = BR
+
79 #define SX1278_OOK_FILTER_2BR 0b01000000 // 6 5 OOK modulation filter, f_cutoff = 2*BR
+
80 
+
81 // SX1278_REG_AGC_REF
+
82 #define SX1278_AGC_REFERENCE_LEVEL_LF 0x19 // 5 0 floor reference for AGC thresholds: AgcRef = -174 + 10*log(2*RxBw) + 8 + AGC_REFERENCE_LEVEL [dBm]: below 525 MHz
+
83 #define SX1278_AGC_REFERENCE_LEVEL_HF 0x1C // 5 0 above 779 MHz
+
84 
+
85 // SX1278_REG_AGC_THRESH_1
+
86 #define SX1278_AGC_STEP_1_LF 0x0C // 4 0 1st AGC threshold: below 525 MHz
+
87 #define SX1278_AGC_STEP_1_HF 0x0E // 4 0 above 779 MHz
+
88 
+
89 // SX1278_REG_AGC_THRESH_2
+
90 #define SX1278_AGC_STEP_2_LF 0x40 // 7 4 2nd AGC threshold: below 525 MHz
+
91 #define SX1278_AGC_STEP_2_HF 0x50 // 7 4 above 779 MHz
+
92 #define SX1278_AGC_STEP_3 0x0B // 3 0 3rd AGC threshold
+
93 
+
94 // SX1278_REG_AGC_THRESH_3
+
95 #define SX1278_AGC_STEP_4 0xC0 // 7 4 4th AGC threshold
+
96 #define SX1278_AGC_STEP_5 0x0C // 4 0 5th AGC threshold
+
97 
+
104 class SX1278: public SX127x {
+
105  public:
+
106 
+
107  // constructor
+
108 
+
114  SX1278(Module* mod);
+
115 
+
116  // basic methods
+
117 
+
141  int16_t begin(float freq = 434.0, float bw = 125.0, uint8_t sf = 9, uint8_t cr = 7, uint8_t syncWord = SX127X_SYNC_WORD, int8_t power = 10, uint16_t preambleLength = 8, uint8_t gain = 0);
+
142 
+
163  int16_t beginFSK(float freq = 434.0, float br = 48.0, float freqDev = 50.0, float rxBw = 125.0, int8_t power = 10, uint16_t preambleLength = 16, bool enableOOK = false);
+
164 
+
168  void reset() override;
+
169 
+
170  // configuration methods
+
171 
+
179  int16_t setFrequency(float freq);
+
180 
+
188  int16_t setBandwidth(float bw);
+
189 
+
197  int16_t setSpreadingFactor(uint8_t sf);
+
198 
+
206  int16_t setCodingRate(uint8_t cr);
+
207 
+
215  int16_t setOutputPower(int8_t power);
+
216 
+
225  int16_t setGain(uint8_t gain);
+
226 
+
235  int16_t setDataShaping(uint8_t sh) override;
+
236 
+
246  int16_t setDataShapingOOK(uint8_t sh);
+
247 
+
253  float getRSSI();
+
254 
+
262  int16_t setCRC(bool enableCRC);
+
263 
+
272  int16_t forceLDRO(bool enable);
+
273 
+
280  int16_t autoLDRO();
+
281 
+
287  int16_t implicitHeader(size_t len);
+
288 
+
296  int16_t explicitHeader();
+
297 
+
298 #ifndef RADIOLIB_GODMODE
+
299  protected:
+
300 #endif
+
301  int16_t setBandwidthRaw(uint8_t newBandwidth);
+
302  int16_t setSpreadingFactorRaw(uint8_t newSpreadingFactor);
+
303  int16_t setCodingRateRaw(uint8_t newCodingRate);
+
304  int16_t setHeaderType(uint8_t headerType, size_t len = 0xFF);
+
305 
+
306  int16_t configFSK();
+
307 
+
308 #ifndef RADIOLIB_GODMODE
+
309  private:
+
310 #endif
+
311  bool _ldroAuto = true;
+
312  bool _ldroEnabled = false;
+
313 
+
314 };
+
315 
+
316 #endif
+
317 
+
318 #endif
+
void reset() override
Reset method. Will reset the chip to the default state using RST pin.
Definition: SX1278.cpp:57
+
float getRSSI()
Gets recorded signal strength indicator of the latest received packet for LoRa modem,...
Definition: SX1278.cpp:399
+
int16_t implicitHeader(size_t len)
Set implicit header mode for future reception/transmission.
Definition: SX1278.cpp:476
+
int16_t begin(float freq=434.0, float bw=125.0, uint8_t sf=9, uint8_t cr=7, uint8_t syncWord=SX127X_SYNC_WORD, int8_t power=10, uint16_t preambleLength=8, uint8_t gain=0)
LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the ...
Definition: SX1278.cpp:8
+
SX1278(Module *mod)
Default constructor. Called from Arduino sketch when creating new LoRa instance.
Definition: SX1278.cpp:4
+
int16_t explicitHeader()
Set explicit header mode for future reception/transmission.
Definition: SX1278.cpp:480
+
int16_t setCodingRate(uint8_t cr)
Sets LoRa link coding rate denominator. Allowed values range from 5 to 8. Only available in LoRa mode...
Definition: SX1278.cpp:249
+
int16_t setBandwidth(float bw)
Sets LoRa link bandwidth. Allowed values are 10.4, 15.6, 20.8, 31.25, 41.7, 62.5, 125,...
Definition: SX1278.cpp:139
+
Derived class for SX1278 modules. Also used as base class for SX1276, SX1277, SX1279,...
Definition: SX1278.h:104
+
int16_t setCRC(bool enableCRC)
Enables/disables CRC check of received packets.
Definition: SX1278.cpp:435
+
Base class for SX127x series. All derived classes for SX127x (e.g. SX1278 or SX1272) inherit from thi...
Definition: SX127x.h:547
+
int16_t setFrequency(float freq)
Sets carrier frequency. Allowed values range from 137.0 MHz to 525.0 MHz.
Definition: SX1278.cpp:65
+
Implements all common low-level SPI/UART/I2C methods to control the wireless module....
Definition: Module.h:17
+
int16_t forceLDRO(bool enable)
Forces LoRa low data rate optimization. Only available in LoRa mode. After calling this method,...
Definition: SX1278.cpp:454
+
int16_t autoLDRO()
Re-enables automatic LDRO configuration. Only available in LoRa mode. After calling this method,...
Definition: SX1278.cpp:467
+
int16_t setDataShapingOOK(uint8_t sh)
Sets filter cutoff frequency that will be used for data shaping. Allowed values are 1 for frequency e...
Definition: SX1278.cpp:367
+
int16_t setGain(uint8_t gain)
Sets gain of receiver LNA (low-noise amplifier). Can be set to any integer in range 1 to 6 where 1 is...
Definition: SX1278.cpp:312
+
int16_t setDataShaping(uint8_t sh) override
Sets Gaussian filter bandwidth-time product that will be used for data shaping. Only available in FSK...
Definition: SX1278.cpp:337
+
int16_t setOutputPower(int8_t power)
Sets transmission output power. Allowed values range from 2 to 17 dBm.
Definition: SX1278.cpp:283
+
int16_t setSpreadingFactor(uint8_t sf)
Sets LoRa link spreading factor. Allowed values range from 6 to 12. Only available in LoRa mode.
Definition: SX1278.cpp:193
+
int16_t beginFSK(float freq=434.0, float br=48.0, float freqDev=50.0, float rxBw=125.0, int8_t power=10, uint16_t preambleLength=16, bool enableOOK=false)
FSK modem initialization method. Must be called at least once from Arduino sketch to initialize the m...
Definition: SX1278.cpp:35
diff --git a/_s_x1279_8h_source.html b/_s_x1279_8h_source.html index 832a1c78..d3eb8982 100644 --- a/_s_x1279_8h_source.html +++ b/_s_x1279_8h_source.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/modules/SX127x/SX1279.h Source File @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -84,22 +86,57 @@ $(document).ready(function(){initNavTree('_s_x1279_8h_source.html','');});
SX1279.h
-
1 #if !defined(_RADIOLIB_SX1279_H)
2 #define _RADIOLIB_SX1279_H
3 
4 #include "../../TypeDef.h"
5 
6 #if !defined(RADIOLIB_EXCLUDE_SX127X)
7 
8 #include "SX1278.h"
9 
15 class SX1279: public SX1278 {
16  public:
17 
18  // constructor
19 
25  SX1279(Module* mod);
26 
27  // basic methods
28 
52  int16_t begin(float freq = 434.0, float bw = 125.0, uint8_t sf = 9, uint8_t cr = 7, uint8_t syncWord = SX127X_SYNC_WORD, int8_t power = 10, uint16_t preambleLength = 8, uint8_t gain = 0);
53 
74  int16_t beginFSK(float freq = 434.0, float br = 48.0, float freqDev = 50.0, float rxBw = 125.0, int8_t power = 10, uint16_t preambleLength = 16, bool enableOOK = false);
75 
76  // configuration methods
77 
85  int16_t setFrequency(float freq);
86 
87 #ifndef RADIOLIB_GODMODE
88  private:
89 #endif
90 
91 };
92 
93 #endif
94 
95 #endif
int16_t setFrequency(float freq)
Sets carrier frequency. Allowed values range from 137.0 MHz to 960.0 MHz.
Definition: SX1279.cpp:53
-
Derived class for SX1279 modules. Overrides some methods from SX1278 due to different parameter range...
Definition: SX1279.h:15
-
SX1279(Module *mod)
Default constructor. Called from Arduino sketch when creating new LoRa instance.
Definition: SX1279.cpp:4
-
Implements all common low-level SPI/UART/I2C methods to control the wireless module. Every module class contains one private instance of this class.
Definition: Module.h:17
-
int16_t beginFSK(float freq=434.0, float br=48.0, float freqDev=50.0, float rxBw=125.0, int8_t power=10, uint16_t preambleLength=16, bool enableOOK=false)
FSK modem initialization method. Must be called at least once from Arduino sketch to initialize the m...
Definition: SX1279.cpp:35
-
Derived class for SX1278 modules. Also used as base class for SX1276, SX1277, SX1279, RFM95 and RFM96. All of these modules use the same basic hardware and only differ in parameter ranges (and names).
Definition: SX1278.h:104
-
int16_t begin(float freq=434.0, float bw=125.0, uint8_t sf=9, uint8_t cr=7, uint8_t syncWord=SX127X_SYNC_WORD, int8_t power=10, uint16_t preambleLength=8, uint8_t gain=0)
LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the ...
Definition: SX1279.cpp:8
+
1 #if !defined(_RADIOLIB_SX1279_H)
+
2 #define _RADIOLIB_SX1279_H
+
3 
+
4 #include "../../TypeDef.h"
+
5 
+
6 #if !defined(RADIOLIB_EXCLUDE_SX127X)
+
7 
+
8 #include "SX1278.h"
+
9 
+
15 class SX1279: public SX1278 {
+
16  public:
+
17 
+
18  // constructor
+
19 
+
25  SX1279(Module* mod);
+
26 
+
27  // basic methods
+
28 
+
52  int16_t begin(float freq = 434.0, float bw = 125.0, uint8_t sf = 9, uint8_t cr = 7, uint8_t syncWord = SX127X_SYNC_WORD, int8_t power = 10, uint16_t preambleLength = 8, uint8_t gain = 0);
+
53 
+
74  int16_t beginFSK(float freq = 434.0, float br = 48.0, float freqDev = 50.0, float rxBw = 125.0, int8_t power = 10, uint16_t preambleLength = 16, bool enableOOK = false);
+
75 
+
76  // configuration methods
+
77 
+
85  int16_t setFrequency(float freq);
+
86 
+
87 #ifndef RADIOLIB_GODMODE
+
88  private:
+
89 #endif
+
90 
+
91 };
+
92 
+
93 #endif
+
94 
+
95 #endif
+
SX1279(Module *mod)
Default constructor. Called from Arduino sketch when creating new LoRa instance.
Definition: SX1279.cpp:4
+
Derived class for SX1278 modules. Also used as base class for SX1276, SX1277, SX1279,...
Definition: SX1278.h:104
+
int16_t setFrequency(float freq)
Sets carrier frequency. Allowed values range from 137.0 MHz to 960.0 MHz.
Definition: SX1279.cpp:53
+
Derived class for SX1279 modules. Overrides some methods from SX1278 due to different parameter range...
Definition: SX1279.h:15
+
int16_t beginFSK(float freq=434.0, float br=48.0, float freqDev=50.0, float rxBw=125.0, int8_t power=10, uint16_t preambleLength=16, bool enableOOK=false)
FSK modem initialization method. Must be called at least once from Arduino sketch to initialize the m...
Definition: SX1279.cpp:35
+
Implements all common low-level SPI/UART/I2C methods to control the wireless module....
Definition: Module.h:17
+
int16_t begin(float freq=434.0, float bw=125.0, uint8_t sf=9, uint8_t cr=7, uint8_t syncWord=SX127X_SYNC_WORD, int8_t power=10, uint16_t preambleLength=8, uint8_t gain=0)
LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the ...
Definition: SX1279.cpp:8
diff --git a/_s_x127x_8h_source.html b/_s_x127x_8h_source.html index 88f6c029..91422dae 100644 --- a/_s_x127x_8h_source.html +++ b/_s_x127x_8h_source.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/modules/SX127x/SX127x.h Source File @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -84,66 +86,752 @@ $(document).ready(function(){initNavTree('_s_x127x_8h_source.html','');});
SX127x.h
-
1 #if !defined(_RADIOLIB_SX127X_H)
2 #define _RADIOLIB_SX127X_H
3 
4 #include "../../TypeDef.h"
5 
6 #if !defined(RADIOLIB_EXCLUDE_SX127X)
7 
8 #include "../../Module.h"
9 
10 #include "../../protocols/PhysicalLayer/PhysicalLayer.h"
11 
12 // SX127x physical layer properties
13 #define SX127X_FREQUENCY_STEP_SIZE 61.03515625
14 #define SX127X_MAX_PACKET_LENGTH 255
15 #define SX127X_MAX_PACKET_LENGTH_FSK 64
16 #define SX127X_CRYSTAL_FREQ 32.0
17 #define SX127X_DIV_EXPONENT 19
18 
19 // SX127x series common LoRa registers
20 #define SX127X_REG_FIFO 0x00
21 #define SX127X_REG_OP_MODE 0x01
22 #define SX127X_REG_FRF_MSB 0x06
23 #define SX127X_REG_FRF_MID 0x07
24 #define SX127X_REG_FRF_LSB 0x08
25 #define SX127X_REG_PA_CONFIG 0x09
26 #define SX127X_REG_PA_RAMP 0x0A
27 #define SX127X_REG_OCP 0x0B
28 #define SX127X_REG_LNA 0x0C
29 #define SX127X_REG_FIFO_ADDR_PTR 0x0D
30 #define SX127X_REG_FIFO_TX_BASE_ADDR 0x0E
31 #define SX127X_REG_FIFO_RX_BASE_ADDR 0x0F
32 #define SX127X_REG_FIFO_RX_CURRENT_ADDR 0x10
33 #define SX127X_REG_IRQ_FLAGS_MASK 0x11
34 #define SX127X_REG_IRQ_FLAGS 0x12
35 #define SX127X_REG_RX_NB_BYTES 0x13
36 #define SX127X_REG_RX_HEADER_CNT_VALUE_MSB 0x14
37 #define SX127X_REG_RX_HEADER_CNT_VALUE_LSB 0x15
38 #define SX127X_REG_RX_PACKET_CNT_VALUE_MSB 0x16
39 #define SX127X_REG_RX_PACKET_CNT_VALUE_LSB 0x17
40 #define SX127X_REG_MODEM_STAT 0x18
41 #define SX127X_REG_PKT_SNR_VALUE 0x19
42 #define SX127X_REG_PKT_RSSI_VALUE 0x1A
43 #define SX127X_REG_RSSI_VALUE 0x1B
44 #define SX127X_REG_HOP_CHANNEL 0x1C
45 #define SX127X_REG_MODEM_CONFIG_1 0x1D
46 #define SX127X_REG_MODEM_CONFIG_2 0x1E
47 #define SX127X_REG_SYMB_TIMEOUT_LSB 0x1F
48 #define SX127X_REG_PREAMBLE_MSB 0x20
49 #define SX127X_REG_PREAMBLE_LSB 0x21
50 #define SX127X_REG_PAYLOAD_LENGTH 0x22
51 #define SX127X_REG_MAX_PAYLOAD_LENGTH 0x23
52 #define SX127X_REG_HOP_PERIOD 0x24
53 #define SX127X_REG_FIFO_RX_BYTE_ADDR 0x25
54 #define SX127X_REG_FEI_MSB 0x28
55 #define SX127X_REG_FEI_MID 0x29
56 #define SX127X_REG_FEI_LSB 0x2A
57 #define SX127X_REG_RSSI_WIDEBAND 0x2C
58 #define SX127X_REG_DETECT_OPTIMIZE 0x31
59 #define SX127X_REG_INVERT_IQ 0x33
60 #define SX127X_REG_DETECTION_THRESHOLD 0x37
61 #define SX127X_REG_SYNC_WORD 0x39
62 #define SX127X_REG_INVERT_IQ2 0x3B
63 #define SX127X_REG_DIO_MAPPING_1 0x40
64 #define SX127X_REG_DIO_MAPPING_2 0x41
65 #define SX127X_REG_VERSION 0x42
66 
67 // SX127x common LoRa modem settings
68 // SX127X_REG_OP_MODE MSB LSB DESCRIPTION
69 #define SX127X_FSK_OOK 0b00000000 // 7 7 FSK/OOK mode
70 #define SX127X_LORA 0b10000000 // 7 7 LoRa mode
71 #define SX127X_ACCESS_SHARED_REG_OFF 0b00000000 // 6 6 access LoRa registers (0x0D:0x3F) in LoRa mode
72 #define SX127X_ACCESS_SHARED_REG_ON 0b01000000 // 6 6 access FSK registers (0x0D:0x3F) in LoRa mode
73 #define SX127X_SLEEP 0b00000000 // 2 0 sleep
74 #define SX127X_STANDBY 0b00000001 // 2 0 standby
75 #define SX127X_FSTX 0b00000010 // 2 0 frequency synthesis TX
76 #define SX127X_TX 0b00000011 // 2 0 transmit
77 #define SX127X_FSRX 0b00000100 // 2 0 frequency synthesis RX
78 #define SX127X_RXCONTINUOUS 0b00000101 // 2 0 receive continuous
79 #define SX127X_RXSINGLE 0b00000110 // 2 0 receive single
80 #define SX127X_CAD 0b00000111 // 2 0 channel activity detection
81 
82 // SX127X_REG_PA_CONFIG
83 #define SX127X_PA_SELECT_RFO 0b00000000 // 7 7 RFO pin output, power limited to +14 dBm
84 #define SX127X_PA_SELECT_BOOST 0b10000000 // 7 7 PA_BOOST pin output, power limited to +20 dBm
85 #define SX127X_OUTPUT_POWER 0b00001111 // 3 0 output power: P_out = 2 + OUTPUT_POWER [dBm] for PA_SELECT_BOOST
86  // P_out = -1 + OUTPUT_POWER [dBm] for PA_SELECT_RFO
87 
88 // SX127X_REG_OCP
89 #define SX127X_OCP_OFF 0b00000000 // 5 5 PA overload current protection disabled
90 #define SX127X_OCP_ON 0b00100000 // 5 5 PA overload current protection enabled
91 #define SX127X_OCP_TRIM 0b00001011 // 4 0 OCP current: I_max(OCP_TRIM = 0b1011) = 100 mA
92 
93 // SX127X_REG_LNA
94 #define SX127X_LNA_GAIN_1 0b00100000 // 7 5 LNA gain setting: max gain
95 #define SX127X_LNA_GAIN_2 0b01000000 // 7 5 .
96 #define SX127X_LNA_GAIN_3 0b01100000 // 7 5 .
97 #define SX127X_LNA_GAIN_4 0b10000000 // 7 5 .
98 #define SX127X_LNA_GAIN_5 0b10100000 // 7 5 .
99 #define SX127X_LNA_GAIN_6 0b11000000 // 7 5 min gain
100 #define SX127X_LNA_BOOST_OFF 0b00000000 // 1 0 default LNA current
101 #define SX127X_LNA_BOOST_ON 0b00000011 // 1 0 150% LNA current
102 
103 // SX127X_REG_MODEM_CONFIG_2
104 #define SX127X_SF_6 0b01100000 // 7 4 spreading factor: 64 chips/bit
105 #define SX127X_SF_7 0b01110000 // 7 4 128 chips/bit
106 #define SX127X_SF_8 0b10000000 // 7 4 256 chips/bit
107 #define SX127X_SF_9 0b10010000 // 7 4 512 chips/bit
108 #define SX127X_SF_10 0b10100000 // 7 4 1024 chips/bit
109 #define SX127X_SF_11 0b10110000 // 7 4 2048 chips/bit
110 #define SX127X_SF_12 0b11000000 // 7 4 4096 chips/bit
111 #define SX127X_TX_MODE_SINGLE 0b00000000 // 3 3 single TX
112 #define SX127X_TX_MODE_CONT 0b00001000 // 3 3 continuous TX
113 #define SX127X_RX_TIMEOUT_MSB 0b00000000 // 1 0
114 
115 // SX127X_REG_SYMB_TIMEOUT_LSB
116 #define SX127X_RX_TIMEOUT_LSB 0b01100100 // 7 0 10 bit RX operation timeout
117 
118 // SX127X_REG_PREAMBLE_MSB + REG_PREAMBLE_LSB
119 #define SX127X_PREAMBLE_LENGTH_MSB 0b00000000 // 7 0 2 byte preamble length setting: l_P = PREAMBLE_LENGTH + 4.25
120 #define SX127X_PREAMBLE_LENGTH_LSB 0b00001000 // 7 0 where l_p = preamble length
121 
122 // SX127X_REG_DETECT_OPTIMIZE
123 #define SX127X_DETECT_OPTIMIZE_SF_6 0b00000101 // 2 0 SF6 detection optimization
124 #define SX127X_DETECT_OPTIMIZE_SF_7_12 0b00000011 // 2 0 SF7 to SF12 detection optimization
125 
126 // SX127X_REG_INVERT_IQ
127 #define SX127X_INVERT_IQ_RXPATH_ON 0b01000000 // 6 6 I and Q signals are inverted
128 #define SX127X_INVERT_IQ_RXPATH_OFF 0b00000000 // 6 6 normal mode
129 #define SX127X_INVERT_IQ_TXPATH_ON 0b00000001 // 0 0 I and Q signals are inverted
130 #define SX127X_INVERT_IQ_TXPATH_OFF 0b00000000 // 0 0 normal mode
131 
132 // SX127X_REG_DETECTION_THRESHOLD
133 #define SX127X_DETECTION_THRESHOLD_SF_6 0b00001100 // 7 0 SF6 detection threshold
134 #define SX127X_DETECTION_THRESHOLD_SF_7_12 0b00001010 // 7 0 SF7 to SF12 detection threshold
135 
136 // SX127X_REG_PA_DAC
137 #define SX127X_PA_BOOST_OFF 0b00000100 // 2 0 PA_BOOST disabled
138 #define SX127X_PA_BOOST_ON 0b00000111 // 2 0 +20 dBm on PA_BOOST when OUTPUT_POWER = 0b1111
139 
140 // SX127X_REG_HOP_PERIOD
141 #define SX127X_HOP_PERIOD_OFF 0b00000000 // 7 0 number of periods between frequency hops; 0 = disabled
142 #define SX127X_HOP_PERIOD_MAX 0b11111111 // 7 0
143 
144 // SX127X_REG_DIO_MAPPING_1
145 #define SX127X_DIO0_RX_DONE 0b00000000 // 7 6
146 #define SX127X_DIO0_TX_DONE 0b01000000 // 7 6
147 #define SX127X_DIO0_CAD_DONE 0b10000000 // 7 6
148 #define SX127X_DIO1_RX_TIMEOUT 0b00000000 // 5 4
149 #define SX127X_DIO1_FHSS_CHANGE_CHANNEL 0b00010000 // 5 4
150 #define SX127X_DIO1_CAD_DETECTED 0b00100000 // 5 4
151 
152 // SX127X_REG_IRQ_FLAGS
153 #define SX127X_CLEAR_IRQ_FLAG_RX_TIMEOUT 0b10000000 // 7 7 timeout
154 #define SX127X_CLEAR_IRQ_FLAG_RX_DONE 0b01000000 // 6 6 packet reception complete
155 #define SX127X_CLEAR_IRQ_FLAG_PAYLOAD_CRC_ERROR 0b00100000 // 5 5 payload CRC error
156 #define SX127X_CLEAR_IRQ_FLAG_VALID_HEADER 0b00010000 // 4 4 valid header received
157 #define SX127X_CLEAR_IRQ_FLAG_TX_DONE 0b00001000 // 3 3 payload transmission complete
158 #define SX127X_CLEAR_IRQ_FLAG_CAD_DONE 0b00000100 // 2 2 CAD complete
159 #define SX127X_CLEAR_IRQ_FLAG_FHSS_CHANGE_CHANNEL 0b00000010 // 1 1 FHSS change channel
160 #define SX127X_CLEAR_IRQ_FLAG_CAD_DETECTED 0b00000001 // 0 0 valid LoRa signal detected during CAD operation
161 
162 // SX127X_REG_IRQ_FLAGS_MASK
163 #define SX127X_MASK_IRQ_FLAG_RX_TIMEOUT 0b01111111 // 7 7 timeout
164 #define SX127X_MASK_IRQ_FLAG_RX_DONE 0b10111111 // 6 6 packet reception complete
165 #define SX127X_MASK_IRQ_FLAG_PAYLOAD_CRC_ERROR 0b11011111 // 5 5 payload CRC error
166 #define SX127X_MASK_IRQ_FLAG_VALID_HEADER 0b11101111 // 4 4 valid header received
167 #define SX127X_MASK_IRQ_FLAG_TX_DONE 0b11110111 // 3 3 payload transmission complete
168 #define SX127X_MASK_IRQ_FLAG_CAD_DONE 0b11111011 // 2 2 CAD complete
169 #define SX127X_MASK_IRQ_FLAG_FHSS_CHANGE_CHANNEL 0b11111101 // 1 1 FHSS change channel
170 #define SX127X_MASK_IRQ_FLAG_CAD_DETECTED 0b11111110 // 0 0 valid LoRa signal detected during CAD operation
171 
172 // SX127X_REG_FIFO_TX_BASE_ADDR
173 #define SX127X_FIFO_TX_BASE_ADDR_MAX 0b00000000 // 7 0 allocate the entire FIFO buffer for TX only
174 
175 // SX127X_REG_FIFO_RX_BASE_ADDR
176 #define SX127X_FIFO_RX_BASE_ADDR_MAX 0b00000000 // 7 0 allocate the entire FIFO buffer for RX only
177 
178 // SX127X_REG_SYNC_WORD
179 #define SX127X_SYNC_WORD 0x12 // 7 0 default LoRa sync word
180 #define SX127X_SYNC_WORD_LORAWAN 0x34 // 7 0 sync word reserved for LoRaWAN networks
181 
182 // SX127X_REG_INVERT_IQ2
183 #define SX127X_IQ2_ENABLE 0x19 // 7 0 enable optimize for inverted IQ
184 #define SX127X_IQ2_DISABLE 0x1D // 7 0 reset optimize for inverted IQ
185 
186 // SX127x series common FSK registers
187 // NOTE: FSK register names that are conflicting with LoRa registers are marked with "_FSK" suffix
188 #define SX127X_REG_BITRATE_MSB 0x02
189 #define SX127X_REG_BITRATE_LSB 0x03
190 #define SX127X_REG_FDEV_MSB 0x04
191 #define SX127X_REG_FDEV_LSB 0x05
192 #define SX127X_REG_RX_CONFIG 0x0D
193 #define SX127X_REG_RSSI_CONFIG 0x0E
194 #define SX127X_REG_RSSI_COLLISION 0x0F
195 #define SX127X_REG_RSSI_THRESH 0x10
196 #define SX127X_REG_RSSI_VALUE_FSK 0x11
197 #define SX127X_REG_RX_BW 0x12
198 #define SX127X_REG_AFC_BW 0x13
199 #define SX127X_REG_OOK_PEAK 0x14
200 #define SX127X_REG_OOK_FIX 0x15
201 #define SX127X_REG_OOK_AVG 0x16
202 #define SX127X_REG_AFC_FEI 0x1A
203 #define SX127X_REG_AFC_MSB 0x1B
204 #define SX127X_REG_AFC_LSB 0x1C
205 #define SX127X_REG_FEI_MSB_FSK 0x1D
206 #define SX127X_REG_FEI_LSB_FSK 0x1E
207 #define SX127X_REG_PREAMBLE_DETECT 0x1F
208 #define SX127X_REG_RX_TIMEOUT_1 0x20
209 #define SX127X_REG_RX_TIMEOUT_2 0x21
210 #define SX127X_REG_RX_TIMEOUT_3 0x22
211 #define SX127X_REG_RX_DELAY 0x23
212 #define SX127X_REG_OSC 0x24
213 #define SX127X_REG_PREAMBLE_MSB_FSK 0x25
214 #define SX127X_REG_PREAMBLE_LSB_FSK 0x26
215 #define SX127X_REG_SYNC_CONFIG 0x27
216 #define SX127X_REG_SYNC_VALUE_1 0x28
217 #define SX127X_REG_SYNC_VALUE_2 0x29
218 #define SX127X_REG_SYNC_VALUE_3 0x2A
219 #define SX127X_REG_SYNC_VALUE_4 0x2B
220 #define SX127X_REG_SYNC_VALUE_5 0x2C
221 #define SX127X_REG_SYNC_VALUE_6 0x2D
222 #define SX127X_REG_SYNC_VALUE_7 0x2E
223 #define SX127X_REG_SYNC_VALUE_8 0x2F
224 #define SX127X_REG_PACKET_CONFIG_1 0x30
225 #define SX127X_REG_PACKET_CONFIG_2 0x31
226 #define SX127X_REG_PAYLOAD_LENGTH_FSK 0x32
227 #define SX127X_REG_NODE_ADRS 0x33
228 #define SX127X_REG_BROADCAST_ADRS 0x34
229 #define SX127X_REG_FIFO_THRESH 0x35
230 #define SX127X_REG_SEQ_CONFIG_1 0x36
231 #define SX127X_REG_SEQ_CONFIG_2 0x37
232 #define SX127X_REG_TIMER_RESOL 0x38
233 #define SX127X_REG_TIMER1_COEF 0x39
234 #define SX127X_REG_TIMER2_COEF 0x3A
235 #define SX127X_REG_IMAGE_CAL 0x3B
236 #define SX127X_REG_TEMP 0x3C
237 #define SX127X_REG_LOW_BAT 0x3D
238 #define SX127X_REG_IRQ_FLAGS_1 0x3E
239 #define SX127X_REG_IRQ_FLAGS_2 0x3F
240 
241 // SX127x common FSK modem settings
242 // SX127X_REG_OP_MODE
243 #define SX127X_MODULATION_FSK 0b00000000 // 6 5 FSK modulation scheme
244 #define SX127X_MODULATION_OOK 0b00100000 // 6 5 OOK modulation scheme
245 #define SX127X_RX 0b00000101 // 2 0 receiver mode
246 
247 // SX127X_REG_BITRATE_MSB + SX127X_REG_BITRATE_LSB
248 #define SX127X_BITRATE_MSB 0x1A // 7 0 bit rate setting: BitRate = F(XOSC)/(BITRATE + BITRATE_FRAC/16)
249 #define SX127X_BITRATE_LSB 0x0B // 7 0 default value: 4.8 kbps
250 
251 // SX127X_REG_FDEV_MSB + SX127X_REG_FDEV_LSB
252 #define SX127X_FDEV_MSB 0x00 // 5 0 frequency deviation: Fdev = Fstep * FDEV
253 #define SX127X_FDEV_LSB 0x52 // 7 0 default value: 5 kHz
254 
255 // SX127X_REG_RX_CONFIG
256 #define SX127X_RESTART_RX_ON_COLLISION_OFF 0b00000000 // 7 7 automatic receiver restart disabled (default)
257 #define SX127X_RESTART_RX_ON_COLLISION_ON 0b10000000 // 7 7 automatically restart receiver if it gets saturated or on packet collision
258 #define SX127X_RESTART_RX_WITHOUT_PLL_LOCK 0b01000000 // 6 6 manually restart receiver without frequency change
259 #define SX127X_RESTART_RX_WITH_PLL_LOCK 0b00100000 // 5 5 manually restart receiver with frequency change
260 #define SX127X_AFC_AUTO_OFF 0b00000000 // 4 4 no AFC performed (default)
261 #define SX127X_AFC_AUTO_ON 0b00010000 // 4 4 AFC performed at each receiver startup
262 #define SX127X_AGC_AUTO_OFF 0b00000000 // 3 3 LNA gain set manually by register
263 #define SX127X_AGC_AUTO_ON 0b00001000 // 3 3 LNA gain controlled by AGC
264 #define SX127X_RX_TRIGGER_NONE 0b00000000 // 2 0 receiver startup at: none
265 #define SX127X_RX_TRIGGER_RSSI_INTERRUPT 0b00000001 // 2 0 RSSI interrupt
266 #define SX127X_RX_TRIGGER_PREAMBLE_DETECT 0b00000110 // 2 0 preamble detected
267 #define SX127X_RX_TRIGGER_BOTH 0b00000111 // 2 0 RSSI interrupt and preamble detected
268 
269 // SX127X_REG_RSSI_CONFIG
270 #define SX127X_RSSI_SMOOTHING_SAMPLES_2 0b00000000 // 2 0 number of samples for RSSI average: 2
271 #define SX127X_RSSI_SMOOTHING_SAMPLES_4 0b00000001 // 2 0 4
272 #define SX127X_RSSI_SMOOTHING_SAMPLES_8 0b00000010 // 2 0 8 (default)
273 #define SX127X_RSSI_SMOOTHING_SAMPLES_16 0b00000011 // 2 0 16
274 #define SX127X_RSSI_SMOOTHING_SAMPLES_32 0b00000100 // 2 0 32
275 #define SX127X_RSSI_SMOOTHING_SAMPLES_64 0b00000101 // 2 0 64
276 #define SX127X_RSSI_SMOOTHING_SAMPLES_128 0b00000110 // 2 0 128
277 #define SX127X_RSSI_SMOOTHING_SAMPLES_256 0b00000111 // 2 0 256
278 
279 // SX127X_REG_RSSI_COLLISION
280 #define SX127X_RSSI_COLLISION_THRESHOLD 0x0A // 7 0 RSSI threshold in dB that will be considered a collision, default value: 10 dB
281 
282 // SX127X_REG_RSSI_THRESH
283 #define SX127X_RSSI_THRESHOLD 0xFF // 7 0 RSSI threshold that will trigger RSSI interrupt, RssiThreshold = RSSI_THRESHOLD / 2 [dBm]
284 
285 // SX127X_REG_RX_BW
286 #define SX127X_RX_BW_MANT_16 0b00000000 // 4 3 channel filter bandwidth: RxBw = F(XOSC) / (RxBwMant * 2^(RxBwExp + 2)) [kHz]
287 #define SX127X_RX_BW_MANT_20 0b00001000 // 4 3
288 #define SX127X_RX_BW_MANT_24 0b00010000 // 4 3 default RxBwMant parameter
289 #define SX127X_RX_BW_EXP 0b00000101 // 2 0 default RxBwExp parameter
290 
291 // SX127X_REG_AFC_BW
292 #define SX127X_RX_BW_MANT_AFC 0b00001000 // 4 3 default RxBwMant parameter used during AFC
293 #define SX127X_RX_BW_EXP_AFC 0b00000011 // 2 0 default RxBwExp parameter used during AFC
294 
295 // SX127X_REG_OOK_PEAK
296 #define SX127X_BIT_SYNC_OFF 0b00000000 // 5 5 bit synchronizer disabled (not allowed in packet mode)
297 #define SX127X_BIT_SYNC_ON 0b00100000 // 5 5 bit synchronizer enabled (default)
298 #define SX127X_OOK_THRESH_FIXED 0b00000000 // 4 3 OOK threshold type: fixed value
299 #define SX127X_OOK_THRESH_PEAK 0b00001000 // 4 3 peak mode (default)
300 #define SX127X_OOK_THRESH_AVERAGE 0b00010000 // 4 3 average mode
301 #define SX127X_OOK_PEAK_THRESH_STEP_0_5_DB 0b00000000 // 2 0 OOK demodulator step size: 0.5 dB (default)
302 #define SX127X_OOK_PEAK_THRESH_STEP_1_0_DB 0b00000001 // 2 0 1.0 dB
303 #define SX127X_OOK_PEAK_THRESH_STEP_1_5_DB 0b00000010 // 2 0 1.5 dB
304 #define SX127X_OOK_PEAK_THRESH_STEP_2_0_DB 0b00000011 // 2 0 2.0 dB
305 #define SX127X_OOK_PEAK_THRESH_STEP_3_0_DB 0b00000100 // 2 0 3.0 dB
306 #define SX127X_OOK_PEAK_THRESH_STEP_4_0_DB 0b00000101 // 2 0 4.0 dB
307 #define SX127X_OOK_PEAK_THRESH_STEP_5_0_DB 0b00000110 // 2 0 5.0 dB
308 #define SX127X_OOK_PEAK_THRESH_STEP_6_0_DB 0b00000111 // 2 0 6.0 dB
309 
310 // SX127X_REG_OOK_FIX
311 #define SX127X_OOK_FIXED_THRESHOLD 0x0C // 7 0 default fixed threshold for OOK data slicer
312 
313 // SX127X_REG_OOK_AVG
314 #define SX127X_OOK_PEAK_THRESH_DEC_1_1_CHIP 0b00000000 // 7 5 OOK demodulator step period: once per chip (default)
315 #define SX127X_OOK_PEAK_THRESH_DEC_1_2_CHIP 0b00100000 // 7 5 once every 2 chips
316 #define SX127X_OOK_PEAK_THRESH_DEC_1_4_CHIP 0b01000000 // 7 5 once every 4 chips
317 #define SX127X_OOK_PEAK_THRESH_DEC_1_8_CHIP 0b01100000 // 7 5 once every 8 chips
318 #define SX127X_OOK_PEAK_THRESH_DEC_2_1_CHIP 0b10000000 // 7 5 2 times per chip
319 #define SX127X_OOK_PEAK_THRESH_DEC_4_1_CHIP 0b10100000 // 7 5 4 times per chip
320 #define SX127X_OOK_PEAK_THRESH_DEC_8_1_CHIP 0b11000000 // 7 5 8 times per chip
321 #define SX127X_OOK_PEAK_THRESH_DEC_16_1_CHIP 0b11100000 // 7 5 16 times per chip
322 #define SX127X_OOK_AVERAGE_OFFSET_0_DB 0b00000000 // 3 2 OOK average threshold offset: 0.0 dB (default)
323 #define SX127X_OOK_AVERAGE_OFFSET_2_DB 0b00000100 // 3 2 2.0 dB
324 #define SX127X_OOK_AVERAGE_OFFSET_4_DB 0b00001000 // 3 2 4.0 dB
325 #define SX127X_OOK_AVERAGE_OFFSET_6_DB 0b00001100 // 3 2 6.0 dB
326 #define SX127X_OOK_AVG_THRESH_FILT_32_PI 0b00000000 // 1 0 OOK average filter coefficient: chip rate / 32*pi
327 #define SX127X_OOK_AVG_THRESH_FILT_8_PI 0b00000001 // 1 0 chip rate / 8*pi
328 #define SX127X_OOK_AVG_THRESH_FILT_4_PI 0b00000010 // 1 0 chip rate / 4*pi (default)
329 #define SX127X_OOK_AVG_THRESH_FILT_2_PI 0b00000011 // 1 0 chip rate / 2*pi
330 
331 // SX127X_REG_AFC_FEI
332 #define SX127X_AGC_START 0b00010000 // 4 4 manually start AGC sequence
333 #define SX127X_AFC_CLEAR 0b00000010 // 1 1 manually clear AFC register
334 #define SX127X_AFC_AUTO_CLEAR_OFF 0b00000000 // 0 0 AFC register will not be cleared at the start of AFC (default)
335 #define SX127X_AFC_AUTO_CLEAR_ON 0b00000001 // 0 0 AFC register will be cleared at the start of AFC
336 
337 // SX127X_REG_PREAMBLE_DETECT
338 #define SX127X_PREAMBLE_DETECTOR_OFF 0b00000000 // 7 7 preamble detection disabled
339 #define SX127X_PREAMBLE_DETECTOR_ON 0b10000000 // 7 7 preamble detection enabled (default)
340 #define SX127X_PREAMBLE_DETECTOR_1_BYTE 0b00000000 // 6 5 preamble detection size: 1 byte (default)
341 #define SX127X_PREAMBLE_DETECTOR_2_BYTE 0b00100000 // 6 5 2 bytes
342 #define SX127X_PREAMBLE_DETECTOR_3_BYTE 0b01000000 // 6 5 3 bytes
343 #define SX127X_PREAMBLE_DETECTOR_TOL 0x0A // 4 0 default number of tolerated errors per chip (4 chips per bit)
344 
345 // SX127X_REG_RX_TIMEOUT_1
346 #define SX127X_TIMEOUT_RX_RSSI_OFF 0x00 // 7 0 disable receiver timeout when RSSI interrupt doesn't occur (default)
347 
348 // SX127X_REG_RX_TIMEOUT_2
349 #define SX127X_TIMEOUT_RX_PREAMBLE_OFF 0x00 // 7 0 disable receiver timeout when preamble interrupt doesn't occur (default)
350 
351 // SX127X_REG_RX_TIMEOUT_3
352 #define SX127X_TIMEOUT_SIGNAL_SYNC_OFF 0x00 // 7 0 disable receiver timeout when sync address interrupt doesn't occur (default)
353 
354 // SX127X_REG_OSC
355 #define SX127X_RC_CAL_START 0b00000000 // 3 3 manually start RC oscillator calibration
356 #define SX127X_CLK_OUT_FXOSC 0b00000000 // 2 0 ClkOut frequency: F(XOSC)
357 #define SX127X_CLK_OUT_FXOSC_2 0b00000001 // 2 0 F(XOSC) / 2
358 #define SX127X_CLK_OUT_FXOSC_4 0b00000010 // 2 0 F(XOSC) / 4
359 #define SX127X_CLK_OUT_FXOSC_8 0b00000011 // 2 0 F(XOSC) / 8
360 #define SX127X_CLK_OUT_FXOSC_16 0b00000100 // 2 0 F(XOSC) / 16
361 #define SX127X_CLK_OUT_FXOSC_32 0b00000101 // 2 0 F(XOSC) / 32
362 #define SX127X_CLK_OUT_RC 0b00000110 // 2 0 RC
363 #define SX127X_CLK_OUT_OFF 0b00000111 // 2 0 disabled (default)
364 
365 // SX127X_REG_PREAMBLE_MSB_FSK + SX127X_REG_PREAMBLE_LSB_FSK
366 #define SX127X_PREAMBLE_SIZE_MSB 0x00 // 7 0 preamble size in bytes
367 #define SX127X_PREAMBLE_SIZE_LSB 0x03 // 7 0 default value: 3 bytes
368 
369 // SX127X_REG_SYNC_CONFIG
370 #define SX127X_AUTO_RESTART_RX_MODE_OFF 0b00000000 // 7 6 Rx mode restart after packet reception: disabled
371 #define SX127X_AUTO_RESTART_RX_MODE_NO_PLL 0b01000000 // 7 6 enabled, don't wait for PLL lock
372 #define SX127X_AUTO_RESTART_RX_MODE_PLL 0b10000000 // 7 6 enabled, wait for PLL lock (default)
373 #define SX127X_PREAMBLE_POLARITY_AA 0b00000000 // 5 5 preamble polarity: 0xAA = 0b10101010 (default)
374 #define SX127X_PREAMBLE_POLARITY_55 0b00100000 // 5 5 0x55 = 0b01010101
375 #define SX127X_SYNC_OFF 0b00000000 // 4 4 sync word disabled
376 #define SX127X_SYNC_ON 0b00010000 // 4 4 sync word enabled (default)
377 #define SX127X_SYNC_SIZE 0x03 // 2 0 sync word size in bytes, SyncSize = SYNC_SIZE + 1 bytes
378 
379 // SX127X_REG_SYNC_VALUE_1 - SX127X_REG_SYNC_VALUE_8
380 #define SX127X_SYNC_VALUE_1 0x01 // 7 0 sync word: 1st byte (MSB)
381 #define SX127X_SYNC_VALUE_2 0x01 // 7 0 2nd byte
382 #define SX127X_SYNC_VALUE_3 0x01 // 7 0 3rd byte
383 #define SX127X_SYNC_VALUE_4 0x01 // 7 0 4th byte
384 #define SX127X_SYNC_VALUE_5 0x01 // 7 0 5th byte
385 #define SX127X_SYNC_VALUE_6 0x01 // 7 0 6th byte
386 #define SX127X_SYNC_VALUE_7 0x01 // 7 0 7th byte
387 #define SX127X_SYNC_VALUE_8 0x01 // 7 0 8th byte (LSB)
388 
389 // SX127X_REG_PACKET_CONFIG_1
390 #define SX127X_PACKET_FIXED 0b00000000 // 7 7 packet format: fixed length
391 #define SX127X_PACKET_VARIABLE 0b10000000 // 7 7 variable length (default)
392 #define SX127X_DC_FREE_NONE 0b00000000 // 6 5 DC-free encoding: disabled (default)
393 #define SX127X_DC_FREE_MANCHESTER 0b00100000 // 6 5 Manchester
394 #define SX127X_DC_FREE_WHITENING 0b01000000 // 6 5 Whitening
395 #define SX127X_CRC_OFF 0b00000000 // 4 4 CRC disabled
396 #define SX127X_CRC_ON 0b00010000 // 4 4 CRC enabled (default)
397 #define SX127X_CRC_AUTOCLEAR_OFF 0b00001000 // 3 3 keep FIFO on CRC mismatch, issue payload ready interrupt
398 #define SX127X_CRC_AUTOCLEAR_ON 0b00000000 // 3 3 clear FIFO on CRC mismatch, do not issue payload ready interrupt
399 #define SX127X_ADDRESS_FILTERING_OFF 0b00000000 // 2 1 address filtering: none (default)
400 #define SX127X_ADDRESS_FILTERING_NODE 0b00000010 // 2 1 node
401 #define SX127X_ADDRESS_FILTERING_NODE_BROADCAST 0b00000100 // 2 1 node or broadcast
402 #define SX127X_CRC_WHITENING_TYPE_CCITT 0b00000000 // 0 0 CRC and whitening algorithms: CCITT CRC with standard whitening (default)
403 #define SX127X_CRC_WHITENING_TYPE_IBM 0b00000001 // 0 0 IBM CRC with alternate whitening
404 
405 // SX127X_REG_PACKET_CONFIG_2
406 #define SX127X_DATA_MODE_PACKET 0b01000000 // 6 6 data mode: packet (default)
407 #define SX127X_DATA_MODE_CONTINUOUS 0b00000000 // 6 6 continuous
408 #define SX127X_IO_HOME_OFF 0b00000000 // 5 5 io-homecontrol compatibility disabled (default)
409 #define SX127X_IO_HOME_ON 0b00100000 // 5 5 io-homecontrol compatibility enabled
410 
411 // SX127X_REG_FIFO_THRESH
412 #define SX127X_TX_START_FIFO_LEVEL 0b00000000 // 7 7 start packet transmission when: number of bytes in FIFO exceeds FIFO_THRESHOLD
413 #define SX127X_TX_START_FIFO_NOT_EMPTY 0b10000000 // 7 7 at least one byte in FIFO (default)
414 #define SX127X_FIFO_THRESH 0x0F // 5 0 FIFO level threshold
415 
416 // SX127X_REG_SEQ_CONFIG_1
417 #define SX127X_SEQUENCER_START 0b10000000 // 7 7 manually start sequencer
418 #define SX127X_SEQUENCER_STOP 0b01000000 // 6 6 manually stop sequencer
419 #define SX127X_IDLE_MODE_STANDBY 0b00000000 // 5 5 chip mode during sequencer idle mode: standby (default)
420 #define SX127X_IDLE_MODE_SLEEP 0b00100000 // 5 5 sleep
421 #define SX127X_FROM_START_LP_SELECTION 0b00000000 // 4 3 mode that will be set after starting sequencer: low power selection (default)
422 #define SX127X_FROM_START_RECEIVE 0b00001000 // 4 3 receive
423 #define SX127X_FROM_START_TRANSMIT 0b00010000 // 4 3 transmit
424 #define SX127X_FROM_START_TRANSMIT_FIFO_LEVEL 0b00011000 // 4 3 transmit on a FIFO level interrupt
425 #define SX127X_LP_SELECTION_SEQ_OFF 0b00000000 // 2 2 mode that will be set after exiting low power selection: sequencer off (default)
426 #define SX127X_LP_SELECTION_IDLE 0b00000100 // 2 2 idle state
427 #define SX127X_FROM_IDLE_TRANSMIT 0b00000000 // 1 1 mode that will be set after exiting idle mode: transmit (default)
428 #define SX127X_FROM_IDLE_RECEIVE 0b00000010 // 1 1 receive
429 #define SX127X_FROM_TRANSMIT_LP_SELECTION 0b00000000 // 0 0 mode that will be set after exiting transmit mode: low power selection (default)
430 #define SX127X_FROM_TRANSMIT_RECEIVE 0b00000001 // 0 0 receive
431 
432 // SX127X_REG_SEQ_CONFIG_2
433 #define SX127X_FROM_RECEIVE_PACKET_RECEIVED_PAYLOAD 0b00100000 // 7 5 mode that will be set after exiting receive mode: packet received on payload ready interrupt (default)
434 #define SX127X_FROM_RECEIVE_LP_SELECTION 0b01000000 // 7 5 low power selection
435 #define SX127X_FROM_RECEIVE_PACKET_RECEIVED_CRC_OK 0b01100000 // 7 5 packet received on CRC OK interrupt
436 #define SX127X_FROM_RECEIVE_SEQ_OFF_RSSI 0b10000000 // 7 5 sequencer off on RSSI interrupt
437 #define SX127X_FROM_RECEIVE_SEQ_OFF_SYNC_ADDR 0b10100000 // 7 5 sequencer off on sync address interrupt
438 #define SX127X_FROM_RECEIVE_SEQ_OFF_PREAMBLE_DETECT 0b11000000 // 7 5 sequencer off on preamble detect interrupt
439 #define SX127X_FROM_RX_TIMEOUT_RECEIVE 0b00000000 // 4 3 mode that will be set after Rx timeout: receive (default)
440 #define SX127X_FROM_RX_TIMEOUT_TRANSMIT 0b00001000 // 4 3 transmit
441 #define SX127X_FROM_RX_TIMEOUT_LP_SELECTION 0b00010000 // 4 3 low power selection
442 #define SX127X_FROM_RX_TIMEOUT_SEQ_OFF 0b00011000 // 4 3 sequencer off
443 #define SX127X_FROM_PACKET_RECEIVED_SEQ_OFF 0b00000000 // 2 0 mode that will be set after packet received: sequencer off (default)
444 #define SX127X_FROM_PACKET_RECEIVED_TRANSMIT 0b00000001 // 2 0 transmit
445 #define SX127X_FROM_PACKET_RECEIVED_LP_SELECTION 0b00000010 // 2 0 low power selection
446 #define SX127X_FROM_PACKET_RECEIVED_RECEIVE_FS 0b00000011 // 2 0 receive via FS
447 #define SX127X_FROM_PACKET_RECEIVED_RECEIVE 0b00000100 // 2 0 receive
448 
449 // SX127X_REG_TIMER_RESOL
450 #define SX127X_TIMER1_OFF 0b00000000 // 3 2 timer 1 resolution: disabled (default)
451 #define SX127X_TIMER1_RESOLUTION_64_US 0b00000100 // 3 2 64 us
452 #define SX127X_TIMER1_RESOLUTION_4_1_MS 0b00001000 // 3 2 4.1 ms
453 #define SX127X_TIMER1_RESOLUTION_262_MS 0b00001100 // 3 2 262 ms
454 #define SX127X_TIMER2_OFF 0b00000000 // 3 2 timer 2 resolution: disabled (default)
455 #define SX127X_TIMER2_RESOLUTION_64_US 0b00000001 // 3 2 64 us
456 #define SX127X_TIMER2_RESOLUTION_4_1_MS 0b00000010 // 3 2 4.1 ms
457 #define SX127X_TIMER2_RESOLUTION_262_MS 0b00000011 // 3 2 262 ms
458 
459 // SX127X_REG_TIMER1_COEF
460 #define SX127X_TIMER1_COEFFICIENT 0xF5 // 7 0 multiplication coefficient for timer 1
461 
462 // SX127X_REG_TIMER2_COEF
463 #define SX127X_TIMER2_COEFFICIENT 0x20 // 7 0 multiplication coefficient for timer 2
464 
465 // SX127X_REG_IMAGE_CAL
466 #define SX127X_AUTO_IMAGE_CAL_OFF 0b00000000 // 7 7 temperature calibration disabled (default)
467 #define SX127X_AUTO_IMAGE_CAL_ON 0b10000000 // 7 7 temperature calibration enabled
468 #define SX127X_IMAGE_CAL_START 0b01000000 // 6 6 start temperature calibration
469 #define SX127X_IMAGE_CAL_RUNNING 0b00100000 // 5 5 temperature calibration is on-going
470 #define SX127X_IMAGE_CAL_COMPLETE 0b00000000 // 5 5 temperature calibration finished
471 #define SX127X_TEMP_CHANGED 0b00001000 // 3 3 temperature changed more than TEMP_THRESHOLD since last calibration
472 #define SX127X_TEMP_THRESHOLD_5_DEG_C 0b00000000 // 2 1 temperature change threshold: 5 deg. C
473 #define SX127X_TEMP_THRESHOLD_10_DEG_C 0b00000010 // 2 1 10 deg. C (default)
474 #define SX127X_TEMP_THRESHOLD_15_DEG_C 0b00000100 // 2 1 15 deg. C
475 #define SX127X_TEMP_THRESHOLD_20_DEG_C 0b00000110 // 2 1 20 deg. C
476 #define SX127X_TEMP_MONITOR_ON 0b00000000 // 0 0 temperature monitoring enabled (default)
477 #define SX127X_TEMP_MONITOR_OFF 0b00000001 // 0 0 temperature monitoring disabled
478 
479 // SX127X_REG_LOW_BAT
480 #define SX127X_LOW_BAT_OFF 0b00000000 // 3 3 low battery detector disabled
481 #define SX127X_LOW_BAT_ON 0b00001000 // 3 3 low battery detector enabled
482 #define SX127X_LOW_BAT_TRIM_1_695_V 0b00000000 // 2 0 battery voltage threshold: 1.695 V
483 #define SX127X_LOW_BAT_TRIM_1_764_V 0b00000001 // 2 0 1.764 V
484 #define SX127X_LOW_BAT_TRIM_1_835_V 0b00000010 // 2 0 1.835 V (default)
485 #define SX127X_LOW_BAT_TRIM_1_905_V 0b00000011 // 2 0 1.905 V
486 #define SX127X_LOW_BAT_TRIM_1_976_V 0b00000100 // 2 0 1.976 V
487 #define SX127X_LOW_BAT_TRIM_2_045_V 0b00000101 // 2 0 2.045 V
488 #define SX127X_LOW_BAT_TRIM_2_116_V 0b00000110 // 2 0 2.116 V
489 #define SX127X_LOW_BAT_TRIM_2_185_V 0b00000111 // 2 0 2.185 V
490 
491 // SX127X_REG_IRQ_FLAGS_1
492 #define SX127X_FLAG_MODE_READY 0b10000000 // 7 7 requested mode is ready
493 #define SX127X_FLAG_RX_READY 0b01000000 // 6 6 reception ready (after RSSI, AGC, AFC)
494 #define SX127X_FLAG_TX_READY 0b00100000 // 5 5 transmission ready (after PA ramp-up)
495 #define SX127X_FLAG_PLL_LOCK 0b00010000 // 4 4 PLL locked
496 #define SX127X_FLAG_RSSI 0b00001000 // 3 3 RSSI value exceeds RSSI threshold
497 #define SX127X_FLAG_TIMEOUT 0b00000100 // 2 2 timeout occurred
498 #define SX127X_FLAG_PREAMBLE_DETECT 0b00000010 // 1 1 valid preamble was detected
499 #define SX127X_FLAG_SYNC_ADDRESS_MATCH 0b00000001 // 0 0 sync address matched
500 
501 // SX127X_REG_IRQ_FLAGS_2
502 #define SX127X_FLAG_FIFO_FULL 0b10000000 // 7 7 FIFO is full
503 #define SX127X_FLAG_FIFO_EMPTY 0b01000000 // 6 6 FIFO is empty
504 #define SX127X_FLAG_FIFO_LEVEL 0b00100000 // 5 5 number of bytes in FIFO exceeds FIFO_THRESHOLD
505 #define SX127X_FLAG_FIFO_OVERRUN 0b00010000 // 4 4 FIFO overrun occurred
506 #define SX127X_FLAG_PACKET_SENT 0b00001000 // 3 3 packet was successfully sent
507 #define SX127X_FLAG_PAYLOAD_READY 0b00000100 // 2 2 packet was successfully received
508 #define SX127X_FLAG_CRC_OK 0b00000010 // 1 1 CRC check passed
509 #define SX127X_FLAG_LOW_BAT 0b00000001 // 0 0 battery voltage dropped below threshold
510 
511 // SX127X_REG_DIO_MAPPING_1
512 #define SX127X_DIO0_CONT_SYNC_ADDRESS 0b00000000 // 7 6
513 #define SX127X_DIO0_CONT_TX_READY 0b00000000 // 7 6
514 #define SX127X_DIO0_CONT_RSSI_PREAMBLE_DETECTED 0b01000000 // 7 6
515 #define SX127X_DIO0_CONT_RX_READY 0b10000000 // 7 6
516 #define SX127X_DIO0_PACK_PAYLOAD_READY 0b00000000 // 7 6
517 #define SX127X_DIO0_PACK_PACKET_SENT 0b00000000 // 7 6
518 #define SX127X_DIO0_PACK_CRC_OK 0b01000000 // 7 6
519 #define SX127X_DIO0_PACK_TEMP_CHANGE_LOW_BAT 0b11000000 // 7 6
520 #define SX127X_DIO1_CONT_DCLK 0b00000000 // 5 4
521 #define SX127X_DIO1_CONT_RSSI_PREAMBLE_DETECTED 0b00010000 // 5 4
522 #define SX127X_DIO1_PACK_FIFO_LEVEL 0b00000000 // 5 4
523 #define SX127X_DIO1_PACK_FIFO_EMPTY 0b00010000 // 5 4
524 #define SX127X_DIO1_PACK_FIFO_FULL 0b00100000 // 5 4
525 #define SX127X_DIO2_CONT_DATA 0b00000000 // 3 2
526 
527 // SX1272_REG_PLL_HOP + SX1278_REG_PLL_HOP
528 #define SX127X_FAST_HOP_OFF 0b00000000 // 7 7 carrier frequency validated when FRF registers are written
529 #define SX127X_FAST_HOP_ON 0b10000000 // 7 7 carrier frequency validated when FS modes are requested
530 
531 // SX1272_REG_TCXO + SX1278_REG_TCXO
532 #define SX127X_TCXO_INPUT_EXTERNAL 0b00000000 // 4 4 use external crystal oscillator
533 #define SX127X_TCXO_INPUT_EXTERNAL_CLIPPED 0b00010000 // 4 4 use external crystal oscillator clipped sine connected to XTA pin
534 
535 // SX1272_REG_PLL + SX1278_REG_PLL
536 #define SX127X_PLL_BANDWIDTH_75_KHZ 0b00000000 // 7 6 PLL bandwidth: 75 kHz
537 #define SX127X_PLL_BANDWIDTH_150_KHZ 0b01000000 // 7 6 150 kHz
538 #define SX127X_PLL_BANDWIDTH_225_KHZ 0b10000000 // 7 6 225 kHz
539 #define SX127X_PLL_BANDWIDTH_300_KHZ 0b11000000 // 7 6 300 kHz (default)
540 
547 class SX127x: public PhysicalLayer {
548  public:
549  // introduce PhysicalLayer overloads
554 
555  // constructor
556 
562  SX127x(Module* mod);
563 
564  // basic methods
565 
577  int16_t begin(uint8_t chipVersion, uint8_t syncWord, uint16_t preambleLength);
578 
582  virtual void reset() = 0;
583 
601  int16_t beginFSK(uint8_t chipVersion, float br, float freqDev, float rxBw, uint16_t preambleLength, bool enableOOK);
602 
615  int16_t transmit(uint8_t* data, size_t len, uint8_t addr = 0) override;
616 
627  int16_t receive(uint8_t* data, size_t len) override;
628 
634  int16_t scanChannel();
635 
642  int16_t sleep();
643 
649  int16_t standby() override;
650 
659  int16_t transmitDirect(uint32_t frf = 0) override;
660 
667  int16_t receiveDirect() override;
668 
674  int16_t packetMode();
675 
676  // interrupt methods
677 
683  void setDio0Action(void (*func)(void));
684 
688  void clearDio0Action();
689 
695  void setDio1Action(void (*func)(void));
696 
700  void clearDio1Action();
701 
713  int16_t startTransmit(uint8_t* data, size_t len, uint8_t addr = 0) override;
714 
724  int16_t startReceive(uint8_t len = 0, uint8_t mode = SX127X_RXCONTINUOUS);
725 
735  int16_t readData(uint8_t* data, size_t len) override;
736 
737 
738  // configuration methods
739 
747  int16_t setSyncWord(uint8_t syncWord);
748 
756  int16_t setCurrentLimit(uint8_t currentLimit);
757 
765  int16_t setPreambleLength(uint16_t preambleLength);
766 
774  float getFrequencyError(bool autoCorrect = false);
775 
781  float getSNR();
782 
788  float getDataRate() const;
789 
797  int16_t setBitRate(float br);
798 
806  int16_t setFrequencyDeviation(float freqDev) override;
807 
815  int16_t setRxBandwidth(float rxBw);
816 
826  int16_t setSyncWord(uint8_t* syncWord, size_t len);
827 
835  int16_t setNodeAddress(uint8_t nodeAddr);
836 
844  int16_t setBroadcastAddress(uint8_t broadAddr);
845 
851  int16_t disableAddressFiltering();
852 
860  int16_t setOOK(bool enableOOK);
861 
869  size_t getPacketLength(bool update = true) override;
870 
878  int16_t fixedPacketLengthMode(uint8_t len = SX127X_MAX_PACKET_LENGTH_FSK);
879 
887  int16_t variablePacketLengthMode(uint8_t maxLen = SX127X_MAX_PACKET_LENGTH_FSK);
888 
899  int16_t setRSSIConfig(uint8_t smoothingSamples, int8_t offset = 0);
900 
909  int16_t setEncoding(uint8_t encoding) override;
910 
918  uint16_t getIRQFlags();
919 
925  uint8_t getModemStatus();
926 
933  int8_t getTempRaw();
934 
943  void setRfSwitchPins(RADIOLIB_PIN_TYPE rxEn, RADIOLIB_PIN_TYPE txEn);
944 
950  uint8_t random();
951 
957  int16_t getChipVersion();
958 
966  int16_t invertIQ(bool invertIQ);
967 
968 #ifndef RADIOLIB_GODMODE
969  protected:
970 #endif
971  Module* _mod;
972 
973  float _freq = 0;
974  float _bw = 0;
975  uint8_t _sf = 0;
976  uint8_t _cr = 0;
977  float _br = 0;
978  float _rxBw = 0;
979  bool _ook = false;
980  bool _crcEnabled = false;
981  size_t _packetLength = 0;
982 
983  int16_t setFrequencyRaw(float newFreq);
984  int16_t config();
985  int16_t configFSK();
986  int16_t getActiveModem();
987  int16_t directMode();
988  int16_t setPacketMode(uint8_t mode, uint8_t len);
989 
990 #ifndef RADIOLIB_GODMODE
991  private:
992 #endif
993  float _dataRate = 0;
994  bool _packetLengthQueried = false; // FSK packet length is the first byte in FIFO, length can only be queried once
995  uint8_t _packetLengthConfig = SX127X_PACKET_VARIABLE;
996 
997  bool findChip(uint8_t ver);
998  int16_t setMode(uint8_t mode);
999  int16_t setActiveModem(uint8_t modem);
1000  void clearIRQFlags();
1001  void clearFIFO(size_t count); // used mostly to clear remaining bytes in FIFO after a packet read
1002 };
1003 
1004 #endif
1005 
1006 #endif
int16_t setRSSIConfig(uint8_t smoothingSamples, int8_t offset=0)
Sets RSSI measurement configuration in FSK mode.
Definition: SX127x.cpp:909
-
int16_t invertIQ(bool invertIQ)
Enables/disables Invert the LoRa I and Q signals.
Definition: SX127x.cpp:1193
-
Base class for SX127x series. All derived classes for SX127x (e.g. SX1278 or SX1272) inherit from thi...
Definition: SX127x.h:547
-
size_t getPacketLength(bool update=true) override
Query modem for the packet length of received payload.
Definition: SX127x.cpp:873
-
int16_t readData(uint8_t *data, size_t len) override
Reads data that was received after calling startReceive method. This method reads len characters...
Definition: SX127x.cpp:485
-
int16_t transmitDirect(uint32_t frf=0) override
Enables direct transmission mode on pins DIO1 (clock) and DIO2 (data). While in direct mode...
Definition: SX127x.cpp:293
-
uint8_t random()
Get one truly random byte from RSSI noise.
Definition: SX127x.cpp:980
-
int16_t startTransmit(String &str, uint8_t addr=0)
Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes.
Definition: PhysicalLayer.cpp:49
-
void clearDio0Action()
Clears interrupt service routine to call when DIO0 activates.
Definition: SX127x.cpp:406
-
virtual void reset()=0
Reset method. Will reset the chip to the default state using RST pin. Declared pure virtual since SX1...
-
int16_t setNodeAddress(uint8_t nodeAddr)
Sets FSK node address. Calling this method will enable address filtering. Only available in FSK mode...
Definition: SX127x.cpp:793
-
int16_t receive(uint8_t *data, size_t len) override
Binary receive method. Will attempt to receive arbitrary binary data up to 255 bytes long using LoRa ...
Definition: SX127x.cpp:193
-
int16_t transmit(uint8_t *data, size_t len, uint8_t addr=0) override
Binary transmit method. Will transmit arbitrary binary data up to 255 bytes long using LoRa or up to ...
Definition: SX127x.cpp:126
-
float getSNR()
Gets signal-to-noise ratio of the latest received packet.
Definition: SX127x.cpp:661
-
int16_t setSyncWord(uint8_t syncWord)
Sets LoRa sync word. Only available in LoRa mode.
Definition: SX127x.cpp:542
-
int16_t setBitRate(float br)
Sets FSK bit rate. Allowed values range from 1.2 to 300 kbps. Only available in FSK mode...
Definition: SX127x.cpp:676
-
int16_t setOOK(bool enableOOK)
Enables/disables OOK modulation instead of FSK.
Definition: SX127x.cpp:839
-
float getFrequencyError(bool autoCorrect=false)
Gets frequency error of the latest received packet.
Definition: SX127x.cpp:608
-
int16_t startTransmit(uint8_t *data, size_t len, uint8_t addr=0) override
Interrupt-driven binary transmit method. Will start transmitting arbitrary binary data up to 255 byte...
Definition: SX127x.cpp:424
-
uint8_t getModemStatus()
Reads modem status. Only available in LoRa mode.
Definition: SX127x.cpp:966
-
int16_t setCurrentLimit(uint8_t currentLimit)
Sets current limit for over current protection at transmitter amplifier. Allowed values range from 45...
Definition: SX127x.cpp:555
-
int16_t sleep()
Sets the LoRa module to sleep to save power. Module will not be able to transmit or receive any data ...
Definition: SX127x.cpp:277
-
int16_t startReceive(uint8_t len=0, uint8_t mode=SX127X_RXCONTINUOUS)
Interrupt-driven receive method. DIO0 will be activated when full valid packet is received...
Definition: SX127x.cpp:358
-
void setDio0Action(void(*func)(void))
Set interrupt service routine function to call when DIO0 activates.
Definition: SX127x.cpp:402
-
void clearDio1Action()
Clears interrupt service routine to call when DIO1 activates.
Definition: SX127x.cpp:417
-
int16_t getChipVersion()
Read version SPI register. Should return SX1278_CHIP_VERSION (0x12) or SX1272_CHIP_VERSION (0x22) if ...
Definition: SX127x.cpp:1005
-
Implements all common low-level SPI/UART/I2C methods to control the wireless module. Every module class contains one private instance of this class.
Definition: Module.h:17
-
int16_t transmit(__FlashStringHelper *fstr, uint8_t addr=0)
Arduino Flash String transmit method.
Definition: PhysicalLayer.cpp:8
-
int16_t receiveDirect() override
Enables direct reception mode on pins DIO1 (clock) and DIO2 (data). While in direct mode...
Definition: SX127x.cpp:319
-
int16_t setEncoding(uint8_t encoding) override
Sets transmission encoding. Only available in FSK mode. Allowed values are RADIOLIB_ENCODING_NRZ, RADIOLIB_ENCODING_MANCHESTER and RADIOLIB_ENCODING_WHITENING.
Definition: SX127x.cpp:932
-
int16_t variablePacketLengthMode(uint8_t maxLen=SX127X_MAX_PACKET_LENGTH_FSK)
Set modem in variable packet length mode. Available in FSK mode only.
Definition: SX127x.cpp:905
-
int16_t setFrequencyDeviation(float freqDev) override
Sets FSK frequency deviation from carrier frequency. Allowed values depend on bit rate setting and mu...
Definition: SX127x.cpp:705
-
int16_t standby() override
Sets the LoRa module to standby.
Definition: SX127x.cpp:285
-
int16_t receive(String &str, size_t len=0)
Arduino String receive method.
Definition: PhysicalLayer.cpp:98
-
int16_t setRxBandwidth(float rxBw)
Sets FSK receiver bandwidth. Allowed values range from 2.6 to 250 kHz. Only available in FSK mode...
Definition: SX127x.cpp:734
-
int16_t beginFSK(uint8_t chipVersion, float br, float freqDev, float rxBw, uint16_t preambleLength, bool enableOOK)
Initialization method for FSK modem. Will be called with appropriate parameters when calling FSK init...
Definition: SX127x.cpp:55
-
uint16_t getIRQFlags()
Reads currently active IRQ flags, can be used to check which event caused an interrupt. In LoRa mode, this is the content of SX127X_REG_IRQ_FLAGS register. In FSK mode, this is the contents of SX127X_REG_IRQ_FLAGS_2 (MSB) and SX127X_REG_IRQ_FLAGS_1 (LSB) registers.
Definition: SX127x.cpp:951
-
Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN...
Definition: PhysicalLayer.h:13
-
int8_t getTempRaw()
Reads uncalibrated temperature value. This function will change operating mode and should not be call...
Definition: SX127x.cpp:1009
-
int16_t scanChannel()
Performs scan for valid LoRa preamble in the current channel.
Definition: SX127x.cpp:238
-
void setRfSwitchPins(RADIOLIB_PIN_TYPE rxEn, RADIOLIB_PIN_TYPE txEn)
Some modules contain external RF switch controlled by two pins. This function gives RadioLib control ...
Definition: SX127x.cpp:976
-
int16_t packetMode()
Disables direct mode and enables packet mode, allowing the module to receive packets. Can only be activated in FSK mode.
Definition: SX127x.cpp:349
-
int16_t disableAddressFiltering()
Disables FSK address filtering.
Definition: SX127x.cpp:821
-
int16_t setBroadcastAddress(uint8_t broadAddr)
Sets FSK broadcast address. Calling this method will enable address filtering. Only available in FSK ...
Definition: SX127x.cpp:807
-
void setDio1Action(void(*func)(void))
Set interrupt service routine function to call when DIO1 activates.
Definition: SX127x.cpp:410
-
float getDataRate() const
Get data rate of the latest transmitted packet.
Definition: SX127x.cpp:672
-
SX127x(Module *mod)
Default constructor. Called internally when creating new LoRa instance.
Definition: SX127x.cpp:4
-
int16_t fixedPacketLengthMode(uint8_t len=SX127X_MAX_PACKET_LENGTH_FSK)
Set modem in fixed packet length mode. Available in FSK mode only.
Definition: SX127x.cpp:901
-
int16_t begin(uint8_t chipVersion, uint8_t syncWord, uint16_t preambleLength)
Initialization method. Will be called with appropriate parameters when calling initialization method ...
Definition: SX127x.cpp:8
-
int16_t readData(String &str, size_t len=0)
Reads data that was received after calling startReceive method.
Definition: PhysicalLayer.cpp:57
-
int16_t setPreambleLength(uint16_t preambleLength)
Sets LoRa or FSK preamble length. Allowed values range from 6 to 65535 in LoRa mode or 0 to 65535 in ...
Definition: SX127x.cpp:579
+
1 #if !defined(_RADIOLIB_SX127X_H)
+
2 #define _RADIOLIB_SX127X_H
+
3 
+
4 #include "../../TypeDef.h"
+
5 
+
6 #if !defined(RADIOLIB_EXCLUDE_SX127X)
+
7 
+
8 #include "../../Module.h"
+
9 
+
10 #include "../../protocols/PhysicalLayer/PhysicalLayer.h"
+
11 
+
12 // SX127x physical layer properties
+
13 #define SX127X_FREQUENCY_STEP_SIZE 61.03515625
+
14 #define SX127X_MAX_PACKET_LENGTH 255
+
15 #define SX127X_MAX_PACKET_LENGTH_FSK 64
+
16 #define SX127X_CRYSTAL_FREQ 32.0
+
17 #define SX127X_DIV_EXPONENT 19
+
18 
+
19 // SX127x series common LoRa registers
+
20 #define SX127X_REG_FIFO 0x00
+
21 #define SX127X_REG_OP_MODE 0x01
+
22 #define SX127X_REG_FRF_MSB 0x06
+
23 #define SX127X_REG_FRF_MID 0x07
+
24 #define SX127X_REG_FRF_LSB 0x08
+
25 #define SX127X_REG_PA_CONFIG 0x09
+
26 #define SX127X_REG_PA_RAMP 0x0A
+
27 #define SX127X_REG_OCP 0x0B
+
28 #define SX127X_REG_LNA 0x0C
+
29 #define SX127X_REG_FIFO_ADDR_PTR 0x0D
+
30 #define SX127X_REG_FIFO_TX_BASE_ADDR 0x0E
+
31 #define SX127X_REG_FIFO_RX_BASE_ADDR 0x0F
+
32 #define SX127X_REG_FIFO_RX_CURRENT_ADDR 0x10
+
33 #define SX127X_REG_IRQ_FLAGS_MASK 0x11
+
34 #define SX127X_REG_IRQ_FLAGS 0x12
+
35 #define SX127X_REG_RX_NB_BYTES 0x13
+
36 #define SX127X_REG_RX_HEADER_CNT_VALUE_MSB 0x14
+
37 #define SX127X_REG_RX_HEADER_CNT_VALUE_LSB 0x15
+
38 #define SX127X_REG_RX_PACKET_CNT_VALUE_MSB 0x16
+
39 #define SX127X_REG_RX_PACKET_CNT_VALUE_LSB 0x17
+
40 #define SX127X_REG_MODEM_STAT 0x18
+
41 #define SX127X_REG_PKT_SNR_VALUE 0x19
+
42 #define SX127X_REG_PKT_RSSI_VALUE 0x1A
+
43 #define SX127X_REG_RSSI_VALUE 0x1B
+
44 #define SX127X_REG_HOP_CHANNEL 0x1C
+
45 #define SX127X_REG_MODEM_CONFIG_1 0x1D
+
46 #define SX127X_REG_MODEM_CONFIG_2 0x1E
+
47 #define SX127X_REG_SYMB_TIMEOUT_LSB 0x1F
+
48 #define SX127X_REG_PREAMBLE_MSB 0x20
+
49 #define SX127X_REG_PREAMBLE_LSB 0x21
+
50 #define SX127X_REG_PAYLOAD_LENGTH 0x22
+
51 #define SX127X_REG_MAX_PAYLOAD_LENGTH 0x23
+
52 #define SX127X_REG_HOP_PERIOD 0x24
+
53 #define SX127X_REG_FIFO_RX_BYTE_ADDR 0x25
+
54 #define SX127X_REG_FEI_MSB 0x28
+
55 #define SX127X_REG_FEI_MID 0x29
+
56 #define SX127X_REG_FEI_LSB 0x2A
+
57 #define SX127X_REG_RSSI_WIDEBAND 0x2C
+
58 #define SX127X_REG_DETECT_OPTIMIZE 0x31
+
59 #define SX127X_REG_INVERT_IQ 0x33
+
60 #define SX127X_REG_DETECTION_THRESHOLD 0x37
+
61 #define SX127X_REG_SYNC_WORD 0x39
+
62 #define SX127X_REG_INVERT_IQ2 0x3B
+
63 #define SX127X_REG_DIO_MAPPING_1 0x40
+
64 #define SX127X_REG_DIO_MAPPING_2 0x41
+
65 #define SX127X_REG_VERSION 0x42
+
66 
+
67 // SX127x common LoRa modem settings
+
68 // SX127X_REG_OP_MODE MSB LSB DESCRIPTION
+
69 #define SX127X_FSK_OOK 0b00000000 // 7 7 FSK/OOK mode
+
70 #define SX127X_LORA 0b10000000 // 7 7 LoRa mode
+
71 #define SX127X_ACCESS_SHARED_REG_OFF 0b00000000 // 6 6 access LoRa registers (0x0D:0x3F) in LoRa mode
+
72 #define SX127X_ACCESS_SHARED_REG_ON 0b01000000 // 6 6 access FSK registers (0x0D:0x3F) in LoRa mode
+
73 #define SX127X_SLEEP 0b00000000 // 2 0 sleep
+
74 #define SX127X_STANDBY 0b00000001 // 2 0 standby
+
75 #define SX127X_FSTX 0b00000010 // 2 0 frequency synthesis TX
+
76 #define SX127X_TX 0b00000011 // 2 0 transmit
+
77 #define SX127X_FSRX 0b00000100 // 2 0 frequency synthesis RX
+
78 #define SX127X_RXCONTINUOUS 0b00000101 // 2 0 receive continuous
+
79 #define SX127X_RXSINGLE 0b00000110 // 2 0 receive single
+
80 #define SX127X_CAD 0b00000111 // 2 0 channel activity detection
+
81 
+
82 // SX127X_REG_PA_CONFIG
+
83 #define SX127X_PA_SELECT_RFO 0b00000000 // 7 7 RFO pin output, power limited to +14 dBm
+
84 #define SX127X_PA_SELECT_BOOST 0b10000000 // 7 7 PA_BOOST pin output, power limited to +20 dBm
+
85 #define SX127X_OUTPUT_POWER 0b00001111 // 3 0 output power: P_out = 2 + OUTPUT_POWER [dBm] for PA_SELECT_BOOST
+
86  // P_out = -1 + OUTPUT_POWER [dBm] for PA_SELECT_RFO
+
87 
+
88 // SX127X_REG_OCP
+
89 #define SX127X_OCP_OFF 0b00000000 // 5 5 PA overload current protection disabled
+
90 #define SX127X_OCP_ON 0b00100000 // 5 5 PA overload current protection enabled
+
91 #define SX127X_OCP_TRIM 0b00001011 // 4 0 OCP current: I_max(OCP_TRIM = 0b1011) = 100 mA
+
92 
+
93 // SX127X_REG_LNA
+
94 #define SX127X_LNA_GAIN_1 0b00100000 // 7 5 LNA gain setting: max gain
+
95 #define SX127X_LNA_GAIN_2 0b01000000 // 7 5 .
+
96 #define SX127X_LNA_GAIN_3 0b01100000 // 7 5 .
+
97 #define SX127X_LNA_GAIN_4 0b10000000 // 7 5 .
+
98 #define SX127X_LNA_GAIN_5 0b10100000 // 7 5 .
+
99 #define SX127X_LNA_GAIN_6 0b11000000 // 7 5 min gain
+
100 #define SX127X_LNA_BOOST_OFF 0b00000000 // 1 0 default LNA current
+
101 #define SX127X_LNA_BOOST_ON 0b00000011 // 1 0 150% LNA current
+
102 
+
103 // SX127X_REG_MODEM_CONFIG_2
+
104 #define SX127X_SF_6 0b01100000 // 7 4 spreading factor: 64 chips/bit
+
105 #define SX127X_SF_7 0b01110000 // 7 4 128 chips/bit
+
106 #define SX127X_SF_8 0b10000000 // 7 4 256 chips/bit
+
107 #define SX127X_SF_9 0b10010000 // 7 4 512 chips/bit
+
108 #define SX127X_SF_10 0b10100000 // 7 4 1024 chips/bit
+
109 #define SX127X_SF_11 0b10110000 // 7 4 2048 chips/bit
+
110 #define SX127X_SF_12 0b11000000 // 7 4 4096 chips/bit
+
111 #define SX127X_TX_MODE_SINGLE 0b00000000 // 3 3 single TX
+
112 #define SX127X_TX_MODE_CONT 0b00001000 // 3 3 continuous TX
+
113 #define SX127X_RX_TIMEOUT_MSB 0b00000000 // 1 0
+
114 
+
115 // SX127X_REG_SYMB_TIMEOUT_LSB
+
116 #define SX127X_RX_TIMEOUT_LSB 0b01100100 // 7 0 10 bit RX operation timeout
+
117 
+
118 // SX127X_REG_PREAMBLE_MSB + REG_PREAMBLE_LSB
+
119 #define SX127X_PREAMBLE_LENGTH_MSB 0b00000000 // 7 0 2 byte preamble length setting: l_P = PREAMBLE_LENGTH + 4.25
+
120 #define SX127X_PREAMBLE_LENGTH_LSB 0b00001000 // 7 0 where l_p = preamble length
+
121 
+
122 // SX127X_REG_DETECT_OPTIMIZE
+
123 #define SX127X_DETECT_OPTIMIZE_SF_6 0b00000101 // 2 0 SF6 detection optimization
+
124 #define SX127X_DETECT_OPTIMIZE_SF_7_12 0b00000011 // 2 0 SF7 to SF12 detection optimization
+
125 
+
126 // SX127X_REG_INVERT_IQ
+
127 #define SX127X_INVERT_IQ_RXPATH_ON 0b01000000 // 6 6 I and Q signals are inverted
+
128 #define SX127X_INVERT_IQ_RXPATH_OFF 0b00000000 // 6 6 normal mode
+
129 #define SX127X_INVERT_IQ_TXPATH_ON 0b00000001 // 0 0 I and Q signals are inverted
+
130 #define SX127X_INVERT_IQ_TXPATH_OFF 0b00000000 // 0 0 normal mode
+
131 
+
132 // SX127X_REG_DETECTION_THRESHOLD
+
133 #define SX127X_DETECTION_THRESHOLD_SF_6 0b00001100 // 7 0 SF6 detection threshold
+
134 #define SX127X_DETECTION_THRESHOLD_SF_7_12 0b00001010 // 7 0 SF7 to SF12 detection threshold
+
135 
+
136 // SX127X_REG_PA_DAC
+
137 #define SX127X_PA_BOOST_OFF 0b00000100 // 2 0 PA_BOOST disabled
+
138 #define SX127X_PA_BOOST_ON 0b00000111 // 2 0 +20 dBm on PA_BOOST when OUTPUT_POWER = 0b1111
+
139 
+
140 // SX127X_REG_HOP_PERIOD
+
141 #define SX127X_HOP_PERIOD_OFF 0b00000000 // 7 0 number of periods between frequency hops; 0 = disabled
+
142 #define SX127X_HOP_PERIOD_MAX 0b11111111 // 7 0
+
143 
+
144 // SX127X_REG_DIO_MAPPING_1
+
145 #define SX127X_DIO0_RX_DONE 0b00000000 // 7 6
+
146 #define SX127X_DIO0_TX_DONE 0b01000000 // 7 6
+
147 #define SX127X_DIO0_CAD_DONE 0b10000000 // 7 6
+
148 #define SX127X_DIO1_RX_TIMEOUT 0b00000000 // 5 4
+
149 #define SX127X_DIO1_FHSS_CHANGE_CHANNEL 0b00010000 // 5 4
+
150 #define SX127X_DIO1_CAD_DETECTED 0b00100000 // 5 4
+
151 
+
152 // SX127X_REG_IRQ_FLAGS
+
153 #define SX127X_CLEAR_IRQ_FLAG_RX_TIMEOUT 0b10000000 // 7 7 timeout
+
154 #define SX127X_CLEAR_IRQ_FLAG_RX_DONE 0b01000000 // 6 6 packet reception complete
+
155 #define SX127X_CLEAR_IRQ_FLAG_PAYLOAD_CRC_ERROR 0b00100000 // 5 5 payload CRC error
+
156 #define SX127X_CLEAR_IRQ_FLAG_VALID_HEADER 0b00010000 // 4 4 valid header received
+
157 #define SX127X_CLEAR_IRQ_FLAG_TX_DONE 0b00001000 // 3 3 payload transmission complete
+
158 #define SX127X_CLEAR_IRQ_FLAG_CAD_DONE 0b00000100 // 2 2 CAD complete
+
159 #define SX127X_CLEAR_IRQ_FLAG_FHSS_CHANGE_CHANNEL 0b00000010 // 1 1 FHSS change channel
+
160 #define SX127X_CLEAR_IRQ_FLAG_CAD_DETECTED 0b00000001 // 0 0 valid LoRa signal detected during CAD operation
+
161 
+
162 // SX127X_REG_IRQ_FLAGS_MASK
+
163 #define SX127X_MASK_IRQ_FLAG_RX_TIMEOUT 0b01111111 // 7 7 timeout
+
164 #define SX127X_MASK_IRQ_FLAG_RX_DONE 0b10111111 // 6 6 packet reception complete
+
165 #define SX127X_MASK_IRQ_FLAG_PAYLOAD_CRC_ERROR 0b11011111 // 5 5 payload CRC error
+
166 #define SX127X_MASK_IRQ_FLAG_VALID_HEADER 0b11101111 // 4 4 valid header received
+
167 #define SX127X_MASK_IRQ_FLAG_TX_DONE 0b11110111 // 3 3 payload transmission complete
+
168 #define SX127X_MASK_IRQ_FLAG_CAD_DONE 0b11111011 // 2 2 CAD complete
+
169 #define SX127X_MASK_IRQ_FLAG_FHSS_CHANGE_CHANNEL 0b11111101 // 1 1 FHSS change channel
+
170 #define SX127X_MASK_IRQ_FLAG_CAD_DETECTED 0b11111110 // 0 0 valid LoRa signal detected during CAD operation
+
171 
+
172 // SX127X_REG_FIFO_TX_BASE_ADDR
+
173 #define SX127X_FIFO_TX_BASE_ADDR_MAX 0b00000000 // 7 0 allocate the entire FIFO buffer for TX only
+
174 
+
175 // SX127X_REG_FIFO_RX_BASE_ADDR
+
176 #define SX127X_FIFO_RX_BASE_ADDR_MAX 0b00000000 // 7 0 allocate the entire FIFO buffer for RX only
+
177 
+
178 // SX127X_REG_SYNC_WORD
+
179 #define SX127X_SYNC_WORD 0x12 // 7 0 default LoRa sync word
+
180 #define SX127X_SYNC_WORD_LORAWAN 0x34 // 7 0 sync word reserved for LoRaWAN networks
+
181 
+
182 // SX127X_REG_INVERT_IQ2
+
183 #define SX127X_IQ2_ENABLE 0x19 // 7 0 enable optimize for inverted IQ
+
184 #define SX127X_IQ2_DISABLE 0x1D // 7 0 reset optimize for inverted IQ
+
185 
+
186 // SX127x series common FSK registers
+
187 // NOTE: FSK register names that are conflicting with LoRa registers are marked with "_FSK" suffix
+
188 #define SX127X_REG_BITRATE_MSB 0x02
+
189 #define SX127X_REG_BITRATE_LSB 0x03
+
190 #define SX127X_REG_FDEV_MSB 0x04
+
191 #define SX127X_REG_FDEV_LSB 0x05
+
192 #define SX127X_REG_RX_CONFIG 0x0D
+
193 #define SX127X_REG_RSSI_CONFIG 0x0E
+
194 #define SX127X_REG_RSSI_COLLISION 0x0F
+
195 #define SX127X_REG_RSSI_THRESH 0x10
+
196 #define SX127X_REG_RSSI_VALUE_FSK 0x11
+
197 #define SX127X_REG_RX_BW 0x12
+
198 #define SX127X_REG_AFC_BW 0x13
+
199 #define SX127X_REG_OOK_PEAK 0x14
+
200 #define SX127X_REG_OOK_FIX 0x15
+
201 #define SX127X_REG_OOK_AVG 0x16
+
202 #define SX127X_REG_AFC_FEI 0x1A
+
203 #define SX127X_REG_AFC_MSB 0x1B
+
204 #define SX127X_REG_AFC_LSB 0x1C
+
205 #define SX127X_REG_FEI_MSB_FSK 0x1D
+
206 #define SX127X_REG_FEI_LSB_FSK 0x1E
+
207 #define SX127X_REG_PREAMBLE_DETECT 0x1F
+
208 #define SX127X_REG_RX_TIMEOUT_1 0x20
+
209 #define SX127X_REG_RX_TIMEOUT_2 0x21
+
210 #define SX127X_REG_RX_TIMEOUT_3 0x22
+
211 #define SX127X_REG_RX_DELAY 0x23
+
212 #define SX127X_REG_OSC 0x24
+
213 #define SX127X_REG_PREAMBLE_MSB_FSK 0x25
+
214 #define SX127X_REG_PREAMBLE_LSB_FSK 0x26
+
215 #define SX127X_REG_SYNC_CONFIG 0x27
+
216 #define SX127X_REG_SYNC_VALUE_1 0x28
+
217 #define SX127X_REG_SYNC_VALUE_2 0x29
+
218 #define SX127X_REG_SYNC_VALUE_3 0x2A
+
219 #define SX127X_REG_SYNC_VALUE_4 0x2B
+
220 #define SX127X_REG_SYNC_VALUE_5 0x2C
+
221 #define SX127X_REG_SYNC_VALUE_6 0x2D
+
222 #define SX127X_REG_SYNC_VALUE_7 0x2E
+
223 #define SX127X_REG_SYNC_VALUE_8 0x2F
+
224 #define SX127X_REG_PACKET_CONFIG_1 0x30
+
225 #define SX127X_REG_PACKET_CONFIG_2 0x31
+
226 #define SX127X_REG_PAYLOAD_LENGTH_FSK 0x32
+
227 #define SX127X_REG_NODE_ADRS 0x33
+
228 #define SX127X_REG_BROADCAST_ADRS 0x34
+
229 #define SX127X_REG_FIFO_THRESH 0x35
+
230 #define SX127X_REG_SEQ_CONFIG_1 0x36
+
231 #define SX127X_REG_SEQ_CONFIG_2 0x37
+
232 #define SX127X_REG_TIMER_RESOL 0x38
+
233 #define SX127X_REG_TIMER1_COEF 0x39
+
234 #define SX127X_REG_TIMER2_COEF 0x3A
+
235 #define SX127X_REG_IMAGE_CAL 0x3B
+
236 #define SX127X_REG_TEMP 0x3C
+
237 #define SX127X_REG_LOW_BAT 0x3D
+
238 #define SX127X_REG_IRQ_FLAGS_1 0x3E
+
239 #define SX127X_REG_IRQ_FLAGS_2 0x3F
+
240 
+
241 // SX127x common FSK modem settings
+
242 // SX127X_REG_OP_MODE
+
243 #define SX127X_MODULATION_FSK 0b00000000 // 6 5 FSK modulation scheme
+
244 #define SX127X_MODULATION_OOK 0b00100000 // 6 5 OOK modulation scheme
+
245 #define SX127X_RX 0b00000101 // 2 0 receiver mode
+
246 
+
247 // SX127X_REG_BITRATE_MSB + SX127X_REG_BITRATE_LSB
+
248 #define SX127X_BITRATE_MSB 0x1A // 7 0 bit rate setting: BitRate = F(XOSC)/(BITRATE + BITRATE_FRAC/16)
+
249 #define SX127X_BITRATE_LSB 0x0B // 7 0 default value: 4.8 kbps
+
250 
+
251 // SX127X_REG_FDEV_MSB + SX127X_REG_FDEV_LSB
+
252 #define SX127X_FDEV_MSB 0x00 // 5 0 frequency deviation: Fdev = Fstep * FDEV
+
253 #define SX127X_FDEV_LSB 0x52 // 7 0 default value: 5 kHz
+
254 
+
255 // SX127X_REG_RX_CONFIG
+
256 #define SX127X_RESTART_RX_ON_COLLISION_OFF 0b00000000 // 7 7 automatic receiver restart disabled (default)
+
257 #define SX127X_RESTART_RX_ON_COLLISION_ON 0b10000000 // 7 7 automatically restart receiver if it gets saturated or on packet collision
+
258 #define SX127X_RESTART_RX_WITHOUT_PLL_LOCK 0b01000000 // 6 6 manually restart receiver without frequency change
+
259 #define SX127X_RESTART_RX_WITH_PLL_LOCK 0b00100000 // 5 5 manually restart receiver with frequency change
+
260 #define SX127X_AFC_AUTO_OFF 0b00000000 // 4 4 no AFC performed (default)
+
261 #define SX127X_AFC_AUTO_ON 0b00010000 // 4 4 AFC performed at each receiver startup
+
262 #define SX127X_AGC_AUTO_OFF 0b00000000 // 3 3 LNA gain set manually by register
+
263 #define SX127X_AGC_AUTO_ON 0b00001000 // 3 3 LNA gain controlled by AGC
+
264 #define SX127X_RX_TRIGGER_NONE 0b00000000 // 2 0 receiver startup at: none
+
265 #define SX127X_RX_TRIGGER_RSSI_INTERRUPT 0b00000001 // 2 0 RSSI interrupt
+
266 #define SX127X_RX_TRIGGER_PREAMBLE_DETECT 0b00000110 // 2 0 preamble detected
+
267 #define SX127X_RX_TRIGGER_BOTH 0b00000111 // 2 0 RSSI interrupt and preamble detected
+
268 
+
269 // SX127X_REG_RSSI_CONFIG
+
270 #define SX127X_RSSI_SMOOTHING_SAMPLES_2 0b00000000 // 2 0 number of samples for RSSI average: 2
+
271 #define SX127X_RSSI_SMOOTHING_SAMPLES_4 0b00000001 // 2 0 4
+
272 #define SX127X_RSSI_SMOOTHING_SAMPLES_8 0b00000010 // 2 0 8 (default)
+
273 #define SX127X_RSSI_SMOOTHING_SAMPLES_16 0b00000011 // 2 0 16
+
274 #define SX127X_RSSI_SMOOTHING_SAMPLES_32 0b00000100 // 2 0 32
+
275 #define SX127X_RSSI_SMOOTHING_SAMPLES_64 0b00000101 // 2 0 64
+
276 #define SX127X_RSSI_SMOOTHING_SAMPLES_128 0b00000110 // 2 0 128
+
277 #define SX127X_RSSI_SMOOTHING_SAMPLES_256 0b00000111 // 2 0 256
+
278 
+
279 // SX127X_REG_RSSI_COLLISION
+
280 #define SX127X_RSSI_COLLISION_THRESHOLD 0x0A // 7 0 RSSI threshold in dB that will be considered a collision, default value: 10 dB
+
281 
+
282 // SX127X_REG_RSSI_THRESH
+
283 #define SX127X_RSSI_THRESHOLD 0xFF // 7 0 RSSI threshold that will trigger RSSI interrupt, RssiThreshold = RSSI_THRESHOLD / 2 [dBm]
+
284 
+
285 // SX127X_REG_RX_BW
+
286 #define SX127X_RX_BW_MANT_16 0b00000000 // 4 3 channel filter bandwidth: RxBw = F(XOSC) / (RxBwMant * 2^(RxBwExp + 2)) [kHz]
+
287 #define SX127X_RX_BW_MANT_20 0b00001000 // 4 3
+
288 #define SX127X_RX_BW_MANT_24 0b00010000 // 4 3 default RxBwMant parameter
+
289 #define SX127X_RX_BW_EXP 0b00000101 // 2 0 default RxBwExp parameter
+
290 
+
291 // SX127X_REG_AFC_BW
+
292 #define SX127X_RX_BW_MANT_AFC 0b00001000 // 4 3 default RxBwMant parameter used during AFC
+
293 #define SX127X_RX_BW_EXP_AFC 0b00000011 // 2 0 default RxBwExp parameter used during AFC
+
294 
+
295 // SX127X_REG_OOK_PEAK
+
296 #define SX127X_BIT_SYNC_OFF 0b00000000 // 5 5 bit synchronizer disabled (not allowed in packet mode)
+
297 #define SX127X_BIT_SYNC_ON 0b00100000 // 5 5 bit synchronizer enabled (default)
+
298 #define SX127X_OOK_THRESH_FIXED 0b00000000 // 4 3 OOK threshold type: fixed value
+
299 #define SX127X_OOK_THRESH_PEAK 0b00001000 // 4 3 peak mode (default)
+
300 #define SX127X_OOK_THRESH_AVERAGE 0b00010000 // 4 3 average mode
+
301 #define SX127X_OOK_PEAK_THRESH_STEP_0_5_DB 0b00000000 // 2 0 OOK demodulator step size: 0.5 dB (default)
+
302 #define SX127X_OOK_PEAK_THRESH_STEP_1_0_DB 0b00000001 // 2 0 1.0 dB
+
303 #define SX127X_OOK_PEAK_THRESH_STEP_1_5_DB 0b00000010 // 2 0 1.5 dB
+
304 #define SX127X_OOK_PEAK_THRESH_STEP_2_0_DB 0b00000011 // 2 0 2.0 dB
+
305 #define SX127X_OOK_PEAK_THRESH_STEP_3_0_DB 0b00000100 // 2 0 3.0 dB
+
306 #define SX127X_OOK_PEAK_THRESH_STEP_4_0_DB 0b00000101 // 2 0 4.0 dB
+
307 #define SX127X_OOK_PEAK_THRESH_STEP_5_0_DB 0b00000110 // 2 0 5.0 dB
+
308 #define SX127X_OOK_PEAK_THRESH_STEP_6_0_DB 0b00000111 // 2 0 6.0 dB
+
309 
+
310 // SX127X_REG_OOK_FIX
+
311 #define SX127X_OOK_FIXED_THRESHOLD 0x0C // 7 0 default fixed threshold for OOK data slicer
+
312 
+
313 // SX127X_REG_OOK_AVG
+
314 #define SX127X_OOK_PEAK_THRESH_DEC_1_1_CHIP 0b00000000 // 7 5 OOK demodulator step period: once per chip (default)
+
315 #define SX127X_OOK_PEAK_THRESH_DEC_1_2_CHIP 0b00100000 // 7 5 once every 2 chips
+
316 #define SX127X_OOK_PEAK_THRESH_DEC_1_4_CHIP 0b01000000 // 7 5 once every 4 chips
+
317 #define SX127X_OOK_PEAK_THRESH_DEC_1_8_CHIP 0b01100000 // 7 5 once every 8 chips
+
318 #define SX127X_OOK_PEAK_THRESH_DEC_2_1_CHIP 0b10000000 // 7 5 2 times per chip
+
319 #define SX127X_OOK_PEAK_THRESH_DEC_4_1_CHIP 0b10100000 // 7 5 4 times per chip
+
320 #define SX127X_OOK_PEAK_THRESH_DEC_8_1_CHIP 0b11000000 // 7 5 8 times per chip
+
321 #define SX127X_OOK_PEAK_THRESH_DEC_16_1_CHIP 0b11100000 // 7 5 16 times per chip
+
322 #define SX127X_OOK_AVERAGE_OFFSET_0_DB 0b00000000 // 3 2 OOK average threshold offset: 0.0 dB (default)
+
323 #define SX127X_OOK_AVERAGE_OFFSET_2_DB 0b00000100 // 3 2 2.0 dB
+
324 #define SX127X_OOK_AVERAGE_OFFSET_4_DB 0b00001000 // 3 2 4.0 dB
+
325 #define SX127X_OOK_AVERAGE_OFFSET_6_DB 0b00001100 // 3 2 6.0 dB
+
326 #define SX127X_OOK_AVG_THRESH_FILT_32_PI 0b00000000 // 1 0 OOK average filter coefficient: chip rate / 32*pi
+
327 #define SX127X_OOK_AVG_THRESH_FILT_8_PI 0b00000001 // 1 0 chip rate / 8*pi
+
328 #define SX127X_OOK_AVG_THRESH_FILT_4_PI 0b00000010 // 1 0 chip rate / 4*pi (default)
+
329 #define SX127X_OOK_AVG_THRESH_FILT_2_PI 0b00000011 // 1 0 chip rate / 2*pi
+
330 
+
331 // SX127X_REG_AFC_FEI
+
332 #define SX127X_AGC_START 0b00010000 // 4 4 manually start AGC sequence
+
333 #define SX127X_AFC_CLEAR 0b00000010 // 1 1 manually clear AFC register
+
334 #define SX127X_AFC_AUTO_CLEAR_OFF 0b00000000 // 0 0 AFC register will not be cleared at the start of AFC (default)
+
335 #define SX127X_AFC_AUTO_CLEAR_ON 0b00000001 // 0 0 AFC register will be cleared at the start of AFC
+
336 
+
337 // SX127X_REG_PREAMBLE_DETECT
+
338 #define SX127X_PREAMBLE_DETECTOR_OFF 0b00000000 // 7 7 preamble detection disabled
+
339 #define SX127X_PREAMBLE_DETECTOR_ON 0b10000000 // 7 7 preamble detection enabled (default)
+
340 #define SX127X_PREAMBLE_DETECTOR_1_BYTE 0b00000000 // 6 5 preamble detection size: 1 byte (default)
+
341 #define SX127X_PREAMBLE_DETECTOR_2_BYTE 0b00100000 // 6 5 2 bytes
+
342 #define SX127X_PREAMBLE_DETECTOR_3_BYTE 0b01000000 // 6 5 3 bytes
+
343 #define SX127X_PREAMBLE_DETECTOR_TOL 0x0A // 4 0 default number of tolerated errors per chip (4 chips per bit)
+
344 
+
345 // SX127X_REG_RX_TIMEOUT_1
+
346 #define SX127X_TIMEOUT_RX_RSSI_OFF 0x00 // 7 0 disable receiver timeout when RSSI interrupt doesn't occur (default)
+
347 
+
348 // SX127X_REG_RX_TIMEOUT_2
+
349 #define SX127X_TIMEOUT_RX_PREAMBLE_OFF 0x00 // 7 0 disable receiver timeout when preamble interrupt doesn't occur (default)
+
350 
+
351 // SX127X_REG_RX_TIMEOUT_3
+
352 #define SX127X_TIMEOUT_SIGNAL_SYNC_OFF 0x00 // 7 0 disable receiver timeout when sync address interrupt doesn't occur (default)
+
353 
+
354 // SX127X_REG_OSC
+
355 #define SX127X_RC_CAL_START 0b00000000 // 3 3 manually start RC oscillator calibration
+
356 #define SX127X_CLK_OUT_FXOSC 0b00000000 // 2 0 ClkOut frequency: F(XOSC)
+
357 #define SX127X_CLK_OUT_FXOSC_2 0b00000001 // 2 0 F(XOSC) / 2
+
358 #define SX127X_CLK_OUT_FXOSC_4 0b00000010 // 2 0 F(XOSC) / 4
+
359 #define SX127X_CLK_OUT_FXOSC_8 0b00000011 // 2 0 F(XOSC) / 8
+
360 #define SX127X_CLK_OUT_FXOSC_16 0b00000100 // 2 0 F(XOSC) / 16
+
361 #define SX127X_CLK_OUT_FXOSC_32 0b00000101 // 2 0 F(XOSC) / 32
+
362 #define SX127X_CLK_OUT_RC 0b00000110 // 2 0 RC
+
363 #define SX127X_CLK_OUT_OFF 0b00000111 // 2 0 disabled (default)
+
364 
+
365 // SX127X_REG_PREAMBLE_MSB_FSK + SX127X_REG_PREAMBLE_LSB_FSK
+
366 #define SX127X_PREAMBLE_SIZE_MSB 0x00 // 7 0 preamble size in bytes
+
367 #define SX127X_PREAMBLE_SIZE_LSB 0x03 // 7 0 default value: 3 bytes
+
368 
+
369 // SX127X_REG_SYNC_CONFIG
+
370 #define SX127X_AUTO_RESTART_RX_MODE_OFF 0b00000000 // 7 6 Rx mode restart after packet reception: disabled
+
371 #define SX127X_AUTO_RESTART_RX_MODE_NO_PLL 0b01000000 // 7 6 enabled, don't wait for PLL lock
+
372 #define SX127X_AUTO_RESTART_RX_MODE_PLL 0b10000000 // 7 6 enabled, wait for PLL lock (default)
+
373 #define SX127X_PREAMBLE_POLARITY_AA 0b00000000 // 5 5 preamble polarity: 0xAA = 0b10101010 (default)
+
374 #define SX127X_PREAMBLE_POLARITY_55 0b00100000 // 5 5 0x55 = 0b01010101
+
375 #define SX127X_SYNC_OFF 0b00000000 // 4 4 sync word disabled
+
376 #define SX127X_SYNC_ON 0b00010000 // 4 4 sync word enabled (default)
+
377 #define SX127X_SYNC_SIZE 0x03 // 2 0 sync word size in bytes, SyncSize = SYNC_SIZE + 1 bytes
+
378 
+
379 // SX127X_REG_SYNC_VALUE_1 - SX127X_REG_SYNC_VALUE_8
+
380 #define SX127X_SYNC_VALUE_1 0x01 // 7 0 sync word: 1st byte (MSB)
+
381 #define SX127X_SYNC_VALUE_2 0x01 // 7 0 2nd byte
+
382 #define SX127X_SYNC_VALUE_3 0x01 // 7 0 3rd byte
+
383 #define SX127X_SYNC_VALUE_4 0x01 // 7 0 4th byte
+
384 #define SX127X_SYNC_VALUE_5 0x01 // 7 0 5th byte
+
385 #define SX127X_SYNC_VALUE_6 0x01 // 7 0 6th byte
+
386 #define SX127X_SYNC_VALUE_7 0x01 // 7 0 7th byte
+
387 #define SX127X_SYNC_VALUE_8 0x01 // 7 0 8th byte (LSB)
+
388 
+
389 // SX127X_REG_PACKET_CONFIG_1
+
390 #define SX127X_PACKET_FIXED 0b00000000 // 7 7 packet format: fixed length
+
391 #define SX127X_PACKET_VARIABLE 0b10000000 // 7 7 variable length (default)
+
392 #define SX127X_DC_FREE_NONE 0b00000000 // 6 5 DC-free encoding: disabled (default)
+
393 #define SX127X_DC_FREE_MANCHESTER 0b00100000 // 6 5 Manchester
+
394 #define SX127X_DC_FREE_WHITENING 0b01000000 // 6 5 Whitening
+
395 #define SX127X_CRC_OFF 0b00000000 // 4 4 CRC disabled
+
396 #define SX127X_CRC_ON 0b00010000 // 4 4 CRC enabled (default)
+
397 #define SX127X_CRC_AUTOCLEAR_OFF 0b00001000 // 3 3 keep FIFO on CRC mismatch, issue payload ready interrupt
+
398 #define SX127X_CRC_AUTOCLEAR_ON 0b00000000 // 3 3 clear FIFO on CRC mismatch, do not issue payload ready interrupt
+
399 #define SX127X_ADDRESS_FILTERING_OFF 0b00000000 // 2 1 address filtering: none (default)
+
400 #define SX127X_ADDRESS_FILTERING_NODE 0b00000010 // 2 1 node
+
401 #define SX127X_ADDRESS_FILTERING_NODE_BROADCAST 0b00000100 // 2 1 node or broadcast
+
402 #define SX127X_CRC_WHITENING_TYPE_CCITT 0b00000000 // 0 0 CRC and whitening algorithms: CCITT CRC with standard whitening (default)
+
403 #define SX127X_CRC_WHITENING_TYPE_IBM 0b00000001 // 0 0 IBM CRC with alternate whitening
+
404 
+
405 // SX127X_REG_PACKET_CONFIG_2
+
406 #define SX127X_DATA_MODE_PACKET 0b01000000 // 6 6 data mode: packet (default)
+
407 #define SX127X_DATA_MODE_CONTINUOUS 0b00000000 // 6 6 continuous
+
408 #define SX127X_IO_HOME_OFF 0b00000000 // 5 5 io-homecontrol compatibility disabled (default)
+
409 #define SX127X_IO_HOME_ON 0b00100000 // 5 5 io-homecontrol compatibility enabled
+
410 
+
411 // SX127X_REG_FIFO_THRESH
+
412 #define SX127X_TX_START_FIFO_LEVEL 0b00000000 // 7 7 start packet transmission when: number of bytes in FIFO exceeds FIFO_THRESHOLD
+
413 #define SX127X_TX_START_FIFO_NOT_EMPTY 0b10000000 // 7 7 at least one byte in FIFO (default)
+
414 #define SX127X_FIFO_THRESH 0x0F // 5 0 FIFO level threshold
+
415 
+
416 // SX127X_REG_SEQ_CONFIG_1
+
417 #define SX127X_SEQUENCER_START 0b10000000 // 7 7 manually start sequencer
+
418 #define SX127X_SEQUENCER_STOP 0b01000000 // 6 6 manually stop sequencer
+
419 #define SX127X_IDLE_MODE_STANDBY 0b00000000 // 5 5 chip mode during sequencer idle mode: standby (default)
+
420 #define SX127X_IDLE_MODE_SLEEP 0b00100000 // 5 5 sleep
+
421 #define SX127X_FROM_START_LP_SELECTION 0b00000000 // 4 3 mode that will be set after starting sequencer: low power selection (default)
+
422 #define SX127X_FROM_START_RECEIVE 0b00001000 // 4 3 receive
+
423 #define SX127X_FROM_START_TRANSMIT 0b00010000 // 4 3 transmit
+
424 #define SX127X_FROM_START_TRANSMIT_FIFO_LEVEL 0b00011000 // 4 3 transmit on a FIFO level interrupt
+
425 #define SX127X_LP_SELECTION_SEQ_OFF 0b00000000 // 2 2 mode that will be set after exiting low power selection: sequencer off (default)
+
426 #define SX127X_LP_SELECTION_IDLE 0b00000100 // 2 2 idle state
+
427 #define SX127X_FROM_IDLE_TRANSMIT 0b00000000 // 1 1 mode that will be set after exiting idle mode: transmit (default)
+
428 #define SX127X_FROM_IDLE_RECEIVE 0b00000010 // 1 1 receive
+
429 #define SX127X_FROM_TRANSMIT_LP_SELECTION 0b00000000 // 0 0 mode that will be set after exiting transmit mode: low power selection (default)
+
430 #define SX127X_FROM_TRANSMIT_RECEIVE 0b00000001 // 0 0 receive
+
431 
+
432 // SX127X_REG_SEQ_CONFIG_2
+
433 #define SX127X_FROM_RECEIVE_PACKET_RECEIVED_PAYLOAD 0b00100000 // 7 5 mode that will be set after exiting receive mode: packet received on payload ready interrupt (default)
+
434 #define SX127X_FROM_RECEIVE_LP_SELECTION 0b01000000 // 7 5 low power selection
+
435 #define SX127X_FROM_RECEIVE_PACKET_RECEIVED_CRC_OK 0b01100000 // 7 5 packet received on CRC OK interrupt
+
436 #define SX127X_FROM_RECEIVE_SEQ_OFF_RSSI 0b10000000 // 7 5 sequencer off on RSSI interrupt
+
437 #define SX127X_FROM_RECEIVE_SEQ_OFF_SYNC_ADDR 0b10100000 // 7 5 sequencer off on sync address interrupt
+
438 #define SX127X_FROM_RECEIVE_SEQ_OFF_PREAMBLE_DETECT 0b11000000 // 7 5 sequencer off on preamble detect interrupt
+
439 #define SX127X_FROM_RX_TIMEOUT_RECEIVE 0b00000000 // 4 3 mode that will be set after Rx timeout: receive (default)
+
440 #define SX127X_FROM_RX_TIMEOUT_TRANSMIT 0b00001000 // 4 3 transmit
+
441 #define SX127X_FROM_RX_TIMEOUT_LP_SELECTION 0b00010000 // 4 3 low power selection
+
442 #define SX127X_FROM_RX_TIMEOUT_SEQ_OFF 0b00011000 // 4 3 sequencer off
+
443 #define SX127X_FROM_PACKET_RECEIVED_SEQ_OFF 0b00000000 // 2 0 mode that will be set after packet received: sequencer off (default)
+
444 #define SX127X_FROM_PACKET_RECEIVED_TRANSMIT 0b00000001 // 2 0 transmit
+
445 #define SX127X_FROM_PACKET_RECEIVED_LP_SELECTION 0b00000010 // 2 0 low power selection
+
446 #define SX127X_FROM_PACKET_RECEIVED_RECEIVE_FS 0b00000011 // 2 0 receive via FS
+
447 #define SX127X_FROM_PACKET_RECEIVED_RECEIVE 0b00000100 // 2 0 receive
+
448 
+
449 // SX127X_REG_TIMER_RESOL
+
450 #define SX127X_TIMER1_OFF 0b00000000 // 3 2 timer 1 resolution: disabled (default)
+
451 #define SX127X_TIMER1_RESOLUTION_64_US 0b00000100 // 3 2 64 us
+
452 #define SX127X_TIMER1_RESOLUTION_4_1_MS 0b00001000 // 3 2 4.1 ms
+
453 #define SX127X_TIMER1_RESOLUTION_262_MS 0b00001100 // 3 2 262 ms
+
454 #define SX127X_TIMER2_OFF 0b00000000 // 3 2 timer 2 resolution: disabled (default)
+
455 #define SX127X_TIMER2_RESOLUTION_64_US 0b00000001 // 3 2 64 us
+
456 #define SX127X_TIMER2_RESOLUTION_4_1_MS 0b00000010 // 3 2 4.1 ms
+
457 #define SX127X_TIMER2_RESOLUTION_262_MS 0b00000011 // 3 2 262 ms
+
458 
+
459 // SX127X_REG_TIMER1_COEF
+
460 #define SX127X_TIMER1_COEFFICIENT 0xF5 // 7 0 multiplication coefficient for timer 1
+
461 
+
462 // SX127X_REG_TIMER2_COEF
+
463 #define SX127X_TIMER2_COEFFICIENT 0x20 // 7 0 multiplication coefficient for timer 2
+
464 
+
465 // SX127X_REG_IMAGE_CAL
+
466 #define SX127X_AUTO_IMAGE_CAL_OFF 0b00000000 // 7 7 temperature calibration disabled (default)
+
467 #define SX127X_AUTO_IMAGE_CAL_ON 0b10000000 // 7 7 temperature calibration enabled
+
468 #define SX127X_IMAGE_CAL_START 0b01000000 // 6 6 start temperature calibration
+
469 #define SX127X_IMAGE_CAL_RUNNING 0b00100000 // 5 5 temperature calibration is on-going
+
470 #define SX127X_IMAGE_CAL_COMPLETE 0b00000000 // 5 5 temperature calibration finished
+
471 #define SX127X_TEMP_CHANGED 0b00001000 // 3 3 temperature changed more than TEMP_THRESHOLD since last calibration
+
472 #define SX127X_TEMP_THRESHOLD_5_DEG_C 0b00000000 // 2 1 temperature change threshold: 5 deg. C
+
473 #define SX127X_TEMP_THRESHOLD_10_DEG_C 0b00000010 // 2 1 10 deg. C (default)
+
474 #define SX127X_TEMP_THRESHOLD_15_DEG_C 0b00000100 // 2 1 15 deg. C
+
475 #define SX127X_TEMP_THRESHOLD_20_DEG_C 0b00000110 // 2 1 20 deg. C
+
476 #define SX127X_TEMP_MONITOR_ON 0b00000000 // 0 0 temperature monitoring enabled (default)
+
477 #define SX127X_TEMP_MONITOR_OFF 0b00000001 // 0 0 temperature monitoring disabled
+
478 
+
479 // SX127X_REG_LOW_BAT
+
480 #define SX127X_LOW_BAT_OFF 0b00000000 // 3 3 low battery detector disabled
+
481 #define SX127X_LOW_BAT_ON 0b00001000 // 3 3 low battery detector enabled
+
482 #define SX127X_LOW_BAT_TRIM_1_695_V 0b00000000 // 2 0 battery voltage threshold: 1.695 V
+
483 #define SX127X_LOW_BAT_TRIM_1_764_V 0b00000001 // 2 0 1.764 V
+
484 #define SX127X_LOW_BAT_TRIM_1_835_V 0b00000010 // 2 0 1.835 V (default)
+
485 #define SX127X_LOW_BAT_TRIM_1_905_V 0b00000011 // 2 0 1.905 V
+
486 #define SX127X_LOW_BAT_TRIM_1_976_V 0b00000100 // 2 0 1.976 V
+
487 #define SX127X_LOW_BAT_TRIM_2_045_V 0b00000101 // 2 0 2.045 V
+
488 #define SX127X_LOW_BAT_TRIM_2_116_V 0b00000110 // 2 0 2.116 V
+
489 #define SX127X_LOW_BAT_TRIM_2_185_V 0b00000111 // 2 0 2.185 V
+
490 
+
491 // SX127X_REG_IRQ_FLAGS_1
+
492 #define SX127X_FLAG_MODE_READY 0b10000000 // 7 7 requested mode is ready
+
493 #define SX127X_FLAG_RX_READY 0b01000000 // 6 6 reception ready (after RSSI, AGC, AFC)
+
494 #define SX127X_FLAG_TX_READY 0b00100000 // 5 5 transmission ready (after PA ramp-up)
+
495 #define SX127X_FLAG_PLL_LOCK 0b00010000 // 4 4 PLL locked
+
496 #define SX127X_FLAG_RSSI 0b00001000 // 3 3 RSSI value exceeds RSSI threshold
+
497 #define SX127X_FLAG_TIMEOUT 0b00000100 // 2 2 timeout occurred
+
498 #define SX127X_FLAG_PREAMBLE_DETECT 0b00000010 // 1 1 valid preamble was detected
+
499 #define SX127X_FLAG_SYNC_ADDRESS_MATCH 0b00000001 // 0 0 sync address matched
+
500 
+
501 // SX127X_REG_IRQ_FLAGS_2
+
502 #define SX127X_FLAG_FIFO_FULL 0b10000000 // 7 7 FIFO is full
+
503 #define SX127X_FLAG_FIFO_EMPTY 0b01000000 // 6 6 FIFO is empty
+
504 #define SX127X_FLAG_FIFO_LEVEL 0b00100000 // 5 5 number of bytes in FIFO exceeds FIFO_THRESHOLD
+
505 #define SX127X_FLAG_FIFO_OVERRUN 0b00010000 // 4 4 FIFO overrun occurred
+
506 #define SX127X_FLAG_PACKET_SENT 0b00001000 // 3 3 packet was successfully sent
+
507 #define SX127X_FLAG_PAYLOAD_READY 0b00000100 // 2 2 packet was successfully received
+
508 #define SX127X_FLAG_CRC_OK 0b00000010 // 1 1 CRC check passed
+
509 #define SX127X_FLAG_LOW_BAT 0b00000001 // 0 0 battery voltage dropped below threshold
+
510 
+
511 // SX127X_REG_DIO_MAPPING_1
+
512 #define SX127X_DIO0_CONT_SYNC_ADDRESS 0b00000000 // 7 6
+
513 #define SX127X_DIO0_CONT_TX_READY 0b00000000 // 7 6
+
514 #define SX127X_DIO0_CONT_RSSI_PREAMBLE_DETECTED 0b01000000 // 7 6
+
515 #define SX127X_DIO0_CONT_RX_READY 0b10000000 // 7 6
+
516 #define SX127X_DIO0_PACK_PAYLOAD_READY 0b00000000 // 7 6
+
517 #define SX127X_DIO0_PACK_PACKET_SENT 0b00000000 // 7 6
+
518 #define SX127X_DIO0_PACK_CRC_OK 0b01000000 // 7 6
+
519 #define SX127X_DIO0_PACK_TEMP_CHANGE_LOW_BAT 0b11000000 // 7 6
+
520 #define SX127X_DIO1_CONT_DCLK 0b00000000 // 5 4
+
521 #define SX127X_DIO1_CONT_RSSI_PREAMBLE_DETECTED 0b00010000 // 5 4
+
522 #define SX127X_DIO1_PACK_FIFO_LEVEL 0b00000000 // 5 4
+
523 #define SX127X_DIO1_PACK_FIFO_EMPTY 0b00010000 // 5 4
+
524 #define SX127X_DIO1_PACK_FIFO_FULL 0b00100000 // 5 4
+
525 #define SX127X_DIO2_CONT_DATA 0b00000000 // 3 2
+
526 
+
527 // SX1272_REG_PLL_HOP + SX1278_REG_PLL_HOP
+
528 #define SX127X_FAST_HOP_OFF 0b00000000 // 7 7 carrier frequency validated when FRF registers are written
+
529 #define SX127X_FAST_HOP_ON 0b10000000 // 7 7 carrier frequency validated when FS modes are requested
+
530 
+
531 // SX1272_REG_TCXO + SX1278_REG_TCXO
+
532 #define SX127X_TCXO_INPUT_EXTERNAL 0b00000000 // 4 4 use external crystal oscillator
+
533 #define SX127X_TCXO_INPUT_EXTERNAL_CLIPPED 0b00010000 // 4 4 use external crystal oscillator clipped sine connected to XTA pin
+
534 
+
535 // SX1272_REG_PLL + SX1278_REG_PLL
+
536 #define SX127X_PLL_BANDWIDTH_75_KHZ 0b00000000 // 7 6 PLL bandwidth: 75 kHz
+
537 #define SX127X_PLL_BANDWIDTH_150_KHZ 0b01000000 // 7 6 150 kHz
+
538 #define SX127X_PLL_BANDWIDTH_225_KHZ 0b10000000 // 7 6 225 kHz
+
539 #define SX127X_PLL_BANDWIDTH_300_KHZ 0b11000000 // 7 6 300 kHz (default)
+
540 
+
547 class SX127x: public PhysicalLayer {
+
548  public:
+
549  // introduce PhysicalLayer overloads
+ + + + +
554 
+
555  // constructor
+
556 
+
562  SX127x(Module* mod);
+
563 
+
564  // basic methods
+
565 
+
577  int16_t begin(uint8_t chipVersion, uint8_t syncWord, uint16_t preambleLength);
+
578 
+
582  virtual void reset() = 0;
+
583 
+
601  int16_t beginFSK(uint8_t chipVersion, float br, float freqDev, float rxBw, uint16_t preambleLength, bool enableOOK);
+
602 
+
615  int16_t transmit(uint8_t* data, size_t len, uint8_t addr = 0) override;
+
616 
+
627  int16_t receive(uint8_t* data, size_t len) override;
+
628 
+
634  int16_t scanChannel();
+
635 
+
642  int16_t sleep();
+
643 
+
649  int16_t standby() override;
+
650 
+
659  int16_t transmitDirect(uint32_t frf = 0) override;
+
660 
+
667  int16_t receiveDirect() override;
+
668 
+
674  int16_t packetMode();
+
675 
+
676  // interrupt methods
+
677 
+
683  void setDio0Action(void (*func)(void));
+
684 
+
688  void clearDio0Action();
+
689 
+
695  void setDio1Action(void (*func)(void));
+
696 
+
700  void clearDio1Action();
+
701 
+
713  int16_t startTransmit(uint8_t* data, size_t len, uint8_t addr = 0) override;
+
714 
+
724  int16_t startReceive(uint8_t len = 0, uint8_t mode = SX127X_RXCONTINUOUS);
+
725 
+
735  int16_t readData(uint8_t* data, size_t len) override;
+
736 
+
737 
+
738  // configuration methods
+
739 
+
747  int16_t setSyncWord(uint8_t syncWord);
+
748 
+
756  int16_t setCurrentLimit(uint8_t currentLimit);
+
757 
+
765  int16_t setPreambleLength(uint16_t preambleLength);
+
766 
+
774  float getFrequencyError(bool autoCorrect = false);
+
775 
+
781  float getSNR();
+
782 
+
788  float getDataRate() const;
+
789 
+
797  int16_t setBitRate(float br);
+
798 
+
806  int16_t setFrequencyDeviation(float freqDev) override;
+
807 
+
815  int16_t setRxBandwidth(float rxBw);
+
816 
+
826  int16_t setSyncWord(uint8_t* syncWord, size_t len);
+
827 
+
835  int16_t setNodeAddress(uint8_t nodeAddr);
+
836 
+
844  int16_t setBroadcastAddress(uint8_t broadAddr);
+
845 
+
851  int16_t disableAddressFiltering();
+
852 
+
860  int16_t setOOK(bool enableOOK);
+
861 
+
869  size_t getPacketLength(bool update = true) override;
+
870 
+
878  int16_t fixedPacketLengthMode(uint8_t len = SX127X_MAX_PACKET_LENGTH_FSK);
+
879 
+
887  int16_t variablePacketLengthMode(uint8_t maxLen = SX127X_MAX_PACKET_LENGTH_FSK);
+
888 
+
899  int16_t setRSSIConfig(uint8_t smoothingSamples, int8_t offset = 0);
+
900 
+
909  int16_t setEncoding(uint8_t encoding) override;
+
910 
+
918  uint16_t getIRQFlags();
+
919 
+
925  uint8_t getModemStatus();
+
926 
+
933  int8_t getTempRaw();
+
934 
+
943  void setRfSwitchPins(RADIOLIB_PIN_TYPE rxEn, RADIOLIB_PIN_TYPE txEn);
+
944 
+
950  uint8_t random();
+
951 
+
957  int16_t getChipVersion();
+
958 
+
966  int16_t invertIQ(bool invertIQ);
+
967 
+
968 #ifndef RADIOLIB_GODMODE
+
969  protected:
+
970 #endif
+
971  Module* _mod;
+
972 
+
973  float _freq = 0;
+
974  float _bw = 0;
+
975  uint8_t _sf = 0;
+
976  uint8_t _cr = 0;
+
977  float _br = 0;
+
978  float _rxBw = 0;
+
979  bool _ook = false;
+
980  bool _crcEnabled = false;
+
981  size_t _packetLength = 0;
+
982 
+
983  int16_t setFrequencyRaw(float newFreq);
+
984  int16_t config();
+
985  int16_t configFSK();
+
986  int16_t getActiveModem();
+
987  int16_t directMode();
+
988  int16_t setPacketMode(uint8_t mode, uint8_t len);
+
989 
+
990 #ifndef RADIOLIB_GODMODE
+
991  private:
+
992 #endif
+
993  float _dataRate = 0;
+
994  bool _packetLengthQueried = false; // FSK packet length is the first byte in FIFO, length can only be queried once
+
995  uint8_t _packetLengthConfig = SX127X_PACKET_VARIABLE;
+
996 
+
997  bool findChip(uint8_t ver);
+
998  int16_t setMode(uint8_t mode);
+
999  int16_t setActiveModem(uint8_t modem);
+
1000  void clearIRQFlags();
+
1001  void clearFIFO(size_t count); // used mostly to clear remaining bytes in FIFO after a packet read
+
1002 };
+
1003 
+
1004 #endif
+
1005 
+
1006 #endif
+
int16_t transmit(__FlashStringHelper *fstr, uint8_t addr=0)
Arduino Flash String transmit method.
Definition: PhysicalLayer.cpp:8
+
int16_t setNodeAddress(uint8_t nodeAddr)
Sets FSK node address. Calling this method will enable address filtering. Only available in FSK mode.
Definition: SX127x.cpp:793
+
int8_t getTempRaw()
Reads uncalibrated temperature value. This function will change operating mode and should not be call...
Definition: SX127x.cpp:1009
+
int16_t variablePacketLengthMode(uint8_t maxLen=SX127X_MAX_PACKET_LENGTH_FSK)
Set modem in variable packet length mode. Available in FSK mode only.
Definition: SX127x.cpp:905
+
int16_t invertIQ(bool invertIQ)
Enables/disables Invert the LoRa I and Q signals.
Definition: SX127x.cpp:1193
+
int16_t setEncoding(uint8_t encoding) override
Sets transmission encoding. Only available in FSK mode. Allowed values are RADIOLIB_ENCODING_NRZ,...
Definition: SX127x.cpp:932
+
void setDio1Action(void(*func)(void))
Set interrupt service routine function to call when DIO1 activates.
Definition: SX127x.cpp:410
+
int16_t sleep()
Sets the LoRa module to sleep to save power. Module will not be able to transmit or receive any data ...
Definition: SX127x.cpp:277
+
int16_t startReceive(uint8_t len=0, uint8_t mode=SX127X_RXCONTINUOUS)
Interrupt-driven receive method. DIO0 will be activated when full valid packet is received.
Definition: SX127x.cpp:358
+
int16_t readData(uint8_t *data, size_t len) override
Reads data that was received after calling startReceive method. This method reads len characters.
Definition: SX127x.cpp:485
+
void clearDio1Action()
Clears interrupt service routine to call when DIO1 activates.
Definition: SX127x.cpp:417
+
int16_t setSyncWord(uint8_t syncWord)
Sets LoRa sync word. Only available in LoRa mode.
Definition: SX127x.cpp:542
+
int16_t readData(String &str, size_t len=0)
Reads data that was received after calling startReceive method.
Definition: PhysicalLayer.cpp:57
+
int16_t beginFSK(uint8_t chipVersion, float br, float freqDev, float rxBw, uint16_t preambleLength, bool enableOOK)
Initialization method for FSK modem. Will be called with appropriate parameters when calling FSK init...
Definition: SX127x.cpp:55
+
int16_t receiveDirect() override
Enables direct reception mode on pins DIO1 (clock) and DIO2 (data). While in direct mode,...
Definition: SX127x.cpp:319
+
void setDio0Action(void(*func)(void))
Set interrupt service routine function to call when DIO0 activates.
Definition: SX127x.cpp:402
+
uint8_t random()
Get one truly random byte from RSSI noise.
Definition: SX127x.cpp:980
+
int16_t setFrequencyDeviation(float freqDev) override
Sets FSK frequency deviation from carrier frequency. Allowed values depend on bit rate setting and mu...
Definition: SX127x.cpp:705
+
float getDataRate() const
Get data rate of the latest transmitted packet.
Definition: SX127x.cpp:672
+
int16_t transmit(uint8_t *data, size_t len, uint8_t addr=0) override
Binary transmit method. Will transmit arbitrary binary data up to 255 bytes long using LoRa or up to ...
Definition: SX127x.cpp:126
+
int16_t fixedPacketLengthMode(uint8_t len=SX127X_MAX_PACKET_LENGTH_FSK)
Set modem in fixed packet length mode. Available in FSK mode only.
Definition: SX127x.cpp:901
+
void setRfSwitchPins(RADIOLIB_PIN_TYPE rxEn, RADIOLIB_PIN_TYPE txEn)
Some modules contain external RF switch controlled by two pins. This function gives RadioLib control ...
Definition: SX127x.cpp:976
+
int16_t disableAddressFiltering()
Disables FSK address filtering.
Definition: SX127x.cpp:821
+
int16_t transmitDirect(uint32_t frf=0) override
Enables direct transmission mode on pins DIO1 (clock) and DIO2 (data). While in direct mode,...
Definition: SX127x.cpp:293
+
int16_t startTransmit(uint8_t *data, size_t len, uint8_t addr=0) override
Interrupt-driven binary transmit method. Will start transmitting arbitrary binary data up to 255 byte...
Definition: SX127x.cpp:424
+
int16_t setBroadcastAddress(uint8_t broadAddr)
Sets FSK broadcast address. Calling this method will enable address filtering. Only available in FSK ...
Definition: SX127x.cpp:807
+
uint8_t getModemStatus()
Reads modem status. Only available in LoRa mode.
Definition: SX127x.cpp:966
+
int16_t standby() override
Sets the LoRa module to standby.
Definition: SX127x.cpp:285
+
Base class for SX127x series. All derived classes for SX127x (e.g. SX1278 or SX1272) inherit from thi...
Definition: SX127x.h:547
+
float getSNR()
Gets signal-to-noise ratio of the latest received packet.
Definition: SX127x.cpp:661
+
virtual void reset()=0
Reset method. Will reset the chip to the default state using RST pin. Declared pure virtual since SX1...
+
int16_t begin(uint8_t chipVersion, uint8_t syncWord, uint16_t preambleLength)
Initialization method. Will be called with appropriate parameters when calling initialization method ...
Definition: SX127x.cpp:8
+
int16_t setPreambleLength(uint16_t preambleLength)
Sets LoRa or FSK preamble length. Allowed values range from 6 to 65535 in LoRa mode or 0 to 65535 in ...
Definition: SX127x.cpp:579
+
int16_t setBitRate(float br)
Sets FSK bit rate. Allowed values range from 1.2 to 300 kbps. Only available in FSK mode.
Definition: SX127x.cpp:676
+
Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN....
Definition: PhysicalLayer.h:13
+
int16_t receive(String &str, size_t len=0)
Arduino String receive method.
Definition: PhysicalLayer.cpp:98
+
void clearDio0Action()
Clears interrupt service routine to call when DIO0 activates.
Definition: SX127x.cpp:406
+
uint16_t getIRQFlags()
Reads currently active IRQ flags, can be used to check which event caused an interrupt....
Definition: SX127x.cpp:951
+
int16_t setRSSIConfig(uint8_t smoothingSamples, int8_t offset=0)
Sets RSSI measurement configuration in FSK mode.
Definition: SX127x.cpp:909
+
int16_t setOOK(bool enableOOK)
Enables/disables OOK modulation instead of FSK.
Definition: SX127x.cpp:839
+
int16_t setRxBandwidth(float rxBw)
Sets FSK receiver bandwidth. Allowed values range from 2.6 to 250 kHz. Only available in FSK mode.
Definition: SX127x.cpp:734
+
Implements all common low-level SPI/UART/I2C methods to control the wireless module....
Definition: Module.h:17
+
int16_t scanChannel()
Performs scan for valid LoRa preamble in the current channel.
Definition: SX127x.cpp:238
+
int16_t receive(uint8_t *data, size_t len) override
Binary receive method. Will attempt to receive arbitrary binary data up to 255 bytes long using LoRa ...
Definition: SX127x.cpp:193
+
int16_t getChipVersion()
Read version SPI register. Should return SX1278_CHIP_VERSION (0x12) or SX1272_CHIP_VERSION (0x22) if ...
Definition: SX127x.cpp:1005
+
size_t getPacketLength(bool update=true) override
Query modem for the packet length of received payload.
Definition: SX127x.cpp:873
+
SX127x(Module *mod)
Default constructor. Called internally when creating new LoRa instance.
Definition: SX127x.cpp:4
+
int16_t packetMode()
Disables direct mode and enables packet mode, allowing the module to receive packets....
Definition: SX127x.cpp:349
+
int16_t setCurrentLimit(uint8_t currentLimit)
Sets current limit for over current protection at transmitter amplifier. Allowed values range from 45...
Definition: SX127x.cpp:555
+
float getFrequencyError(bool autoCorrect=false)
Gets frequency error of the latest received packet.
Definition: SX127x.cpp:608
+
int16_t startTransmit(String &str, uint8_t addr=0)
Interrupt-driven Arduino String transmit method. Unlike the standard transmit method,...
Definition: PhysicalLayer.cpp:49
diff --git a/_s_x1280_8h_source.html b/_s_x1280_8h_source.html index f2baba41..e3a5b441 100644 --- a/_s_x1280_8h_source.html +++ b/_s_x1280_8h_source.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/modules/SX128x/SX1280.h Source File @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -84,22 +86,52 @@ $(document).ready(function(){initNavTree('_s_x1280_8h_source.html','');});
SX1280.h
-
1 #if !defined(_RADIOLIB_SX1280_H)
2 #define _RADIOLIB_SX1280_H
3 
4 #include "../../TypeDef.h"
5 
6 #if !defined(RADIOLIB_EXCLUDE_SX128X)
7 
8 #include "../../Module.h"
9 #include "SX128x.h"
10 #include "SX1281.h"
11 
17 class SX1280: public SX1281 {
18  public:
24  SX1280(Module* mod);
25 
35  int16_t range(bool master, uint32_t addr);
36 
46  int16_t startRanging(bool master, uint32_t addr);
47 
53  float getRangingResult();
54 
55 #ifndef RADIOLIB_GODMODE
56  private:
57 #endif
58 
59 };
60 
61 #endif
62 
63 #endif
Derived class for SX1280 modules.
Definition: SX1280.h:17
-
int16_t range(bool master, uint32_t addr)
Blocking ranging method.
Definition: SX1280.cpp:8
-
int16_t startRanging(bool master, uint32_t addr)
Interrupt-driven ranging method.
Definition: SX1280.cpp:34
-
Derived class for SX1281 modules.
Definition: SX1281.h:16
-
Implements all common low-level SPI/UART/I2C methods to control the wireless module. Every module class contains one private instance of this class.
Definition: Module.h:17
-
float getRangingResult()
Gets ranging result of the last ranging exchange.
Definition: SX1280.cpp:104
-
SX1280(Module *mod)
Default constructor.
Definition: SX1280.cpp:4
+
1 #if !defined(_RADIOLIB_SX1280_H)
+
2 #define _RADIOLIB_SX1280_H
+
3 
+
4 #include "../../TypeDef.h"
+
5 
+
6 #if !defined(RADIOLIB_EXCLUDE_SX128X)
+
7 
+
8 #include "../../Module.h"
+
9 #include "SX128x.h"
+
10 #include "SX1281.h"
+
11 
+
17 class SX1280: public SX1281 {
+
18  public:
+
24  SX1280(Module* mod);
+
25 
+
35  int16_t range(bool master, uint32_t addr);
+
36 
+
46  int16_t startRanging(bool master, uint32_t addr);
+
47 
+
53  float getRangingResult();
+
54 
+
55 #ifndef RADIOLIB_GODMODE
+
56  private:
+
57 #endif
+
58 
+
59 };
+
60 
+
61 #endif
+
62 
+
63 #endif
+
SX1280(Module *mod)
Default constructor.
Definition: SX1280.cpp:4
+
int16_t startRanging(bool master, uint32_t addr)
Interrupt-driven ranging method.
Definition: SX1280.cpp:34
+
Derived class for SX1280 modules.
Definition: SX1280.h:17
+
float getRangingResult()
Gets ranging result of the last ranging exchange.
Definition: SX1280.cpp:104
+
Implements all common low-level SPI/UART/I2C methods to control the wireless module....
Definition: Module.h:17
+
Derived class for SX1281 modules.
Definition: SX1281.h:16
+
int16_t range(bool master, uint32_t addr)
Blocking ranging method.
Definition: SX1280.cpp:8
diff --git a/_s_x1281_8h_source.html b/_s_x1281_8h_source.html index 4a039e9a..e4a2aa9e 100644 --- a/_s_x1281_8h_source.html +++ b/_s_x1281_8h_source.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/modules/SX128x/SX1281.h Source File @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -84,19 +86,42 @@ $(document).ready(function(){initNavTree('_s_x1281_8h_source.html','');});
SX1281.h
-
1 #if !defined(_RADIOLIB_SX1281_H)
2 #define _RADIOLIB_SX1281_H
3 
4 #include "../../TypeDef.h"
5 
6 #if !defined(RADIOLIB_EXCLUDE_SX128X)
7 
8 #include "../../Module.h"
9 #include "SX128x.h"
10 
16 class SX1281: public SX128x {
17  public:
23  SX1281(Module* mod);
24 
25 #ifndef RADIOLIB_GODMODE
26  private:
27 #endif
28 
29 };
30 
31 #endif
32 
33 #endif
Derived class for SX1281 modules.
Definition: SX1281.h:16
-
SX1281(Module *mod)
Default constructor.
Definition: SX1281.cpp:4
-
Implements all common low-level SPI/UART/I2C methods to control the wireless module. Every module class contains one private instance of this class.
Definition: Module.h:17
-
Base class for SX128x series. All derived classes for SX128x (e.g. SX1280 or SX1281) inherit from thi...
Definition: SX128x.h:339
+
1 #if !defined(_RADIOLIB_SX1281_H)
+
2 #define _RADIOLIB_SX1281_H
+
3 
+
4 #include "../../TypeDef.h"
+
5 
+
6 #if !defined(RADIOLIB_EXCLUDE_SX128X)
+
7 
+
8 #include "../../Module.h"
+
9 #include "SX128x.h"
+
10 
+
16 class SX1281: public SX128x {
+
17  public:
+
23  SX1281(Module* mod);
+
24 
+
25 #ifndef RADIOLIB_GODMODE
+
26  private:
+
27 #endif
+
28 
+
29 };
+
30 
+
31 #endif
+
32 
+
33 #endif
+
Base class for SX128x series. All derived classes for SX128x (e.g. SX1280 or SX1281) inherit from thi...
Definition: SX128x.h:339
+
SX1281(Module *mod)
Default constructor.
Definition: SX1281.cpp:4
+
Implements all common low-level SPI/UART/I2C methods to control the wireless module....
Definition: Module.h:17
+
Derived class for SX1281 modules.
Definition: SX1281.h:16
diff --git a/_s_x1282_8h_source.html b/_s_x1282_8h_source.html index a82eac6b..c53d20fb 100644 --- a/_s_x1282_8h_source.html +++ b/_s_x1282_8h_source.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/modules/SX128x/SX1282.h Source File @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -84,19 +86,43 @@ $(document).ready(function(){initNavTree('_s_x1282_8h_source.html','');});
SX1282.h
-
1 #if !defined(_RADIOLIB_SX1282_H)
2 #define _RADIOLIB_SX1282_H
3 
4 #include "../../TypeDef.h"
5 
6 #if !defined(RADIOLIB_EXCLUDE_SX128X)
7 
8 #include "../../Module.h"
9 #include "SX128x.h"
10 #include "SX1280.h"
11 
17 class SX1282: public SX1280 {
18  public:
24  SX1282(Module* mod);
25 
26 #ifndef RADIOLIB_GODMODE
27  private:
28 #endif
29 
30 };
31 
32 #endif
33 
34 #endif
Derived class for SX1280 modules.
Definition: SX1280.h:17
-
SX1282(Module *mod)
Default constructor.
Definition: SX1282.cpp:5
-
Implements all common low-level SPI/UART/I2C methods to control the wireless module. Every module class contains one private instance of this class.
Definition: Module.h:17
-
Derived class for SX1282 modules.
Definition: SX1282.h:17
+
1 #if !defined(_RADIOLIB_SX1282_H)
+
2 #define _RADIOLIB_SX1282_H
+
3 
+
4 #include "../../TypeDef.h"
+
5 
+
6 #if !defined(RADIOLIB_EXCLUDE_SX128X)
+
7 
+
8 #include "../../Module.h"
+
9 #include "SX128x.h"
+
10 #include "SX1280.h"
+
11 
+
17 class SX1282: public SX1280 {
+
18  public:
+
24  SX1282(Module* mod);
+
25 
+
26 #ifndef RADIOLIB_GODMODE
+
27  private:
+
28 #endif
+
29 
+
30 };
+
31 
+
32 #endif
+
33 
+
34 #endif
+
Derived class for SX1282 modules.
Definition: SX1282.h:17
+
Derived class for SX1280 modules.
Definition: SX1280.h:17
+
Implements all common low-level SPI/UART/I2C methods to control the wireless module....
Definition: Module.h:17
+
SX1282(Module *mod)
Default constructor.
Definition: SX1282.cpp:5
diff --git a/_s_x128x_8h_source.html b/_s_x128x_8h_source.html index 8025c50b..9d300187 100644 --- a/_s_x128x_8h_source.html +++ b/_s_x128x_8h_source.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/modules/SX128x/SX128x.h Source File @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -84,63 +86,557 @@ $(document).ready(function(){initNavTree('_s_x128x_8h_source.html','');});
SX128x.h
-
1 #if !defined(_RADIOLIB_SX128X_H)
2 #define _RADIOLIB_SX128X_H
3 
4 #include "../../TypeDef.h"
5 
6 #if !defined(RADIOLIB_EXCLUDE_SX128X)
7 
8 #include "../../Module.h"
9 
10 #include "../../protocols/PhysicalLayer/PhysicalLayer.h"
11 
12 // SX128X physical layer properties
13 #define SX128X_FREQUENCY_STEP_SIZE 198.3642578
14 #define SX128X_MAX_PACKET_LENGTH 255
15 #define SX128X_CRYSTAL_FREQ 52.0
16 #define SX128X_DIV_EXPONENT 18
17 
18 // SX128X SPI commands
19 #define SX128X_CMD_NOP 0x00
20 #define SX128X_CMD_GET_STATUS 0xC0
21 #define SX128X_CMD_WRITE_REGISTER 0x18
22 #define SX128X_CMD_READ_REGISTER 0x19
23 #define SX128X_CMD_WRITE_BUFFER 0x1A
24 #define SX128X_CMD_READ_BUFFER 0x1B
25 #define SX128X_CMD_SET_SLEEP 0x84
26 #define SX128X_CMD_SET_STANDBY 0x80
27 #define SX128X_CMD_SET_FS 0xC1
28 #define SX128X_CMD_SET_TX 0x83
29 #define SX128X_CMD_SET_RX 0x82
30 #define SX128X_CMD_SET_RX_DUTY_CYCLE 0x94
31 #define SX128X_CMD_SET_CAD 0xC5
32 #define SX128X_CMD_SET_TX_CONTINUOUS_WAVE 0xD1
33 #define SX128X_CMD_SET_TX_CONTINUOUS_PREAMBLE 0xD2
34 #define SX128X_CMD_SET_PACKET_TYPE 0x8A
35 #define SX128X_CMD_GET_PACKET_TYPE 0x03
36 #define SX128X_CMD_SET_RF_FREQUENCY 0x86
37 #define SX128X_CMD_SET_TX_PARAMS 0x8E
38 #define SX128X_CMD_SET_CAD_PARAMS 0x88
39 #define SX128X_CMD_SET_BUFFER_BASE_ADDRESS 0x8F
40 #define SX128X_CMD_SET_MODULATION_PARAMS 0x8B
41 #define SX128X_CMD_SET_PACKET_PARAMS 0x8C
42 #define SX128X_CMD_GET_RX_BUFFER_STATUS 0x17
43 #define SX128X_CMD_GET_PACKET_STATUS 0x1D
44 #define SX128X_CMD_GET_RSSI_INST 0x1F
45 #define SX128X_CMD_SET_DIO_IRQ_PARAMS 0x8D
46 #define SX128X_CMD_GET_IRQ_STATUS 0x15
47 #define SX128X_CMD_CLEAR_IRQ_STATUS 0x97
48 #define SX128X_CMD_SET_REGULATOR_MODE 0x96
49 #define SX128X_CMD_SET_SAVE_CONTEXT 0xD5
50 #define SX128X_CMD_SET_AUTO_TX 0x98
51 #define SX128X_CMD_SET_AUTO_FS 0x9E
52 #define SX128X_CMD_SET_PERF_COUNTER_MODE 0x9C
53 #define SX128X_CMD_SET_LONG_PREAMBLE 0x9B
54 #define SX128X_CMD_SET_UART_SPEED 0x9D
55 #define SX128X_CMD_SET_RANGING_ROLE 0xA3
56 #define SX128X_CMD_SET_ADVANCED_RANGING 0x9A
57 
58 // SX128X register map
59 #define SX128X_REG_SYNC_WORD_1_BYTE_4 0x09CE
60 #define SX128X_REG_SYNC_WORD_1_BYTE_3 0x09CF
61 #define SX128X_REG_SYNC_WORD_1_BYTE_2 0x09D0
62 #define SX128X_REG_SYNC_WORD_1_BYTE_1 0x09D1
63 #define SX128X_REG_SYNC_WORD_1_BYTE_0 0x09D2
64 #define SX128X_REG_SYNC_WORD_2_BYTE_4 0x09D3
65 #define SX128X_REG_SYNC_WORD_2_BYTE_3 0x09D4
66 #define SX128X_REG_SYNC_WORD_2_BYTE_2 0x09D5
67 #define SX128X_REG_SYNC_WORD_2_BYTE_1 0x09D6
68 #define SX128X_REG_SYNC_WORD_2_BYTE_0 0x09D7
69 #define SX128X_REG_SYNC_WORD_3_BYTE_4 0x09D8
70 #define SX128X_REG_SYNC_WORD_3_BYTE_3 0x09D9
71 #define SX128X_REG_SYNC_WORD_3_BYTE_2 0x09DA
72 #define SX128X_REG_SYNC_WORD_3_BYTE_1 0x09DB
73 #define SX128X_REG_SYNC_WORD_3_BYTE_0 0x09DC
74 #define SX128X_REG_CRC_INITIAL_MSB 0x09C8
75 #define SX128X_REG_CRC_INITIAL_LSB 0x09C9
76 #define SX128X_REG_CRC_POLYNOMIAL_MSB 0x09C6
77 #define SX128X_REG_CRC_POLYNOMIAL_LSB 0x09C7
78 #define SX128X_REG_ACCESS_ADDRESS_BYTE_3 (SX128X_REG_SYNC_WORD_1_BYTE_3)
79 #define SX128X_REG_ACCESS_ADDRESS_BYTE_2 (SX128X_REG_SYNC_WORD_1_BYTE_2)
80 #define SX128X_REG_ACCESS_ADDRESS_BYTE_1 (SX128X_REG_SYNC_WORD_1_BYTE_1)
81 #define SX128X_REG_ACCESS_ADDRESS_BYTE_0 (SX128X_REG_SYNC_WORD_1_BYTE_0)
82 #define SX128X_REG_BLE_CRC_INITIAL_MSB 0x09C7
83 #define SX128X_REG_BLE_CRC_INITIAL_MID (SX128X_REG_CRC_INITIAL_MSB)
84 #define SX128X_REG_BLE_CRC_INITIAL_LSB (SX128X_REG_CRC_INITIAL_LSB)
85 #define SX128X_REG_SLAVE_RANGING_ADDRESS_BYTE_3 0x0916
86 #define SX128X_REG_SLAVE_RANGING_ADDRESS_BYTE_2 0x0917
87 #define SX128X_REG_SLAVE_RANGING_ADDRESS_BYTE_1 0x0918
88 #define SX128X_REG_SLAVE_RANGING_ADDRESS_BYTE_0 0x0919
89 #define SX128X_REG_SLAVE_RANGING_ADDRESS_WIDTH 0x0931
90 #define SX128X_REG_MASTER_RANGING_ADDRESS_BYTE_3 0x0912
91 #define SX128X_REG_MASTER_RANGING_ADDRESS_BYTE_2 0x0913
92 #define SX128X_REG_MASTER_RANGING_ADDRESS_BYTE_1 0x0914
93 #define SX128X_REG_MASTER_RANGING_ADDRESS_BYTE_0 0x0915
94 #define SX128X_REG_RANGING_CALIBRATION_MSB 0x092C
95 #define SX128X_REG_RANGING_CALIBRATION_LSB 0x092D
96 #define SX128X_REG_RANGING_RESULT_MSB 0x0961
97 #define SX128X_REG_RANGING_RESULT_MID 0x0962
98 #define SX128X_REG_RANGING_RESULT_LSB 0x0963
99 #define SX128X_REG_MANUAL_GAIN_CONTROL_ENABLE_1 0x089F
100 #define SX128X_REG_MANUAL_GAIN_CONTROL_ENABLE_2 0x0895
101 #define SX128X_REG_MANUAL_GAIN_SETTING 0x089E
102 #define SX128X_REG_GAIN_MODE 0x0891
103 #define SX128X_REG_LORA_FIXED_PAYLOAD_LENGTH 0x0901
104 #define SX128X_REG_LORA_SF_CONFIG 0x0925
105 #define SX128X_REG_FEI_MSB 0x0954
106 #define SX128X_REG_FEI_MID 0x0955
107 #define SX128X_REG_FEI_LSB 0x0956
108 #define SX128X_REG_RANGING_FILTER_WINDOW_SIZE 0x091E
109 #define SX128X_REG_RANGING_FILTER_RSSI_OFFSET 0x0953
110 #define SX128X_REG_RANGING_FILTER_RESET 0x0923
111 #define SX128X_REG_RANGING_LORA_CLOCK_ENABLE 0x097F
112 #define SX128X_REG_RANGING_TYPE 0x0924
113 #define SX128X_REG_RANGING_ADDRESS_SWITCH 0x0927
114 #define SX128X_REG_RANGING_ADDRESS_MSB 0x095F
115 #define SX128X_REG_RANGING_ADDRESS_LSB 0x0960
116 
117 
118 // SX128X SPI command variables
119 //SX128X_CMD_GET_STATUS MSB LSB DESCRIPTION
120 #define SX128X_STATUS_MODE_STDBY_RC 0b01000000 // 7 5 current chip mode: STDBY_RC
121 #define SX128X_STATUS_MODE_STDBY_XOSC 0b01100000 // 7 5 STDBY_XOSC
122 #define SX128X_STATUS_MODE_FS 0b10000000 // 7 5 FS
123 #define SX128X_STATUS_MODE_RX 0b10100000 // 7 5 Rx
124 #define SX128X_STATUS_MODE_TX 0b11000000 // 7 5 Tx
125 #define SX128X_STATUS_CMD_PROCESSED 0b00000100 // 4 2 command status: processing OK
126 #define SX128X_STATUS_DATA_AVAILABLE 0b00001000 // 4 2 data available
127 #define SX128X_STATUS_CMD_TIMEOUT 0b00001100 // 4 2 timeout
128 #define SX128X_STATUS_CMD_ERROR 0b00010000 // 4 2 processing error
129 #define SX128X_STATUS_CMD_FAILED 0b00010100 // 4 2 failed to execute
130 #define SX128X_STATUS_TX_DONE 0b00011000 // 4 2 transmission finished
131 #define SX128X_STATUS_BUSY 0b00000001 // 0 0 chip busy
132 #define SX128X_STATUS_SPI_FAILED 0b11111111 // 7 0 SPI transaction failed
133 
134 //SX128X_CMD_SET_SLEEP
135 #define SX128X_SLEEP_DATA_BUFFER_FLUSH 0b00000000 // 1 1 data buffer behavior in sleep mode: flush
136 #define SX128X_SLEEP_DATA_BUFFER_RETAIN 0b00000010 // 1 1 retain
137 #define SX128X_SLEEP_DATA_RAM_FLUSH 0b00000000 // 0 0 data RAM (configuration) behavior in sleep mode: flush
138 #define SX128X_SLEEP_DATA_RAM_RETAIN 0b00000001 // 0 0 retain
139 
140 //SX128X_CMD_SET_STANDBY
141 #define SX128X_STANDBY_RC 0x00 // 7 0 standby mode: 13 MHz RC oscillator
142 #define SX128X_STANDBY_XOSC 0x01 // 7 0 52 MHz crystal oscillator
143 
144 //SX128X_CMD_SET_TX + SX128X_CMD_SET_RX + SX128X_CMD_SET_RX_DUTY_CYCLE
145 #define SX128X_PERIOD_BASE_15_625_US 0x00 // 7 0 time period step: 15.625 us
146 #define SX128X_PERIOD_BASE_62_5_US 0x01 // 7 0 62.5 us
147 #define SX128X_PERIOD_BASE_1_MS 0x02 // 7 0 1 ms
148 #define SX128X_PERIOD_BASE_4_MS 0x03 // 7 0 4 ms
149 
150 //SX128X_CMD_SET_TX
151 #define SX128X_TX_TIMEOUT_NONE 0x0000 // 15 0 Tx timeout duration: no timeout (Tx single mode)
152 
153 //SX128X_CMD_SET_RX
154 #define SX128X_RX_TIMEOUT_NONE 0x0000 // 15 0 Rx timeout duration: no timeout (Rx single mode)
155 #define SX128X_RX_TIMEOUT_INF 0xFFFF // 15 0 infinite (Rx continuous mode)
156 
157 //SX128X_CMD_SET_PACKET_TYPE
158 #define SX128X_PACKET_TYPE_GFSK 0x00 // 7 0 packet type: (G)FSK
159 #define SX128X_PACKET_TYPE_LORA 0x01 // 7 0 LoRa
160 #define SX128X_PACKET_TYPE_RANGING 0x02 // 7 0 ranging engine
161 #define SX128X_PACKET_TYPE_FLRC 0x03 // 7 0 FLRC
162 #define SX128X_PACKET_TYPE_BLE 0x04 // 7 0 BLE
163 
164 //SX128X_CMD_SET_TX_PARAMS
165 #define SX128X_PA_RAMP_02_US 0x00 // 7 0 PA ramp time: 2 us
166 #define SX128X_PA_RAMP_04_US 0x20 // 7 0 4 us
167 #define SX128X_PA_RAMP_06_US 0x40 // 7 0 6 us
168 #define SX128X_PA_RAMP_08_US 0x60 // 7 0 8 us
169 #define SX128X_PA_RAMP_10_US 0x80 // 7 0 10 us
170 #define SX128X_PA_RAMP_12_US 0xA0 // 7 0 12 us
171 #define SX128X_PA_RAMP_16_US 0xC0 // 7 0 16 us
172 #define SX128X_PA_RAMP_20_US 0xE0 // 7 0 20 us
173 
174 //SX128X_CMD_SET_CAD_PARAMS
175 #define SX128X_CAD_ON_1_SYMB 0x00 // 7 0 number of symbols used for CAD: 1
176 #define SX128X_CAD_ON_2_SYMB 0x20 // 7 0 2
177 #define SX128X_CAD_ON_4_SYMB 0x40 // 7 0 4
178 #define SX128X_CAD_ON_8_SYMB 0x60 // 7 0 8
179 #define SX128X_CAD_ON_16_SYMB 0x80 // 7 0 16
180 
181 //SX128X_CMD_SET_MODULATION_PARAMS
182 #define SX128X_BLE_GFSK_BR_2_000_BW_2_4 0x04 // 7 0 GFSK/BLE bit rate and bandwidth setting: 2.0 Mbps 2.4 MHz
183 #define SX128X_BLE_GFSK_BR_1_600_BW_2_4 0x28 // 7 0 1.6 Mbps 2.4 MHz
184 #define SX128X_BLE_GFSK_BR_1_000_BW_2_4 0x4C // 7 0 1.0 Mbps 2.4 MHz
185 #define SX128X_BLE_GFSK_BR_1_000_BW_1_2 0x45 // 7 0 1.0 Mbps 1.2 MHz
186 #define SX128X_BLE_GFSK_BR_0_800_BW_2_4 0x70 // 7 0 0.8 Mbps 2.4 MHz
187 #define SX128X_BLE_GFSK_BR_0_800_BW_1_2 0x69 // 7 0 0.8 Mbps 1.2 MHz
188 #define SX128X_BLE_GFSK_BR_0_500_BW_1_2 0x8D // 7 0 0.5 Mbps 1.2 MHz
189 #define SX128X_BLE_GFSK_BR_0_500_BW_0_6 0x86 // 7 0 0.5 Mbps 0.6 MHz
190 #define SX128X_BLE_GFSK_BR_0_400_BW_1_2 0xB1 // 7 0 0.4 Mbps 1.2 MHz
191 #define SX128X_BLE_GFSK_BR_0_400_BW_0_6 0xAA // 7 0 0.4 Mbps 0.6 MHz
192 #define SX128X_BLE_GFSK_BR_0_250_BW_0_6 0xCE // 7 0 0.25 Mbps 0.6 MHz
193 #define SX128X_BLE_GFSK_BR_0_250_BW_0_3 0xC7 // 7 0 0.25 Mbps 0.3 MHz
194 #define SX128X_BLE_GFSK_BR_0_125_BW_0_3 0xEF // 7 0 0.125 Mbps 0.3 MHz
195 #define SX128X_BLE_GFSK_MOD_IND_0_35 0x00 // 7 0 GFSK/BLE modulation index: 0.35
196 #define SX128X_BLE_GFSK_MOD_IND_0_50 0x01 // 7 0 0.50
197 #define SX128X_BLE_GFSK_MOD_IND_0_75 0x02 // 7 0 0.75
198 #define SX128X_BLE_GFSK_MOD_IND_1_00 0x03 // 7 0 1.00
199 #define SX128X_BLE_GFSK_MOD_IND_1_25 0x04 // 7 0 1.25
200 #define SX128X_BLE_GFSK_MOD_IND_1_50 0x05 // 7 0 1.50
201 #define SX128X_BLE_GFSK_MOD_IND_1_75 0x06 // 7 0 1.75
202 #define SX128X_BLE_GFSK_MOD_IND_2_00 0x07 // 7 0 2.00
203 #define SX128X_BLE_GFSK_MOD_IND_2_25 0x08 // 7 0 2.25
204 #define SX128X_BLE_GFSK_MOD_IND_2_50 0x09 // 7 0 2.50
205 #define SX128X_BLE_GFSK_MOD_IND_2_75 0x0A // 7 0 2.75
206 #define SX128X_BLE_GFSK_MOD_IND_3_00 0x0B // 7 0 3.00
207 #define SX128X_BLE_GFSK_MOD_IND_3_25 0x0C // 7 0 3.25
208 #define SX128X_BLE_GFSK_MOD_IND_3_50 0x0D // 7 0 3.50
209 #define SX128X_BLE_GFSK_MOD_IND_3_75 0x0E // 7 0 3.75
210 #define SX128X_BLE_GFSK_MOD_IND_4_00 0x0F // 7 0 4.00
211 #define SX128X_BLE_GFSK_BT_OFF 0x00 // 7 0 GFSK Gaussian filter BT product: filter disabled
212 #define SX128X_BLE_GFSK_BT_1_0 0x10 // 7 0 1.0
213 #define SX128X_BLE_GFSK_BT_0_5 0x20 // 7 0 0.5
214 #define SX128X_FLRC_BR_1_300_BW_1_2 0x45 // 7 0 FLRC bit rate and bandwidth setting: 1.3 Mbps 1.2 MHz
215 #define SX128X_FLRC_BR_1_000_BW_1_2 0x69 // 7 0 1.04 Mbps 1.2 MHz
216 #define SX128X_FLRC_BR_0_650_BW_0_6 0x86 // 7 0 0.65 Mbps 0.6 MHz
217 #define SX128X_FLRC_BR_0_520_BW_0_6 0xAA // 7 0 0.52 Mbps 0.6 MHz
218 #define SX128X_FLRC_BR_0_325_BW_0_3 0xC7 // 7 0 0.325 Mbps 0.3 MHz
219 #define SX128X_FLRC_BR_0_260_BW_0_3 0xEB // 7 0 0.260 Mbps 0.3 MHz
220 #define SX128X_FLRC_CR_1_2 0x00 // 7 0 FLRC coding rate: 1/2
221 #define SX128X_FLRC_CR_3_4 0x02 // 7 0 3/4
222 #define SX128X_FLRC_CR_1_0 0x04 // 7 0 1/1
223 #define SX128X_FLRC_BT_OFF 0x00 // 7 0 FLRC Gaussian filter BT product: filter disabled
224 #define SX128X_FLRC_BT_1_0 0x10 // 7 0 1.0
225 #define SX128X_FLRC_BT_0_5 0x20 // 7 0 0.5
226 #define SX128X_LORA_SF_5 0x50 // 7 0 LoRa spreading factor: 5
227 #define SX128X_LORA_SF_6 0x60 // 7 0 6
228 #define SX128X_LORA_SF_7 0x70 // 7 0 7
229 #define SX128X_LORA_SF_8 0x80 // 7 0 8
230 #define SX128X_LORA_SF_9 0x90 // 7 0 9
231 #define SX128X_LORA_SF_10 0xA0 // 7 0 10
232 #define SX128X_LORA_SF_11 0xB0 // 7 0 11
233 #define SX128X_LORA_SF_12 0xC0 // 7 0 12
234 #define SX128X_LORA_BW_1625_00 0x0A // 7 0 LoRa bandwidth: 1625.0 kHz
235 #define SX128X_LORA_BW_812_50 0x18 // 7 0 812.5 kHz
236 #define SX128X_LORA_BW_406_25 0x26 // 7 0 406.25 kHz
237 #define SX128X_LORA_BW_203_125 0x34 // 7 0 203.125 kHz
238 #define SX128X_LORA_CR_4_5 0x01 // 7 0 LoRa coding rate: 4/5
239 #define SX128X_LORA_CR_4_6 0x02 // 7 0 4/6
240 #define SX128X_LORA_CR_4_7 0x03 // 7 0 4/7
241 #define SX128X_LORA_CR_4_8 0x04 // 7 0 4/8
242 #define SX128X_LORA_CR_4_5_LI 0x05 // 7 0 4/5, long interleaving
243 #define SX128X_LORA_CR_4_6_LI 0x06 // 7 0 4/6, long interleaving
244 #define SX128X_LORA_CR_4_7_LI 0x07 // 7 0 4/7, long interleaving
245 
246 //SX128X_CMD_SET_PACKET_PARAMS
247 #define SX128X_GFSK_FLRC_SYNC_WORD_OFF 0x00 // 7 0 GFSK/FLRC sync word used: none
248 #define SX128X_GFSK_FLRC_SYNC_WORD_1 0x10 // 7 0 sync word 1
249 #define SX128X_GFSK_FLRC_SYNC_WORD_2 0x20 // 7 0 sync word 2
250 #define SX128X_GFSK_FLRC_SYNC_WORD_1_2 0x30 // 7 0 sync words 1 and 2
251 #define SX128X_GFSK_FLRC_SYNC_WORD_3 0x40 // 7 0 sync word 3
252 #define SX128X_GFSK_FLRC_SYNC_WORD_1_3 0x50 // 7 0 sync words 1 and 3
253 #define SX128X_GFSK_FLRC_SYNC_WORD_2_3 0x60 // 7 0 sync words 2 and 3
254 #define SX128X_GFSK_FLRC_SYNC_WORD_1_2_3 0x70 // 7 0 sync words 1, 2 and 3
255 #define SX128X_GFSK_FLRC_PACKET_FIXED 0x00 // 7 0 GFSK/FLRC packet length mode: fixed
256 #define SX128X_GFSK_FLRC_PACKET_VARIABLE 0x20 // 7 0 variable
257 #define SX128X_GFSK_FLRC_CRC_OFF 0x00 // 7 0 GFSK/FLRC packet CRC: none
258 #define SX128X_GFSK_FLRC_CRC_1_BYTE 0x10 // 7 0 1 byte
259 #define SX128X_GFSK_FLRC_CRC_2_BYTE 0x20 // 7 0 2 bytes
260 #define SX128X_GFSK_FLRC_CRC_3_BYTE 0x30 // 7 0 3 bytes (FLRC only)
261 #define SX128X_GFSK_BLE_WHITENING_ON 0x00 // 7 0 GFSK/BLE whitening: enabled
262 #define SX128X_GFSK_BLE_WHITENING_OFF 0x08 // 7 0 disabled
263 #define SX128X_BLE_PAYLOAD_LENGTH_MAX_31 0x00 // 7 0 BLE maximum payload length: 31 bytes
264 #define SX128X_BLE_PAYLOAD_LENGTH_MAX_37 0x20 // 7 0 37 bytes
265 #define SX128X_BLE_PAYLOAD_LENGTH_TEST 0x40 // 7 0 63 bytes (test mode)
266 #define SX128X_BLE_PAYLOAD_LENGTH_MAX_255 0x80 // 7 0 255 bytes (Bluetooth 4.2 and above)
267 #define SX128X_BLE_CRC_OFF 0x00 // 7 0 BLE packet CRC: none
268 #define SX128X_BLE_CRC_3_BYTE 0x10 // 7 0 3 byte
269 #define SX128X_BLE_PRBS_9 0x00 // 7 0 BLE test payload contents: PRNG sequence using x^9 + x^5 + x
270 #define SX128X_BLE_EYELONG 0x04 // 7 0 repeated 0xF0
271 #define SX128X_BLE_EYESHORT 0x08 // 7 0 repeated 0xAA
272 #define SX128X_BLE_PRBS_15 0x0C // 7 0 PRNG sequence using x^15 + x^14 + x^13 + x^12 + x^2 + x + 1
273 #define SX128X_BLE_ALL_1 0x10 // 7 0 repeated 0xFF
274 #define SX128X_BLE_ALL_0 0x14 // 7 0 repeated 0x00
275 #define SX128X_BLE_EYELONG_INV 0x18 // 7 0 repeated 0x0F
276 #define SX128X_BLE_EYESHORT_INV 0x1C // 7 0 repeated 0x55
277 #define SX128X_FLRC_SYNC_WORD_OFF 0x00 // 7 0 FLRC sync word: disabled
278 #define SX128X_FLRC_SYNC_WORD_ON 0x04 // 7 0 enabled
279 #define SX128X_LORA_HEADER_EXPLICIT 0x00 // 7 0 LoRa header mode: explicit
280 #define SX128X_LORA_HEADER_IMPLICIT 0x80 // 7 0 implicit
281 #define SX128X_LORA_CRC_OFF 0x00 // 7 0 LoRa packet CRC: disabled
282 #define SX128X_LORA_CRC_ON 0x20 // 7 0 enabled
283 #define SX128X_LORA_IQ_STANDARD 0x40 // 7 0 LoRa IQ: standard
284 #define SX128X_LORA_IQ_INVERTED 0x00 // 7 0 inverted
285 
286 //SX128X_CMD_GET_PACKET_STATUS
287 #define SX128X_PACKET_STATUS_SYNC_ERROR 0b01000000 // 6 6 packet status errors byte: sync word error
288 #define SX128X_PACKET_STATUS_LENGTH_ERROR 0b00100000 // 5 5 packet length error
289 #define SX128X_PACKET_STATUS_CRC_ERROR 0b00010000 // 4 4 CRC error
290 #define SX128X_PACKET_STATUS_ABORT_ERROR 0b00001000 // 3 3 packet reception aborted
291 #define SX128X_PACKET_STATUS_HEADER_RECEIVED 0b00000100 // 2 2 header received
292 #define SX128X_PACKET_STATUS_PACKET_RECEIVED 0b00000010 // 1 1 packet received
293 #define SX128X_PACKET_STATUS_PACKET_CTRL_BUSY 0b00000001 // 0 0 packet controller is busy
294 #define SX128X_PACKET_STATUS_RX_PID 0b11000000 // 7 6 packet status status byte: PID field of the received packet
295 #define SX128X_PACKET_STATUS_NO_ACK 0b00100000 // 5 5 NO_ACK field of the received packet
296 #define SX128X_PACKET_STATUS_RX_PID_ERROR 0b00010000 // 4 4 PID field error
297 #define SX128X_PACKET_STATUS_PACKET_SENT 0b00000001 // 0 0 packet sent
298 #define SX128X_PACKET_STATUS_SYNC_DET_ERROR 0b00000000 // 2 0 packet status sync byte: sync word detection error
299 #define SX128X_PACKET_STATUS_SYNC_DET_1 0b00000001 // 2 0 detected sync word 1
300 #define SX128X_PACKET_STATUS_SYNC_DET_2 0b00000010 // 2 0 detected sync word 2
301 #define SX128X_PACKET_STATUS_SYNC_DET_3 0b00000100 // 2 0 detected sync word 3
302 
303 //SX128X_CMD_SET_DIO_IRQ_PARAMS
304 #define SX128X_IRQ_PREAMBLE_DETECTED 0x8000 // 15 15 interrupt source: preamble detected
305 #define SX128X_IRQ_ADVANCED_RANGING_DONE 0x8000 // 15 15 advanced ranging done
306 #define SX128X_IRQ_RX_TX_TIMEOUT 0x4000 // 14 14 Rx or Tx timeout
307 #define SX128X_IRQ_CAD_DETECTED 0x2000 // 13 13 channel activity detected
308 #define SX128X_IRQ_CAD_DONE 0x1000 // 12 12 CAD finished
309 #define SX128X_IRQ_RANGING_SLAVE_REQ_VALID 0x0800 // 11 11 ranging request valid (slave)
310 #define SX128X_IRQ_RANGING_MASTER_TIMEOUT 0x0400 // 10 10 ranging timeout (master)
311 #define SX128X_IRQ_RANGING_MASTER_RES_VALID 0x0200 // 9 9 ranging result valid (master)
312 #define SX128X_IRQ_RANGING_SLAVE_REQ_DISCARD 0x0100 // 8 8 ranging result valid (master)
313 #define SX128X_IRQ_RANGING_SLAVE_RESP_DONE 0x0080 // 7 7 ranging response complete (slave)
314 #define SX128X_IRQ_CRC_ERROR 0x0040 // 6 6 CRC error
315 #define SX128X_IRQ_HEADER_ERROR 0x0020 // 5 5 header error
316 #define SX128X_IRQ_HEADER_VALID 0x0010 // 4 4 header valid
317 #define SX128X_IRQ_SYNC_WORD_ERROR 0x0008 // 3 3 sync word error
318 #define SX128X_IRQ_SYNC_WORD_VALID 0x0004 // 2 2 sync word valid
319 #define SX128X_IRQ_RX_DONE 0x0002 // 1 1 Rx done
320 #define SX128X_IRQ_TX_DONE 0x0001 // 0 0 Tx done
321 #define SX128X_IRQ_NONE 0x0000 // 15 0 none
322 #define SX128X_IRQ_ALL 0xFFFF // 15 0 all
323 
324 //SX128X_CMD_SET_REGULATOR_MODE
325 #define SX128X_REGULATOR_LDO 0x00 // 7 0 set regulator mode: LDO (default)
326 #define SX128X_REGULATOR_DC_DC 0x01 // 7 0 DC-DC
327 
328 //SX128X_CMD_SET_RANGING_ROLE
329 #define SX128X_RANGING_ROLE_MASTER 0x01 // 7 0 ranging role: master
330 #define SX128X_RANGING_ROLE_SLAVE 0x00 // 7 0 slave
331 
332 
339 class SX128x: public PhysicalLayer {
340  public:
341  // introduce PhysicalLayer overloads
346 
352  SX128x(Module* mod);
353 
354  // basic methods
355 
373  int16_t begin(float freq = 2400.0, float bw = 812.5, uint8_t sf = 9, uint8_t cr = 7, int8_t power = 10, uint16_t preambleLength = 12);
374 
390  int16_t beginGFSK(float freq = 2400.0, uint16_t br = 800, float freqDev = 400.0, int8_t power = 10, uint16_t preambleLength = 16);
391 
407  int16_t beginBLE(float freq = 2400.0, uint16_t br = 800, float freqDev = 400.0, int8_t power = 10, uint8_t dataShaping = RADIOLIB_SHAPING_0_5);
408 
426  int16_t beginFLRC(float freq = 2400.0, uint16_t br = 650, uint8_t cr = 3, int8_t power = 10, uint16_t preambleLength = 16, uint8_t dataShaping = RADIOLIB_SHAPING_0_5);
427 
436  int16_t reset(bool verify = true);
437 
450  int16_t transmit(uint8_t* data, size_t len, uint8_t addr = 0) override;
451 
462  int16_t receive(uint8_t* data, size_t len) override;
463 
471  int16_t transmitDirect(uint32_t frf = 0) override;
472 
479  int16_t receiveDirect() override;
480 
486  int16_t scanChannel();
487 
495  int16_t sleep(bool retainConfig = true);
496 
502  int16_t standby() override;
503 
511  int16_t standby(uint8_t mode);
512 
513  // interrupt methods
514 
520  void setDio1Action(void (*func)(void));
521 
525  void clearDio1Action();
526 
539  int16_t startTransmit(uint8_t* data, size_t len, uint8_t addr = 0) override;
540 
548  int16_t startReceive(uint16_t timeout = SX128X_RX_TIMEOUT_INF);
549 
559  int16_t readData(uint8_t* data, size_t len) override;
560 
561  // configuration methods
562 
570  int16_t setFrequency(float freq);
571 
579  int16_t setBandwidth(float bw);
580 
588  int16_t setSpreadingFactor(uint8_t sf);
589 
599  int16_t setCodingRate(uint8_t cr, bool longInterleaving = false);
600 
608  int16_t setOutputPower(int8_t power);
609 
617  int16_t setPreambleLength(uint32_t preambleLength);
618 
626  int16_t setBitRate(uint16_t br);
627 
635  int16_t setFrequencyDeviation(float freqDev) override;
636 
645  int16_t setDataShaping(uint8_t sh) override;
646 
656  int16_t setSyncWord(uint8_t* syncWord, uint8_t len);
657 
669  int16_t setCRC(uint8_t len, uint32_t initial = 0x1D0F, uint16_t polynomial = 0x1021);
670 
678  int16_t setWhitening(bool enabled);
679 
687  int16_t setAccessAddress(uint32_t addr);
688 
694  float getRSSI();
695 
701  float getSNR();
702 
710  size_t getPacketLength(bool update = true) override;
711 
719  uint32_t getTimeOnAir(size_t len);
720 
726  int16_t implicitHeader(size_t len);
727 
735  int16_t explicitHeader();
736 
744  int16_t setEncoding(uint8_t encoding) override;
745 
754  void setRfSwitchPins(RADIOLIB_PIN_TYPE rxEn, RADIOLIB_PIN_TYPE txEn);
755 
761  uint8_t random();
762 
763 #ifndef RADIOLIB_GODMODE
764  protected:
765 #endif
766  Module* _mod;
767 
768  // cached LoRa parameters
769  float _bwKhz = 0;
770  uint8_t _bw = 0, _sf = 0, _cr = 0;
771  uint8_t _preambleLengthLoRa = 0, _headerType = 0, _payloadLen = 0, _crcLoRa = 0;
772 
773  // SX128x SPI command implementations
774  uint8_t getStatus();
775  int16_t writeRegister(uint16_t addr, uint8_t* data, uint8_t numBytes);
776  int16_t readRegister(uint16_t addr, uint8_t* data, uint8_t numBytes);
777  int16_t writeBuffer(uint8_t* data, uint8_t numBytes, uint8_t offset = 0x00);
778  int16_t readBuffer(uint8_t* data, uint8_t numBytes);
779  int16_t setTx(uint16_t periodBaseCount = SX128X_TX_TIMEOUT_NONE, uint8_t periodBase = SX128X_PERIOD_BASE_15_625_US);
780  int16_t setRx(uint16_t periodBaseCount, uint8_t periodBase = SX128X_PERIOD_BASE_15_625_US);
781  int16_t setCad();
782  uint8_t getPacketType();
783  int16_t setRfFrequency(uint32_t frf);
784  int16_t setTxParams(uint8_t power, uint8_t rampTime = SX128X_PA_RAMP_10_US);
785  int16_t setBufferBaseAddress(uint8_t txBaseAddress = 0x00, uint8_t rxBaseAddress = 0x00);
786  int16_t setModulationParams(uint8_t modParam1, uint8_t modParam2, uint8_t modParam3);
787  int16_t setPacketParamsGFSK(uint8_t preambleLen, uint8_t syncWordLen, uint8_t syncWordMatch, uint8_t crcLen, uint8_t whitening, uint8_t payloadLen = 0xFF, uint8_t headerType = SX128X_GFSK_FLRC_PACKET_VARIABLE);
788  int16_t setPacketParamsBLE(uint8_t connState, uint8_t crcLen, uint8_t bleTestPayload, uint8_t whitening);
789  int16_t setPacketParamsLoRa(uint8_t preambleLen, uint8_t headerType, uint8_t payloadLen, uint8_t crc, uint8_t invertIQ = SX128X_LORA_IQ_STANDARD);
790  int16_t setDioIrqParams(uint16_t irqMask, uint16_t dio1Mask, uint16_t dio2Mask = SX128X_IRQ_NONE, uint16_t dio3Mask = SX128X_IRQ_NONE);
791  uint16_t getIrqStatus();
792  int16_t clearIrqStatus(uint16_t clearIrqParams = SX128X_IRQ_ALL);
793  int16_t setRangingRole(uint8_t role);
794  int16_t setPacketType(uint8_t type);
795 
796  int16_t setHeaderType(uint8_t headerType, size_t len = 0xFF);
797 
798 #ifndef RADIOLIB_GODMODE
799  private:
800 #endif
801  // common parameters
802  uint8_t _pwr = 0;
803 
804  // cached GFSK parameters
805  float _modIndexReal = 0;
806  uint16_t _brKbps = 0;
807  uint8_t _br = 0, _modIndex = 0, _shaping = 0;
808  uint8_t _preambleLengthGFSK = 0, _syncWordLen = 0, _syncWordMatch = 0, _crcGFSK = 0, _whitening = 0;
809 
810  // cached FLRC parameters
811  uint8_t _crFLRC = 0;
812 
813  // cached BLE parameters
814  uint8_t _connectionState = 0, _crcBLE = 0, _bleTestPayload = 0;
815 
816  int16_t config(uint8_t modem);
817 
818  // common low-level SPI interface
819  int16_t SPIwriteCommand(uint8_t cmd, uint8_t* data, uint8_t numBytes, bool waitForBusy = true);
820  int16_t SPIwriteCommand(uint8_t* cmd, uint8_t cmdLen, uint8_t* data, uint8_t numBytes, bool waitForBusy = true);
821  int16_t SPIreadCommand(uint8_t cmd, uint8_t* data, uint8_t numBytes, bool waitForBusy = true);
822  int16_t SPIreadCommand(uint8_t* cmd, uint8_t cmdLen, uint8_t* data, uint8_t numBytes, bool waitForBusy = true);
823  int16_t SPItransfer(uint8_t* cmd, uint8_t cmdLen, bool write, uint8_t* dataOut, uint8_t* dataIn, uint8_t numBytes, bool waitForBusy, uint32_t timeout = 5000);
824 };
825 
826 #endif
827 
828 #endif
int16_t explicitHeader()
Set explicit header mode for future reception/transmission.
Definition: SX128x.cpp:1123
-
int16_t setAccessAddress(uint32_t addr)
Sets BLE access address.
Definition: SX128x.cpp:993
-
int16_t receive(uint8_t *data, size_t len) override
Blocking binary receive method. Overloads for string-based transmissions are implemented in PhysicalL...
Definition: SX128x.cpp:312
-
int16_t standby() override
Sets the module to standby mode (overload for PhysicalLayer compatibility, uses 13 MHz RC oscillator)...
Definition: SX128x.cpp:434
-
void clearDio1Action()
Clears interrupt service routine to call when DIO1 activates.
Definition: SX128x.cpp:450
-
int16_t startTransmit(String &str, uint8_t addr=0)
Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes.
Definition: PhysicalLayer.cpp:49
-
#define RADIOLIB_SHAPING_0_5
Gaussin shaping filter, BT = 0.5.
Definition: TypeDef.h:110
-
int16_t sleep(bool retainConfig=true)
Sets the module to sleep mode.
Definition: SX128x.cpp:418
-
int16_t implicitHeader(size_t len)
Set implicit header mode for future reception/transmission.
Definition: SX128x.cpp:1119
-
int16_t setEncoding(uint8_t encoding) override
Sets transmission encoding. Serves only as alias for PhysicalLayer compatibility. ...
Definition: SX128x.cpp:1127
-
int16_t reset(bool verify=true)
Reset method. Will reset the chip to the default state using RST pin.
Definition: SX128x.cpp:231
-
int16_t setSyncWord(uint8_t *syncWord, uint8_t len)
Sets FSK/FLRC sync word in the form of array of up to 5 bytes (FSK). For FLRC modem, the sync word must be exactly 4 bytes long.
Definition: SX128x.cpp:861
-
int16_t transmit(uint8_t *data, size_t len, uint8_t addr=0) override
Blocking binary transmit method. Overloads for string-based transmissions are implemented in Physical...
Definition: SX128x.cpp:264
-
float getSNR()
Gets SNR (Signal to Noise Ratio) of the last received packet. Only available for LoRa or ranging mode...
Definition: SX128x.cpp:1028
-
int16_t setBitRate(uint16_t br)
Sets FSK or FLRC bit rate. Allowed values are 125, 250, 400, 500, 800, 1000, 1600 and 2000 kbps (for ...
Definition: SX128x.cpp:741
-
uint32_t getTimeOnAir(size_t len)
Get expected time-on-air for a given size of payload.
Definition: SX128x.cpp:1055
-
int16_t beginGFSK(float freq=2400.0, uint16_t br=800, float freqDev=400.0, int8_t power=10, uint16_t preambleLength=16)
Initialization method for GFSK modem.
Definition: SX128x.cpp:60
-
size_t getPacketLength(bool update=true) override
Query modem for the packet length of received payload.
Definition: SX128x.cpp:1048
-
int16_t setSpreadingFactor(uint8_t sf)
Sets LoRa spreading factor. Allowed values range from 5 to 12.
Definition: SX128x.cpp:625
-
int16_t setWhitening(bool enabled)
Sets whitening parameters, not available for LoRa or FLRC modem.
Definition: SX128x.cpp:973
-
uint8_t random()
Dummy random method, to ensure PhysicalLayer compatibility.
Definition: SX128x.cpp:1135
-
int16_t setBandwidth(float bw)
Sets LoRa bandwidth. Allowed values are 203.125, 406.25, 812.5 and 1625.0 kHz.
Definition: SX128x.cpp:595
-
int16_t setCRC(uint8_t len, uint32_t initial=0x1D0F, uint16_t polynomial=0x1021)
Sets CRC configuration.
Definition: SX128x.cpp:909
-
int16_t receiveDirect() override
Starts direct mode reception. Only implemented for PhysicalLayer compatibility, as SX128x series does...
Definition: SX128x.cpp:365
-
void setRfSwitchPins(RADIOLIB_PIN_TYPE rxEn, RADIOLIB_PIN_TYPE txEn)
Some modules contain external RF switch controlled by two pins. This function gives RadioLib control ...
Definition: SX128x.cpp:1131
-
void setDio1Action(void(*func)(void))
Sets interrupt service routine to call when DIO1 activates.
Definition: SX128x.cpp:446
-
Implements all common low-level SPI/UART/I2C methods to control the wireless module. Every module class contains one private instance of this class.
Definition: Module.h:17
-
int16_t transmit(__FlashStringHelper *fstr, uint8_t addr=0)
Arduino Flash String transmit method.
Definition: PhysicalLayer.cpp:8
-
Base class for SX128x series. All derived classes for SX128x (e.g. SX1280 or SX1281) inherit from thi...
Definition: SX128x.h:339
-
int16_t receive(String &str, size_t len=0)
Arduino String receive method.
Definition: PhysicalLayer.cpp:98
-
int16_t setFrequency(float freq)
Sets carrier frequency. Allowed values are in range from 2400.0 to 2500.0 MHz.
Definition: SX128x.cpp:587
-
int16_t beginBLE(float freq=2400.0, uint16_t br=800, float freqDev=400.0, int8_t power=10, uint8_t dataShaping=RADIOLIB_SHAPING_0_5)
Initialization method for BLE modem.
Definition: SX128x.cpp:123
-
int16_t readData(uint8_t *data, size_t len) override
Reads data received after calling startReceive method.
Definition: SX128x.cpp:551
-
Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN...
Definition: PhysicalLayer.h:13
-
int16_t scanChannel()
Performs scan for LoRa transmission in the current channel. Detects both preamble and payload...
Definition: SX128x.cpp:373
-
SX128x(Module *mod)
Default constructor.
Definition: SX128x.cpp:4
-
float getRSSI()
Gets RSSI (Recorded Signal Strength Indicator) of the last received packet.
Definition: SX128x.cpp:1004
-
int16_t setPreambleLength(uint32_t preambleLength)
Sets preamble length for currently active modem. Allowed values range from 1 to 65535.
Definition: SX128x.cpp:693
-
int16_t setCodingRate(uint8_t cr, bool longInterleaving=false)
Sets LoRa coding rate denominator. Allowed values range from 5 to 8.
Definition: SX128x.cpp:659
-
int16_t beginFLRC(float freq=2400.0, uint16_t br=650, uint8_t cr=3, int8_t power=10, uint16_t preambleLength=16, uint8_t dataShaping=RADIOLIB_SHAPING_0_5)
Initialization method for FLRC modem.
Definition: SX128x.cpp:172
-
int16_t begin(float freq=2400.0, float bw=812.5, uint8_t sf=9, uint8_t cr=7, int8_t power=10, uint16_t preambleLength=12)
Initialization method for LoRa modem.
Definition: SX128x.cpp:8
-
int16_t startReceive(uint16_t timeout=SX128X_RX_TIMEOUT_INF)
Interrupt-driven receive method. DIO1 will be activated when full packet is received.
Definition: SX128x.cpp:518
-
int16_t setDataShaping(uint8_t sh) override
Sets time-bandwidth product of Gaussian filter applied for shaping. Allowed values are RADIOLIB_SHAPI...
Definition: SX128x.cpp:831
-
int16_t setFrequencyDeviation(float freqDev) override
Sets FSK frequency deviation. Allowed values range from 0.0 to 3200.0 kHz.
Definition: SX128x.cpp:798
-
int16_t transmitDirect(uint32_t frf=0) override
Starts direct mode transmission.
Definition: SX128x.cpp:350
-
int16_t setOutputPower(int8_t power)
Sets output power. Allowed values are in range from -18 to 13 dBm.
Definition: SX128x.cpp:687
-
int16_t readData(String &str, size_t len=0)
Reads data that was received after calling startReceive method.
Definition: PhysicalLayer.cpp:57
-
int16_t startTransmit(uint8_t *data, size_t len, uint8_t addr=0) override
Interrupt-driven binary transmit method. Overloads for string-based transmissions are implemented in ...
Definition: SX128x.cpp:454
+
1 #if !defined(_RADIOLIB_SX128X_H)
+
2 #define _RADIOLIB_SX128X_H
+
3 
+
4 #include "../../TypeDef.h"
+
5 
+
6 #if !defined(RADIOLIB_EXCLUDE_SX128X)
+
7 
+
8 #include "../../Module.h"
+
9 
+
10 #include "../../protocols/PhysicalLayer/PhysicalLayer.h"
+
11 
+
12 // SX128X physical layer properties
+
13 #define SX128X_FREQUENCY_STEP_SIZE 198.3642578
+
14 #define SX128X_MAX_PACKET_LENGTH 255
+
15 #define SX128X_CRYSTAL_FREQ 52.0
+
16 #define SX128X_DIV_EXPONENT 18
+
17 
+
18 // SX128X SPI commands
+
19 #define SX128X_CMD_NOP 0x00
+
20 #define SX128X_CMD_GET_STATUS 0xC0
+
21 #define SX128X_CMD_WRITE_REGISTER 0x18
+
22 #define SX128X_CMD_READ_REGISTER 0x19
+
23 #define SX128X_CMD_WRITE_BUFFER 0x1A
+
24 #define SX128X_CMD_READ_BUFFER 0x1B
+
25 #define SX128X_CMD_SET_SLEEP 0x84
+
26 #define SX128X_CMD_SET_STANDBY 0x80
+
27 #define SX128X_CMD_SET_FS 0xC1
+
28 #define SX128X_CMD_SET_TX 0x83
+
29 #define SX128X_CMD_SET_RX 0x82
+
30 #define SX128X_CMD_SET_RX_DUTY_CYCLE 0x94
+
31 #define SX128X_CMD_SET_CAD 0xC5
+
32 #define SX128X_CMD_SET_TX_CONTINUOUS_WAVE 0xD1
+
33 #define SX128X_CMD_SET_TX_CONTINUOUS_PREAMBLE 0xD2
+
34 #define SX128X_CMD_SET_PACKET_TYPE 0x8A
+
35 #define SX128X_CMD_GET_PACKET_TYPE 0x03
+
36 #define SX128X_CMD_SET_RF_FREQUENCY 0x86
+
37 #define SX128X_CMD_SET_TX_PARAMS 0x8E
+
38 #define SX128X_CMD_SET_CAD_PARAMS 0x88
+
39 #define SX128X_CMD_SET_BUFFER_BASE_ADDRESS 0x8F
+
40 #define SX128X_CMD_SET_MODULATION_PARAMS 0x8B
+
41 #define SX128X_CMD_SET_PACKET_PARAMS 0x8C
+
42 #define SX128X_CMD_GET_RX_BUFFER_STATUS 0x17
+
43 #define SX128X_CMD_GET_PACKET_STATUS 0x1D
+
44 #define SX128X_CMD_GET_RSSI_INST 0x1F
+
45 #define SX128X_CMD_SET_DIO_IRQ_PARAMS 0x8D
+
46 #define SX128X_CMD_GET_IRQ_STATUS 0x15
+
47 #define SX128X_CMD_CLEAR_IRQ_STATUS 0x97
+
48 #define SX128X_CMD_SET_REGULATOR_MODE 0x96
+
49 #define SX128X_CMD_SET_SAVE_CONTEXT 0xD5
+
50 #define SX128X_CMD_SET_AUTO_TX 0x98
+
51 #define SX128X_CMD_SET_AUTO_FS 0x9E
+
52 #define SX128X_CMD_SET_PERF_COUNTER_MODE 0x9C
+
53 #define SX128X_CMD_SET_LONG_PREAMBLE 0x9B
+
54 #define SX128X_CMD_SET_UART_SPEED 0x9D
+
55 #define SX128X_CMD_SET_RANGING_ROLE 0xA3
+
56 #define SX128X_CMD_SET_ADVANCED_RANGING 0x9A
+
57 
+
58 // SX128X register map
+
59 #define SX128X_REG_SYNC_WORD_1_BYTE_4 0x09CE
+
60 #define SX128X_REG_SYNC_WORD_1_BYTE_3 0x09CF
+
61 #define SX128X_REG_SYNC_WORD_1_BYTE_2 0x09D0
+
62 #define SX128X_REG_SYNC_WORD_1_BYTE_1 0x09D1
+
63 #define SX128X_REG_SYNC_WORD_1_BYTE_0 0x09D2
+
64 #define SX128X_REG_SYNC_WORD_2_BYTE_4 0x09D3
+
65 #define SX128X_REG_SYNC_WORD_2_BYTE_3 0x09D4
+
66 #define SX128X_REG_SYNC_WORD_2_BYTE_2 0x09D5
+
67 #define SX128X_REG_SYNC_WORD_2_BYTE_1 0x09D6
+
68 #define SX128X_REG_SYNC_WORD_2_BYTE_0 0x09D7
+
69 #define SX128X_REG_SYNC_WORD_3_BYTE_4 0x09D8
+
70 #define SX128X_REG_SYNC_WORD_3_BYTE_3 0x09D9
+
71 #define SX128X_REG_SYNC_WORD_3_BYTE_2 0x09DA
+
72 #define SX128X_REG_SYNC_WORD_3_BYTE_1 0x09DB
+
73 #define SX128X_REG_SYNC_WORD_3_BYTE_0 0x09DC
+
74 #define SX128X_REG_CRC_INITIAL_MSB 0x09C8
+
75 #define SX128X_REG_CRC_INITIAL_LSB 0x09C9
+
76 #define SX128X_REG_CRC_POLYNOMIAL_MSB 0x09C6
+
77 #define SX128X_REG_CRC_POLYNOMIAL_LSB 0x09C7
+
78 #define SX128X_REG_ACCESS_ADDRESS_BYTE_3 (SX128X_REG_SYNC_WORD_1_BYTE_3)
+
79 #define SX128X_REG_ACCESS_ADDRESS_BYTE_2 (SX128X_REG_SYNC_WORD_1_BYTE_2)
+
80 #define SX128X_REG_ACCESS_ADDRESS_BYTE_1 (SX128X_REG_SYNC_WORD_1_BYTE_1)
+
81 #define SX128X_REG_ACCESS_ADDRESS_BYTE_0 (SX128X_REG_SYNC_WORD_1_BYTE_0)
+
82 #define SX128X_REG_BLE_CRC_INITIAL_MSB 0x09C7
+
83 #define SX128X_REG_BLE_CRC_INITIAL_MID (SX128X_REG_CRC_INITIAL_MSB)
+
84 #define SX128X_REG_BLE_CRC_INITIAL_LSB (SX128X_REG_CRC_INITIAL_LSB)
+
85 #define SX128X_REG_SLAVE_RANGING_ADDRESS_BYTE_3 0x0916
+
86 #define SX128X_REG_SLAVE_RANGING_ADDRESS_BYTE_2 0x0917
+
87 #define SX128X_REG_SLAVE_RANGING_ADDRESS_BYTE_1 0x0918
+
88 #define SX128X_REG_SLAVE_RANGING_ADDRESS_BYTE_0 0x0919
+
89 #define SX128X_REG_SLAVE_RANGING_ADDRESS_WIDTH 0x0931
+
90 #define SX128X_REG_MASTER_RANGING_ADDRESS_BYTE_3 0x0912
+
91 #define SX128X_REG_MASTER_RANGING_ADDRESS_BYTE_2 0x0913
+
92 #define SX128X_REG_MASTER_RANGING_ADDRESS_BYTE_1 0x0914
+
93 #define SX128X_REG_MASTER_RANGING_ADDRESS_BYTE_0 0x0915
+
94 #define SX128X_REG_RANGING_CALIBRATION_MSB 0x092C
+
95 #define SX128X_REG_RANGING_CALIBRATION_LSB 0x092D
+
96 #define SX128X_REG_RANGING_RESULT_MSB 0x0961
+
97 #define SX128X_REG_RANGING_RESULT_MID 0x0962
+
98 #define SX128X_REG_RANGING_RESULT_LSB 0x0963
+
99 #define SX128X_REG_MANUAL_GAIN_CONTROL_ENABLE_1 0x089F
+
100 #define SX128X_REG_MANUAL_GAIN_CONTROL_ENABLE_2 0x0895
+
101 #define SX128X_REG_MANUAL_GAIN_SETTING 0x089E
+
102 #define SX128X_REG_GAIN_MODE 0x0891
+
103 #define SX128X_REG_LORA_FIXED_PAYLOAD_LENGTH 0x0901
+
104 #define SX128X_REG_LORA_SF_CONFIG 0x0925
+
105 #define SX128X_REG_FEI_MSB 0x0954
+
106 #define SX128X_REG_FEI_MID 0x0955
+
107 #define SX128X_REG_FEI_LSB 0x0956
+
108 #define SX128X_REG_RANGING_FILTER_WINDOW_SIZE 0x091E
+
109 #define SX128X_REG_RANGING_FILTER_RSSI_OFFSET 0x0953
+
110 #define SX128X_REG_RANGING_FILTER_RESET 0x0923
+
111 #define SX128X_REG_RANGING_LORA_CLOCK_ENABLE 0x097F
+
112 #define SX128X_REG_RANGING_TYPE 0x0924
+
113 #define SX128X_REG_RANGING_ADDRESS_SWITCH 0x0927
+
114 #define SX128X_REG_RANGING_ADDRESS_MSB 0x095F
+
115 #define SX128X_REG_RANGING_ADDRESS_LSB 0x0960
+
116 
+
117 
+
118 // SX128X SPI command variables
+
119 //SX128X_CMD_GET_STATUS MSB LSB DESCRIPTION
+
120 #define SX128X_STATUS_MODE_STDBY_RC 0b01000000 // 7 5 current chip mode: STDBY_RC
+
121 #define SX128X_STATUS_MODE_STDBY_XOSC 0b01100000 // 7 5 STDBY_XOSC
+
122 #define SX128X_STATUS_MODE_FS 0b10000000 // 7 5 FS
+
123 #define SX128X_STATUS_MODE_RX 0b10100000 // 7 5 Rx
+
124 #define SX128X_STATUS_MODE_TX 0b11000000 // 7 5 Tx
+
125 #define SX128X_STATUS_CMD_PROCESSED 0b00000100 // 4 2 command status: processing OK
+
126 #define SX128X_STATUS_DATA_AVAILABLE 0b00001000 // 4 2 data available
+
127 #define SX128X_STATUS_CMD_TIMEOUT 0b00001100 // 4 2 timeout
+
128 #define SX128X_STATUS_CMD_ERROR 0b00010000 // 4 2 processing error
+
129 #define SX128X_STATUS_CMD_FAILED 0b00010100 // 4 2 failed to execute
+
130 #define SX128X_STATUS_TX_DONE 0b00011000 // 4 2 transmission finished
+
131 #define SX128X_STATUS_BUSY 0b00000001 // 0 0 chip busy
+
132 #define SX128X_STATUS_SPI_FAILED 0b11111111 // 7 0 SPI transaction failed
+
133 
+
134 //SX128X_CMD_SET_SLEEP
+
135 #define SX128X_SLEEP_DATA_BUFFER_FLUSH 0b00000000 // 1 1 data buffer behavior in sleep mode: flush
+
136 #define SX128X_SLEEP_DATA_BUFFER_RETAIN 0b00000010 // 1 1 retain
+
137 #define SX128X_SLEEP_DATA_RAM_FLUSH 0b00000000 // 0 0 data RAM (configuration) behavior in sleep mode: flush
+
138 #define SX128X_SLEEP_DATA_RAM_RETAIN 0b00000001 // 0 0 retain
+
139 
+
140 //SX128X_CMD_SET_STANDBY
+
141 #define SX128X_STANDBY_RC 0x00 // 7 0 standby mode: 13 MHz RC oscillator
+
142 #define SX128X_STANDBY_XOSC 0x01 // 7 0 52 MHz crystal oscillator
+
143 
+
144 //SX128X_CMD_SET_TX + SX128X_CMD_SET_RX + SX128X_CMD_SET_RX_DUTY_CYCLE
+
145 #define SX128X_PERIOD_BASE_15_625_US 0x00 // 7 0 time period step: 15.625 us
+
146 #define SX128X_PERIOD_BASE_62_5_US 0x01 // 7 0 62.5 us
+
147 #define SX128X_PERIOD_BASE_1_MS 0x02 // 7 0 1 ms
+
148 #define SX128X_PERIOD_BASE_4_MS 0x03 // 7 0 4 ms
+
149 
+
150 //SX128X_CMD_SET_TX
+
151 #define SX128X_TX_TIMEOUT_NONE 0x0000 // 15 0 Tx timeout duration: no timeout (Tx single mode)
+
152 
+
153 //SX128X_CMD_SET_RX
+
154 #define SX128X_RX_TIMEOUT_NONE 0x0000 // 15 0 Rx timeout duration: no timeout (Rx single mode)
+
155 #define SX128X_RX_TIMEOUT_INF 0xFFFF // 15 0 infinite (Rx continuous mode)
+
156 
+
157 //SX128X_CMD_SET_PACKET_TYPE
+
158 #define SX128X_PACKET_TYPE_GFSK 0x00 // 7 0 packet type: (G)FSK
+
159 #define SX128X_PACKET_TYPE_LORA 0x01 // 7 0 LoRa
+
160 #define SX128X_PACKET_TYPE_RANGING 0x02 // 7 0 ranging engine
+
161 #define SX128X_PACKET_TYPE_FLRC 0x03 // 7 0 FLRC
+
162 #define SX128X_PACKET_TYPE_BLE 0x04 // 7 0 BLE
+
163 
+
164 //SX128X_CMD_SET_TX_PARAMS
+
165 #define SX128X_PA_RAMP_02_US 0x00 // 7 0 PA ramp time: 2 us
+
166 #define SX128X_PA_RAMP_04_US 0x20 // 7 0 4 us
+
167 #define SX128X_PA_RAMP_06_US 0x40 // 7 0 6 us
+
168 #define SX128X_PA_RAMP_08_US 0x60 // 7 0 8 us
+
169 #define SX128X_PA_RAMP_10_US 0x80 // 7 0 10 us
+
170 #define SX128X_PA_RAMP_12_US 0xA0 // 7 0 12 us
+
171 #define SX128X_PA_RAMP_16_US 0xC0 // 7 0 16 us
+
172 #define SX128X_PA_RAMP_20_US 0xE0 // 7 0 20 us
+
173 
+
174 //SX128X_CMD_SET_CAD_PARAMS
+
175 #define SX128X_CAD_ON_1_SYMB 0x00 // 7 0 number of symbols used for CAD: 1
+
176 #define SX128X_CAD_ON_2_SYMB 0x20 // 7 0 2
+
177 #define SX128X_CAD_ON_4_SYMB 0x40 // 7 0 4
+
178 #define SX128X_CAD_ON_8_SYMB 0x60 // 7 0 8
+
179 #define SX128X_CAD_ON_16_SYMB 0x80 // 7 0 16
+
180 
+
181 //SX128X_CMD_SET_MODULATION_PARAMS
+
182 #define SX128X_BLE_GFSK_BR_2_000_BW_2_4 0x04 // 7 0 GFSK/BLE bit rate and bandwidth setting: 2.0 Mbps 2.4 MHz
+
183 #define SX128X_BLE_GFSK_BR_1_600_BW_2_4 0x28 // 7 0 1.6 Mbps 2.4 MHz
+
184 #define SX128X_BLE_GFSK_BR_1_000_BW_2_4 0x4C // 7 0 1.0 Mbps 2.4 MHz
+
185 #define SX128X_BLE_GFSK_BR_1_000_BW_1_2 0x45 // 7 0 1.0 Mbps 1.2 MHz
+
186 #define SX128X_BLE_GFSK_BR_0_800_BW_2_4 0x70 // 7 0 0.8 Mbps 2.4 MHz
+
187 #define SX128X_BLE_GFSK_BR_0_800_BW_1_2 0x69 // 7 0 0.8 Mbps 1.2 MHz
+
188 #define SX128X_BLE_GFSK_BR_0_500_BW_1_2 0x8D // 7 0 0.5 Mbps 1.2 MHz
+
189 #define SX128X_BLE_GFSK_BR_0_500_BW_0_6 0x86 // 7 0 0.5 Mbps 0.6 MHz
+
190 #define SX128X_BLE_GFSK_BR_0_400_BW_1_2 0xB1 // 7 0 0.4 Mbps 1.2 MHz
+
191 #define SX128X_BLE_GFSK_BR_0_400_BW_0_6 0xAA // 7 0 0.4 Mbps 0.6 MHz
+
192 #define SX128X_BLE_GFSK_BR_0_250_BW_0_6 0xCE // 7 0 0.25 Mbps 0.6 MHz
+
193 #define SX128X_BLE_GFSK_BR_0_250_BW_0_3 0xC7 // 7 0 0.25 Mbps 0.3 MHz
+
194 #define SX128X_BLE_GFSK_BR_0_125_BW_0_3 0xEF // 7 0 0.125 Mbps 0.3 MHz
+
195 #define SX128X_BLE_GFSK_MOD_IND_0_35 0x00 // 7 0 GFSK/BLE modulation index: 0.35
+
196 #define SX128X_BLE_GFSK_MOD_IND_0_50 0x01 // 7 0 0.50
+
197 #define SX128X_BLE_GFSK_MOD_IND_0_75 0x02 // 7 0 0.75
+
198 #define SX128X_BLE_GFSK_MOD_IND_1_00 0x03 // 7 0 1.00
+
199 #define SX128X_BLE_GFSK_MOD_IND_1_25 0x04 // 7 0 1.25
+
200 #define SX128X_BLE_GFSK_MOD_IND_1_50 0x05 // 7 0 1.50
+
201 #define SX128X_BLE_GFSK_MOD_IND_1_75 0x06 // 7 0 1.75
+
202 #define SX128X_BLE_GFSK_MOD_IND_2_00 0x07 // 7 0 2.00
+
203 #define SX128X_BLE_GFSK_MOD_IND_2_25 0x08 // 7 0 2.25
+
204 #define SX128X_BLE_GFSK_MOD_IND_2_50 0x09 // 7 0 2.50
+
205 #define SX128X_BLE_GFSK_MOD_IND_2_75 0x0A // 7 0 2.75
+
206 #define SX128X_BLE_GFSK_MOD_IND_3_00 0x0B // 7 0 3.00
+
207 #define SX128X_BLE_GFSK_MOD_IND_3_25 0x0C // 7 0 3.25
+
208 #define SX128X_BLE_GFSK_MOD_IND_3_50 0x0D // 7 0 3.50
+
209 #define SX128X_BLE_GFSK_MOD_IND_3_75 0x0E // 7 0 3.75
+
210 #define SX128X_BLE_GFSK_MOD_IND_4_00 0x0F // 7 0 4.00
+
211 #define SX128X_BLE_GFSK_BT_OFF 0x00 // 7 0 GFSK Gaussian filter BT product: filter disabled
+
212 #define SX128X_BLE_GFSK_BT_1_0 0x10 // 7 0 1.0
+
213 #define SX128X_BLE_GFSK_BT_0_5 0x20 // 7 0 0.5
+
214 #define SX128X_FLRC_BR_1_300_BW_1_2 0x45 // 7 0 FLRC bit rate and bandwidth setting: 1.3 Mbps 1.2 MHz
+
215 #define SX128X_FLRC_BR_1_000_BW_1_2 0x69 // 7 0 1.04 Mbps 1.2 MHz
+
216 #define SX128X_FLRC_BR_0_650_BW_0_6 0x86 // 7 0 0.65 Mbps 0.6 MHz
+
217 #define SX128X_FLRC_BR_0_520_BW_0_6 0xAA // 7 0 0.52 Mbps 0.6 MHz
+
218 #define SX128X_FLRC_BR_0_325_BW_0_3 0xC7 // 7 0 0.325 Mbps 0.3 MHz
+
219 #define SX128X_FLRC_BR_0_260_BW_0_3 0xEB // 7 0 0.260 Mbps 0.3 MHz
+
220 #define SX128X_FLRC_CR_1_2 0x00 // 7 0 FLRC coding rate: 1/2
+
221 #define SX128X_FLRC_CR_3_4 0x02 // 7 0 3/4
+
222 #define SX128X_FLRC_CR_1_0 0x04 // 7 0 1/1
+
223 #define SX128X_FLRC_BT_OFF 0x00 // 7 0 FLRC Gaussian filter BT product: filter disabled
+
224 #define SX128X_FLRC_BT_1_0 0x10 // 7 0 1.0
+
225 #define SX128X_FLRC_BT_0_5 0x20 // 7 0 0.5
+
226 #define SX128X_LORA_SF_5 0x50 // 7 0 LoRa spreading factor: 5
+
227 #define SX128X_LORA_SF_6 0x60 // 7 0 6
+
228 #define SX128X_LORA_SF_7 0x70 // 7 0 7
+
229 #define SX128X_LORA_SF_8 0x80 // 7 0 8
+
230 #define SX128X_LORA_SF_9 0x90 // 7 0 9
+
231 #define SX128X_LORA_SF_10 0xA0 // 7 0 10
+
232 #define SX128X_LORA_SF_11 0xB0 // 7 0 11
+
233 #define SX128X_LORA_SF_12 0xC0 // 7 0 12
+
234 #define SX128X_LORA_BW_1625_00 0x0A // 7 0 LoRa bandwidth: 1625.0 kHz
+
235 #define SX128X_LORA_BW_812_50 0x18 // 7 0 812.5 kHz
+
236 #define SX128X_LORA_BW_406_25 0x26 // 7 0 406.25 kHz
+
237 #define SX128X_LORA_BW_203_125 0x34 // 7 0 203.125 kHz
+
238 #define SX128X_LORA_CR_4_5 0x01 // 7 0 LoRa coding rate: 4/5
+
239 #define SX128X_LORA_CR_4_6 0x02 // 7 0 4/6
+
240 #define SX128X_LORA_CR_4_7 0x03 // 7 0 4/7
+
241 #define SX128X_LORA_CR_4_8 0x04 // 7 0 4/8
+
242 #define SX128X_LORA_CR_4_5_LI 0x05 // 7 0 4/5, long interleaving
+
243 #define SX128X_LORA_CR_4_6_LI 0x06 // 7 0 4/6, long interleaving
+
244 #define SX128X_LORA_CR_4_7_LI 0x07 // 7 0 4/7, long interleaving
+
245 
+
246 //SX128X_CMD_SET_PACKET_PARAMS
+
247 #define SX128X_GFSK_FLRC_SYNC_WORD_OFF 0x00 // 7 0 GFSK/FLRC sync word used: none
+
248 #define SX128X_GFSK_FLRC_SYNC_WORD_1 0x10 // 7 0 sync word 1
+
249 #define SX128X_GFSK_FLRC_SYNC_WORD_2 0x20 // 7 0 sync word 2
+
250 #define SX128X_GFSK_FLRC_SYNC_WORD_1_2 0x30 // 7 0 sync words 1 and 2
+
251 #define SX128X_GFSK_FLRC_SYNC_WORD_3 0x40 // 7 0 sync word 3
+
252 #define SX128X_GFSK_FLRC_SYNC_WORD_1_3 0x50 // 7 0 sync words 1 and 3
+
253 #define SX128X_GFSK_FLRC_SYNC_WORD_2_3 0x60 // 7 0 sync words 2 and 3
+
254 #define SX128X_GFSK_FLRC_SYNC_WORD_1_2_3 0x70 // 7 0 sync words 1, 2 and 3
+
255 #define SX128X_GFSK_FLRC_PACKET_FIXED 0x00 // 7 0 GFSK/FLRC packet length mode: fixed
+
256 #define SX128X_GFSK_FLRC_PACKET_VARIABLE 0x20 // 7 0 variable
+
257 #define SX128X_GFSK_FLRC_CRC_OFF 0x00 // 7 0 GFSK/FLRC packet CRC: none
+
258 #define SX128X_GFSK_FLRC_CRC_1_BYTE 0x10 // 7 0 1 byte
+
259 #define SX128X_GFSK_FLRC_CRC_2_BYTE 0x20 // 7 0 2 bytes
+
260 #define SX128X_GFSK_FLRC_CRC_3_BYTE 0x30 // 7 0 3 bytes (FLRC only)
+
261 #define SX128X_GFSK_BLE_WHITENING_ON 0x00 // 7 0 GFSK/BLE whitening: enabled
+
262 #define SX128X_GFSK_BLE_WHITENING_OFF 0x08 // 7 0 disabled
+
263 #define SX128X_BLE_PAYLOAD_LENGTH_MAX_31 0x00 // 7 0 BLE maximum payload length: 31 bytes
+
264 #define SX128X_BLE_PAYLOAD_LENGTH_MAX_37 0x20 // 7 0 37 bytes
+
265 #define SX128X_BLE_PAYLOAD_LENGTH_TEST 0x40 // 7 0 63 bytes (test mode)
+
266 #define SX128X_BLE_PAYLOAD_LENGTH_MAX_255 0x80 // 7 0 255 bytes (Bluetooth 4.2 and above)
+
267 #define SX128X_BLE_CRC_OFF 0x00 // 7 0 BLE packet CRC: none
+
268 #define SX128X_BLE_CRC_3_BYTE 0x10 // 7 0 3 byte
+
269 #define SX128X_BLE_PRBS_9 0x00 // 7 0 BLE test payload contents: PRNG sequence using x^9 + x^5 + x
+
270 #define SX128X_BLE_EYELONG 0x04 // 7 0 repeated 0xF0
+
271 #define SX128X_BLE_EYESHORT 0x08 // 7 0 repeated 0xAA
+
272 #define SX128X_BLE_PRBS_15 0x0C // 7 0 PRNG sequence using x^15 + x^14 + x^13 + x^12 + x^2 + x + 1
+
273 #define SX128X_BLE_ALL_1 0x10 // 7 0 repeated 0xFF
+
274 #define SX128X_BLE_ALL_0 0x14 // 7 0 repeated 0x00
+
275 #define SX128X_BLE_EYELONG_INV 0x18 // 7 0 repeated 0x0F
+
276 #define SX128X_BLE_EYESHORT_INV 0x1C // 7 0 repeated 0x55
+
277 #define SX128X_FLRC_SYNC_WORD_OFF 0x00 // 7 0 FLRC sync word: disabled
+
278 #define SX128X_FLRC_SYNC_WORD_ON 0x04 // 7 0 enabled
+
279 #define SX128X_LORA_HEADER_EXPLICIT 0x00 // 7 0 LoRa header mode: explicit
+
280 #define SX128X_LORA_HEADER_IMPLICIT 0x80 // 7 0 implicit
+
281 #define SX128X_LORA_CRC_OFF 0x00 // 7 0 LoRa packet CRC: disabled
+
282 #define SX128X_LORA_CRC_ON 0x20 // 7 0 enabled
+
283 #define SX128X_LORA_IQ_STANDARD 0x40 // 7 0 LoRa IQ: standard
+
284 #define SX128X_LORA_IQ_INVERTED 0x00 // 7 0 inverted
+
285 
+
286 //SX128X_CMD_GET_PACKET_STATUS
+
287 #define SX128X_PACKET_STATUS_SYNC_ERROR 0b01000000 // 6 6 packet status errors byte: sync word error
+
288 #define SX128X_PACKET_STATUS_LENGTH_ERROR 0b00100000 // 5 5 packet length error
+
289 #define SX128X_PACKET_STATUS_CRC_ERROR 0b00010000 // 4 4 CRC error
+
290 #define SX128X_PACKET_STATUS_ABORT_ERROR 0b00001000 // 3 3 packet reception aborted
+
291 #define SX128X_PACKET_STATUS_HEADER_RECEIVED 0b00000100 // 2 2 header received
+
292 #define SX128X_PACKET_STATUS_PACKET_RECEIVED 0b00000010 // 1 1 packet received
+
293 #define SX128X_PACKET_STATUS_PACKET_CTRL_BUSY 0b00000001 // 0 0 packet controller is busy
+
294 #define SX128X_PACKET_STATUS_RX_PID 0b11000000 // 7 6 packet status status byte: PID field of the received packet
+
295 #define SX128X_PACKET_STATUS_NO_ACK 0b00100000 // 5 5 NO_ACK field of the received packet
+
296 #define SX128X_PACKET_STATUS_RX_PID_ERROR 0b00010000 // 4 4 PID field error
+
297 #define SX128X_PACKET_STATUS_PACKET_SENT 0b00000001 // 0 0 packet sent
+
298 #define SX128X_PACKET_STATUS_SYNC_DET_ERROR 0b00000000 // 2 0 packet status sync byte: sync word detection error
+
299 #define SX128X_PACKET_STATUS_SYNC_DET_1 0b00000001 // 2 0 detected sync word 1
+
300 #define SX128X_PACKET_STATUS_SYNC_DET_2 0b00000010 // 2 0 detected sync word 2
+
301 #define SX128X_PACKET_STATUS_SYNC_DET_3 0b00000100 // 2 0 detected sync word 3
+
302 
+
303 //SX128X_CMD_SET_DIO_IRQ_PARAMS
+
304 #define SX128X_IRQ_PREAMBLE_DETECTED 0x8000 // 15 15 interrupt source: preamble detected
+
305 #define SX128X_IRQ_ADVANCED_RANGING_DONE 0x8000 // 15 15 advanced ranging done
+
306 #define SX128X_IRQ_RX_TX_TIMEOUT 0x4000 // 14 14 Rx or Tx timeout
+
307 #define SX128X_IRQ_CAD_DETECTED 0x2000 // 13 13 channel activity detected
+
308 #define SX128X_IRQ_CAD_DONE 0x1000 // 12 12 CAD finished
+
309 #define SX128X_IRQ_RANGING_SLAVE_REQ_VALID 0x0800 // 11 11 ranging request valid (slave)
+
310 #define SX128X_IRQ_RANGING_MASTER_TIMEOUT 0x0400 // 10 10 ranging timeout (master)
+
311 #define SX128X_IRQ_RANGING_MASTER_RES_VALID 0x0200 // 9 9 ranging result valid (master)
+
312 #define SX128X_IRQ_RANGING_SLAVE_REQ_DISCARD 0x0100 // 8 8 ranging result valid (master)
+
313 #define SX128X_IRQ_RANGING_SLAVE_RESP_DONE 0x0080 // 7 7 ranging response complete (slave)
+
314 #define SX128X_IRQ_CRC_ERROR 0x0040 // 6 6 CRC error
+
315 #define SX128X_IRQ_HEADER_ERROR 0x0020 // 5 5 header error
+
316 #define SX128X_IRQ_HEADER_VALID 0x0010 // 4 4 header valid
+
317 #define SX128X_IRQ_SYNC_WORD_ERROR 0x0008 // 3 3 sync word error
+
318 #define SX128X_IRQ_SYNC_WORD_VALID 0x0004 // 2 2 sync word valid
+
319 #define SX128X_IRQ_RX_DONE 0x0002 // 1 1 Rx done
+
320 #define SX128X_IRQ_TX_DONE 0x0001 // 0 0 Tx done
+
321 #define SX128X_IRQ_NONE 0x0000 // 15 0 none
+
322 #define SX128X_IRQ_ALL 0xFFFF // 15 0 all
+
323 
+
324 //SX128X_CMD_SET_REGULATOR_MODE
+
325 #define SX128X_REGULATOR_LDO 0x00 // 7 0 set regulator mode: LDO (default)
+
326 #define SX128X_REGULATOR_DC_DC 0x01 // 7 0 DC-DC
+
327 
+
328 //SX128X_CMD_SET_RANGING_ROLE
+
329 #define SX128X_RANGING_ROLE_MASTER 0x01 // 7 0 ranging role: master
+
330 #define SX128X_RANGING_ROLE_SLAVE 0x00 // 7 0 slave
+
331 
+
332 
+
339 class SX128x: public PhysicalLayer {
+
340  public:
+
341  // introduce PhysicalLayer overloads
+ + + + +
346 
+
352  SX128x(Module* mod);
+
353 
+
354  // basic methods
+
355 
+
373  int16_t begin(float freq = 2400.0, float bw = 812.5, uint8_t sf = 9, uint8_t cr = 7, int8_t power = 10, uint16_t preambleLength = 12);
+
374 
+
390  int16_t beginGFSK(float freq = 2400.0, uint16_t br = 800, float freqDev = 400.0, int8_t power = 10, uint16_t preambleLength = 16);
+
391 
+
407  int16_t beginBLE(float freq = 2400.0, uint16_t br = 800, float freqDev = 400.0, int8_t power = 10, uint8_t dataShaping = RADIOLIB_SHAPING_0_5);
+
408 
+
426  int16_t beginFLRC(float freq = 2400.0, uint16_t br = 650, uint8_t cr = 3, int8_t power = 10, uint16_t preambleLength = 16, uint8_t dataShaping = RADIOLIB_SHAPING_0_5);
+
427 
+
436  int16_t reset(bool verify = true);
+
437 
+
450  int16_t transmit(uint8_t* data, size_t len, uint8_t addr = 0) override;
+
451 
+
462  int16_t receive(uint8_t* data, size_t len) override;
+
463 
+
471  int16_t transmitDirect(uint32_t frf = 0) override;
+
472 
+
479  int16_t receiveDirect() override;
+
480 
+
486  int16_t scanChannel();
+
487 
+
495  int16_t sleep(bool retainConfig = true);
+
496 
+
502  int16_t standby() override;
+
503 
+
511  int16_t standby(uint8_t mode);
+
512 
+
513  // interrupt methods
+
514 
+
520  void setDio1Action(void (*func)(void));
+
521 
+
525  void clearDio1Action();
+
526 
+
539  int16_t startTransmit(uint8_t* data, size_t len, uint8_t addr = 0) override;
+
540 
+
548  int16_t startReceive(uint16_t timeout = SX128X_RX_TIMEOUT_INF);
+
549 
+
559  int16_t readData(uint8_t* data, size_t len) override;
+
560 
+
561  // configuration methods
+
562 
+
570  int16_t setFrequency(float freq);
+
571 
+
579  int16_t setBandwidth(float bw);
+
580 
+
588  int16_t setSpreadingFactor(uint8_t sf);
+
589 
+
599  int16_t setCodingRate(uint8_t cr, bool longInterleaving = false);
+
600 
+
608  int16_t setOutputPower(int8_t power);
+
609 
+
617  int16_t setPreambleLength(uint32_t preambleLength);
+
618 
+
626  int16_t setBitRate(uint16_t br);
+
627 
+
635  int16_t setFrequencyDeviation(float freqDev) override;
+
636 
+
645  int16_t setDataShaping(uint8_t sh) override;
+
646 
+
656  int16_t setSyncWord(uint8_t* syncWord, uint8_t len);
+
657 
+
669  int16_t setCRC(uint8_t len, uint32_t initial = 0x1D0F, uint16_t polynomial = 0x1021);
+
670 
+
678  int16_t setWhitening(bool enabled);
+
679 
+
687  int16_t setAccessAddress(uint32_t addr);
+
688 
+
694  float getRSSI();
+
695 
+
701  float getSNR();
+
702 
+
710  size_t getPacketLength(bool update = true) override;
+
711 
+
719  uint32_t getTimeOnAir(size_t len);
+
720 
+
726  int16_t implicitHeader(size_t len);
+
727 
+
735  int16_t explicitHeader();
+
736 
+
744  int16_t setEncoding(uint8_t encoding) override;
+
745 
+
754  void setRfSwitchPins(RADIOLIB_PIN_TYPE rxEn, RADIOLIB_PIN_TYPE txEn);
+
755 
+
761  uint8_t random();
+
762 
+
763 #ifndef RADIOLIB_GODMODE
+
764  protected:
+
765 #endif
+
766  Module* _mod;
+
767 
+
768  // cached LoRa parameters
+
769  float _bwKhz = 0;
+
770  uint8_t _bw = 0, _sf = 0, _cr = 0;
+
771  uint8_t _preambleLengthLoRa = 0, _headerType = 0, _payloadLen = 0, _crcLoRa = 0;
+
772 
+
773  // SX128x SPI command implementations
+
774  uint8_t getStatus();
+
775  int16_t writeRegister(uint16_t addr, uint8_t* data, uint8_t numBytes);
+
776  int16_t readRegister(uint16_t addr, uint8_t* data, uint8_t numBytes);
+
777  int16_t writeBuffer(uint8_t* data, uint8_t numBytes, uint8_t offset = 0x00);
+
778  int16_t readBuffer(uint8_t* data, uint8_t numBytes);
+
779  int16_t setTx(uint16_t periodBaseCount = SX128X_TX_TIMEOUT_NONE, uint8_t periodBase = SX128X_PERIOD_BASE_15_625_US);
+
780  int16_t setRx(uint16_t periodBaseCount, uint8_t periodBase = SX128X_PERIOD_BASE_15_625_US);
+
781  int16_t setCad();
+
782  uint8_t getPacketType();
+
783  int16_t setRfFrequency(uint32_t frf);
+
784  int16_t setTxParams(uint8_t power, uint8_t rampTime = SX128X_PA_RAMP_10_US);
+
785  int16_t setBufferBaseAddress(uint8_t txBaseAddress = 0x00, uint8_t rxBaseAddress = 0x00);
+
786  int16_t setModulationParams(uint8_t modParam1, uint8_t modParam2, uint8_t modParam3);
+
787  int16_t setPacketParamsGFSK(uint8_t preambleLen, uint8_t syncWordLen, uint8_t syncWordMatch, uint8_t crcLen, uint8_t whitening, uint8_t payloadLen = 0xFF, uint8_t headerType = SX128X_GFSK_FLRC_PACKET_VARIABLE);
+
788  int16_t setPacketParamsBLE(uint8_t connState, uint8_t crcLen, uint8_t bleTestPayload, uint8_t whitening);
+
789  int16_t setPacketParamsLoRa(uint8_t preambleLen, uint8_t headerType, uint8_t payloadLen, uint8_t crc, uint8_t invertIQ = SX128X_LORA_IQ_STANDARD);
+
790  int16_t setDioIrqParams(uint16_t irqMask, uint16_t dio1Mask, uint16_t dio2Mask = SX128X_IRQ_NONE, uint16_t dio3Mask = SX128X_IRQ_NONE);
+
791  uint16_t getIrqStatus();
+
792  int16_t clearIrqStatus(uint16_t clearIrqParams = SX128X_IRQ_ALL);
+
793  int16_t setRangingRole(uint8_t role);
+
794  int16_t setPacketType(uint8_t type);
+
795 
+
796  int16_t setHeaderType(uint8_t headerType, size_t len = 0xFF);
+
797 
+
798 #ifndef RADIOLIB_GODMODE
+
799  private:
+
800 #endif
+
801  // common parameters
+
802  uint8_t _pwr = 0;
+
803 
+
804  // cached GFSK parameters
+
805  float _modIndexReal = 0;
+
806  uint16_t _brKbps = 0;
+
807  uint8_t _br = 0, _modIndex = 0, _shaping = 0;
+
808  uint8_t _preambleLengthGFSK = 0, _syncWordLen = 0, _syncWordMatch = 0, _crcGFSK = 0, _whitening = 0;
+
809 
+
810  // cached FLRC parameters
+
811  uint8_t _crFLRC = 0;
+
812 
+
813  // cached BLE parameters
+
814  uint8_t _connectionState = 0, _crcBLE = 0, _bleTestPayload = 0;
+
815 
+
816  int16_t config(uint8_t modem);
+
817 
+
818  // common low-level SPI interface
+
819  int16_t SPIwriteCommand(uint8_t cmd, uint8_t* data, uint8_t numBytes, bool waitForBusy = true);
+
820  int16_t SPIwriteCommand(uint8_t* cmd, uint8_t cmdLen, uint8_t* data, uint8_t numBytes, bool waitForBusy = true);
+
821  int16_t SPIreadCommand(uint8_t cmd, uint8_t* data, uint8_t numBytes, bool waitForBusy = true);
+
822  int16_t SPIreadCommand(uint8_t* cmd, uint8_t cmdLen, uint8_t* data, uint8_t numBytes, bool waitForBusy = true);
+
823  int16_t SPItransfer(uint8_t* cmd, uint8_t cmdLen, bool write, uint8_t* dataOut, uint8_t* dataIn, uint8_t numBytes, bool waitForBusy, uint32_t timeout = 5000);
+
824 };
+
825 
+
826 #endif
+
827 
+
828 #endif
+
int16_t beginBLE(float freq=2400.0, uint16_t br=800, float freqDev=400.0, int8_t power=10, uint8_t dataShaping=RADIOLIB_SHAPING_0_5)
Initialization method for BLE modem.
Definition: SX128x.cpp:123
+
int16_t readData(uint8_t *data, size_t len) override
Reads data received after calling startReceive method.
Definition: SX128x.cpp:551
+
int16_t transmit(__FlashStringHelper *fstr, uint8_t addr=0)
Arduino Flash String transmit method.
Definition: PhysicalLayer.cpp:8
+
Base class for SX128x series. All derived classes for SX128x (e.g. SX1280 or SX1281) inherit from thi...
Definition: SX128x.h:339
+
int16_t setSyncWord(uint8_t *syncWord, uint8_t len)
Sets FSK/FLRC sync word in the form of array of up to 5 bytes (FSK). For FLRC modem,...
Definition: SX128x.cpp:861
+
int16_t setCodingRate(uint8_t cr, bool longInterleaving=false)
Sets LoRa coding rate denominator. Allowed values range from 5 to 8.
Definition: SX128x.cpp:659
+
int16_t startTransmit(uint8_t *data, size_t len, uint8_t addr=0) override
Interrupt-driven binary transmit method. Overloads for string-based transmissions are implemented in ...
Definition: SX128x.cpp:454
+
int16_t standby() override
Sets the module to standby mode (overload for PhysicalLayer compatibility, uses 13 MHz RC oscillator)...
Definition: SX128x.cpp:434
+
int16_t receiveDirect() override
Starts direct mode reception. Only implemented for PhysicalLayer compatibility, as SX128x series does...
Definition: SX128x.cpp:365
+
int16_t setAccessAddress(uint32_t addr)
Sets BLE access address.
Definition: SX128x.cpp:993
+
int16_t setDataShaping(uint8_t sh) override
Sets time-bandwidth product of Gaussian filter applied for shaping. Allowed values are RADIOLIB_SHAPI...
Definition: SX128x.cpp:831
+
uint8_t random()
Dummy random method, to ensure PhysicalLayer compatibility.
Definition: SX128x.cpp:1135
+
int16_t startReceive(uint16_t timeout=SX128X_RX_TIMEOUT_INF)
Interrupt-driven receive method. DIO1 will be activated when full packet is received.
Definition: SX128x.cpp:518
+
int16_t receive(uint8_t *data, size_t len) override
Blocking binary receive method. Overloads for string-based transmissions are implemented in PhysicalL...
Definition: SX128x.cpp:312
+
#define RADIOLIB_SHAPING_0_5
Gaussin shaping filter, BT = 0.5.
Definition: TypeDef.h:110
+
int16_t readData(String &str, size_t len=0)
Reads data that was received after calling startReceive method.
Definition: PhysicalLayer.cpp:57
+
int16_t setFrequency(float freq)
Sets carrier frequency. Allowed values are in range from 2400.0 to 2500.0 MHz.
Definition: SX128x.cpp:587
+
SX128x(Module *mod)
Default constructor.
Definition: SX128x.cpp:4
+
int16_t setCRC(uint8_t len, uint32_t initial=0x1D0F, uint16_t polynomial=0x1021)
Sets CRC configuration.
Definition: SX128x.cpp:909
+
int16_t setWhitening(bool enabled)
Sets whitening parameters, not available for LoRa or FLRC modem.
Definition: SX128x.cpp:973
+
int16_t scanChannel()
Performs scan for LoRa transmission in the current channel. Detects both preamble and payload.
Definition: SX128x.cpp:373
+
int16_t setFrequencyDeviation(float freqDev) override
Sets FSK frequency deviation. Allowed values range from 0.0 to 3200.0 kHz.
Definition: SX128x.cpp:798
+
void clearDio1Action()
Clears interrupt service routine to call when DIO1 activates.
Definition: SX128x.cpp:450
+
int16_t setBandwidth(float bw)
Sets LoRa bandwidth. Allowed values are 203.125, 406.25, 812.5 and 1625.0 kHz.
Definition: SX128x.cpp:595
+
int16_t beginFLRC(float freq=2400.0, uint16_t br=650, uint8_t cr=3, int8_t power=10, uint16_t preambleLength=16, uint8_t dataShaping=RADIOLIB_SHAPING_0_5)
Initialization method for FLRC modem.
Definition: SX128x.cpp:172
+
int16_t setBitRate(uint16_t br)
Sets FSK or FLRC bit rate. Allowed values are 125, 250, 400, 500, 800, 1000, 1600 and 2000 kbps (for ...
Definition: SX128x.cpp:741
+
int16_t setEncoding(uint8_t encoding) override
Sets transmission encoding. Serves only as alias for PhysicalLayer compatibility.
Definition: SX128x.cpp:1127
+
int16_t setSpreadingFactor(uint8_t sf)
Sets LoRa spreading factor. Allowed values range from 5 to 12.
Definition: SX128x.cpp:625
+
int16_t beginGFSK(float freq=2400.0, uint16_t br=800, float freqDev=400.0, int8_t power=10, uint16_t preambleLength=16)
Initialization method for GFSK modem.
Definition: SX128x.cpp:60
+
float getRSSI()
Gets RSSI (Recorded Signal Strength Indicator) of the last received packet.
Definition: SX128x.cpp:1004
+
int16_t setOutputPower(int8_t power)
Sets output power. Allowed values are in range from -18 to 13 dBm.
Definition: SX128x.cpp:687
+
int16_t transmitDirect(uint32_t frf=0) override
Starts direct mode transmission.
Definition: SX128x.cpp:350
+
int16_t transmit(uint8_t *data, size_t len, uint8_t addr=0) override
Blocking binary transmit method. Overloads for string-based transmissions are implemented in Physical...
Definition: SX128x.cpp:264
+
size_t getPacketLength(bool update=true) override
Query modem for the packet length of received payload.
Definition: SX128x.cpp:1048
+
Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN....
Definition: PhysicalLayer.h:13
+
int16_t receive(String &str, size_t len=0)
Arduino String receive method.
Definition: PhysicalLayer.cpp:98
+
uint32_t getTimeOnAir(size_t len)
Get expected time-on-air for a given size of payload.
Definition: SX128x.cpp:1055
+
Implements all common low-level SPI/UART/I2C methods to control the wireless module....
Definition: Module.h:17
+
void setDio1Action(void(*func)(void))
Sets interrupt service routine to call when DIO1 activates.
Definition: SX128x.cpp:446
+
int16_t setPreambleLength(uint32_t preambleLength)
Sets preamble length for currently active modem. Allowed values range from 1 to 65535.
Definition: SX128x.cpp:693
+
int16_t explicitHeader()
Set explicit header mode for future reception/transmission.
Definition: SX128x.cpp:1123
+
int16_t sleep(bool retainConfig=true)
Sets the module to sleep mode.
Definition: SX128x.cpp:418
+
int16_t implicitHeader(size_t len)
Set implicit header mode for future reception/transmission.
Definition: SX128x.cpp:1119
+
void setRfSwitchPins(RADIOLIB_PIN_TYPE rxEn, RADIOLIB_PIN_TYPE txEn)
Some modules contain external RF switch controlled by two pins. This function gives RadioLib control ...
Definition: SX128x.cpp:1131
+
float getSNR()
Gets SNR (Signal to Noise Ratio) of the last received packet. Only available for LoRa or ranging mode...
Definition: SX128x.cpp:1028
+
int16_t begin(float freq=2400.0, float bw=812.5, uint8_t sf=9, uint8_t cr=7, int8_t power=10, uint16_t preambleLength=12)
Initialization method for LoRa modem.
Definition: SX128x.cpp:8
+
int16_t startTransmit(String &str, uint8_t addr=0)
Interrupt-driven Arduino String transmit method. Unlike the standard transmit method,...
Definition: PhysicalLayer.cpp:49
+
int16_t reset(bool verify=true)
Reset method. Will reset the chip to the default state using RST pin.
Definition: SX128x.cpp:231
diff --git a/_si4430_8h_source.html b/_si4430_8h_source.html index 96054728..39843822 100644 --- a/_si4430_8h_source.html +++ b/_si4430_8h_source.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/modules/Si443x/Si4430.h Source File @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -84,22 +86,62 @@ $(document).ready(function(){initNavTree('_si4430_8h_source.html','');});
Si4430.h
-
1 #if !defined(_RADIOLIB_SI4430_H)
2 #define _RADIOLIB_SI4430_H
3 
4 #include "../../TypeDef.h"
5 
6 #if !defined(RADIOLIB_EXCLUDE_SI443X)
7 
8 #include "../../Module.h"
9 #include "Si4432.h"
10 
16 class Si4430: public Si4432 {
17  public:
18 
19  // constructor
20 
26  Si4430(Module* mod);
27 
28  // basic methods
29 
47  int16_t begin(float freq = 434.0, float br = 48.0, float freqDev = 50.0, float rxBw = 181.1, int8_t power = 10, uint8_t preambleLen = 16);
48 
49  // configuration methods
50 
58  int16_t setFrequency(float freq);
59 
67  int16_t setOutputPower(int8_t power);
68 
69 
70 #ifndef RADIOLIB_GODMODE
71  protected:
72 #endif
73 
74 #ifndef RADIOLIB_GODMODE
75  private:
76 #endif
77 };
78 
79 #endif
80 
81 #endif
int16_t setFrequency(float freq)
Sets carrier frequency. Allowed values range from 900.0 MHz to 960.0 MHz.
Definition: Si4430.cpp:24
-
int16_t begin(float freq=434.0, float br=48.0, float freqDev=50.0, float rxBw=181.1, int8_t power=10, uint8_t preambleLen=16)
Initialization method. Must be called at least once from Arduino sketch to initialize the module...
Definition: Si4430.cpp:8
-
Derived class for Si4432 modules.
Definition: Si4432.h:16
-
Si4430(Module *mod)
Default constructor.
Definition: Si4430.cpp:4
-
Implements all common low-level SPI/UART/I2C methods to control the wireless module. Every module class contains one private instance of this class.
Definition: Module.h:17
-
int16_t setOutputPower(int8_t power)
Sets output power. Allowed values range from -8 to 13 dBm in 3 dBm steps.
Definition: Si4430.cpp:31
-
Derived class for Si4430 modules.
Definition: Si4430.h:16
+
1 #if !defined(_RADIOLIB_SI4430_H)
+
2 #define _RADIOLIB_SI4430_H
+
3 
+
4 #include "../../TypeDef.h"
+
5 
+
6 #if !defined(RADIOLIB_EXCLUDE_SI443X)
+
7 
+
8 #include "../../Module.h"
+
9 #include "Si4432.h"
+
10 
+
16 class Si4430: public Si4432 {
+
17  public:
+
18 
+
19  // constructor
+
20 
+
26  Si4430(Module* mod);
+
27 
+
28  // basic methods
+
29 
+
47  int16_t begin(float freq = 434.0, float br = 48.0, float freqDev = 50.0, float rxBw = 181.1, int8_t power = 10, uint8_t preambleLen = 16);
+
48 
+
49  // configuration methods
+
50 
+
58  int16_t setFrequency(float freq);
+
59 
+
67  int16_t setOutputPower(int8_t power);
+
68 
+
69 
+
70 #ifndef RADIOLIB_GODMODE
+
71  protected:
+
72 #endif
+
73 
+
74 #ifndef RADIOLIB_GODMODE
+
75  private:
+
76 #endif
+
77 };
+
78 
+
79 #endif
+
80 
+
81 #endif
+
Si4430(Module *mod)
Default constructor.
Definition: Si4430.cpp:4
+
int16_t setOutputPower(int8_t power)
Sets output power. Allowed values range from -8 to 13 dBm in 3 dBm steps.
Definition: Si4430.cpp:31
+
Derived class for Si4432 modules.
Definition: Si4432.h:16
+
int16_t begin(float freq=434.0, float br=48.0, float freqDev=50.0, float rxBw=181.1, int8_t power=10, uint8_t preambleLen=16)
Initialization method. Must be called at least once from Arduino sketch to initialize the module.
Definition: Si4430.cpp:8
+
int16_t setFrequency(float freq)
Sets carrier frequency. Allowed values range from 900.0 MHz to 960.0 MHz.
Definition: Si4430.cpp:24
+
Derived class for Si4430 modules.
Definition: Si4430.h:16
+
Implements all common low-level SPI/UART/I2C methods to control the wireless module....
Definition: Module.h:17
diff --git a/_si4431_8h_source.html b/_si4431_8h_source.html index 416f4752..a4a1ea62 100644 --- a/_si4431_8h_source.html +++ b/_si4431_8h_source.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/modules/Si443x/Si4431.h Source File @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -84,21 +86,59 @@ $(document).ready(function(){initNavTree('_si4431_8h_source.html','');});
Si4431.h
-
1 #if !defined(_RADIOLIB_SI4431_H)
2 #define _RADIOLIB_SI4431_H
3 
4 #include "../../TypeDef.h"
5 
6 #if !defined(RADIOLIB_EXCLUDE_SI443X)
7 
8 #include "../../Module.h"
9 #include "Si4432.h"
10 
16 class Si4431: public Si4432 {
17  public:
18 
19  // constructor
20 
26  Si4431(Module* mod);
27 
28  // basic methods
29 
47  int16_t begin(float freq = 434.0, float br = 48.0, float freqDev = 50.0, float rxBw = 181.1, int8_t power = 10, uint8_t preambleLen = 16);
48 
49  // configuration methods
50 
58  int16_t setOutputPower(int8_t power);
59 
60 
61 #ifndef RADIOLIB_GODMODE
62  protected:
63 #endif
64 
65 #ifndef RADIOLIB_GODMODE
66  private:
67 #endif
68 };
69 
70 #endif
71 
72 #endif
Derived class for Si4432 modules.
Definition: Si4432.h:16
-
int16_t setOutputPower(int8_t power)
Sets output power. Allowed values range from -8 to 13 dBm in 3 dBm steps.
Definition: Si4431.cpp:24
-
Implements all common low-level SPI/UART/I2C methods to control the wireless module. Every module class contains one private instance of this class.
Definition: Module.h:17
-
Derived class for Si4431 modules.
Definition: Si4431.h:16
-
int16_t begin(float freq=434.0, float br=48.0, float freqDev=50.0, float rxBw=181.1, int8_t power=10, uint8_t preambleLen=16)
Initialization method. Must be called at least once from Arduino sketch to initialize the module...
Definition: Si4431.cpp:8
-
Si4431(Module *mod)
Default constructor.
Definition: Si4431.cpp:4
+
1 #if !defined(_RADIOLIB_SI4431_H)
+
2 #define _RADIOLIB_SI4431_H
+
3 
+
4 #include "../../TypeDef.h"
+
5 
+
6 #if !defined(RADIOLIB_EXCLUDE_SI443X)
+
7 
+
8 #include "../../Module.h"
+
9 #include "Si4432.h"
+
10 
+
16 class Si4431: public Si4432 {
+
17  public:
+
18 
+
19  // constructor
+
20 
+
26  Si4431(Module* mod);
+
27 
+
28  // basic methods
+
29 
+
47  int16_t begin(float freq = 434.0, float br = 48.0, float freqDev = 50.0, float rxBw = 181.1, int8_t power = 10, uint8_t preambleLen = 16);
+
48 
+
49  // configuration methods
+
50 
+
58  int16_t setOutputPower(int8_t power);
+
59 
+
60 
+
61 #ifndef RADIOLIB_GODMODE
+
62  protected:
+
63 #endif
+
64 
+
65 #ifndef RADIOLIB_GODMODE
+
66  private:
+
67 #endif
+
68 };
+
69 
+
70 #endif
+
71 
+
72 #endif
+
Derived class for Si4431 modules.
Definition: Si4431.h:16
+
int16_t begin(float freq=434.0, float br=48.0, float freqDev=50.0, float rxBw=181.1, int8_t power=10, uint8_t preambleLen=16)
Initialization method. Must be called at least once from Arduino sketch to initialize the module.
Definition: Si4431.cpp:8
+
Si4431(Module *mod)
Default constructor.
Definition: Si4431.cpp:4
+
Derived class for Si4432 modules.
Definition: Si4432.h:16
+
Implements all common low-level SPI/UART/I2C methods to control the wireless module....
Definition: Module.h:17
+
int16_t setOutputPower(int8_t power)
Sets output power. Allowed values range from -8 to 13 dBm in 3 dBm steps.
Definition: Si4431.cpp:24
diff --git a/_si4432_8h_source.html b/_si4432_8h_source.html index 8a3a6329..0deb26b8 100644 --- a/_si4432_8h_source.html +++ b/_si4432_8h_source.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/modules/Si443x/Si4432.h Source File @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -84,22 +86,62 @@ $(document).ready(function(){initNavTree('_si4432_8h_source.html','');});
Si4432.h
-
1 #if !defined(_RADIOLIB_SI4432_H)
2 #define _RADIOLIB_SI4432_H
3 
4 #include "../../TypeDef.h"
5 
6 #if !defined(RADIOLIB_EXCLUDE_SI443X)
7 
8 #include "../../Module.h"
9 #include "Si443x.h"
10 
16 class Si4432: public Si443x {
17  public:
18 
19  // constructor
20 
26  Si4432(Module* mod);
27 
28  // basic methods
29 
47  int16_t begin(float freq = 434.0, float br = 48.0, float freqDev = 50.0, float rxBw = 181.1, int8_t power = 10, uint8_t preambleLen = 16);
48 
49  // configuration methods
50 
58  int16_t setFrequency(float freq);
59 
67  int16_t setOutputPower(int8_t power);
68 
69 
70 #ifndef RADIOLIB_GODMODE
71  protected:
72 #endif
73 
74 #ifndef RADIOLIB_GODMODE
75  private:
76 #endif
77 };
78 
79 #endif
80 
81 #endif
int16_t setFrequency(float freq)
Sets carrier frequency. Allowed values range from 240.0 MHz to 930.0 MHz.
Definition: Si4432.cpp:24
-
Derived class for Si4432 modules.
Definition: Si4432.h:16
-
int16_t begin(float freq=434.0, float br=48.0, float freqDev=50.0, float rxBw=181.1, int8_t power=10, uint8_t preambleLen=16)
Initialization method. Must be called at least once from Arduino sketch to initialize the module...
Definition: Si4432.cpp:8
-
Base class for Si443x series. All derived classes for Si443x (e.g. Si4431 or Si4432) inherit from thi...
Definition: Si443x.h:554
-
Implements all common low-level SPI/UART/I2C methods to control the wireless module. Every module class contains one private instance of this class.
Definition: Module.h:17
-
int16_t setOutputPower(int8_t power)
Sets output power. Allowed values range from -1 to 20 dBm in 3 dBm steps.
Definition: Si4432.cpp:31
-
Si4432(Module *mod)
Default constructor.
Definition: Si4432.cpp:4
+
1 #if !defined(_RADIOLIB_SI4432_H)
+
2 #define _RADIOLIB_SI4432_H
+
3 
+
4 #include "../../TypeDef.h"
+
5 
+
6 #if !defined(RADIOLIB_EXCLUDE_SI443X)
+
7 
+
8 #include "../../Module.h"
+
9 #include "Si443x.h"
+
10 
+
16 class Si4432: public Si443x {
+
17  public:
+
18 
+
19  // constructor
+
20 
+
26  Si4432(Module* mod);
+
27 
+
28  // basic methods
+
29 
+
47  int16_t begin(float freq = 434.0, float br = 48.0, float freqDev = 50.0, float rxBw = 181.1, int8_t power = 10, uint8_t preambleLen = 16);
+
48 
+
49  // configuration methods
+
50 
+
58  int16_t setFrequency(float freq);
+
59 
+
67  int16_t setOutputPower(int8_t power);
+
68 
+
69 
+
70 #ifndef RADIOLIB_GODMODE
+
71  protected:
+
72 #endif
+
73 
+
74 #ifndef RADIOLIB_GODMODE
+
75  private:
+
76 #endif
+
77 };
+
78 
+
79 #endif
+
80 
+
81 #endif
+
int16_t begin(float freq=434.0, float br=48.0, float freqDev=50.0, float rxBw=181.1, int8_t power=10, uint8_t preambleLen=16)
Initialization method. Must be called at least once from Arduino sketch to initialize the module.
Definition: Si4432.cpp:8
+
Derived class for Si4432 modules.
Definition: Si4432.h:16
+
int16_t setFrequency(float freq)
Sets carrier frequency. Allowed values range from 240.0 MHz to 930.0 MHz.
Definition: Si4432.cpp:24
+
int16_t setOutputPower(int8_t power)
Sets output power. Allowed values range from -1 to 20 dBm in 3 dBm steps.
Definition: Si4432.cpp:31
+
Si4432(Module *mod)
Default constructor.
Definition: Si4432.cpp:4
+
Implements all common low-level SPI/UART/I2C methods to control the wireless module....
Definition: Module.h:17
+
Base class for Si443x series. All derived classes for Si443x (e.g. Si4431 or Si4432) inherit from thi...
Definition: Si443x.h:554
diff --git a/_si443x_8h_source.html b/_si443x_8h_source.html index ce3c5f09..958a5989 100644 --- a/_si443x_8h_source.html +++ b/_si443x_8h_source.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/modules/Si443x/Si443x.h Source File @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -84,48 +86,690 @@ $(document).ready(function(){initNavTree('_si443x_8h_source.html','');});
Si443x.h
-
1 #if !defined(_RADIOLIB_SI443X_H)
2 #define _RADIOLIB_SI443X_H
3 
4 #include "../../TypeDef.h"
5 
6 #if !defined(RADIOLIB_EXCLUDE_SI443X)
7 
8 #include "../../Module.h"
9 
10 #include "../../protocols/PhysicalLayer/PhysicalLayer.h"
11 
12 // Si443x physical layer properties
13 #define SI443X_FREQUENCY_STEP_SIZE 156.25
14 #define SI443X_MAX_PACKET_LENGTH 64
15 
16 // Si443x series common registers
17 #define SI443X_REG_DEVICE_TYPE 0x00
18 #define SI443X_REG_DEVICE_VERSION 0x01
19 #define SI443X_REG_DEVICE_STATUS 0x02
20 #define SI443X_REG_INTERRUPT_STATUS_1 0x03
21 #define SI443X_REG_INTERRUPT_STATUS_2 0x04
22 #define SI443X_REG_INTERRUPT_ENABLE_1 0x05
23 #define SI443X_REG_INTERRUPT_ENABLE_2 0x06
24 #define SI443X_REG_OP_FUNC_CONTROL_1 0x07
25 #define SI443X_REG_OP_FUNC_CONTROL_2 0x08
26 #define SI443X_REG_XOSC_LOAD_CAPACITANCE 0x09
27 #define SI443X_REG_MCU_OUTPUT_CLOCK 0x0A
28 #define SI443X_REG_GPIO0_CONFIG 0x0B
29 #define SI443X_REG_GPIO1_CONFIG 0x0C
30 #define SI443X_REG_GPIO2_CONFIG 0x0D
31 #define SI443X_REG_IO_PORT_CONFIG 0x0E
32 #define SI443X_REG_ADC_CONFIG 0x0F
33 #define SI443X_REG_ADC_SENSOR_AMP_OFFSET 0x10
34 #define SI443X_REG_ADC_VALUE 0x11
35 #define SI443X_REG_TEMP_SENSOR_CONTROL 0x12
36 #define SI443X_REG_TEMP_VALUE_OFFSET 0x13
37 #define SI443X_REG_WAKEUP_TIMER_PERIOD_1 0x14
38 #define SI443X_REG_WAKEUP_TIMER_PERIOD_2 0x15
39 #define SI443X_REG_WAKEUP_TIMER_PERIOD_3 0x16
40 #define SI443X_REG_WAKEUP_TIMER_VALUE_1 0x17
41 #define SI443X_REG_WAKEUP_TIMER_VALUE_2 0x18
42 #define SI443X_REG_LOW_DC_MODE_DURATION 0x19
43 #define SI443X_REG_LOW_BATT_DET_THRESHOLD 0x1A
44 #define SI443X_REG_BATT_VOLTAGE_LEVEL 0x1B
45 #define SI443X_REG_IF_FILTER_BANDWIDTH 0x1C
46 #define SI443X_REG_AFC_LOOP_GEARSHIFT_OVERRIDE 0x1D
47 #define SI443X_REG_AFC_TIMING_CONTROL 0x1E
48 #define SI443X_REG_CLOCK_REC_GEARSHIFT_OVERRIDE 0x1F
49 #define SI443X_REG_CLOCK_REC_OVERSAMP_RATIO 0x20
50 #define SI443X_REG_CLOCK_REC_OFFSET_2 0x21
51 #define SI443X_REG_CLOCK_REC_OFFSET_1 0x22
52 #define SI443X_REG_CLOCK_REC_OFFSET_0 0x23
53 #define SI443X_REG_CLOCK_REC_TIMING_LOOP_GAIN_1 0x24
54 #define SI443X_REG_CLOCK_REC_TIMING_LOOP_GAIN_0 0x25
55 #define SI443X_REG_RSSI 0x26
56 #define SI443X_REG_RSSI_CLEAR_CHANNEL_THRESHOLD 0x27
57 #define SI443X_REG_ANTENNA_DIVERSITY_1 0x28
58 #define SI443X_REG_ANTENNA_DIVERSITY_2 0x29
59 #define SI443X_REG_AFC_LIMITER 0x2A
60 #define SI443X_REG_AFC_CORRECTION 0x2B
61 #define SI443X_REG_OOK_COUNTER_1 0x2C
62 #define SI443X_REG_OOK_COUNTER_2 0x2D
63 #define SI443X_REG_SLICER_PEAK_HOLD 0x2E
64 #define SI443X_REG_DATA_ACCESS_CONTROL 0x30
65 #define SI443X_REG_EZMAC_STATUS 0x31
66 #define SI443X_REG_HEADER_CONTROL_1 0x32
67 #define SI443X_REG_HEADER_CONTROL_2 0x33
68 #define SI443X_REG_PREAMBLE_LENGTH 0x34
69 #define SI443X_REG_PREAMBLE_DET_CONTROL 0x35
70 #define SI443X_REG_SYNC_WORD_3 0x36
71 #define SI443X_REG_SYNC_WORD_2 0x37
72 #define SI443X_REG_SYNC_WORD_1 0x38
73 #define SI443X_REG_SYNC_WORD_0 0x39
74 #define SI443X_REG_TRANSMIT_HEADER_3 0x3A
75 #define SI443X_REG_TRANSMIT_HEADER_2 0x3B
76 #define SI443X_REG_TRANSMIT_HEADER_1 0x3C
77 #define SI443X_REG_TRANSMIT_HEADER_0 0x3D
78 #define SI443X_REG_TRANSMIT_PACKET_LENGTH 0x3E
79 #define SI443X_REG_CHECK_HEADER_3 0x3F
80 #define SI443X_REG_CHECK_HEADER_2 0x40
81 #define SI443X_REG_CHECK_HEADER_1 0x41
82 #define SI443X_REG_CHECK_HEADER_0 0x42
83 #define SI443X_REG_HEADER_ENABLE_3 0x43
84 #define SI443X_REG_HEADER_ENABLE_2 0x44
85 #define SI443X_REG_HEADER_ENABLE_1 0x45
86 #define SI443X_REG_HEADER_ENABLE_0 0x46
87 #define SI443X_REG_RECEIVED_HEADER_3 0x47
88 #define SI443X_REG_RECEIVED_HEADER_2 0x48
89 #define SI443X_REG_RECEIVED_HEADER_1 0x49
90 #define SI443X_REG_RECEIVED_HEADER_0 0x4A
91 #define SI443X_REG_RECEIVED_PACKET_LENGTH 0x4B
92 #define SI443X_REG_ADC8_CONTROL 0x4F
93 #define SI443X_REG_CHANNEL_FILTER_COEFF 0x60
94 #define SI443X_REG_XOSC_CONTROL_TEST 0x62
95 #define SI443X_REG_AGC_OVERRIDE_1 0x69
96 #define SI443X_REG_TX_POWER 0x6D
97 #define SI443X_REG_TX_DATA_RATE_1 0x6E
98 #define SI443X_REG_TX_DATA_RATE_0 0x6F
99 #define SI443X_REG_MODULATION_MODE_CONTROL_1 0x70
100 #define SI443X_REG_MODULATION_MODE_CONTROL_2 0x71
101 #define SI443X_REG_FREQUENCY_DEVIATION 0x72
102 #define SI443X_REG_FREQUENCY_OFFSET_1 0x73
103 #define SI443X_REG_FREQUENCY_OFFSET_2 0x74
104 #define SI443X_REG_FREQUENCY_BAND_SELECT 0x75
105 #define SI443X_REG_NOM_CARRIER_FREQUENCY_1 0x76
106 #define SI443X_REG_NOM_CARRIER_FREQUENCY_0 0x77
107 #define SI443X_REG_FREQUENCY_HOPPING_CHANNEL_SEL 0x79
108 #define SI443X_REG_FREQUENCY_HOPPING_STEP_SIZE 0x7A
109 #define SI443X_REG_TX_FIFO_CONTROL_1 0x7C
110 #define SI443X_REG_TX_FIFO_CONTROL_2 0x7D
111 #define SI443X_REG_RX_FIFO_CONTROL 0x7E
112 #define SI443X_REG_FIFO_ACCESS 0x7F
113 
114 // SI443X_REG_DEVICE_TYPE MSB LSB DESCRIPTION
115 #define SI443X_DEVICE_TYPE 0x08 // 4 0 device identification register
116 
117 // SI443X_REG_DEVICE_VERSION
118 #define SI443X_DEVICE_VERSION 0x06 // 4 0 chip version register
119 
120 // SI443X_REG_DEVICE_STATUS
121 #define SI443X_RX_TX_FIFO_OVERFLOW 0b10000000 // 7 7 Rx/Tx FIFO overflow flag
122 #define SI443X_RX_TX_FIFO_UNDERFLOW 0b01000000 // 6 6 Rx/Tx FIFO underflow flag
123 #define SI443X_RX_FIFO_EMPTY 0b00100000 // 5 5 Rx FIFO empty flag
124 #define SI443X_HEADER_ERROR 0b00010000 // 4 4 header error flag
125 #define SI443X_FREQUENCY_ERROR 0b00001000 // 3 3 frequency error flag (frequency outside allowed range)
126 #define SI443X_TX 0b00000010 // 1 0 power state: Tx
127 #define SI443X_RX 0b00000001 // 1 0 Rx
128 #define SI443X_IDLE 0b00000000 // 1 0 idle
129 
130 // SI443X_REG_INTERRUPT_STATUS_1
131 #define SI443X_FIFO_LEVEL_ERROR_INTERRUPT 0b10000000 // 7 7 Tx/Rx FIFO overflow or underflow
132 #define SI443X_TX_FIFO_ALMOST_FULL_INTERRUPT 0b01000000 // 6 6 Tx FIFO almost full
133 #define SI443X_TX_FIFO_ALMOST_EMPTY_INTERRUPT 0b00100000 // 5 5 Tx FIFO almost empty
134 #define SI443X_RX_FIFO_ALMOST_FULL_INTERRUPT 0b00010000 // 4 4 Rx FIFO almost full
135 #define SI443X_EXTERNAL_INTERRUPT 0b00001000 // 3 3 external interrupt occurred on GPIOx
136 #define SI443X_PACKET_SENT_INTERRUPT 0b00000100 // 2 2 packet transmission done
137 #define SI443X_VALID_PACKET_RECEIVED_INTERRUPT 0b00000010 // 1 1 valid packet has been received
138 #define SI443X_CRC_ERROR_INTERRUPT 0b00000001 // 0 0 CRC failed
139 
140 // SI443X_REG_INTERRUPT_STATUS_2
141 #define SI443X_SYNC_WORD_DETECTED_INTERRUPT 0b10000000 // 7 7 sync word has been detected
142 #define SI443X_VALID_PREAMBLE_DETECTED_INTERRUPT 0b01000000 // 6 6 valid preamble has been detected
143 #define SI443X_INVALID_PREAMBLE_DETECTED_INTERRUPT 0b00100000 // 5 5 invalid preamble has been detected
144 #define SI443X_RSSI_INTERRUPT 0b00010000 // 4 4 RSSI exceeded programmed threshold
145 #define SI443X_WAKEUP_TIMER_INTERRUPT 0b00001000 // 3 3 wake-up timer expired
146 #define SI443X_LOW_BATTERY_INTERRUPT 0b00000100 // 2 2 low battery detected
147 #define SI443X_CHIP_READY_INTERRUPT 0b00000010 // 1 1 chip ready event detected
148 #define SI443X_POWER_ON_RESET_INTERRUPT 0b00000001 // 0 0 power-on-reset detected
149 
150 // SI443X_REG_INTERRUPT_ENABLE_1
151 #define SI443X_FIFO_LEVEL_ERROR_ENABLED 0b10000000 // 7 7 Tx/Rx FIFO overflow or underflow interrupt enabled
152 #define SI443X_TX_FIFO_ALMOST_FULL_ENABLED 0b01000000 // 6 6 Tx FIFO almost full interrupt enabled
153 #define SI443X_TX_FIFO_ALMOST_EMPTY_ENABLED 0b00100000 // 5 5 Tx FIFO almost empty interrupt enabled
154 #define SI443X_RX_FIFO_ALMOST_FULL_ENABLED 0b00010000 // 4 4 Rx FIFO almost full interrupt enabled
155 #define SI443X_EXTERNAL_ENABLED 0b00001000 // 3 3 external interrupt interrupt enabled
156 #define SI443X_PACKET_SENT_ENABLED 0b00000100 // 2 2 packet transmission done interrupt enabled
157 #define SI443X_VALID_PACKET_RECEIVED_ENABLED 0b00000010 // 1 1 valid packet received interrupt enabled
158 #define SI443X_CRC_ERROR_ENABLED 0b00000001 // 0 0 CRC failed interrupt enabled
159 
160 // SI443X_REG_INTERRUPT_ENABLE_2
161 #define SI443X_SYNC_WORD_DETECTED_ENABLED 0b10000000 // 7 7 sync word interrupt enabled
162 #define SI443X_VALID_PREAMBLE_DETECTED_ENABLED 0b01000000 // 6 6 valid preamble interrupt enabled
163 #define SI443X_INVALID_PREAMBLE_DETECTED_ENABLED 0b00100000 // 5 5 invalid preamble interrupt enabled
164 #define SI443X_RSSI_ENABLED 0b00010000 // 4 4 RSSI exceeded programmed threshold interrupt enabled
165 #define SI443X_WAKEUP_TIMER_ENABLED 0b00001000 // 3 3 wake-up timer interrupt enabled
166 #define SI443X_LOW_BATTERY_ENABLED 0b00000100 // 2 2 low battery interrupt enabled
167 #define SI443X_CHIP_READY_ENABLED 0b00000010 // 1 1 chip ready event interrupt enabled
168 #define SI443X_POWER_ON_RESET_ENABLED 0b00000001 // 0 0 power-on-reset interrupt enabled
169 
170 // SI443X_REG_OP_FUNC_CONTROL_1
171 #define SI443X_SOFTWARE_RESET 0b10000000 // 7 7 reset all registers to default values
172 #define SI443X_ENABLE_LOW_BATTERY_DETECT 0b01000000 // 6 6 enable low battery detection
173 #define SI443X_ENABLE_WAKEUP_TIMER 0b00100000 // 5 5 enable wakeup timer
174 #define SI443X_32_KHZ_RC 0b00000000 // 4 4 32.768 kHz source: RC oscillator (default)
175 #define SI443X_32_KHZ_XOSC 0b00010000 // 4 4 crystal oscillator
176 #define SI443X_TX_ON 0b00001000 // 3 3 Tx on in manual transmit mode
177 #define SI443X_RX_ON 0b00000100 // 2 2 Rx on in manual receive mode
178 #define SI443X_PLL_ON 0b00000010 // 1 1 PLL on (tune mode)
179 #define SI443X_XTAL_OFF 0b00000000 // 0 0 crystal oscillator: off (standby mode)
180 #define SI443X_XTAL_ON 0b00000001 // 0 0 on (ready mode)
181 
182 // SI443X_REG_OP_FUNC_CONTROL_2
183 #define SI443X_ANT_DIV_TR_HL_IDLE_L 0b00000000 // 7 5 GPIO1/2 states: Tx/Rx GPIO1 H, GPIO2 L; idle low (default)
184 #define SI443X_ANT_DIV_TR_LH_IDLE_L 0b00100000 // 7 5 Tx/Rx GPIO1 L, GPIO2 H; idle low
185 #define SI443X_ANT_DIV_TR_HL_IDLE_H 0b01000000 // 7 5 Tx/Rx GPIO1 H, GPIO2 L; idle high
186 #define SI443X_ANT_DIV_TR_LH_IDLE_H 0b01100000 // 7 5 Tx/Rx GPIO1 L, GPIO2 H; idle high
187 #define SI443X_ANT_DIV_TR_ALG_IDLE_L 0b10000000 // 7 5 Tx/Rx diversity algorithm; idle low
188 #define SI443X_ANT_DIV_TR_ALG_IDLE_H 0b10100000 // 7 5 Tx/Rx diversity algorithm; idle high
189 #define SI443X_ANT_DIV_TR_ALG_BEACON_IDLE_L 0b11000000 // 7 5 Tx/Rx diversity algorithm (beacon); idle low
190 #define SI443X_ANT_DIV_TR_ALG_BEACON_IDLE_H 0b11100000 // 7 5 Tx/Rx diversity algorithm (beacon); idle high
191 #define SI443X_RX_MULTIPACKET_OFF 0b00000000 // 4 4 Rx multipacket: disabled (default)
192 #define SI443X_RX_MULTIPACKET_ON 0b00010000 // 4 4 enabled
193 #define SI443X_AUTO_TX_OFF 0b00000000 // 3 3 Tx autotransmit on FIFO almost full: disabled (default)
194 #define SI443X_AUTO_TX_ON 0b00001000 // 3 3 enabled
195 #define SI443X_LOW_DUTY_CYCLE_OFF 0b00000000 // 2 2 low duty cycle mode: disabled (default)
196 #define SI443X_LOW_DUTY_CYCLE_ON 0b00000100 // 2 2 enabled
197 #define SI443X_RX_FIFO_RESET 0b00000010 // 1 1 Rx FIFO reset/clear: reset (call first)
198 #define SI443X_RX_FIFO_CLEAR 0b00000000 // 1 1 clear (call second)
199 #define SI443X_TX_FIFO_RESET 0b00000001 // 0 0 Tx FIFO reset/clear: reset (call first)
200 #define SI443X_TX_FIFO_CLEAR 0b00000000 // 0 0 clear (call second)
201 
202 // SI443X_REG_XOSC_LOAD_CAPACITANCE
203 #define SI443X_XTAL_SHIFT 0b00000000 // 7 7 crystal capacitance configuration:
204 #define SI443X_XTAL_LOAD_CAPACITANCE 0b01111111 // 6 0 C_int = 1.8 pF + 0.085 pF * SI443X_XTAL_LOAD_CAPACITANCE + 3.7 pF * SI443X_XTAL_SHIFT
205 
206 // SI443X_REG_MCU_OUTPUT_CLOCK
207 #define SI443X_CLOCK_TAIL_CYCLES_OFF 0b00000000 // 5 4 additional clock cycles: none (default)
208 #define SI443X_CLOCK_TAIL_CYCLES_128 0b00010000 // 5 4 128
209 #define SI443X_CLOCK_TAIL_CYCLES_256 0b00100000 // 5 4 256
210 #define SI443X_CLOCK_TAIL_CYCLES_512 0b00110000 // 5 4 512
211 #define SI443X_LOW_FREQ_CLOCK_OFF 0b00000000 // 3 3 32.768 kHz clock output: disabled (default)
212 #define SI443X_LOW_FREQ_CLOCK_ON 0b00001000 // 3 3 enabled
213 #define SI443X_MCU_CLOCK_30_MHZ 0b00000000 // 2 0 GPIO clock output: 30 MHz
214 #define SI443X_MCU_CLOCK_15_MHZ 0b00000001 // 2 0 15 MHz
215 #define SI443X_MCU_CLOCK_10_MHZ 0b00000010 // 2 0 10 MHz
216 #define SI443X_MCU_CLOCK_4_MHZ 0b00000011 // 2 0 4 MHz
217 #define SI443X_MCU_CLOCK_3_MHZ 0b00000100 // 2 0 3 MHz
218 #define SI443X_MCU_CLOCK_2_MHZ 0b00000101 // 2 0 2 MHz
219 #define SI443X_MCU_CLOCK_1_MHZ 0b00000110 // 2 0 1 MHz (default)
220 #define SI443X_MCU_CLOCK_32_KHZ 0b00000111 // 2 0 32.768 kHz
221 
222 // SI443X_REG_GPIO0_CONFIG + SI443X_REG_GPIO1_CONFIG + SI443X_REG_GPIO2_CONFIG
223 #define SI443X_GPIOX_DRIVE_STRENGTH 0b00000000 // 7 6 GPIOx drive strength (higher number = stronger drive)
224 #define SI443X_GPIOX_PULLUP_OFF 0b00000000 // 5 5 GPIOx internal 200k pullup: disabled (default)
225 #define SI443X_GPIOX_PULLUP_ON 0b00100000 // 5 5 enabled
226 #define SI443X_GPIO0_POWER_ON_RESET_OUT 0b00000000 // 4 0 GPIOx function: power-on-reset output (GPIO0 only, default)
227 #define SI443X_GPIO1_POWER_ON_RESET_INV_OUT 0b00000000 // 4 0 inverted power-on-reset output (GPIO1 only, default)
228 #define SI443X_GPIO2_MCU_CLOCK_OUT 0b00000000 // 4 0 MCU clock output (GPIO2 only, default)
229 #define SI443X_GPIOX_WAKEUP_OUT 0b00000001 // 4 0 wakeup timer expired output
230 #define SI443X_GPIOX_LOW_BATTERY_OUT 0b00000010 // 4 0 low battery detect output
231 #define SI443X_GPIOX_DIGITAL_OUT 0b00000011 // 4 0 direct digital output
232 #define SI443X_GPIOX_EXT_INT_FALLING_IN 0b00000100 // 4 0 external interrupt, falling edge
233 #define SI443X_GPIOX_EXT_INT_RISING_IN 0b00000101 // 4 0 external interrupt, rising edge
234 #define SI443X_GPIOX_EXT_INT_CHANGE_IN 0b00000110 // 4 0 external interrupt, state change
235 #define SI443X_GPIOX_ADC_IN 0b00000111 // 4 0 ADC analog input
236 #define SI443X_GPIOX_ANALOG_TEST_N_IN 0b00001000 // 4 0 analog test N input
237 #define SI443X_GPIOX_ANALOG_TEST_P_IN 0b00001001 // 4 0 analog test P input
238 #define SI443X_GPIOX_DIGITAL_IN 0b00001010 // 4 0 direct digital input
239 #define SI443X_GPIOX_DIGITAL_TEST_OUT 0b00001011 // 4 0 digital test output
240 #define SI443X_GPIOX_ANALOG_TEST_N_OUT 0b00001100 // 4 0 analog test N output
241 #define SI443X_GPIOX_ANALOG_TEST_P_OUT 0b00001101 // 4 0 analog test P output
242 #define SI443X_GPIOX_REFERENCE_VOLTAGE_OUT 0b00001110 // 4 0 reference voltage output
243 #define SI443X_GPIOX_TX_RX_DATA_CLK_OUT 0b00001111 // 4 0 Tx/Rx clock output in direct mode
244 #define SI443X_GPIOX_TX_DATA_IN 0b00010000 // 4 0 Tx data input direct mode
245 #define SI443X_GPIOX_EXT_RETRANSMIT_REQUEST_IN 0b00010001 // 4 0 external retransmission request input
246 #define SI443X_GPIOX_TX_STATE_OUT 0b00010010 // 4 0 Tx state output
247 #define SI443X_GPIOX_TX_FIFO_ALMOST_FULL_OUT 0b00010011 // 4 0 Tx FIFO almost full output
248 #define SI443X_GPIOX_RX_DATA_OUT 0b00010100 // 4 0 Rx data output
249 #define SI443X_GPIOX_RX_STATE_OUT 0b00010101 // 4 0 Rx state output
250 #define SI443X_GPIOX_RX_FIFO_ALMOST_FULL_OUT 0b00010110 // 4 0 Rx FIFO almost full output
251 #define SI443X_GPIOX_ANT_DIV_1_OUT 0b00010111 // 4 0 antenna diversity output 1
252 #define SI443X_GPIOX_ANT_DIV_2_OUT 0b00011000 // 4 0 antenna diversity output 2
253 #define SI443X_GPIOX_VALID_PREAMBLE_OUT 0b00011001 // 4 0 valid preamble detected output
254 #define SI443X_GPIOX_INVALID_PREAMBLE_OUT 0b00011010 // 4 0 invalid preamble detected output
255 #define SI443X_GPIOX_SYNC_WORD_DETECTED_OUT 0b00011011 // 4 0 sync word detected output
256 #define SI443X_GPIOX_CLEAR_CHANNEL_OUT 0b00011100 // 4 0 clear channel assessment output
257 #define SI443X_GPIOX_VDD 0b00011101 // 4 0 VDD
258 #define SI443X_GPIOX_GND 0b00011110 // 4 0 GND
259 
260 // SI443X_REG_IO_PORT_CONFIG
261 #define SI443X_GPIO2_EXT_INT_STATE_MASK 0b01000000 // 6 6 external interrupt state mask for: GPIO2
262 #define SI443X_GPIO1_EXT_INT_STATE_MASK 0b00100000 // 5 5 GPIO1
263 #define SI443X_GPIO0_EXT_INT_STATE_MASK 0b00010000 // 4 4 GPIO0
264 #define SI443X_IRQ_BY_SDO_OFF 0b00000000 // 3 3 output IRQ state on SDO pin: disabled (default)
265 #define SI443X_IRQ_BY_SDO_ON 0b00001000 // 3 3 enabled
266 #define SI443X_GPIO2_DIGITAL_STATE_MASK 0b00000100 // 2 2 digital state mask for: GPIO2
267 #define SI443X_GPIO1_DIGITAL_STATE_MASK 0b00000010 // 1 1 GPIO1
268 #define SI443X_GPIO0_DIGITAL_STATE_MASK 0b00000001 // 0 0 GPIO0
269 
270 // SI443X_REG_ADC_CONFIG
271 #define SI443X_ADC_START 0b10000000 // 7 7 ADC control: start measurement
272 #define SI443X_ADC_RUNNING 0b00000000 // 7 7 measurement in progress
273 #define SI443X_ADC_DONE 0b10000000 // 7 7 done
274 #define SI443X_ADC_SOURCE_TEMPERATURE 0b00000000 // 6 4 ADC source: internal temperature sensor (default)
275 #define SI443X_ADC_SOURCE_GPIO0_SINGLE 0b00010000 // 6 4 single-ended on GPIO0
276 #define SI443X_ADC_SOURCE_GPIO1_SINGLE 0b00100000 // 6 4 single-ended on GPIO1
277 #define SI443X_ADC_SOURCE_GPIO2_SINGLE 0b00110000 // 6 4 single-ended on GPIO2
278 #define SI443X_ADC_SOURCE_GPIO01_DIFF 0b01000000 // 6 4 differential on GPIO0 (+) and GPIO1 (-)
279 #define SI443X_ADC_SOURCE_GPIO12_DIFF 0b01010000 // 6 4 differential on GPIO1 (+) and GPIO2 (-)
280 #define SI443X_ADC_SOURCE_GPIO02_DIFF 0b01100000 // 6 4 differential on GPIO0 (+) and GPIO2 (-)
281 #define SI443X_ADC_SOURCE_GND 0b01110000 // 6 4 GND
282 #define SI443X_ADC_REFERNCE_BAND_GAP 0b00000000 // 3 2 ADC reference: internal bandgap 1.2 V (default)
283 #define SI443X_ADC_REFERNCE_VDD_3 0b00001000 // 3 2 VDD/3
284 #define SI443X_ADC_REFERNCE_VDD_2 0b00001100 // 3 2 VDD/2
285 #define SI443X_ADC_GAIN 0b00000000 // 1 0 ADC amplifier gain
286 
287 // SI443X_REG_ADC_SENSOR_AMP_OFFSET
288 #define SI443X_ADC_OFFSET 0b00000000 // 3 0 ADC offset
289 
290 // SI443X_REG_TEMP_SENSOR_CONTROL
291 #define SI443X_TEMP_SENSOR_RANGE_64_TO_64_C 0b00000000 // 7 6 temperature sensor range: -64 to 64 deg. C, 0.5 deg. C resolution (default)
292 #define SI443X_TEMP_SENSOR_RANGE_64_TO_192_C 0b01000000 // 7 6 -64 to 192 deg. C, 1.0 deg. C resolution
293 #define SI443X_TEMP_SENSOR_RANGE_0_TO_128_C 0b11000000 // 7 6 0 to 128 deg. C, 0.5 deg. C resolution
294 #define SI443X_TEMP_SENSOR_RANGE_40_TO_216_F 0b10000000 // 7 6 -40 to 216 deg. F, 1.0 deg. F resolution
295 #define SI443X_TEMP_SENSOR_KELVIN_TO_CELSIUS_OFF 0b00000000 // 5 5 Kelvin to Celsius offset: disabled
296 #define SI443X_TEMP_SENSOR_KELVIN_TO_CELSIUS_ON 0b00100000 // 5 5 enabled (default)
297 #define SI443X_TEMP_SENSOR_TRIM_OFF 0b00000000 // 4 4 temperature sensor trim: disabled (default)
298 #define SI443X_TEMP_SENSOR_TRIM_ON 0b00010000 // 4 4 enabled
299 #define SI443X_TEMP_SENSOR_TRIM_VALUE 0b00000000 // 3 0 temperature sensor trim value
300 
301 // SI443X_REG_WAKEUP_TIMER_PERIOD_1
302 #define SI443X_WAKEUP_TIMER_EXPONENT 0b00000011 // 4 0 wakeup timer value exponent
303 
304 // SI443X_REG_WAKEUP_TIMER_PERIOD_2 + SI443X_REG_WAKEUP_TIMER_PERIOD_3
305 #define SI443X_WAKEUP_TIMER_MANTISSA_MSB 0x00 // 7 0 wakeup timer value:
306 #define SI443X_WAKEUP_TIMER_MANTISSA_LSB 0x01 // 7 0 T = (4 * SI443X_WAKEUP_TIMER_MANTISSA * 2 ^ SI443X_WAKEUP_TIMER_EXPONENT) / 32.768 ms
307 
308 // SI443X_REG_LOW_DC_MODE_DURATION
309 #define SI443X_LOW_DC_MODE_DURATION_MANTISSA 0x01 // 7 0 low duty cycle mode duration: T = (4 * SI443X_LOW_DC_MODE_DURATION_MANTISSA * 2 ^ SI443X_WAKEUP_TIMER_EXPONENT) / 32.768 ms
310 
311 // SI443X_REG_LOW_BATT_DET_THRESHOLD
312 #define SI443X_LOW_BATT_DET_THRESHOLD 0b00010100 // 4 0 low battery detection threshold: Vth = 1.7 + SI443X_LOW_BATT_DET_THRESHOLD * 0.05 V (defaults to 2.7 V)
313 
314 // SI443X_REG_IF_FILTER_BANDWIDTH
315 #define SI443X_BYPASS_DEC_BY_3_OFF 0b00000000 // 7 7 bypass decimate-by-3 stage: disabled (default)
316 #define SI443X_BYPASS_DEC_BY_3_ON 0b10000000 // 7 7 enabled
317 #define SI443X_IF_FILTER_DEC_RATE 0b00000000 // 6 4 IF filter decimation rate
318 #define SI443X_IF_FILTER_COEFF_SET 0b00000001 // 3 0 IF filter coefficient set selection
319 
320 // SI443X_REG_AFC_LOOP_GEARSHIFT_OVERRIDE
321 #define SI443X_AFC_WIDEBAND_OFF 0b00000000 // 7 7 AFC wideband: disabled (default)
322 #define SI443X_AFC_WIDEBAND_ON 0b10000000 // 7 7 enabled
323 #define SI443X_AFC_OFF 0b00000000 // 6 6 AFC: disabled
324 #define SI443X_AFC_ON 0b01000000 // 6 6 enabled (default)
325 #define SI443X_AFC_HIGH_GEAR_SETTING 0b00000000 // 5 3 AFC high gear setting
326 #define SI443X_SECOND_PHASE_BIAS_0_DB 0b00000100 // 2 2 second phase antenna selection bias: 0 dB (default)
327 #define SI443X_SECOND_PHASE_BIAS_1_5_DB 0b00000000 // 2 2 1.5 dB
328 #define SI443X_MOVING_AVERAGE_TAP_8 0b00000010 // 1 1 moving average filter tap length: 8*Tb
329 #define SI443X_MOVING_AVERAGE_TAP_4 0b00000000 // 1 1 4*Tb after first preamble (default)
330 #define SI443X_ZERO_PHASE_RESET_5 0b00000000 // 0 0 reset preamble detector after: 5 zero phases (default)
331 #define SI443X_ZERO_PHASE_RESET_2 0b00000001 // 0 0 3 zero phases
332 
333 // SI443X_REG_AFC_TIMING_CONTROL
334 #define SI443X_SW_ANT_TIMER 0b00000000 // 7 6 number of periods to wait for RSSI to stabilize during antenna switching
335 #define SI443X_SHORT_WAIT 0b00001000 // 5 3 period to wait after AFC correction
336 #define SI443X_ANTENNA_SWITCH_WAIT 0b00000010 // 2 0 antenna switching wait time
337 
338 // SI443X_REG_CLOCK_REC_GEARSHIFT_OVERRIDE
339 #define SI443X_CLOCK_RECOVER_FAST_GEARSHIFT 0b00000000 // 5 3 clock recovery fast gearshift value
340 #define SI443X_CLOCK_RECOVER_SLOW_GEARSHIFT 0b00000011 // 2 0 clock recovery slow gearshift value
341 
342 // SI443X_REG_CLOCK_REC_OVERSAMP_RATIO
343 #define SI443X_CLOCK_REC_OVERSAMP_RATIO_LSB 0b01100100 // 7 0 oversampling rate LSB, defaults to 12.5 clock cycles per bit
344 
345 // SI443X_REG_CLOCK_REC_OFFSET_2
346 #define SI443X_CLOCK_REC_OVERSAMP_RATIO_MSB 0b00000000 // 7 5 oversampling rate MSB, defaults to 12.5 clock cycles per bit
347 #define SI443X_SECOND_PHASE_SKIP_THRESHOLD 0b00000000 // 4 4 skip seconds phase antenna diversity threshold
348 #define SI443X_NCO_OFFSET_MSB 0b00000001 // 3 0 NCO offset MSB
349 
350 // SI443X_REG_CLOCK_REC_OFFSET_1
351 #define SI443X_NCO_OFFSET_MID 0b01000111 // 7 0 NCO offset MID
352 
353 // SI443X_REG_CLOCK_REC_OFFSET_0
354 #define SI443X_NCO_OFFSET_LSB 0b10101110 // 7 0 NCO offset LSB
355 
356 // SI443X_REG_CLOCK_REC_TIMING_LOOP_GAIN_1
357 #define SI443X_RX_COMPENSATION_OFF 0b00000000 // 4 4 Rx compensation for high data rate: disabled (default)
358 #define SI443X_RX_COMPENSATION_ON 0b00010000 // 4 4 enabled
359 #define SI443X_CLOCK_REC_GAIN_DOUBLE_OFF 0b00000000 // 3 3 clock recovery gain doubling: disabled (default)
360 #define SI443X_CLOCK_REC_GAIN_DOUBLE_ON 0b00001000 // 3 3 enabled
361 #define SI443X_CLOCK_REC_LOOP_GAIN_MSB 0b00000010 // 2 0 clock recovery timing loop gain MSB
362 
363 // SI443X_REG_CLOCK_REC_TIMING_LOOP_GAIN_0
364 #define SI443X_CLOCK_REC_LOOP_GAIN_LSB 0b10001111 // 7 0 clock recovery timing loop gain LSB
365 
366 // SI443X_REG_RSSI_CLEAR_CHANNEL_THRESHOLD
367 #define SI443X_RSSI_CLEAR_CHANNEL_THRESHOLD 0b00011110 // 7 0 RSSI clear channel interrupt threshold
368 
369 // SI443X_REG_AFC_LIMITER
370 #define SI443X_AFC_LIMITER 0x00 // 7 0 AFC limiter value
371 
372 // SI443X_REG_OOK_COUNTER_1
373 #define SI443X_OOK_FREEZE_OFF 0b00000000 // 5 5 OOK moving average detector freeze: disabled (default)
374 #define SI443X_OOK_FREEZE_ON 0b00100000 // 5 5 enabled
375 #define SI443X_PEAK_DETECTOR_OFF 0b00000000 // 4 4 peak detector: disabled
376 #define SI443X_PEAK_DETECTOR_ON 0b00010000 // 4 4 enabled (default)
377 #define SI443X_OOK_MOVING_AVERAGE_OFF 0b00000000 // 3 3 OOK moving average: disabled
378 #define SI443X_OOK_MOVING_AVERAGE_ON 0b00001000 // 3 3 enabled (default)
379 #define SI443X_OOK_COUNTER_MSB 0b00000000 // 2 0 OOK counter MSB
380 
381 // SI443X_REG_OOK_COUNTER_2
382 #define SI443X_OOK_COUNTER_LSB 0b10111100 // 7 0 OOK counter LSB
383 
384 // SI443X_REG_SLICER_PEAK_HOLD
385 #define SI443X_PEAK_DETECTOR_ATTACK 0b00010000 // 6 4 OOK peak detector attach time
386 #define SI443X_PEAK_DETECTOR_DECAY 0b00001100 // 3 0 OOK peak detector decay time
387 
388 // SI443X_REG_DATA_ACCESS_CONTROL
389 #define SI443X_PACKET_RX_HANDLING_OFF 0b00000000 // 7 7 packet Rx handling: disabled
390 #define SI443X_PACKET_RX_HANDLING_ON 0b10000000 // 7 7 enabled (default)
391 #define SI443X_LSB_FIRST_OFF 0b00000000 // 6 6 LSB first transmission: disabled (default)
392 #define SI443X_LSB_FIRST_ON 0b01000000 // 6 6 enabled
393 #define SI443X_CRC_DATA_ONLY_OFF 0b00000000 // 5 5 CRC calculated only from data fields: disabled (default)
394 #define SI443X_CRC_DATA_ONLY_ON 0b00100000 // 5 5 enabled
395 #define SI443X_SKIP_SECOND_PHASE_PREAMBLE_DET_OFF 0b00000000 // 4 4 skip second phase of preamble detection: disabled (default)
396 #define SI443X_SKIP_SECOND_PHASE_PREAMBLE_DET_ON 0b00010000 // 4 4 enabled
397 #define SI443X_PACKET_TX_HANDLING_OFF 0b00000000 // 3 3 packet Tx handling: disabled
398 #define SI443X_PACKET_TX_HANDLING_ON 0b00001000 // 3 3 enabled (default)
399 #define SI443X_CRC_OFF 0b00000000 // 2 2 CRC: disabled
400 #define SI443X_CRC_ON 0b00000100 // 2 2 enabled (default)
401 #define SI443X_CRC_CCITT 0b00000000 // 1 0 CRC type: CCITT
402 #define SI443X_CRC_IBM_CRC16 0b00000001 // 1 0 IBM CRC-16 (default)
403 #define SI443X_CRC_IEC16 0b00000010 // 1 0 IEC-16
404 #define SI443X_CRC_BIACHEVA 0b00000011 // 1 0 Biacheva
405 
406 // SI443X_REG_EZMAC_STATUS
407 #define SI443X_CRC_ALL_ONE 0b01000000 // 6 6 last received CRC was all ones
408 #define SI443X_PACKET_SEARCHING 0b00100000 // 5 5 radio is searching for a valid packet
409 #define SI443X_PACKET_RECEIVING 0b00010000 // 4 4 radio is currently receiving packet
410 #define SI443X_VALID_PACKET_RECEIVED 0b00001000 // 3 3 valid packet was received
411 #define SI443X_CRC_ERROR 0b00000100 // 2 2 CRC check failed
412 #define SI443X_PACKET_TRANSMITTING 0b00000010 // 1 1 radio is currently transmitting packet
413 #define SI443X_PACKET_SENT 0b00000001 // 0 0 packet sent
414 
415 // SI443X_REG_HEADER_CONTROL_1
416 #define SI443X_BROADCAST_ADDR_CHECK_NONE 0b00000000 // 7 4 broadcast address check: none (default)
417 #define SI443X_BROADCAST_ADDR_CHECK_BYTE0 0b00010000 // 7 4 on byte 0
418 #define SI443X_BROADCAST_ADDR_CHECK_BYTE1 0b00100000 // 7 4 on byte 1
419 #define SI443X_BROADCAST_ADDR_CHECK_BYTE2 0b01000000 // 7 4 on byte 2
420 #define SI443X_BROADCAST_ADDR_CHECK_BYTE3 0b10000000 // 7 4 on byte 3
421 #define SI443X_RECEIVED_HEADER_CHECK_NONE 0b00000000 // 3 0 received header check: none
422 #define SI443X_RECEIVED_HEADER_CHECK_BYTE0 0b00000001 // 3 0 on byte 0
423 #define SI443X_RECEIVED_HEADER_CHECK_BYTE1 0b00000010 // 3 0 on byte 1
424 #define SI443X_RECEIVED_HEADER_CHECK_BYTE2 0b00000100 // 3 0 on byte 2 (default)
425 #define SI443X_RECEIVED_HEADER_CHECK_BYTE3 0b00001000 // 3 0 on byte 3 (default)
426 
427 // SI443X_REG_HEADER_CONTROL_2
428 #define SI443X_SYNC_WORD_TIMEOUT_OFF 0b00000000 // 7 7 ignore timeout period when searching for sync word: disabled (default)
429 #define SI443X_SYNC_WORD_TIMEOUT_ON 0b10000000 // 7 7 enabled
430 #define SI443X_HEADER_LENGTH_HEADER_NONE 0b00000000 // 6 4 header length: none
431 #define SI443X_HEADER_LENGTH_HEADER_3 0b00010000 // 6 4 header 3
432 #define SI443X_HEADER_LENGTH_HEADER_32 0b00100000 // 6 4 header 3 and 2
433 #define SI443X_HEADER_LENGTH_HEADER_321 0b00110000 // 6 4 header 3, 2 and 1 (default)
434 #define SI443X_HEADER_LENGTH_HEADER_3210 0b01000000 // 6 4 header 3, 2, 1, and 0
435 #define SI443X_FIXED_PACKET_LENGTH_OFF 0b00000000 // 3 3 fixed packet length mode: disabled (default)
436 #define SI443X_FIXED_PACKET_LENGTH_ON 0b00001000 // 3 3 enabled
437 #define SI443X_SYNC_LENGTH_SYNC_3 0b00000000 // 2 1 sync word length: sync 3
438 #define SI443X_SYNC_LENGTH_SYNC_32 0b00000010 // 2 1 sync 3 and 2 (default)
439 #define SI443X_SYNC_LENGTH_SYNC_321 0b00000100 // 2 1 sync 3, 2 and 1
440 #define SI443X_SYNC_LENGTH_SYNC_3210 0b00000110 // 2 1 sync 3, 2, 1 and 0
441 #define SI443X_PREAMBLE_LENGTH_MSB 0b00000000 // 0 0 preamble length MSB
442 
443 // SI443X_REG_PREAMBLE_LENGTH
444 #define SI443X_PREAMBLE_LENGTH_LSB 0b00001000 // 0 0 preamble length LSB, defaults to 32 bits
445 
446 // SI443X_REG_PREAMBLE_DET_CONTROL
447 #define SI443X_PREAMBLE_DET_THRESHOLD 0b00101000 // 7 3 number of 4-bit nibbles in valid preamble, defaults to 20 bits
448 #define SI443X_RSSI_OFFSET 0b00000010 // 2 0 RSSI calculation offset, defaults to +8 dB
449 
450 // SI443X_REG_SYNC_WORD_3 - SI443X_REG_SYNC_WORD_0
451 #define SI443X_SYNC_WORD_3 0x2D // 7 0 sync word: 4th byte (MSB)
452 #define SI443X_SYNC_WORD_2 0xD4 // 7 0 3rd byte
453 #define SI443X_SYNC_WORD_1 0x00 // 7 0 2nd byte
454 #define SI443X_SYNC_WORD_0 0x00 // 7 0 1st byte (LSB)
455 
456 // SI443X_REG_CHANNEL_FILTER_COEFF
457 #define SI443X_INVALID_PREAMBLE_THRESHOLD 0b00000000 // 7 4 invalid preamble threshold in nibbles
458 
459 // SI443X_REG_XOSC_CONTROL_TEST
460 #define SI443X_STATE_LOW_POWER 0b00000000 // 7 5 chip power state: low power
461 #define SI443X_STATE_READY 0b00100000 // 7 5 ready
462 #define SI443X_STATE_TUNE 0b01100000 // 7 5 tune
463 #define SI443X_STATE_TX 0b01000000 // 7 5 Tx
464 #define SI443X_STATE_RX 0b11100000 // 7 5 Rx
465 
466 // SI443X_REG_AGC_OVERRIDE_1
467 #define SI443X_AGC_GAIN_INCREASE_OFF 0b00000000 // 6 6 AGC gain increase override: disabled (default)
468 #define SI443X_AGC_GAIN_INCREASE_ON 0b01000000 // 6 6 enabled
469 #define SI443X_AGC_OFF 0b00000000 // 5 5 AGC loop: disabled
470 #define SI443X_AGC_ON 0b00100000 // 5 5 enabled (default)
471 #define SI443X_LNA_GAIN_MIN 0b00000000 // 4 4 LNA gain select: 5 dB (default)
472 #define SI443X_LNA_GAIN_MAX 0b00010000 // 4 4 25 dB
473 #define SI443X_PGA_GAIN_OVERRIDE 0b00000000 // 3 0 PGA gain override, gain = SI443X_PGA_GAIN_OVERRIDE * 3 dB
474 
475 // SI443X_REG_TX_POWER
476 #define SI443X_LNA_SWITCH_OFF 0b00000000 // 3 3 LNA switch control: disabled
477 #define SI443X_LNA_SWITCH_ON 0b00001000 // 3 3 enabled (default)
478 #define SI443X_OUTPUT_POWER 0b00000000 // 2 0 output power in 3 dB steps, 0 is chip min, 7 is chip max
479 
480 // SI443X_REG_TX_DATA_RATE_1 + SI443X_REG_TX_DATA_RATE_0
481 #define SI443X_DATA_RATE_MSB 0x0A // 7 0 data rate: DR = 10^6 * (SI443X_DATA_RATE / 2^16) in high data rate mode or
482 #define SI443X_DATA_RATE_LSB 0x3D // 7 0 DR = 10^6 * (SI443X_DATA_RATE / 2^21) in low data rate mode (defaults to 40 kbps)
483 
484 // SI443X_REG_MODULATION_MODE_CONTROL_1
485 #define SI443X_HIGH_DATA_RATE_MODE 0b00000000 // 5 5 data rate: above 30 kbps (default)
486 #define SI443X_LOW_DATA_RATE_MODE 0b00100000 // 5 5 below 30 kbps
487 #define SI443X_PACKET_HANDLER_POWER_DOWN_OFF 0b00000000 // 4 4 power off packet handler in low power mode: disabled (default)
488 #define SI443X_PACKET_HANDLER_POWER_DOWN_ON 0b00010000 // 4 4 enabled
489 #define SI443X_MANCHESTER_PREAMBLE_POL_LOW 0b00000000 // 3 3 preamble polarity in Manchester mode: low
490 #define SI443X_MANCHESTER_PREAMBLE_POL_HIGH 0b00001000 // 3 3 high (default)
491 #define SI443X_MANCHESTER_INVERTED_OFF 0b00000000 // 2 2 inverted Manchester encoding: disabled
492 #define SI443X_MANCHESTER_INVERTED_ON 0b00000100 // 2 2 enabled (default)
493 #define SI443X_MANCHESTER_OFF 0b00000000 // 1 1 Manchester encoding: disabled (default)
494 #define SI443X_MANCHESTER_ON 0b00000010 // 1 1 enabled
495 #define SI443X_WHITENING_OFF 0b00000000 // 0 0 data whitening: disabled (default)
496 #define SI443X_WHITENING_ON 0b00000001 // 0 0 enabled
497 
498 // SI443X_REG_MODULATION_MODE_CONTROL_2
499 #define SI443X_TX_DATA_CLOCK_NONE 0b00000000 // 7 6 Tx data clock: disabled (default)
500 #define SI443X_TX_DATA_CLOCK_GPIO 0b01000000 // 7 6 GPIO pin
501 #define SI443X_TX_DATA_CLOCK_SDI 0b10000000 // 7 6 SDI pin
502 #define SI443X_TX_DATA_CLOCK_NIRQ 0b11000000 // 7 6 nIRQ pin
503 #define SI443X_TX_DATA_SOURCE_GPIO 0b00000000 // 5 4 Tx data source in direct mode: GPIO pin (default)
504 #define SI443X_TX_DATA_SOURCE_SDI 0b00010000 // 5 4 SDI pin
505 #define SI443X_TX_DATA_SOURCE_FIFO 0b00100000 // 5 4 FIFO
506 #define SI443X_TX_DATA_SOURCE_PN9 0b00110000 // 5 4 PN9 internal
507 #define SI443X_TX_RX_INVERTED_OFF 0b00000000 // 3 3 Tx/Rx data inverted: disabled (default)
508 #define SI443X_TX_RX_INVERTED_ON 0b00001000 // 3 3 enabled
509 #define SI443X_FREQUENCY_DEVIATION_MSB 0b00000000 // 2 2 frequency deviation MSB
510 #define SI443X_MODULATION_NONE 0b00000000 // 1 0 modulation type: unmodulated carrier (default)
511 #define SI443X_MODULATION_OOK 0b00000001 // 1 0 OOK
512 #define SI443X_MODULATION_FSK 0b00000010 // 1 0 FSK
513 #define SI443X_MODULATION_GFSK 0b00000011 // 1 0 GFSK
514 
515 // SI443X_REG_FREQUENCY_DEVIATION
516 #define SI443X_FREQUENCY_DEVIATION_LSB 0b00100000 // 7 0 frequency deviation LSB, Fd = 625 Hz * SI443X_FREQUENCY_DEVIATION, defaults to 20 kHz
517 
518 // SI443X_REG_FREQUENCY_OFFSET_1 + SI443X_REG_FREQUENCY_OFFSET_2
519 #define SI443X_FREQUENCY_OFFSET_MSB 0x00 // 7 0 frequency offset:
520 #define SI443X_FREQUENCY_OFFSET_LSB 0x00 // 1 0 Foff = 156.25 Hz * (SI443X_BAND_SELECT + 1) * SI443X_FREQUENCY_OFFSET, defaults to 156.25 Hz
521 
522 // SI443X_REG_FREQUENCY_BAND_SELECT
523 #define SI443X_SIDE_BAND_SELECT_LOW 0b00000000 // 6 6 Rx LO tuning: below channel frequency (default)
524 #define SI443X_SIDE_BAND_SELECT_HIGH 0b01000000 // 6 6 above channel frequency
525 #define SI443X_BAND_SELECT_LOW 0b00000000 // 5 5 band select: low, 240 - 479.9 MHz
526 #define SI443X_BAND_SELECT_HIGH 0b00100000 // 5 5 high, 480 - 960 MHz (default)
527 #define SI443X_FREQUENCY_BAND_SELECT 0b00010101 // 4 0 frequency band select
528 
529 // SI443X_REG_NOM_CARRIER_FREQUENCY_1 + SI443X_REG_NOM_CARRIER_FREQUENCY_0
530 #define SI443X_NOM_CARRIER_FREQUENCY_MSB 0b10111011 // 7 0 nominal carrier frequency:
531 #define SI443X_NOM_CARRIER_FREQUENCY_LSB 0b10000000 // 7 0 Fc = (SI443X_BAND_SELECT + 1)*10*(SI443X_FREQUENCY_BAND_SELECT + 24) + (SI443X_NOM_CARRIER_FREQUENCY - SI443X_FREQUENCY_OFFSET)/6400 [MHz]
532 
533 // SI443X_REG_FREQUENCY_HOPPING_CHANNEL_SEL
534 #define SI443X_FREQUENCY_HOPPING_CHANNEL 0x00 // 7 0 frequency hopping channel number
535 
536 // SI443X_REG_FREQUENCY_HOPPING_STEP_SIZE
537 #define SI443X_FREQUENCY_HOPPING_STEP_SIZE 0x00 // 7 0 frequency hopping step size
538 
539 // SI443X_REG_TX_FIFO_CONTROL_1
540 #define SI443X_TX_FIFO_ALMOST_FULL_THRESHOLD 0x37 // 5 0 Tx FIFO almost full threshold
541 
542 // SI443X_REG_TX_FIFO_CONTROL_2
543 #define SI443X_TX_FIFO_ALMOST_EMPTY_THRESHOLD 0x04 // 5 0 Tx FIFO almost full threshold
544 
545 // SI443X_REG_RX_FIFO_CONTROL
546 #define SI443X_RX_FIFO_ALMOST_FULL_THRESHOLD 0x37 // 5 0 Rx FIFO almost full threshold
547 
554 class Si443x: public PhysicalLayer {
555  public:
556  // introduce PhysicalLayer overloads
561 
562  // constructor
563 
569  Si443x(Module* mod);
570 
571  // basic methods
572 
586  int16_t begin(float br, float freqDev, float rxBw, uint8_t preambleLen);
587 
591  void reset();
592 
605  int16_t transmit(uint8_t* data, size_t len, uint8_t addr = 0) override;
606 
617  int16_t receive(uint8_t* data, size_t len) override;
618 
625  int16_t sleep();
626 
632  int16_t standby() override;
633 
641  int16_t transmitDirect(uint32_t frf = 0) override;
642 
648  int16_t receiveDirect() override;
649 
655  int16_t packetMode();
656 
657  // interrupt methods
658 
664  void setIrqAction(void (*func)(void));
665 
669  void clearIrqAction();
670 
682  int16_t startTransmit(uint8_t* data, size_t len, uint8_t addr = 0) override;
683 
689  int16_t startReceive();
690 
700  int16_t readData(uint8_t* data, size_t len) override;
701 
702  // configuration methods
703 
711  int16_t setBitRate(float br);
712 
720  int16_t setFrequencyDeviation(float freqDev) override;
721 
729  int16_t setRxBandwidth(float rxBw);
730 
738  int16_t setSyncWord(uint8_t* syncWord, size_t len);
739 
747  int16_t setPreambleLength(uint8_t preambleLen);
748 
756  size_t getPacketLength(bool update = true) override;
757 
766  int16_t setEncoding(uint8_t encoding) override;
767 
776  int16_t setDataShaping(uint8_t sh) override;
777 
786  void setRfSwitchPins(RADIOLIB_PIN_TYPE rxEn, RADIOLIB_PIN_TYPE txEn);
787 
793  uint8_t random();
794 
800  int16_t getChipVersion();
801 
802 #ifndef RADIOLIB_GODMODE
803  protected:
804 #endif
805  Module* _mod;
806 
807  float _br = 0;
808  float _freqDev = 0;
809  float _freq = 0;
810 
811  size_t _packetLength = 0;
812  bool _packetLengthQueried = false;
813 
814  int16_t setFrequencyRaw(float newFreq);
815 
816 #ifndef RADIOLIB_GODMODE
817  private:
818 #endif
819  bool findChip();
820  void clearIRQFlags();
821  int16_t config();
822  int16_t updateClockRecovery();
823  int16_t directMode();
824 };
825 
826 #endif
827 
828 #endif
int16_t setRxBandwidth(float rxBw)
Sets receiver bandwidth. Allowed values range from 2.6 to 620.7 kHz.
Definition: Si443x.cpp:359
-
int16_t startReceive()
Interrupt-driven receive method. IRQ will be activated when full valid packet is received.
Definition: Si443x.cpp:254
-
int16_t setDataShaping(uint8_t sh) override
Sets Gaussian filter bandwidth-time product that will be used for data shaping. Only available in FSK...
Definition: Si443x.cpp:528
-
int16_t startTransmit(String &str, uint8_t addr=0)
Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes.
Definition: PhysicalLayer.cpp:49
-
int16_t getChipVersion()
Read version SPI register. Should return SI443X_DEVICE_VERSION (0x06) if Si443x is connected and work...
Definition: Si443x.cpp:570
-
void setRfSwitchPins(RADIOLIB_PIN_TYPE rxEn, RADIOLIB_PIN_TYPE txEn)
Some modules contain external RF switch controlled by two pins. This function gives RadioLib control ...
Definition: Si443x.cpp:547
-
int16_t setSyncWord(uint8_t *syncWord, size_t len)
Sets sync word. Up to 4 bytes can be set as sync word.
Definition: Si443x.cpp:466
-
int16_t receiveDirect() override
Enables direct reception mode. While in direct mode, the module will not be able to transmit or recei...
Definition: Si443x.cpp:189
-
int16_t packetMode()
Disables direct mode and enables packet mode, allowing the module to receive packets.
Definition: Si443x.cpp:202
-
int16_t readData(uint8_t *data, size_t len) override
Reads data that was received after calling startReceive method. This method reads len characters...
Definition: Si443x.cpp:279
-
Si443x(Module *mod)
Default constructor.
Definition: Si443x.cpp:4
-
int16_t setEncoding(uint8_t encoding) override
Sets transmission encoding. Only available in FSK mode. Allowed values are RADIOLIB_ENCODING_NRZ, RADIOLIB_ENCODING_MANCHESTER and RADIOLIB_ENCODING_WHITENING.
Definition: Si443x.cpp:509
-
void reset()
Reset method. Will reset the chip to the default state using SDN pin.
Definition: Si443x.cpp:60
-
size_t getPacketLength(bool update=true) override
Query modem for the packet length of received payload.
Definition: Si443x.cpp:499
-
int16_t standby() override
Sets the module to standby.
Definition: Si443x.cpp:139
-
int16_t receive(uint8_t *data, size_t len) override
Binary receive method. Will attempt to receive arbitrary binary data up to 64 bytes long...
Definition: Si443x.cpp:101
-
int16_t transmit(uint8_t *data, size_t len, uint8_t addr=0) override
Binary transmit method. Will transmit arbitrary binary data up to 64 bytes long. For overloads to tra...
Definition: Si443x.cpp:68
-
Base class for Si443x series. All derived classes for Si443x (e.g. Si4431 or Si4432) inherit from thi...
Definition: Si443x.h:554
-
int16_t begin(float br, float freqDev, float rxBw, uint8_t preambleLen)
Initialization method.
Definition: Si443x.cpp:8
-
void clearIrqAction()
Clears interrupt service routine to call when IRQ activates.
Definition: Si443x.cpp:210
-
int16_t setBitRate(float br)
Sets FSK bit rate. Allowed values range from 0.123 to 256.0 kbps.
Definition: Si443x.cpp:305
-
Implements all common low-level SPI/UART/I2C methods to control the wireless module. Every module class contains one private instance of this class.
Definition: Module.h:17
-
int16_t transmit(__FlashStringHelper *fstr, uint8_t addr=0)
Arduino Flash String transmit method.
Definition: PhysicalLayer.cpp:8
-
void setIrqAction(void(*func)(void))
Sets interrupt service routine to call when IRQ activates.
Definition: Si443x.cpp:206
-
int16_t setPreambleLength(uint8_t preambleLen)
Sets preamble length.
Definition: Si443x.cpp:483
-
int16_t receive(String &str, size_t len=0)
Arduino String receive method.
Definition: PhysicalLayer.cpp:98
-
int16_t transmitDirect(uint32_t frf=0) override
Enables direct transmission mode. While in direct mode, the module will not be able to transmit or re...
Definition: Si443x.cpp:147
-
int16_t setFrequencyDeviation(float freqDev) override
Sets FSK frequency deviation from carrier frequency. Allowed values range from 0.625 to 320...
Definition: Si443x.cpp:336
-
Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN...
Definition: PhysicalLayer.h:13
-
int16_t sleep()
Sets the module to sleep to save power. Module will not be able to transmit or receive any data while...
Definition: Si443x.cpp:123
-
uint8_t random()
Get one truly random byte from RSSI noise.
Definition: Si443x.cpp:551
-
int16_t startTransmit(uint8_t *data, size_t len, uint8_t addr=0) override
Interrupt-driven binary transmit method. Will start transmitting arbitrary binary data up to 64 bytes...
Definition: Si443x.cpp:214
-
int16_t readData(String &str, size_t len=0)
Reads data that was received after calling startReceive method.
Definition: PhysicalLayer.cpp:57
+
1 #if !defined(_RADIOLIB_SI443X_H)
+
2 #define _RADIOLIB_SI443X_H
+
3 
+
4 #include "../../TypeDef.h"
+
5 
+
6 #if !defined(RADIOLIB_EXCLUDE_SI443X)
+
7 
+
8 #include "../../Module.h"
+
9 
+
10 #include "../../protocols/PhysicalLayer/PhysicalLayer.h"
+
11 
+
12 // Si443x physical layer properties
+
13 #define SI443X_FREQUENCY_STEP_SIZE 156.25
+
14 #define SI443X_MAX_PACKET_LENGTH 64
+
15 
+
16 // Si443x series common registers
+
17 #define SI443X_REG_DEVICE_TYPE 0x00
+
18 #define SI443X_REG_DEVICE_VERSION 0x01
+
19 #define SI443X_REG_DEVICE_STATUS 0x02
+
20 #define SI443X_REG_INTERRUPT_STATUS_1 0x03
+
21 #define SI443X_REG_INTERRUPT_STATUS_2 0x04
+
22 #define SI443X_REG_INTERRUPT_ENABLE_1 0x05
+
23 #define SI443X_REG_INTERRUPT_ENABLE_2 0x06
+
24 #define SI443X_REG_OP_FUNC_CONTROL_1 0x07
+
25 #define SI443X_REG_OP_FUNC_CONTROL_2 0x08
+
26 #define SI443X_REG_XOSC_LOAD_CAPACITANCE 0x09
+
27 #define SI443X_REG_MCU_OUTPUT_CLOCK 0x0A
+
28 #define SI443X_REG_GPIO0_CONFIG 0x0B
+
29 #define SI443X_REG_GPIO1_CONFIG 0x0C
+
30 #define SI443X_REG_GPIO2_CONFIG 0x0D
+
31 #define SI443X_REG_IO_PORT_CONFIG 0x0E
+
32 #define SI443X_REG_ADC_CONFIG 0x0F
+
33 #define SI443X_REG_ADC_SENSOR_AMP_OFFSET 0x10
+
34 #define SI443X_REG_ADC_VALUE 0x11
+
35 #define SI443X_REG_TEMP_SENSOR_CONTROL 0x12
+
36 #define SI443X_REG_TEMP_VALUE_OFFSET 0x13
+
37 #define SI443X_REG_WAKEUP_TIMER_PERIOD_1 0x14
+
38 #define SI443X_REG_WAKEUP_TIMER_PERIOD_2 0x15
+
39 #define SI443X_REG_WAKEUP_TIMER_PERIOD_3 0x16
+
40 #define SI443X_REG_WAKEUP_TIMER_VALUE_1 0x17
+
41 #define SI443X_REG_WAKEUP_TIMER_VALUE_2 0x18
+
42 #define SI443X_REG_LOW_DC_MODE_DURATION 0x19
+
43 #define SI443X_REG_LOW_BATT_DET_THRESHOLD 0x1A
+
44 #define SI443X_REG_BATT_VOLTAGE_LEVEL 0x1B
+
45 #define SI443X_REG_IF_FILTER_BANDWIDTH 0x1C
+
46 #define SI443X_REG_AFC_LOOP_GEARSHIFT_OVERRIDE 0x1D
+
47 #define SI443X_REG_AFC_TIMING_CONTROL 0x1E
+
48 #define SI443X_REG_CLOCK_REC_GEARSHIFT_OVERRIDE 0x1F
+
49 #define SI443X_REG_CLOCK_REC_OVERSAMP_RATIO 0x20
+
50 #define SI443X_REG_CLOCK_REC_OFFSET_2 0x21
+
51 #define SI443X_REG_CLOCK_REC_OFFSET_1 0x22
+
52 #define SI443X_REG_CLOCK_REC_OFFSET_0 0x23
+
53 #define SI443X_REG_CLOCK_REC_TIMING_LOOP_GAIN_1 0x24
+
54 #define SI443X_REG_CLOCK_REC_TIMING_LOOP_GAIN_0 0x25
+
55 #define SI443X_REG_RSSI 0x26
+
56 #define SI443X_REG_RSSI_CLEAR_CHANNEL_THRESHOLD 0x27
+
57 #define SI443X_REG_ANTENNA_DIVERSITY_1 0x28
+
58 #define SI443X_REG_ANTENNA_DIVERSITY_2 0x29
+
59 #define SI443X_REG_AFC_LIMITER 0x2A
+
60 #define SI443X_REG_AFC_CORRECTION 0x2B
+
61 #define SI443X_REG_OOK_COUNTER_1 0x2C
+
62 #define SI443X_REG_OOK_COUNTER_2 0x2D
+
63 #define SI443X_REG_SLICER_PEAK_HOLD 0x2E
+
64 #define SI443X_REG_DATA_ACCESS_CONTROL 0x30
+
65 #define SI443X_REG_EZMAC_STATUS 0x31
+
66 #define SI443X_REG_HEADER_CONTROL_1 0x32
+
67 #define SI443X_REG_HEADER_CONTROL_2 0x33
+
68 #define SI443X_REG_PREAMBLE_LENGTH 0x34
+
69 #define SI443X_REG_PREAMBLE_DET_CONTROL 0x35
+
70 #define SI443X_REG_SYNC_WORD_3 0x36
+
71 #define SI443X_REG_SYNC_WORD_2 0x37
+
72 #define SI443X_REG_SYNC_WORD_1 0x38
+
73 #define SI443X_REG_SYNC_WORD_0 0x39
+
74 #define SI443X_REG_TRANSMIT_HEADER_3 0x3A
+
75 #define SI443X_REG_TRANSMIT_HEADER_2 0x3B
+
76 #define SI443X_REG_TRANSMIT_HEADER_1 0x3C
+
77 #define SI443X_REG_TRANSMIT_HEADER_0 0x3D
+
78 #define SI443X_REG_TRANSMIT_PACKET_LENGTH 0x3E
+
79 #define SI443X_REG_CHECK_HEADER_3 0x3F
+
80 #define SI443X_REG_CHECK_HEADER_2 0x40
+
81 #define SI443X_REG_CHECK_HEADER_1 0x41
+
82 #define SI443X_REG_CHECK_HEADER_0 0x42
+
83 #define SI443X_REG_HEADER_ENABLE_3 0x43
+
84 #define SI443X_REG_HEADER_ENABLE_2 0x44
+
85 #define SI443X_REG_HEADER_ENABLE_1 0x45
+
86 #define SI443X_REG_HEADER_ENABLE_0 0x46
+
87 #define SI443X_REG_RECEIVED_HEADER_3 0x47
+
88 #define SI443X_REG_RECEIVED_HEADER_2 0x48
+
89 #define SI443X_REG_RECEIVED_HEADER_1 0x49
+
90 #define SI443X_REG_RECEIVED_HEADER_0 0x4A
+
91 #define SI443X_REG_RECEIVED_PACKET_LENGTH 0x4B
+
92 #define SI443X_REG_ADC8_CONTROL 0x4F
+
93 #define SI443X_REG_CHANNEL_FILTER_COEFF 0x60
+
94 #define SI443X_REG_XOSC_CONTROL_TEST 0x62
+
95 #define SI443X_REG_AGC_OVERRIDE_1 0x69
+
96 #define SI443X_REG_TX_POWER 0x6D
+
97 #define SI443X_REG_TX_DATA_RATE_1 0x6E
+
98 #define SI443X_REG_TX_DATA_RATE_0 0x6F
+
99 #define SI443X_REG_MODULATION_MODE_CONTROL_1 0x70
+
100 #define SI443X_REG_MODULATION_MODE_CONTROL_2 0x71
+
101 #define SI443X_REG_FREQUENCY_DEVIATION 0x72
+
102 #define SI443X_REG_FREQUENCY_OFFSET_1 0x73
+
103 #define SI443X_REG_FREQUENCY_OFFSET_2 0x74
+
104 #define SI443X_REG_FREQUENCY_BAND_SELECT 0x75
+
105 #define SI443X_REG_NOM_CARRIER_FREQUENCY_1 0x76
+
106 #define SI443X_REG_NOM_CARRIER_FREQUENCY_0 0x77
+
107 #define SI443X_REG_FREQUENCY_HOPPING_CHANNEL_SEL 0x79
+
108 #define SI443X_REG_FREQUENCY_HOPPING_STEP_SIZE 0x7A
+
109 #define SI443X_REG_TX_FIFO_CONTROL_1 0x7C
+
110 #define SI443X_REG_TX_FIFO_CONTROL_2 0x7D
+
111 #define SI443X_REG_RX_FIFO_CONTROL 0x7E
+
112 #define SI443X_REG_FIFO_ACCESS 0x7F
+
113 
+
114 // SI443X_REG_DEVICE_TYPE MSB LSB DESCRIPTION
+
115 #define SI443X_DEVICE_TYPE 0x08 // 4 0 device identification register
+
116 
+
117 // SI443X_REG_DEVICE_VERSION
+
118 #define SI443X_DEVICE_VERSION 0x06 // 4 0 chip version register
+
119 
+
120 // SI443X_REG_DEVICE_STATUS
+
121 #define SI443X_RX_TX_FIFO_OVERFLOW 0b10000000 // 7 7 Rx/Tx FIFO overflow flag
+
122 #define SI443X_RX_TX_FIFO_UNDERFLOW 0b01000000 // 6 6 Rx/Tx FIFO underflow flag
+
123 #define SI443X_RX_FIFO_EMPTY 0b00100000 // 5 5 Rx FIFO empty flag
+
124 #define SI443X_HEADER_ERROR 0b00010000 // 4 4 header error flag
+
125 #define SI443X_FREQUENCY_ERROR 0b00001000 // 3 3 frequency error flag (frequency outside allowed range)
+
126 #define SI443X_TX 0b00000010 // 1 0 power state: Tx
+
127 #define SI443X_RX 0b00000001 // 1 0 Rx
+
128 #define SI443X_IDLE 0b00000000 // 1 0 idle
+
129 
+
130 // SI443X_REG_INTERRUPT_STATUS_1
+
131 #define SI443X_FIFO_LEVEL_ERROR_INTERRUPT 0b10000000 // 7 7 Tx/Rx FIFO overflow or underflow
+
132 #define SI443X_TX_FIFO_ALMOST_FULL_INTERRUPT 0b01000000 // 6 6 Tx FIFO almost full
+
133 #define SI443X_TX_FIFO_ALMOST_EMPTY_INTERRUPT 0b00100000 // 5 5 Tx FIFO almost empty
+
134 #define SI443X_RX_FIFO_ALMOST_FULL_INTERRUPT 0b00010000 // 4 4 Rx FIFO almost full
+
135 #define SI443X_EXTERNAL_INTERRUPT 0b00001000 // 3 3 external interrupt occurred on GPIOx
+
136 #define SI443X_PACKET_SENT_INTERRUPT 0b00000100 // 2 2 packet transmission done
+
137 #define SI443X_VALID_PACKET_RECEIVED_INTERRUPT 0b00000010 // 1 1 valid packet has been received
+
138 #define SI443X_CRC_ERROR_INTERRUPT 0b00000001 // 0 0 CRC failed
+
139 
+
140 // SI443X_REG_INTERRUPT_STATUS_2
+
141 #define SI443X_SYNC_WORD_DETECTED_INTERRUPT 0b10000000 // 7 7 sync word has been detected
+
142 #define SI443X_VALID_PREAMBLE_DETECTED_INTERRUPT 0b01000000 // 6 6 valid preamble has been detected
+
143 #define SI443X_INVALID_PREAMBLE_DETECTED_INTERRUPT 0b00100000 // 5 5 invalid preamble has been detected
+
144 #define SI443X_RSSI_INTERRUPT 0b00010000 // 4 4 RSSI exceeded programmed threshold
+
145 #define SI443X_WAKEUP_TIMER_INTERRUPT 0b00001000 // 3 3 wake-up timer expired
+
146 #define SI443X_LOW_BATTERY_INTERRUPT 0b00000100 // 2 2 low battery detected
+
147 #define SI443X_CHIP_READY_INTERRUPT 0b00000010 // 1 1 chip ready event detected
+
148 #define SI443X_POWER_ON_RESET_INTERRUPT 0b00000001 // 0 0 power-on-reset detected
+
149 
+
150 // SI443X_REG_INTERRUPT_ENABLE_1
+
151 #define SI443X_FIFO_LEVEL_ERROR_ENABLED 0b10000000 // 7 7 Tx/Rx FIFO overflow or underflow interrupt enabled
+
152 #define SI443X_TX_FIFO_ALMOST_FULL_ENABLED 0b01000000 // 6 6 Tx FIFO almost full interrupt enabled
+
153 #define SI443X_TX_FIFO_ALMOST_EMPTY_ENABLED 0b00100000 // 5 5 Tx FIFO almost empty interrupt enabled
+
154 #define SI443X_RX_FIFO_ALMOST_FULL_ENABLED 0b00010000 // 4 4 Rx FIFO almost full interrupt enabled
+
155 #define SI443X_EXTERNAL_ENABLED 0b00001000 // 3 3 external interrupt interrupt enabled
+
156 #define SI443X_PACKET_SENT_ENABLED 0b00000100 // 2 2 packet transmission done interrupt enabled
+
157 #define SI443X_VALID_PACKET_RECEIVED_ENABLED 0b00000010 // 1 1 valid packet received interrupt enabled
+
158 #define SI443X_CRC_ERROR_ENABLED 0b00000001 // 0 0 CRC failed interrupt enabled
+
159 
+
160 // SI443X_REG_INTERRUPT_ENABLE_2
+
161 #define SI443X_SYNC_WORD_DETECTED_ENABLED 0b10000000 // 7 7 sync word interrupt enabled
+
162 #define SI443X_VALID_PREAMBLE_DETECTED_ENABLED 0b01000000 // 6 6 valid preamble interrupt enabled
+
163 #define SI443X_INVALID_PREAMBLE_DETECTED_ENABLED 0b00100000 // 5 5 invalid preamble interrupt enabled
+
164 #define SI443X_RSSI_ENABLED 0b00010000 // 4 4 RSSI exceeded programmed threshold interrupt enabled
+
165 #define SI443X_WAKEUP_TIMER_ENABLED 0b00001000 // 3 3 wake-up timer interrupt enabled
+
166 #define SI443X_LOW_BATTERY_ENABLED 0b00000100 // 2 2 low battery interrupt enabled
+
167 #define SI443X_CHIP_READY_ENABLED 0b00000010 // 1 1 chip ready event interrupt enabled
+
168 #define SI443X_POWER_ON_RESET_ENABLED 0b00000001 // 0 0 power-on-reset interrupt enabled
+
169 
+
170 // SI443X_REG_OP_FUNC_CONTROL_1
+
171 #define SI443X_SOFTWARE_RESET 0b10000000 // 7 7 reset all registers to default values
+
172 #define SI443X_ENABLE_LOW_BATTERY_DETECT 0b01000000 // 6 6 enable low battery detection
+
173 #define SI443X_ENABLE_WAKEUP_TIMER 0b00100000 // 5 5 enable wakeup timer
+
174 #define SI443X_32_KHZ_RC 0b00000000 // 4 4 32.768 kHz source: RC oscillator (default)
+
175 #define SI443X_32_KHZ_XOSC 0b00010000 // 4 4 crystal oscillator
+
176 #define SI443X_TX_ON 0b00001000 // 3 3 Tx on in manual transmit mode
+
177 #define SI443X_RX_ON 0b00000100 // 2 2 Rx on in manual receive mode
+
178 #define SI443X_PLL_ON 0b00000010 // 1 1 PLL on (tune mode)
+
179 #define SI443X_XTAL_OFF 0b00000000 // 0 0 crystal oscillator: off (standby mode)
+
180 #define SI443X_XTAL_ON 0b00000001 // 0 0 on (ready mode)
+
181 
+
182 // SI443X_REG_OP_FUNC_CONTROL_2
+
183 #define SI443X_ANT_DIV_TR_HL_IDLE_L 0b00000000 // 7 5 GPIO1/2 states: Tx/Rx GPIO1 H, GPIO2 L; idle low (default)
+
184 #define SI443X_ANT_DIV_TR_LH_IDLE_L 0b00100000 // 7 5 Tx/Rx GPIO1 L, GPIO2 H; idle low
+
185 #define SI443X_ANT_DIV_TR_HL_IDLE_H 0b01000000 // 7 5 Tx/Rx GPIO1 H, GPIO2 L; idle high
+
186 #define SI443X_ANT_DIV_TR_LH_IDLE_H 0b01100000 // 7 5 Tx/Rx GPIO1 L, GPIO2 H; idle high
+
187 #define SI443X_ANT_DIV_TR_ALG_IDLE_L 0b10000000 // 7 5 Tx/Rx diversity algorithm; idle low
+
188 #define SI443X_ANT_DIV_TR_ALG_IDLE_H 0b10100000 // 7 5 Tx/Rx diversity algorithm; idle high
+
189 #define SI443X_ANT_DIV_TR_ALG_BEACON_IDLE_L 0b11000000 // 7 5 Tx/Rx diversity algorithm (beacon); idle low
+
190 #define SI443X_ANT_DIV_TR_ALG_BEACON_IDLE_H 0b11100000 // 7 5 Tx/Rx diversity algorithm (beacon); idle high
+
191 #define SI443X_RX_MULTIPACKET_OFF 0b00000000 // 4 4 Rx multipacket: disabled (default)
+
192 #define SI443X_RX_MULTIPACKET_ON 0b00010000 // 4 4 enabled
+
193 #define SI443X_AUTO_TX_OFF 0b00000000 // 3 3 Tx autotransmit on FIFO almost full: disabled (default)
+
194 #define SI443X_AUTO_TX_ON 0b00001000 // 3 3 enabled
+
195 #define SI443X_LOW_DUTY_CYCLE_OFF 0b00000000 // 2 2 low duty cycle mode: disabled (default)
+
196 #define SI443X_LOW_DUTY_CYCLE_ON 0b00000100 // 2 2 enabled
+
197 #define SI443X_RX_FIFO_RESET 0b00000010 // 1 1 Rx FIFO reset/clear: reset (call first)
+
198 #define SI443X_RX_FIFO_CLEAR 0b00000000 // 1 1 clear (call second)
+
199 #define SI443X_TX_FIFO_RESET 0b00000001 // 0 0 Tx FIFO reset/clear: reset (call first)
+
200 #define SI443X_TX_FIFO_CLEAR 0b00000000 // 0 0 clear (call second)
+
201 
+
202 // SI443X_REG_XOSC_LOAD_CAPACITANCE
+
203 #define SI443X_XTAL_SHIFT 0b00000000 // 7 7 crystal capacitance configuration:
+
204 #define SI443X_XTAL_LOAD_CAPACITANCE 0b01111111 // 6 0 C_int = 1.8 pF + 0.085 pF * SI443X_XTAL_LOAD_CAPACITANCE + 3.7 pF * SI443X_XTAL_SHIFT
+
205 
+
206 // SI443X_REG_MCU_OUTPUT_CLOCK
+
207 #define SI443X_CLOCK_TAIL_CYCLES_OFF 0b00000000 // 5 4 additional clock cycles: none (default)
+
208 #define SI443X_CLOCK_TAIL_CYCLES_128 0b00010000 // 5 4 128
+
209 #define SI443X_CLOCK_TAIL_CYCLES_256 0b00100000 // 5 4 256
+
210 #define SI443X_CLOCK_TAIL_CYCLES_512 0b00110000 // 5 4 512
+
211 #define SI443X_LOW_FREQ_CLOCK_OFF 0b00000000 // 3 3 32.768 kHz clock output: disabled (default)
+
212 #define SI443X_LOW_FREQ_CLOCK_ON 0b00001000 // 3 3 enabled
+
213 #define SI443X_MCU_CLOCK_30_MHZ 0b00000000 // 2 0 GPIO clock output: 30 MHz
+
214 #define SI443X_MCU_CLOCK_15_MHZ 0b00000001 // 2 0 15 MHz
+
215 #define SI443X_MCU_CLOCK_10_MHZ 0b00000010 // 2 0 10 MHz
+
216 #define SI443X_MCU_CLOCK_4_MHZ 0b00000011 // 2 0 4 MHz
+
217 #define SI443X_MCU_CLOCK_3_MHZ 0b00000100 // 2 0 3 MHz
+
218 #define SI443X_MCU_CLOCK_2_MHZ 0b00000101 // 2 0 2 MHz
+
219 #define SI443X_MCU_CLOCK_1_MHZ 0b00000110 // 2 0 1 MHz (default)
+
220 #define SI443X_MCU_CLOCK_32_KHZ 0b00000111 // 2 0 32.768 kHz
+
221 
+
222 // SI443X_REG_GPIO0_CONFIG + SI443X_REG_GPIO1_CONFIG + SI443X_REG_GPIO2_CONFIG
+
223 #define SI443X_GPIOX_DRIVE_STRENGTH 0b00000000 // 7 6 GPIOx drive strength (higher number = stronger drive)
+
224 #define SI443X_GPIOX_PULLUP_OFF 0b00000000 // 5 5 GPIOx internal 200k pullup: disabled (default)
+
225 #define SI443X_GPIOX_PULLUP_ON 0b00100000 // 5 5 enabled
+
226 #define SI443X_GPIO0_POWER_ON_RESET_OUT 0b00000000 // 4 0 GPIOx function: power-on-reset output (GPIO0 only, default)
+
227 #define SI443X_GPIO1_POWER_ON_RESET_INV_OUT 0b00000000 // 4 0 inverted power-on-reset output (GPIO1 only, default)
+
228 #define SI443X_GPIO2_MCU_CLOCK_OUT 0b00000000 // 4 0 MCU clock output (GPIO2 only, default)
+
229 #define SI443X_GPIOX_WAKEUP_OUT 0b00000001 // 4 0 wakeup timer expired output
+
230 #define SI443X_GPIOX_LOW_BATTERY_OUT 0b00000010 // 4 0 low battery detect output
+
231 #define SI443X_GPIOX_DIGITAL_OUT 0b00000011 // 4 0 direct digital output
+
232 #define SI443X_GPIOX_EXT_INT_FALLING_IN 0b00000100 // 4 0 external interrupt, falling edge
+
233 #define SI443X_GPIOX_EXT_INT_RISING_IN 0b00000101 // 4 0 external interrupt, rising edge
+
234 #define SI443X_GPIOX_EXT_INT_CHANGE_IN 0b00000110 // 4 0 external interrupt, state change
+
235 #define SI443X_GPIOX_ADC_IN 0b00000111 // 4 0 ADC analog input
+
236 #define SI443X_GPIOX_ANALOG_TEST_N_IN 0b00001000 // 4 0 analog test N input
+
237 #define SI443X_GPIOX_ANALOG_TEST_P_IN 0b00001001 // 4 0 analog test P input
+
238 #define SI443X_GPIOX_DIGITAL_IN 0b00001010 // 4 0 direct digital input
+
239 #define SI443X_GPIOX_DIGITAL_TEST_OUT 0b00001011 // 4 0 digital test output
+
240 #define SI443X_GPIOX_ANALOG_TEST_N_OUT 0b00001100 // 4 0 analog test N output
+
241 #define SI443X_GPIOX_ANALOG_TEST_P_OUT 0b00001101 // 4 0 analog test P output
+
242 #define SI443X_GPIOX_REFERENCE_VOLTAGE_OUT 0b00001110 // 4 0 reference voltage output
+
243 #define SI443X_GPIOX_TX_RX_DATA_CLK_OUT 0b00001111 // 4 0 Tx/Rx clock output in direct mode
+
244 #define SI443X_GPIOX_TX_DATA_IN 0b00010000 // 4 0 Tx data input direct mode
+
245 #define SI443X_GPIOX_EXT_RETRANSMIT_REQUEST_IN 0b00010001 // 4 0 external retransmission request input
+
246 #define SI443X_GPIOX_TX_STATE_OUT 0b00010010 // 4 0 Tx state output
+
247 #define SI443X_GPIOX_TX_FIFO_ALMOST_FULL_OUT 0b00010011 // 4 0 Tx FIFO almost full output
+
248 #define SI443X_GPIOX_RX_DATA_OUT 0b00010100 // 4 0 Rx data output
+
249 #define SI443X_GPIOX_RX_STATE_OUT 0b00010101 // 4 0 Rx state output
+
250 #define SI443X_GPIOX_RX_FIFO_ALMOST_FULL_OUT 0b00010110 // 4 0 Rx FIFO almost full output
+
251 #define SI443X_GPIOX_ANT_DIV_1_OUT 0b00010111 // 4 0 antenna diversity output 1
+
252 #define SI443X_GPIOX_ANT_DIV_2_OUT 0b00011000 // 4 0 antenna diversity output 2
+
253 #define SI443X_GPIOX_VALID_PREAMBLE_OUT 0b00011001 // 4 0 valid preamble detected output
+
254 #define SI443X_GPIOX_INVALID_PREAMBLE_OUT 0b00011010 // 4 0 invalid preamble detected output
+
255 #define SI443X_GPIOX_SYNC_WORD_DETECTED_OUT 0b00011011 // 4 0 sync word detected output
+
256 #define SI443X_GPIOX_CLEAR_CHANNEL_OUT 0b00011100 // 4 0 clear channel assessment output
+
257 #define SI443X_GPIOX_VDD 0b00011101 // 4 0 VDD
+
258 #define SI443X_GPIOX_GND 0b00011110 // 4 0 GND
+
259 
+
260 // SI443X_REG_IO_PORT_CONFIG
+
261 #define SI443X_GPIO2_EXT_INT_STATE_MASK 0b01000000 // 6 6 external interrupt state mask for: GPIO2
+
262 #define SI443X_GPIO1_EXT_INT_STATE_MASK 0b00100000 // 5 5 GPIO1
+
263 #define SI443X_GPIO0_EXT_INT_STATE_MASK 0b00010000 // 4 4 GPIO0
+
264 #define SI443X_IRQ_BY_SDO_OFF 0b00000000 // 3 3 output IRQ state on SDO pin: disabled (default)
+
265 #define SI443X_IRQ_BY_SDO_ON 0b00001000 // 3 3 enabled
+
266 #define SI443X_GPIO2_DIGITAL_STATE_MASK 0b00000100 // 2 2 digital state mask for: GPIO2
+
267 #define SI443X_GPIO1_DIGITAL_STATE_MASK 0b00000010 // 1 1 GPIO1
+
268 #define SI443X_GPIO0_DIGITAL_STATE_MASK 0b00000001 // 0 0 GPIO0
+
269 
+
270 // SI443X_REG_ADC_CONFIG
+
271 #define SI443X_ADC_START 0b10000000 // 7 7 ADC control: start measurement
+
272 #define SI443X_ADC_RUNNING 0b00000000 // 7 7 measurement in progress
+
273 #define SI443X_ADC_DONE 0b10000000 // 7 7 done
+
274 #define SI443X_ADC_SOURCE_TEMPERATURE 0b00000000 // 6 4 ADC source: internal temperature sensor (default)
+
275 #define SI443X_ADC_SOURCE_GPIO0_SINGLE 0b00010000 // 6 4 single-ended on GPIO0
+
276 #define SI443X_ADC_SOURCE_GPIO1_SINGLE 0b00100000 // 6 4 single-ended on GPIO1
+
277 #define SI443X_ADC_SOURCE_GPIO2_SINGLE 0b00110000 // 6 4 single-ended on GPIO2
+
278 #define SI443X_ADC_SOURCE_GPIO01_DIFF 0b01000000 // 6 4 differential on GPIO0 (+) and GPIO1 (-)
+
279 #define SI443X_ADC_SOURCE_GPIO12_DIFF 0b01010000 // 6 4 differential on GPIO1 (+) and GPIO2 (-)
+
280 #define SI443X_ADC_SOURCE_GPIO02_DIFF 0b01100000 // 6 4 differential on GPIO0 (+) and GPIO2 (-)
+
281 #define SI443X_ADC_SOURCE_GND 0b01110000 // 6 4 GND
+
282 #define SI443X_ADC_REFERNCE_BAND_GAP 0b00000000 // 3 2 ADC reference: internal bandgap 1.2 V (default)
+
283 #define SI443X_ADC_REFERNCE_VDD_3 0b00001000 // 3 2 VDD/3
+
284 #define SI443X_ADC_REFERNCE_VDD_2 0b00001100 // 3 2 VDD/2
+
285 #define SI443X_ADC_GAIN 0b00000000 // 1 0 ADC amplifier gain
+
286 
+
287 // SI443X_REG_ADC_SENSOR_AMP_OFFSET
+
288 #define SI443X_ADC_OFFSET 0b00000000 // 3 0 ADC offset
+
289 
+
290 // SI443X_REG_TEMP_SENSOR_CONTROL
+
291 #define SI443X_TEMP_SENSOR_RANGE_64_TO_64_C 0b00000000 // 7 6 temperature sensor range: -64 to 64 deg. C, 0.5 deg. C resolution (default)
+
292 #define SI443X_TEMP_SENSOR_RANGE_64_TO_192_C 0b01000000 // 7 6 -64 to 192 deg. C, 1.0 deg. C resolution
+
293 #define SI443X_TEMP_SENSOR_RANGE_0_TO_128_C 0b11000000 // 7 6 0 to 128 deg. C, 0.5 deg. C resolution
+
294 #define SI443X_TEMP_SENSOR_RANGE_40_TO_216_F 0b10000000 // 7 6 -40 to 216 deg. F, 1.0 deg. F resolution
+
295 #define SI443X_TEMP_SENSOR_KELVIN_TO_CELSIUS_OFF 0b00000000 // 5 5 Kelvin to Celsius offset: disabled
+
296 #define SI443X_TEMP_SENSOR_KELVIN_TO_CELSIUS_ON 0b00100000 // 5 5 enabled (default)
+
297 #define SI443X_TEMP_SENSOR_TRIM_OFF 0b00000000 // 4 4 temperature sensor trim: disabled (default)
+
298 #define SI443X_TEMP_SENSOR_TRIM_ON 0b00010000 // 4 4 enabled
+
299 #define SI443X_TEMP_SENSOR_TRIM_VALUE 0b00000000 // 3 0 temperature sensor trim value
+
300 
+
301 // SI443X_REG_WAKEUP_TIMER_PERIOD_1
+
302 #define SI443X_WAKEUP_TIMER_EXPONENT 0b00000011 // 4 0 wakeup timer value exponent
+
303 
+
304 // SI443X_REG_WAKEUP_TIMER_PERIOD_2 + SI443X_REG_WAKEUP_TIMER_PERIOD_3
+
305 #define SI443X_WAKEUP_TIMER_MANTISSA_MSB 0x00 // 7 0 wakeup timer value:
+
306 #define SI443X_WAKEUP_TIMER_MANTISSA_LSB 0x01 // 7 0 T = (4 * SI443X_WAKEUP_TIMER_MANTISSA * 2 ^ SI443X_WAKEUP_TIMER_EXPONENT) / 32.768 ms
+
307 
+
308 // SI443X_REG_LOW_DC_MODE_DURATION
+
309 #define SI443X_LOW_DC_MODE_DURATION_MANTISSA 0x01 // 7 0 low duty cycle mode duration: T = (4 * SI443X_LOW_DC_MODE_DURATION_MANTISSA * 2 ^ SI443X_WAKEUP_TIMER_EXPONENT) / 32.768 ms
+
310 
+
311 // SI443X_REG_LOW_BATT_DET_THRESHOLD
+
312 #define SI443X_LOW_BATT_DET_THRESHOLD 0b00010100 // 4 0 low battery detection threshold: Vth = 1.7 + SI443X_LOW_BATT_DET_THRESHOLD * 0.05 V (defaults to 2.7 V)
+
313 
+
314 // SI443X_REG_IF_FILTER_BANDWIDTH
+
315 #define SI443X_BYPASS_DEC_BY_3_OFF 0b00000000 // 7 7 bypass decimate-by-3 stage: disabled (default)
+
316 #define SI443X_BYPASS_DEC_BY_3_ON 0b10000000 // 7 7 enabled
+
317 #define SI443X_IF_FILTER_DEC_RATE 0b00000000 // 6 4 IF filter decimation rate
+
318 #define SI443X_IF_FILTER_COEFF_SET 0b00000001 // 3 0 IF filter coefficient set selection
+
319 
+
320 // SI443X_REG_AFC_LOOP_GEARSHIFT_OVERRIDE
+
321 #define SI443X_AFC_WIDEBAND_OFF 0b00000000 // 7 7 AFC wideband: disabled (default)
+
322 #define SI443X_AFC_WIDEBAND_ON 0b10000000 // 7 7 enabled
+
323 #define SI443X_AFC_OFF 0b00000000 // 6 6 AFC: disabled
+
324 #define SI443X_AFC_ON 0b01000000 // 6 6 enabled (default)
+
325 #define SI443X_AFC_HIGH_GEAR_SETTING 0b00000000 // 5 3 AFC high gear setting
+
326 #define SI443X_SECOND_PHASE_BIAS_0_DB 0b00000100 // 2 2 second phase antenna selection bias: 0 dB (default)
+
327 #define SI443X_SECOND_PHASE_BIAS_1_5_DB 0b00000000 // 2 2 1.5 dB
+
328 #define SI443X_MOVING_AVERAGE_TAP_8 0b00000010 // 1 1 moving average filter tap length: 8*Tb
+
329 #define SI443X_MOVING_AVERAGE_TAP_4 0b00000000 // 1 1 4*Tb after first preamble (default)
+
330 #define SI443X_ZERO_PHASE_RESET_5 0b00000000 // 0 0 reset preamble detector after: 5 zero phases (default)
+
331 #define SI443X_ZERO_PHASE_RESET_2 0b00000001 // 0 0 3 zero phases
+
332 
+
333 // SI443X_REG_AFC_TIMING_CONTROL
+
334 #define SI443X_SW_ANT_TIMER 0b00000000 // 7 6 number of periods to wait for RSSI to stabilize during antenna switching
+
335 #define SI443X_SHORT_WAIT 0b00001000 // 5 3 period to wait after AFC correction
+
336 #define SI443X_ANTENNA_SWITCH_WAIT 0b00000010 // 2 0 antenna switching wait time
+
337 
+
338 // SI443X_REG_CLOCK_REC_GEARSHIFT_OVERRIDE
+
339 #define SI443X_CLOCK_RECOVER_FAST_GEARSHIFT 0b00000000 // 5 3 clock recovery fast gearshift value
+
340 #define SI443X_CLOCK_RECOVER_SLOW_GEARSHIFT 0b00000011 // 2 0 clock recovery slow gearshift value
+
341 
+
342 // SI443X_REG_CLOCK_REC_OVERSAMP_RATIO
+
343 #define SI443X_CLOCK_REC_OVERSAMP_RATIO_LSB 0b01100100 // 7 0 oversampling rate LSB, defaults to 12.5 clock cycles per bit
+
344 
+
345 // SI443X_REG_CLOCK_REC_OFFSET_2
+
346 #define SI443X_CLOCK_REC_OVERSAMP_RATIO_MSB 0b00000000 // 7 5 oversampling rate MSB, defaults to 12.5 clock cycles per bit
+
347 #define SI443X_SECOND_PHASE_SKIP_THRESHOLD 0b00000000 // 4 4 skip seconds phase antenna diversity threshold
+
348 #define SI443X_NCO_OFFSET_MSB 0b00000001 // 3 0 NCO offset MSB
+
349 
+
350 // SI443X_REG_CLOCK_REC_OFFSET_1
+
351 #define SI443X_NCO_OFFSET_MID 0b01000111 // 7 0 NCO offset MID
+
352 
+
353 // SI443X_REG_CLOCK_REC_OFFSET_0
+
354 #define SI443X_NCO_OFFSET_LSB 0b10101110 // 7 0 NCO offset LSB
+
355 
+
356 // SI443X_REG_CLOCK_REC_TIMING_LOOP_GAIN_1
+
357 #define SI443X_RX_COMPENSATION_OFF 0b00000000 // 4 4 Rx compensation for high data rate: disabled (default)
+
358 #define SI443X_RX_COMPENSATION_ON 0b00010000 // 4 4 enabled
+
359 #define SI443X_CLOCK_REC_GAIN_DOUBLE_OFF 0b00000000 // 3 3 clock recovery gain doubling: disabled (default)
+
360 #define SI443X_CLOCK_REC_GAIN_DOUBLE_ON 0b00001000 // 3 3 enabled
+
361 #define SI443X_CLOCK_REC_LOOP_GAIN_MSB 0b00000010 // 2 0 clock recovery timing loop gain MSB
+
362 
+
363 // SI443X_REG_CLOCK_REC_TIMING_LOOP_GAIN_0
+
364 #define SI443X_CLOCK_REC_LOOP_GAIN_LSB 0b10001111 // 7 0 clock recovery timing loop gain LSB
+
365 
+
366 // SI443X_REG_RSSI_CLEAR_CHANNEL_THRESHOLD
+
367 #define SI443X_RSSI_CLEAR_CHANNEL_THRESHOLD 0b00011110 // 7 0 RSSI clear channel interrupt threshold
+
368 
+
369 // SI443X_REG_AFC_LIMITER
+
370 #define SI443X_AFC_LIMITER 0x00 // 7 0 AFC limiter value
+
371 
+
372 // SI443X_REG_OOK_COUNTER_1
+
373 #define SI443X_OOK_FREEZE_OFF 0b00000000 // 5 5 OOK moving average detector freeze: disabled (default)
+
374 #define SI443X_OOK_FREEZE_ON 0b00100000 // 5 5 enabled
+
375 #define SI443X_PEAK_DETECTOR_OFF 0b00000000 // 4 4 peak detector: disabled
+
376 #define SI443X_PEAK_DETECTOR_ON 0b00010000 // 4 4 enabled (default)
+
377 #define SI443X_OOK_MOVING_AVERAGE_OFF 0b00000000 // 3 3 OOK moving average: disabled
+
378 #define SI443X_OOK_MOVING_AVERAGE_ON 0b00001000 // 3 3 enabled (default)
+
379 #define SI443X_OOK_COUNTER_MSB 0b00000000 // 2 0 OOK counter MSB
+
380 
+
381 // SI443X_REG_OOK_COUNTER_2
+
382 #define SI443X_OOK_COUNTER_LSB 0b10111100 // 7 0 OOK counter LSB
+
383 
+
384 // SI443X_REG_SLICER_PEAK_HOLD
+
385 #define SI443X_PEAK_DETECTOR_ATTACK 0b00010000 // 6 4 OOK peak detector attach time
+
386 #define SI443X_PEAK_DETECTOR_DECAY 0b00001100 // 3 0 OOK peak detector decay time
+
387 
+
388 // SI443X_REG_DATA_ACCESS_CONTROL
+
389 #define SI443X_PACKET_RX_HANDLING_OFF 0b00000000 // 7 7 packet Rx handling: disabled
+
390 #define SI443X_PACKET_RX_HANDLING_ON 0b10000000 // 7 7 enabled (default)
+
391 #define SI443X_LSB_FIRST_OFF 0b00000000 // 6 6 LSB first transmission: disabled (default)
+
392 #define SI443X_LSB_FIRST_ON 0b01000000 // 6 6 enabled
+
393 #define SI443X_CRC_DATA_ONLY_OFF 0b00000000 // 5 5 CRC calculated only from data fields: disabled (default)
+
394 #define SI443X_CRC_DATA_ONLY_ON 0b00100000 // 5 5 enabled
+
395 #define SI443X_SKIP_SECOND_PHASE_PREAMBLE_DET_OFF 0b00000000 // 4 4 skip second phase of preamble detection: disabled (default)
+
396 #define SI443X_SKIP_SECOND_PHASE_PREAMBLE_DET_ON 0b00010000 // 4 4 enabled
+
397 #define SI443X_PACKET_TX_HANDLING_OFF 0b00000000 // 3 3 packet Tx handling: disabled
+
398 #define SI443X_PACKET_TX_HANDLING_ON 0b00001000 // 3 3 enabled (default)
+
399 #define SI443X_CRC_OFF 0b00000000 // 2 2 CRC: disabled
+
400 #define SI443X_CRC_ON 0b00000100 // 2 2 enabled (default)
+
401 #define SI443X_CRC_CCITT 0b00000000 // 1 0 CRC type: CCITT
+
402 #define SI443X_CRC_IBM_CRC16 0b00000001 // 1 0 IBM CRC-16 (default)
+
403 #define SI443X_CRC_IEC16 0b00000010 // 1 0 IEC-16
+
404 #define SI443X_CRC_BIACHEVA 0b00000011 // 1 0 Biacheva
+
405 
+
406 // SI443X_REG_EZMAC_STATUS
+
407 #define SI443X_CRC_ALL_ONE 0b01000000 // 6 6 last received CRC was all ones
+
408 #define SI443X_PACKET_SEARCHING 0b00100000 // 5 5 radio is searching for a valid packet
+
409 #define SI443X_PACKET_RECEIVING 0b00010000 // 4 4 radio is currently receiving packet
+
410 #define SI443X_VALID_PACKET_RECEIVED 0b00001000 // 3 3 valid packet was received
+
411 #define SI443X_CRC_ERROR 0b00000100 // 2 2 CRC check failed
+
412 #define SI443X_PACKET_TRANSMITTING 0b00000010 // 1 1 radio is currently transmitting packet
+
413 #define SI443X_PACKET_SENT 0b00000001 // 0 0 packet sent
+
414 
+
415 // SI443X_REG_HEADER_CONTROL_1
+
416 #define SI443X_BROADCAST_ADDR_CHECK_NONE 0b00000000 // 7 4 broadcast address check: none (default)
+
417 #define SI443X_BROADCAST_ADDR_CHECK_BYTE0 0b00010000 // 7 4 on byte 0
+
418 #define SI443X_BROADCAST_ADDR_CHECK_BYTE1 0b00100000 // 7 4 on byte 1
+
419 #define SI443X_BROADCAST_ADDR_CHECK_BYTE2 0b01000000 // 7 4 on byte 2
+
420 #define SI443X_BROADCAST_ADDR_CHECK_BYTE3 0b10000000 // 7 4 on byte 3
+
421 #define SI443X_RECEIVED_HEADER_CHECK_NONE 0b00000000 // 3 0 received header check: none
+
422 #define SI443X_RECEIVED_HEADER_CHECK_BYTE0 0b00000001 // 3 0 on byte 0
+
423 #define SI443X_RECEIVED_HEADER_CHECK_BYTE1 0b00000010 // 3 0 on byte 1
+
424 #define SI443X_RECEIVED_HEADER_CHECK_BYTE2 0b00000100 // 3 0 on byte 2 (default)
+
425 #define SI443X_RECEIVED_HEADER_CHECK_BYTE3 0b00001000 // 3 0 on byte 3 (default)
+
426 
+
427 // SI443X_REG_HEADER_CONTROL_2
+
428 #define SI443X_SYNC_WORD_TIMEOUT_OFF 0b00000000 // 7 7 ignore timeout period when searching for sync word: disabled (default)
+
429 #define SI443X_SYNC_WORD_TIMEOUT_ON 0b10000000 // 7 7 enabled
+
430 #define SI443X_HEADER_LENGTH_HEADER_NONE 0b00000000 // 6 4 header length: none
+
431 #define SI443X_HEADER_LENGTH_HEADER_3 0b00010000 // 6 4 header 3
+
432 #define SI443X_HEADER_LENGTH_HEADER_32 0b00100000 // 6 4 header 3 and 2
+
433 #define SI443X_HEADER_LENGTH_HEADER_321 0b00110000 // 6 4 header 3, 2 and 1 (default)
+
434 #define SI443X_HEADER_LENGTH_HEADER_3210 0b01000000 // 6 4 header 3, 2, 1, and 0
+
435 #define SI443X_FIXED_PACKET_LENGTH_OFF 0b00000000 // 3 3 fixed packet length mode: disabled (default)
+
436 #define SI443X_FIXED_PACKET_LENGTH_ON 0b00001000 // 3 3 enabled
+
437 #define SI443X_SYNC_LENGTH_SYNC_3 0b00000000 // 2 1 sync word length: sync 3
+
438 #define SI443X_SYNC_LENGTH_SYNC_32 0b00000010 // 2 1 sync 3 and 2 (default)
+
439 #define SI443X_SYNC_LENGTH_SYNC_321 0b00000100 // 2 1 sync 3, 2 and 1
+
440 #define SI443X_SYNC_LENGTH_SYNC_3210 0b00000110 // 2 1 sync 3, 2, 1 and 0
+
441 #define SI443X_PREAMBLE_LENGTH_MSB 0b00000000 // 0 0 preamble length MSB
+
442 
+
443 // SI443X_REG_PREAMBLE_LENGTH
+
444 #define SI443X_PREAMBLE_LENGTH_LSB 0b00001000 // 0 0 preamble length LSB, defaults to 32 bits
+
445 
+
446 // SI443X_REG_PREAMBLE_DET_CONTROL
+
447 #define SI443X_PREAMBLE_DET_THRESHOLD 0b00101000 // 7 3 number of 4-bit nibbles in valid preamble, defaults to 20 bits
+
448 #define SI443X_RSSI_OFFSET 0b00000010 // 2 0 RSSI calculation offset, defaults to +8 dB
+
449 
+
450 // SI443X_REG_SYNC_WORD_3 - SI443X_REG_SYNC_WORD_0
+
451 #define SI443X_SYNC_WORD_3 0x2D // 7 0 sync word: 4th byte (MSB)
+
452 #define SI443X_SYNC_WORD_2 0xD4 // 7 0 3rd byte
+
453 #define SI443X_SYNC_WORD_1 0x00 // 7 0 2nd byte
+
454 #define SI443X_SYNC_WORD_0 0x00 // 7 0 1st byte (LSB)
+
455 
+
456 // SI443X_REG_CHANNEL_FILTER_COEFF
+
457 #define SI443X_INVALID_PREAMBLE_THRESHOLD 0b00000000 // 7 4 invalid preamble threshold in nibbles
+
458 
+
459 // SI443X_REG_XOSC_CONTROL_TEST
+
460 #define SI443X_STATE_LOW_POWER 0b00000000 // 7 5 chip power state: low power
+
461 #define SI443X_STATE_READY 0b00100000 // 7 5 ready
+
462 #define SI443X_STATE_TUNE 0b01100000 // 7 5 tune
+
463 #define SI443X_STATE_TX 0b01000000 // 7 5 Tx
+
464 #define SI443X_STATE_RX 0b11100000 // 7 5 Rx
+
465 
+
466 // SI443X_REG_AGC_OVERRIDE_1
+
467 #define SI443X_AGC_GAIN_INCREASE_OFF 0b00000000 // 6 6 AGC gain increase override: disabled (default)
+
468 #define SI443X_AGC_GAIN_INCREASE_ON 0b01000000 // 6 6 enabled
+
469 #define SI443X_AGC_OFF 0b00000000 // 5 5 AGC loop: disabled
+
470 #define SI443X_AGC_ON 0b00100000 // 5 5 enabled (default)
+
471 #define SI443X_LNA_GAIN_MIN 0b00000000 // 4 4 LNA gain select: 5 dB (default)
+
472 #define SI443X_LNA_GAIN_MAX 0b00010000 // 4 4 25 dB
+
473 #define SI443X_PGA_GAIN_OVERRIDE 0b00000000 // 3 0 PGA gain override, gain = SI443X_PGA_GAIN_OVERRIDE * 3 dB
+
474 
+
475 // SI443X_REG_TX_POWER
+
476 #define SI443X_LNA_SWITCH_OFF 0b00000000 // 3 3 LNA switch control: disabled
+
477 #define SI443X_LNA_SWITCH_ON 0b00001000 // 3 3 enabled (default)
+
478 #define SI443X_OUTPUT_POWER 0b00000000 // 2 0 output power in 3 dB steps, 0 is chip min, 7 is chip max
+
479 
+
480 // SI443X_REG_TX_DATA_RATE_1 + SI443X_REG_TX_DATA_RATE_0
+
481 #define SI443X_DATA_RATE_MSB 0x0A // 7 0 data rate: DR = 10^6 * (SI443X_DATA_RATE / 2^16) in high data rate mode or
+
482 #define SI443X_DATA_RATE_LSB 0x3D // 7 0 DR = 10^6 * (SI443X_DATA_RATE / 2^21) in low data rate mode (defaults to 40 kbps)
+
483 
+
484 // SI443X_REG_MODULATION_MODE_CONTROL_1
+
485 #define SI443X_HIGH_DATA_RATE_MODE 0b00000000 // 5 5 data rate: above 30 kbps (default)
+
486 #define SI443X_LOW_DATA_RATE_MODE 0b00100000 // 5 5 below 30 kbps
+
487 #define SI443X_PACKET_HANDLER_POWER_DOWN_OFF 0b00000000 // 4 4 power off packet handler in low power mode: disabled (default)
+
488 #define SI443X_PACKET_HANDLER_POWER_DOWN_ON 0b00010000 // 4 4 enabled
+
489 #define SI443X_MANCHESTER_PREAMBLE_POL_LOW 0b00000000 // 3 3 preamble polarity in Manchester mode: low
+
490 #define SI443X_MANCHESTER_PREAMBLE_POL_HIGH 0b00001000 // 3 3 high (default)
+
491 #define SI443X_MANCHESTER_INVERTED_OFF 0b00000000 // 2 2 inverted Manchester encoding: disabled
+
492 #define SI443X_MANCHESTER_INVERTED_ON 0b00000100 // 2 2 enabled (default)
+
493 #define SI443X_MANCHESTER_OFF 0b00000000 // 1 1 Manchester encoding: disabled (default)
+
494 #define SI443X_MANCHESTER_ON 0b00000010 // 1 1 enabled
+
495 #define SI443X_WHITENING_OFF 0b00000000 // 0 0 data whitening: disabled (default)
+
496 #define SI443X_WHITENING_ON 0b00000001 // 0 0 enabled
+
497 
+
498 // SI443X_REG_MODULATION_MODE_CONTROL_2
+
499 #define SI443X_TX_DATA_CLOCK_NONE 0b00000000 // 7 6 Tx data clock: disabled (default)
+
500 #define SI443X_TX_DATA_CLOCK_GPIO 0b01000000 // 7 6 GPIO pin
+
501 #define SI443X_TX_DATA_CLOCK_SDI 0b10000000 // 7 6 SDI pin
+
502 #define SI443X_TX_DATA_CLOCK_NIRQ 0b11000000 // 7 6 nIRQ pin
+
503 #define SI443X_TX_DATA_SOURCE_GPIO 0b00000000 // 5 4 Tx data source in direct mode: GPIO pin (default)
+
504 #define SI443X_TX_DATA_SOURCE_SDI 0b00010000 // 5 4 SDI pin
+
505 #define SI443X_TX_DATA_SOURCE_FIFO 0b00100000 // 5 4 FIFO
+
506 #define SI443X_TX_DATA_SOURCE_PN9 0b00110000 // 5 4 PN9 internal
+
507 #define SI443X_TX_RX_INVERTED_OFF 0b00000000 // 3 3 Tx/Rx data inverted: disabled (default)
+
508 #define SI443X_TX_RX_INVERTED_ON 0b00001000 // 3 3 enabled
+
509 #define SI443X_FREQUENCY_DEVIATION_MSB 0b00000000 // 2 2 frequency deviation MSB
+
510 #define SI443X_MODULATION_NONE 0b00000000 // 1 0 modulation type: unmodulated carrier (default)
+
511 #define SI443X_MODULATION_OOK 0b00000001 // 1 0 OOK
+
512 #define SI443X_MODULATION_FSK 0b00000010 // 1 0 FSK
+
513 #define SI443X_MODULATION_GFSK 0b00000011 // 1 0 GFSK
+
514 
+
515 // SI443X_REG_FREQUENCY_DEVIATION
+
516 #define SI443X_FREQUENCY_DEVIATION_LSB 0b00100000 // 7 0 frequency deviation LSB, Fd = 625 Hz * SI443X_FREQUENCY_DEVIATION, defaults to 20 kHz
+
517 
+
518 // SI443X_REG_FREQUENCY_OFFSET_1 + SI443X_REG_FREQUENCY_OFFSET_2
+
519 #define SI443X_FREQUENCY_OFFSET_MSB 0x00 // 7 0 frequency offset:
+
520 #define SI443X_FREQUENCY_OFFSET_LSB 0x00 // 1 0 Foff = 156.25 Hz * (SI443X_BAND_SELECT + 1) * SI443X_FREQUENCY_OFFSET, defaults to 156.25 Hz
+
521 
+
522 // SI443X_REG_FREQUENCY_BAND_SELECT
+
523 #define SI443X_SIDE_BAND_SELECT_LOW 0b00000000 // 6 6 Rx LO tuning: below channel frequency (default)
+
524 #define SI443X_SIDE_BAND_SELECT_HIGH 0b01000000 // 6 6 above channel frequency
+
525 #define SI443X_BAND_SELECT_LOW 0b00000000 // 5 5 band select: low, 240 - 479.9 MHz
+
526 #define SI443X_BAND_SELECT_HIGH 0b00100000 // 5 5 high, 480 - 960 MHz (default)
+
527 #define SI443X_FREQUENCY_BAND_SELECT 0b00010101 // 4 0 frequency band select
+
528 
+
529 // SI443X_REG_NOM_CARRIER_FREQUENCY_1 + SI443X_REG_NOM_CARRIER_FREQUENCY_0
+
530 #define SI443X_NOM_CARRIER_FREQUENCY_MSB 0b10111011 // 7 0 nominal carrier frequency:
+
531 #define SI443X_NOM_CARRIER_FREQUENCY_LSB 0b10000000 // 7 0 Fc = (SI443X_BAND_SELECT + 1)*10*(SI443X_FREQUENCY_BAND_SELECT + 24) + (SI443X_NOM_CARRIER_FREQUENCY - SI443X_FREQUENCY_OFFSET)/6400 [MHz]
+
532 
+
533 // SI443X_REG_FREQUENCY_HOPPING_CHANNEL_SEL
+
534 #define SI443X_FREQUENCY_HOPPING_CHANNEL 0x00 // 7 0 frequency hopping channel number
+
535 
+
536 // SI443X_REG_FREQUENCY_HOPPING_STEP_SIZE
+
537 #define SI443X_FREQUENCY_HOPPING_STEP_SIZE 0x00 // 7 0 frequency hopping step size
+
538 
+
539 // SI443X_REG_TX_FIFO_CONTROL_1
+
540 #define SI443X_TX_FIFO_ALMOST_FULL_THRESHOLD 0x37 // 5 0 Tx FIFO almost full threshold
+
541 
+
542 // SI443X_REG_TX_FIFO_CONTROL_2
+
543 #define SI443X_TX_FIFO_ALMOST_EMPTY_THRESHOLD 0x04 // 5 0 Tx FIFO almost full threshold
+
544 
+
545 // SI443X_REG_RX_FIFO_CONTROL
+
546 #define SI443X_RX_FIFO_ALMOST_FULL_THRESHOLD 0x37 // 5 0 Rx FIFO almost full threshold
+
547 
+
554 class Si443x: public PhysicalLayer {
+
555  public:
+
556  // introduce PhysicalLayer overloads
+ + + + +
561 
+
562  // constructor
+
563 
+
569  Si443x(Module* mod);
+
570 
+
571  // basic methods
+
572 
+
586  int16_t begin(float br, float freqDev, float rxBw, uint8_t preambleLen);
+
587 
+
591  void reset();
+
592 
+
605  int16_t transmit(uint8_t* data, size_t len, uint8_t addr = 0) override;
+
606 
+
617  int16_t receive(uint8_t* data, size_t len) override;
+
618 
+
625  int16_t sleep();
+
626 
+
632  int16_t standby() override;
+
633 
+
641  int16_t transmitDirect(uint32_t frf = 0) override;
+
642 
+
648  int16_t receiveDirect() override;
+
649 
+
655  int16_t packetMode();
+
656 
+
657  // interrupt methods
+
658 
+
664  void setIrqAction(void (*func)(void));
+
665 
+
669  void clearIrqAction();
+
670 
+
682  int16_t startTransmit(uint8_t* data, size_t len, uint8_t addr = 0) override;
+
683 
+
689  int16_t startReceive();
+
690 
+
700  int16_t readData(uint8_t* data, size_t len) override;
+
701 
+
702  // configuration methods
+
703 
+
711  int16_t setBitRate(float br);
+
712 
+
720  int16_t setFrequencyDeviation(float freqDev) override;
+
721 
+
729  int16_t setRxBandwidth(float rxBw);
+
730 
+
738  int16_t setSyncWord(uint8_t* syncWord, size_t len);
+
739 
+
747  int16_t setPreambleLength(uint8_t preambleLen);
+
748 
+
756  size_t getPacketLength(bool update = true) override;
+
757 
+
766  int16_t setEncoding(uint8_t encoding) override;
+
767 
+
776  int16_t setDataShaping(uint8_t sh) override;
+
777 
+
786  void setRfSwitchPins(RADIOLIB_PIN_TYPE rxEn, RADIOLIB_PIN_TYPE txEn);
+
787 
+
793  uint8_t random();
+
794 
+
800  int16_t getChipVersion();
+
801 
+
802 #ifndef RADIOLIB_GODMODE
+
803  protected:
+
804 #endif
+
805  Module* _mod;
+
806 
+
807  float _br = 0;
+
808  float _freqDev = 0;
+
809  float _freq = 0;
+
810 
+
811  size_t _packetLength = 0;
+
812  bool _packetLengthQueried = false;
+
813 
+
814  int16_t setFrequencyRaw(float newFreq);
+
815 
+
816 #ifndef RADIOLIB_GODMODE
+
817  private:
+
818 #endif
+
819  bool findChip();
+
820  void clearIRQFlags();
+
821  int16_t config();
+
822  int16_t updateClockRecovery();
+
823  int16_t directMode();
+
824 };
+
825 
+
826 #endif
+
827 
+
828 #endif
+
int16_t transmit(__FlashStringHelper *fstr, uint8_t addr=0)
Arduino Flash String transmit method.
Definition: PhysicalLayer.cpp:8
+
int16_t receiveDirect() override
Enables direct reception mode. While in direct mode, the module will not be able to transmit or recei...
Definition: Si443x.cpp:189
+
int16_t standby() override
Sets the module to standby.
Definition: Si443x.cpp:139
+
int16_t setBitRate(float br)
Sets FSK bit rate. Allowed values range from 0.123 to 256.0 kbps.
Definition: Si443x.cpp:305
+
int16_t setPreambleLength(uint8_t preambleLen)
Sets preamble length.
Definition: Si443x.cpp:483
+
int16_t packetMode()
Disables direct mode and enables packet mode, allowing the module to receive packets.
Definition: Si443x.cpp:202
+
int16_t setRxBandwidth(float rxBw)
Sets receiver bandwidth. Allowed values range from 2.6 to 620.7 kHz.
Definition: Si443x.cpp:359
+
int16_t begin(float br, float freqDev, float rxBw, uint8_t preambleLen)
Initialization method.
Definition: Si443x.cpp:8
+
int16_t getChipVersion()
Read version SPI register. Should return SI443X_DEVICE_VERSION (0x06) if Si443x is connected and work...
Definition: Si443x.cpp:570
+
void setIrqAction(void(*func)(void))
Sets interrupt service routine to call when IRQ activates.
Definition: Si443x.cpp:206
+
int16_t sleep()
Sets the module to sleep to save power. Module will not be able to transmit or receive any data while...
Definition: Si443x.cpp:123
+
int16_t readData(uint8_t *data, size_t len) override
Reads data that was received after calling startReceive method. This method reads len characters.
Definition: Si443x.cpp:279
+
uint8_t random()
Get one truly random byte from RSSI noise.
Definition: Si443x.cpp:551
+
int16_t readData(String &str, size_t len=0)
Reads data that was received after calling startReceive method.
Definition: PhysicalLayer.cpp:57
+
void clearIrqAction()
Clears interrupt service routine to call when IRQ activates.
Definition: Si443x.cpp:210
+
int16_t startTransmit(uint8_t *data, size_t len, uint8_t addr=0) override
Interrupt-driven binary transmit method. Will start transmitting arbitrary binary data up to 64 bytes...
Definition: Si443x.cpp:214
+
size_t getPacketLength(bool update=true) override
Query modem for the packet length of received payload.
Definition: Si443x.cpp:499
+
int16_t setDataShaping(uint8_t sh) override
Sets Gaussian filter bandwidth-time product that will be used for data shaping. Only available in FSK...
Definition: Si443x.cpp:528
+
void setRfSwitchPins(RADIOLIB_PIN_TYPE rxEn, RADIOLIB_PIN_TYPE txEn)
Some modules contain external RF switch controlled by two pins. This function gives RadioLib control ...
Definition: Si443x.cpp:547
+
Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN....
Definition: PhysicalLayer.h:13
+
int16_t receive(String &str, size_t len=0)
Arduino String receive method.
Definition: PhysicalLayer.cpp:98
+
Implements all common low-level SPI/UART/I2C methods to control the wireless module....
Definition: Module.h:17
+
int16_t setEncoding(uint8_t encoding) override
Sets transmission encoding. Only available in FSK mode. Allowed values are RADIOLIB_ENCODING_NRZ,...
Definition: Si443x.cpp:509
+
void reset()
Reset method. Will reset the chip to the default state using SDN pin.
Definition: Si443x.cpp:60
+
int16_t setSyncWord(uint8_t *syncWord, size_t len)
Sets sync word. Up to 4 bytes can be set as sync word.
Definition: Si443x.cpp:466
+
Base class for Si443x series. All derived classes for Si443x (e.g. Si4431 or Si4432) inherit from thi...
Definition: Si443x.h:554
+
int16_t setFrequencyDeviation(float freqDev) override
Sets FSK frequency deviation from carrier frequency. Allowed values range from 0.625 to 320....
Definition: Si443x.cpp:336
+
int16_t receive(uint8_t *data, size_t len) override
Binary receive method. Will attempt to receive arbitrary binary data up to 64 bytes long....
Definition: Si443x.cpp:101
+
int16_t transmit(uint8_t *data, size_t len, uint8_t addr=0) override
Binary transmit method. Will transmit arbitrary binary data up to 64 bytes long. For overloads to tra...
Definition: Si443x.cpp:68
+
Si443x(Module *mod)
Default constructor.
Definition: Si443x.cpp:4
+
int16_t startReceive()
Interrupt-driven receive method. IRQ will be activated when full valid packet is received.
Definition: Si443x.cpp:254
+
int16_t transmitDirect(uint32_t frf=0) override
Enables direct transmission mode. While in direct mode, the module will not be able to transmit or re...
Definition: Si443x.cpp:147
+
int16_t startTransmit(String &str, uint8_t addr=0)
Interrupt-driven Arduino String transmit method. Unlike the standard transmit method,...
Definition: PhysicalLayer.cpp:49
diff --git a/_transport_layer_8h_source.html b/_transport_layer_8h_source.html index ea9c5c79..79e65857 100644 --- a/_transport_layer_8h_source.html +++ b/_transport_layer_8h_source.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/protocols/TransportLayer/TransportLayer.h Source File @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -84,21 +86,47 @@ $(document).ready(function(){initNavTree('_transport_layer_8h_source.html','');}
TransportLayer.h
-
1 #ifndef _RADIOLIB_TRANSPORT_LAYER_H
2 #define _RADIOLIB_TRANSPORT_LAYER_H
3 
4 #include "../../TypeDef.h"
5 
13  public:
14  // constructor
15  // this class is purely virtual and does not require explicit constructor
16 
17  // basic methods
18 
32  virtual int16_t openTransportConnection(const char* host, const char* protocol, uint16_t port, uint16_t tcpKeepAlive = 0) = 0;
33 
39  virtual int16_t closeTransportConnection() = 0;
40 
48  virtual int16_t send(const char* data) = 0;
49 
59  virtual int16_t send(uint8_t* data, size_t len) = 0;
60 
72  virtual size_t receive(uint8_t* data, size_t len, uint32_t timeout = 10000) = 0;
73 
83  virtual size_t getNumBytes(uint32_t timeout = 10000, size_t minBytes = 10) = 0;
84 };
85 
86 #endif
Provides common interface for protocols that run on modules with Internet connectivity, such as HTTP or MQTT. Because this class is used mainly as interface, all of its virtual members must be implemented in the module class.
Definition: TransportLayer.h:12
-
virtual size_t getNumBytes(uint32_t timeout=10000, size_t minBytes=10)=0
Get number of received bytes.
-
virtual size_t receive(uint8_t *data, size_t len, uint32_t timeout=10000)=0
Receive data.
-
virtual int16_t openTransportConnection(const char *host, const char *protocol, uint16_t port, uint16_t tcpKeepAlive=0)=0
Open transport layer connection.
-
virtual int16_t send(const char *data)=0
Send string-based data.
-
virtual int16_t closeTransportConnection()=0
Close transport layer connection.
+
1 #ifndef _RADIOLIB_TRANSPORT_LAYER_H
+
2 #define _RADIOLIB_TRANSPORT_LAYER_H
+
3 
+
4 #include "../../TypeDef.h"
+
5 
+ +
13  public:
+
14  // constructor
+
15  // this class is purely virtual and does not require explicit constructor
+
16 
+
17  // basic methods
+
18 
+
32  virtual int16_t openTransportConnection(const char* host, const char* protocol, uint16_t port, uint16_t tcpKeepAlive = 0) = 0;
+
33 
+
39  virtual int16_t closeTransportConnection() = 0;
+
40 
+
48  virtual int16_t send(const char* data) = 0;
+
49 
+
59  virtual int16_t send(uint8_t* data, size_t len) = 0;
+
60 
+
72  virtual size_t receive(uint8_t* data, size_t len, uint32_t timeout = 10000) = 0;
+
73 
+
83  virtual size_t getNumBytes(uint32_t timeout = 10000, size_t minBytes = 10) = 0;
+
84 };
+
85 
+
86 #endif
+
virtual int16_t send(const char *data)=0
Send string-based data.
+
virtual size_t receive(uint8_t *data, size_t len, uint32_t timeout=10000)=0
Receive data.
+
virtual size_t getNumBytes(uint32_t timeout=10000, size_t minBytes=10)=0
Get number of received bytes.
+
virtual int16_t openTransportConnection(const char *host, const char *protocol, uint16_t port, uint16_t tcpKeepAlive=0)=0
Open transport layer connection.
+
Provides common interface for protocols that run on modules with Internet connectivity,...
Definition: TransportLayer.h:12
+
virtual int16_t closeTransportConnection()=0
Close transport layer connection.
diff --git a/_type_def_8h_source.html b/_type_def_8h_source.html index 4ba08560..e0a401f4 100644 --- a/_type_def_8h_source.html +++ b/_type_def_8h_source.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/TypeDef.h Source File @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -84,7 +86,221 @@ $(document).ready(function(){initNavTree('_type_def_8h_source.html','');});
TypeDef.h
-
1 #ifndef _RADIOLIB_TYPES_H
2 #define _RADIOLIB_TYPES_H
3 
4 #include "BuildOpt.h"
5 
15 #define RADIOLIB_USE_SPI 0x00
16 
20 #define RADIOLIB_USE_UART 0x01
21 
25 #define RADIOLIB_USE_I2C 0x02
26 
40 #define RADIOLIB_UART_STOPBIT_1 0x01
41 
45 #define RADIOLIB_UART_STOPBIT_1_5 0x02
46 
50 #define RADIOLIB_UART_STOPBIT_2 0x03
51 
55 #define RADIOLIB_UART_PARITY_NONE 0x00
56 
60 #define RADIOLIB_UART_PARITY_ODD 0x01
61 
65 #define RADIOLIB_UART_PARITY_EVEN 0x02
66 
70 #define RADIOLIB_UART_FLOW_NONE 0x00
71 
75 #define RADIOLIB_UART_FLOW_RTS 0x01
76 
80 #define RADIOLIB_UART_FLOW_CTS 0x02
81 
85 #define RADIOLIB_UART_FLOW_BOTH 0x03
86 
100 #define RADIOLIB_SHAPING_NONE 0x00
101 
105 #define RADIOLIB_SHAPING_0_3 0x01
106 
110 #define RADIOLIB_SHAPING_0_5 0x02
111 
115 #define RADIOLIB_SHAPING_0_7 0x03
116 
120 #define RADIOLIB_SHAPING_1_0 0x04
121 
135 #define RADIOLIB_ENCODING_NRZ 0x00
136 
140 #define RADIOLIB_ENCODING_MANCHESTER 0x01
141 
145 #define RADIOLIB_ENCODING_WHITENING 0x02
146 
157 // common status codes
158 
162 #define ERR_NONE 0
163 
168 #define ERR_UNKNOWN -1
169 
170 // SX127x/RFM9x status codes
171 
176 #define ERR_CHIP_NOT_FOUND -2
177 
181 #define ERR_MEMORY_ALLOCATION_FAILED -3
182 
186 #define ERR_PACKET_TOO_LONG -4
187 
191 #define ERR_TX_TIMEOUT -5
192 
196 #define ERR_RX_TIMEOUT -6
197 
202 #define ERR_CRC_MISMATCH -7
203 
207 #define ERR_INVALID_BANDWIDTH -8
208 
212 #define ERR_INVALID_SPREADING_FACTOR -9
213 
217 #define ERR_INVALID_CODING_RATE -10
218 
222 #define ERR_INVALID_BIT_RANGE -11
223 
227 #define ERR_INVALID_FREQUENCY -12
228 
232 #define ERR_INVALID_OUTPUT_POWER -13
233 
238 #define PREAMBLE_DETECTED -14
239 
243 #define CHANNEL_FREE -15
244 
248 #define ERR_SPI_WRITE_FAILED -16
249 
253 #define ERR_INVALID_CURRENT_LIMIT -17
254 
258 #define ERR_INVALID_PREAMBLE_LENGTH -18
259 
263 #define ERR_INVALID_GAIN -19
264 
269 #define ERR_WRONG_MODEM -20
270 
274 #define ERR_INVALID_NUM_SAMPLES -21
275 
279 #define ERR_INVALID_RSSI_OFFSET -22
280 
284 #define ERR_INVALID_ENCODING -23
285 
289 #define ERR_LORA_HEADER_DAMAGED -24
290 
291 // RF69-specific status codes
292 
296 #define ERR_INVALID_BIT_RATE -101
297 
301 #define ERR_INVALID_FREQUENCY_DEVIATION -102
302 
306 #define ERR_INVALID_BIT_RATE_BW_RATIO -103
307 
311 #define ERR_INVALID_RX_BANDWIDTH -104
312 
316 #define ERR_INVALID_SYNC_WORD -105
317 
321 #define ERR_INVALID_DATA_SHAPING -106
322 
326 #define ERR_INVALID_MODULATION -107
327 
328 // ESP8266 status codes
329 
333 #define ERR_AT_FAILED -201
334 
338 #define ERR_URL_MALFORMED -202
339 
343 #define ERR_RESPONSE_MALFORMED_AT -203
344 
348 #define ERR_RESPONSE_MALFORMED -204
349 
353 #define ERR_MQTT_CONN_VERSION_REJECTED -205
354 
358 #define ERR_MQTT_CONN_ID_REJECTED -206
359 
363 #define ERR_MQTT_CONN_SERVER_UNAVAILABLE -207
364 
368 #define ERR_MQTT_CONN_BAD_USERNAME_PASSWORD -208
369 
373 #define ERR_MQTT_CONN_NOT_AUTHORIZED -208
374 
378 #define ERR_MQTT_UNEXPECTED_PACKET_ID -209
379 
383 #define ERR_MQTT_NO_NEW_PACKET_AVAILABLE -210
384 
388 #define MQTT_SUBS_SUCCESS_QOS_0 0x00
389 
393 #define MQTT_SUBS_SUCCESS_QOS_1 0x01
394 
398 #define MQTT_SUBS_SUCCESS_QOS_2 0x02
399 
403 #define ERR_MQTT_SUBS_FAILED 0x80
404 
405 // XBee status codes
406 
410 #define ERR_CMD_MODE_FAILED -301
411 
415 #define ERR_FRAME_MALFORMED -302
416 
420 #define ERR_FRAME_INCORRECT_CHECKSUM -303
421 
425 #define ERR_FRAME_UNEXPECTED_ID -304
426 
430 #define ERR_FRAME_NO_RESPONSE -305
431 
432 // RTTY status codes
433 
437 #define ERR_INVALID_RTTY_SHIFT -401
438 
442 #define ERR_UNSUPPORTED_ENCODING -402
443 
444 // nRF24-specific status codes
445 
449 #define ERR_INVALID_DATA_RATE -501
450 
454 #define ERR_INVALID_ADDRESS_WIDTH -502
455 
459 #define ERR_INVALID_PIPE_NUMBER -503
460 
464 #define ERR_ACK_NOT_RECEIVED -504
465 
466 // CC1101-specific status codes
467 
471 #define ERR_INVALID_NUM_BROAD_ADDRS -601
472 
473 // SX126x-specific status codes
474 
478 #define ERR_INVALID_CRC_CONFIGURATION -701
479 
483 #define LORA_DETECTED -702
484 
488 #define ERR_INVALID_TCXO_VOLTAGE -703
489 
493 #define ERR_INVALID_MODULATION_PARAMETERS -704
494 
498 #define ERR_SPI_CMD_TIMEOUT -705
499 
503 #define ERR_SPI_CMD_INVALID -706
504 
508 #define ERR_SPI_CMD_FAILED -707
509 
516 #define ERR_INVALID_SLEEP_PERIOD -708
517 
523 #define ERR_INVALID_RX_PERIOD -709
524 
525 // AX.25-specific status codes
526 
532 #define ERR_INVALID_CALLSIGN -801
533 
539 #define ERR_INVALID_NUM_REPEATERS -802
540 
546 #define ERR_INVALID_REPEATER_CALLSIGN -803
547 
548 // SX128x-specific status codes
549 
553 #define ERR_RANGING_TIMEOUT -901
554 
559 #endif
+
1 #if !defined(_RADIOLIB_TYPES_H)
+
2 #define _RADIOLIB_TYPES_H
+
3 
+
4 #include "BuildOpt.h"
+
5 
+
15 #define RADIOLIB_USE_SPI 0x00
+
16 
+
20 #define RADIOLIB_USE_UART 0x01
+
21 
+
25 #define RADIOLIB_USE_I2C 0x02
+
26 
+
40 #define RADIOLIB_UART_STOPBIT_1 0x01
+
41 
+
45 #define RADIOLIB_UART_STOPBIT_1_5 0x02
+
46 
+
50 #define RADIOLIB_UART_STOPBIT_2 0x03
+
51 
+
55 #define RADIOLIB_UART_PARITY_NONE 0x00
+
56 
+
60 #define RADIOLIB_UART_PARITY_ODD 0x01
+
61 
+
65 #define RADIOLIB_UART_PARITY_EVEN 0x02
+
66 
+
70 #define RADIOLIB_UART_FLOW_NONE 0x00
+
71 
+
75 #define RADIOLIB_UART_FLOW_RTS 0x01
+
76 
+
80 #define RADIOLIB_UART_FLOW_CTS 0x02
+
81 
+
85 #define RADIOLIB_UART_FLOW_BOTH 0x03
+
86 
+
100 #define RADIOLIB_SHAPING_NONE 0x00
+
101 
+
105 #define RADIOLIB_SHAPING_0_3 0x01
+
106 
+
110 #define RADIOLIB_SHAPING_0_5 0x02
+
111 
+
115 #define RADIOLIB_SHAPING_0_7 0x03
+
116 
+
120 #define RADIOLIB_SHAPING_1_0 0x04
+
121 
+
135 #define RADIOLIB_ENCODING_NRZ 0x00
+
136 
+
140 #define RADIOLIB_ENCODING_MANCHESTER 0x01
+
141 
+
145 #define RADIOLIB_ENCODING_WHITENING 0x02
+
146 
+
157 // common status codes
+
158 
+
162 #define ERR_NONE 0
+
163 
+
168 #define ERR_UNKNOWN -1
+
169 
+
170 // SX127x/RFM9x status codes
+
171 
+
176 #define ERR_CHIP_NOT_FOUND -2
+
177 
+
181 #define ERR_MEMORY_ALLOCATION_FAILED -3
+
182 
+
186 #define ERR_PACKET_TOO_LONG -4
+
187 
+
191 #define ERR_TX_TIMEOUT -5
+
192 
+
196 #define ERR_RX_TIMEOUT -6
+
197 
+
202 #define ERR_CRC_MISMATCH -7
+
203 
+
207 #define ERR_INVALID_BANDWIDTH -8
+
208 
+
212 #define ERR_INVALID_SPREADING_FACTOR -9
+
213 
+
217 #define ERR_INVALID_CODING_RATE -10
+
218 
+
222 #define ERR_INVALID_BIT_RANGE -11
+
223 
+
227 #define ERR_INVALID_FREQUENCY -12
+
228 
+
232 #define ERR_INVALID_OUTPUT_POWER -13
+
233 
+
238 #define PREAMBLE_DETECTED -14
+
239 
+
243 #define CHANNEL_FREE -15
+
244 
+
248 #define ERR_SPI_WRITE_FAILED -16
+
249 
+
253 #define ERR_INVALID_CURRENT_LIMIT -17
+
254 
+
258 #define ERR_INVALID_PREAMBLE_LENGTH -18
+
259 
+
263 #define ERR_INVALID_GAIN -19
+
264 
+
269 #define ERR_WRONG_MODEM -20
+
270 
+
274 #define ERR_INVALID_NUM_SAMPLES -21
+
275 
+
279 #define ERR_INVALID_RSSI_OFFSET -22
+
280 
+
284 #define ERR_INVALID_ENCODING -23
+
285 
+
289 #define ERR_LORA_HEADER_DAMAGED -24
+
290 
+
291 // RF69-specific status codes
+
292 
+
296 #define ERR_INVALID_BIT_RATE -101
+
297 
+
301 #define ERR_INVALID_FREQUENCY_DEVIATION -102
+
302 
+
306 #define ERR_INVALID_BIT_RATE_BW_RATIO -103
+
307 
+
311 #define ERR_INVALID_RX_BANDWIDTH -104
+
312 
+
316 #define ERR_INVALID_SYNC_WORD -105
+
317 
+
321 #define ERR_INVALID_DATA_SHAPING -106
+
322 
+
326 #define ERR_INVALID_MODULATION -107
+
327 
+
328 // ESP8266 status codes
+
329 
+
333 #define ERR_AT_FAILED -201
+
334 
+
338 #define ERR_URL_MALFORMED -202
+
339 
+
343 #define ERR_RESPONSE_MALFORMED_AT -203
+
344 
+
348 #define ERR_RESPONSE_MALFORMED -204
+
349 
+
353 #define ERR_MQTT_CONN_VERSION_REJECTED -205
+
354 
+
358 #define ERR_MQTT_CONN_ID_REJECTED -206
+
359 
+
363 #define ERR_MQTT_CONN_SERVER_UNAVAILABLE -207
+
364 
+
368 #define ERR_MQTT_CONN_BAD_USERNAME_PASSWORD -208
+
369 
+
373 #define ERR_MQTT_CONN_NOT_AUTHORIZED -208
+
374 
+
378 #define ERR_MQTT_UNEXPECTED_PACKET_ID -209
+
379 
+
383 #define ERR_MQTT_NO_NEW_PACKET_AVAILABLE -210
+
384 
+
388 #define MQTT_SUBS_SUCCESS_QOS_0 0x00
+
389 
+
393 #define MQTT_SUBS_SUCCESS_QOS_1 0x01
+
394 
+
398 #define MQTT_SUBS_SUCCESS_QOS_2 0x02
+
399 
+
403 #define ERR_MQTT_SUBS_FAILED 0x80
+
404 
+
405 // XBee status codes
+
406 
+
410 #define ERR_CMD_MODE_FAILED -301
+
411 
+
415 #define ERR_FRAME_MALFORMED -302
+
416 
+
420 #define ERR_FRAME_INCORRECT_CHECKSUM -303
+
421 
+
425 #define ERR_FRAME_UNEXPECTED_ID -304
+
426 
+
430 #define ERR_FRAME_NO_RESPONSE -305
+
431 
+
432 // RTTY status codes
+
433 
+
437 #define ERR_INVALID_RTTY_SHIFT -401
+
438 
+
442 #define ERR_UNSUPPORTED_ENCODING -402
+
443 
+
444 // nRF24-specific status codes
+
445 
+
449 #define ERR_INVALID_DATA_RATE -501
+
450 
+
454 #define ERR_INVALID_ADDRESS_WIDTH -502
+
455 
+
459 #define ERR_INVALID_PIPE_NUMBER -503
+
460 
+
464 #define ERR_ACK_NOT_RECEIVED -504
+
465 
+
466 // CC1101-specific status codes
+
467 
+
471 #define ERR_INVALID_NUM_BROAD_ADDRS -601
+
472 
+
473 // SX126x-specific status codes
+
474 
+
478 #define ERR_INVALID_CRC_CONFIGURATION -701
+
479 
+
483 #define LORA_DETECTED -702
+
484 
+
488 #define ERR_INVALID_TCXO_VOLTAGE -703
+
489 
+
493 #define ERR_INVALID_MODULATION_PARAMETERS -704
+
494 
+
498 #define ERR_SPI_CMD_TIMEOUT -705
+
499 
+
503 #define ERR_SPI_CMD_INVALID -706
+
504 
+
508 #define ERR_SPI_CMD_FAILED -707
+
509 
+
516 #define ERR_INVALID_SLEEP_PERIOD -708
+
517 
+
523 #define ERR_INVALID_RX_PERIOD -709
+
524 
+
525 // AX.25-specific status codes
+
526 
+
532 #define ERR_INVALID_CALLSIGN -801
+
533 
+
539 #define ERR_INVALID_NUM_REPEATERS -802
+
540 
+
546 #define ERR_INVALID_REPEATER_CALLSIGN -803
+
547 
+
548 // SX128x-specific status codes
+
549 
+
553 #define ERR_RANGING_TIMEOUT -901
+
554 
+
559 #endif
+
diff --git a/_x_bee_8h_source.html b/_x_bee_8h_source.html index 8fd897f2..23812075 100644 --- a/_x_bee_8h_source.html +++ b/_x_bee_8h_source.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/modules/XBee/XBee.h Source File @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -84,24 +86,137 @@ $(document).ready(function(){initNavTree('_x_bee_8h_source.html','');});
XBee.h
-
1 #if !defined(_RADIOLIB_XBEE_H) && !defined(RADIOLIB_EXCLUDE_XBEE)
2 #define _RADIOLIB_XBEE_H
3 
4 #include "../../ISerial.h"
5 #include "../../TypeDef.h"
6 
7 // API reserved characters
8 #define XBEE_API_START 0x7E
9 #define XBEE_API_ESCAPE 0x7D
10 #define XBEE_API_XON 0x11
11 #define XBEE_API_XOFF 0x13
12 
13 // API frame IDs
14 #define XBEE_API_FRAME_AT_COMMAND 0x08
15 #define XBEE_API_FRAME_AT_COMMAND_QUEUE 0x09
16 #define XBEE_API_FRAME_ZIGBEE_TRANSMIT_REQUEST 0x10
17 #define XBEE_API_FRAME_ZIGBEE_ADDRESS_EXPLICIT 0x11
18 #define XBEE_API_FRAME_REMOTE_COMMAND 0x17
19 #define XBEE_API_FRAME_CREATE_SOURCE_ROUTE 0x21
20 #define XBEE_API_FRAME_AT_COMMAND_RESPONSE 0x88
21 #define XBEE_API_FRAME_MODEM_STATUS 0x8A
22 #define XBEE_API_FRAME_ZIGBEE_TRANSMIT_STATUS 0x8B
23 #define XBEE_API_FRAME_ZIGBEE_RECEIVE_PACKET 0x90
24 #define XBEE_API_FRAME_ZIGBEE_EXPLICIT_RX 0x91
25 #define XBEE_API_FRAME_ZIGBEE_IO_DATA_SAMPLE_RX 0x92
26 #define XBEE_API_FRAME_SENSOR_READ 0x94
27 #define XBEE_API_FRAME_NODE_ID 0x95
28 #define XBEE_API_FRAME_REMOTE_COMMAND_RESPONSE 0x97
29 #define XBEE_API_FRAME_EXTENDED_MODEM_STATUS 0x98
30 #define XBEE_API_FRAME_OTA_FW_UPDATE_STATUS 0xA0
31 #define XBEE_API_FRAME_ROUTE_RECORD 0xA1
32 #define XBEE_API_FRAME_MANY_TO_ONE_ROUTE_REQUEST 0xA3
33 
39 class XBeeSerial: public ISerial {
40  public:
46  XBeeSerial(Module* mod);
47 
48  // basic methods
49 
57  int16_t begin(long speed);
58 
62  void reset();
63 
64  // configuration methods
65 
75  int16_t setDestinationAddress(const char* destinationAddressHigh, const char* destinationAddressLow);
76 
82  int16_t setPanId(const char* panId);
83 
84 #ifndef RADIOLIB_GODMODE
85  private:
86 #endif
87  bool enterCmdMode();
88 
89 };
90 
96 class XBee {
97  public:
103  XBee(Module* mod);
104 
105  // basic methods
106 
114  int16_t begin(long speed);
115 
119  void reset();
120 
130  int16_t transmit(uint8_t* dest, const char* payload, uint8_t radius = 1);
131 
143  int16_t transmit(uint8_t* dest, uint8_t* destNetwork, const char* payload, uint8_t radius = 1);
144 
150  size_t available();
151 
157  String getPacketSource();
158 
164  String getPacketData();
165 
166  // configuration methods
167 
173  int16_t setPanId(uint8_t* panId);
174 
175 #ifndef RADIOLIB_GODMODE
176  private:
177 #endif
178  Module* _mod;
179  uint8_t _frameID = 0x01;
180  size_t _frameLength = 0;
181  bool _frameHeaderProcessed = false;
182 
183  #ifdef RADIOLIB_STATIC_ONLY
184  char _packetData[RADIOLIB_STATIC_ARRAY_SIZE];
185  #else
186  char* _packetData = new char[0];
187  #endif
188  uint8_t _packetSource[8] = {0, 0, 0, 0, 0, 0, 0, 0};
189 
190  int16_t confirmChanges();
191 
192  void sendApiFrame(uint8_t type, uint8_t id, const char* data);
193  void sendApiFrame(uint8_t type, uint8_t id, uint8_t* data, uint16_t length);
194  int16_t readApiFrame(uint8_t frameID, uint8_t codePos, uint16_t timeout = 5000);
195 
196  uint16_t getNumBytes(uint32_t timeout = 10000, size_t minBytes = 10);
197 };
198 
199 #endif
int16_t setPanId(const char *panId)
Sets PAN (Personal Area Network) ID. Both XBees must be in the same PAN in order to use transparent m...
Definition: XBee.cpp:276
-
int16_t setDestinationAddress(const char *destinationAddressHigh, const char *destinationAddressLow)
Sets destination XBee address.
Definition: XBee.cpp:226
-
XBee Serial interface. This class is used for XBees in transparent mode, i.e. when two XBees act as a...
Definition: XBee.h:39
-
Implements all common low-level SPI/UART/I2C methods to control the wireless module. Every module class contains one private instance of this class.
Definition: Module.h:17
-
Interface class for Arduino Serial. Only calls the appropriate methods for the active UART interface...
Definition: ISerial.h:11
-
XBeeSerial(Module *mod)
Default constructor.
Definition: XBee.cpp:180
-
Control class for XBee modules.
Definition: XBee.h:96
-
void reset()
Resets module using interrupt/GPIO pin 1.
Definition: XBee.cpp:218
-
int16_t begin(long speed)
Initialization method.
Definition: XBee.cpp:184
+
1 #if !defined(_RADIOLIB_XBEE_H) && !defined(RADIOLIB_EXCLUDE_XBEE)
+
2 #define _RADIOLIB_XBEE_H
+
3 
+
4 #include "../../ISerial.h"
+
5 #include "../../TypeDef.h"
+
6 
+
7 // API reserved characters
+
8 #define XBEE_API_START 0x7E
+
9 #define XBEE_API_ESCAPE 0x7D
+
10 #define XBEE_API_XON 0x11
+
11 #define XBEE_API_XOFF 0x13
+
12 
+
13 // API frame IDs
+
14 #define XBEE_API_FRAME_AT_COMMAND 0x08
+
15 #define XBEE_API_FRAME_AT_COMMAND_QUEUE 0x09
+
16 #define XBEE_API_FRAME_ZIGBEE_TRANSMIT_REQUEST 0x10
+
17 #define XBEE_API_FRAME_ZIGBEE_ADDRESS_EXPLICIT 0x11
+
18 #define XBEE_API_FRAME_REMOTE_COMMAND 0x17
+
19 #define XBEE_API_FRAME_CREATE_SOURCE_ROUTE 0x21
+
20 #define XBEE_API_FRAME_AT_COMMAND_RESPONSE 0x88
+
21 #define XBEE_API_FRAME_MODEM_STATUS 0x8A
+
22 #define XBEE_API_FRAME_ZIGBEE_TRANSMIT_STATUS 0x8B
+
23 #define XBEE_API_FRAME_ZIGBEE_RECEIVE_PACKET 0x90
+
24 #define XBEE_API_FRAME_ZIGBEE_EXPLICIT_RX 0x91
+
25 #define XBEE_API_FRAME_ZIGBEE_IO_DATA_SAMPLE_RX 0x92
+
26 #define XBEE_API_FRAME_SENSOR_READ 0x94
+
27 #define XBEE_API_FRAME_NODE_ID 0x95
+
28 #define XBEE_API_FRAME_REMOTE_COMMAND_RESPONSE 0x97
+
29 #define XBEE_API_FRAME_EXTENDED_MODEM_STATUS 0x98
+
30 #define XBEE_API_FRAME_OTA_FW_UPDATE_STATUS 0xA0
+
31 #define XBEE_API_FRAME_ROUTE_RECORD 0xA1
+
32 #define XBEE_API_FRAME_MANY_TO_ONE_ROUTE_REQUEST 0xA3
+
33 
+
39 class XBeeSerial: public ISerial {
+
40  public:
+
46  XBeeSerial(Module* mod);
+
47 
+
48  // basic methods
+
49 
+
57  int16_t begin(long speed);
+
58 
+
62  void reset();
+
63 
+
64  // configuration methods
+
65 
+
75  int16_t setDestinationAddress(const char* destinationAddressHigh, const char* destinationAddressLow);
+
76 
+
82  int16_t setPanId(const char* panId);
+
83 
+
84 #ifndef RADIOLIB_GODMODE
+
85  private:
+
86 #endif
+
87  bool enterCmdMode();
+
88 
+
89 };
+
90 
+
96 class XBee {
+
97  public:
+
103  XBee(Module* mod);
+
104 
+
105  // basic methods
+
106 
+
114  int16_t begin(long speed);
+
115 
+
119  void reset();
+
120 
+
130  int16_t transmit(uint8_t* dest, const char* payload, uint8_t radius = 1);
+
131 
+
143  int16_t transmit(uint8_t* dest, uint8_t* destNetwork, const char* payload, uint8_t radius = 1);
+
144 
+
150  size_t available();
+
151 
+
157  String getPacketSource();
+
158 
+
164  String getPacketData();
+
165 
+
166  // configuration methods
+
167 
+
173  int16_t setPanId(uint8_t* panId);
+
174 
+
175 #ifndef RADIOLIB_GODMODE
+
176  private:
+
177 #endif
+
178  Module* _mod;
+
179  uint8_t _frameID = 0x01;
+
180  size_t _frameLength = 0;
+
181  bool _frameHeaderProcessed = false;
+
182 
+
183  #ifdef RADIOLIB_STATIC_ONLY
+
184  char _packetData[RADIOLIB_STATIC_ARRAY_SIZE];
+
185  #else
+
186  char* _packetData = new char[0];
+
187  #endif
+
188  uint8_t _packetSource[8] = {0, 0, 0, 0, 0, 0, 0, 0};
+
189 
+
190  int16_t confirmChanges();
+
191 
+
192  void sendApiFrame(uint8_t type, uint8_t id, const char* data);
+
193  void sendApiFrame(uint8_t type, uint8_t id, uint8_t* data, uint16_t length);
+
194  int16_t readApiFrame(uint8_t frameID, uint8_t codePos, uint16_t timeout = 5000);
+
195 
+
196  uint16_t getNumBytes(uint32_t timeout = 10000, size_t minBytes = 10);
+
197 };
+
198 
+
199 #endif
+
int16_t setPanId(const char *panId)
Sets PAN (Personal Area Network) ID. Both XBees must be in the same PAN in order to use transparent m...
Definition: XBee.cpp:276
+
void reset()
Resets module using interrupt/GPIO pin 1.
Definition: XBee.cpp:218
+
size_t available()
Gets the number of payload bytes received.
Definition: XBee.cpp:91
+
void reset()
Resets module using interrupt/GPIO pin 1.
Definition: XBee.cpp:53
+
XBee(Module *mod)
Default constructor.
Definition: XBee.cpp:4
+
XBee Serial interface. This class is used for XBees in transparent mode, i.e. when two XBees act as a...
Definition: XBee.h:39
+
XBeeSerial(Module *mod)
Default constructor.
Definition: XBee.cpp:180
+
int16_t setPanId(uint8_t *panId)
Sets PAN (Personal Area Network) ID. All XBees must be in the same PAN in order to communicate.
Definition: XBee.cpp:162
+
Interface class for Arduino Serial. Only calls the appropriate methods for the active UART interface.
Definition: ISerial.h:11
+
String getPacketData()
Gets packet payload.
Definition: XBee.cpp:157
+
String getPacketSource()
Gets packet source 64-bit address.
Definition: XBee.cpp:149
+
Control class for XBee modules.
Definition: XBee.h:96
+
Implements all common low-level SPI/UART/I2C methods to control the wireless module....
Definition: Module.h:17
+
int16_t begin(long speed)
Initialization method.
Definition: XBee.cpp:184
+
int16_t begin(long speed)
Initialization method.
Definition: XBee.cpp:9
+
int16_t setDestinationAddress(const char *destinationAddressHigh, const char *destinationAddressLow)
Sets destination XBee address.
Definition: XBee.cpp:226
+
int16_t transmit(uint8_t *dest, const char *payload, uint8_t radius=1)
Sends data to the destination 64-bit (global) address, when destination 16-bit (local) address is unk...
Definition: XBee.cpp:60
diff --git a/annotated.html b/annotated.html index 1051531e..44b5b2b8 100644 --- a/annotated.html +++ b/annotated.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class List @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -86,52 +88,52 @@ $(document).ready(function(){initNavTree('annotated.html','');});
Here are the classes, structs, unions and interfaces with brief descriptions:
- + - - + + - + - - - - - + + + + + - + - + - + - - + + - - + + - + @@ -145,7 +147,7 @@ $(document).ready(function(){initNavTree('annotated.html','');});
    + doxygen 1.8.17
diff --git a/class_a_f_s_k_client-members.html b/class_a_f_s_k_client-members.html index 5290d588..caec7d2b 100644 --- a/class_a_f_s_k_client-members.html +++ b/class_a_f_s_k_client-members.html @@ -1,9 +1,9 @@ - + - +RadioLib: Member List @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@
 CAFSKClientClient for audio-based transmissions. Requires Arduino tone() function, and a module capable of direct mode transmission using DIO pins
 CAFSKClientClient for audio-based transmissions. Requires Arduino tone() function, and a module capable of direct mode transmission using DIO pins
 CAX25ClientClient for AX25 communication
 CAX25FrameAbstraction of AX.25 frame format
 CCC1101Control class for CC1101 module
 CESP8266Control class for ESP8266 module. Implements TransportLayer methods
 CHC05Control class for HC05 module. Most methods supported by this module are implemented in ISerial interface
 CESP8266Control class for ESP8266 module. Implements TransportLayer methods
 CHC05Control class for HC05 module. Most methods supported by this module are implemented in ISerial interface
 CHellClientClient for Hellschreiber transmissions
 CHTTPClientClient for simple HTTP communication
 CISerialInterface class for Arduino Serial. Only calls the appropriate methods for the active UART interface
 CITA2StringITA2-encoded string
 CJDY08Control class for JDY08 module. Most methods supported by this module are implemented in ISerial interface
 CJDY08Control class for JDY08 module. Most methods supported by this module are implemented in ISerial interface
 CModuleImplements all common low-level SPI/UART/I2C methods to control the wireless module. Every module class contains one private instance of this class
 CMorseClientClient for Morse Code communication. The public interface is the same as Arduino Serial
 CMQTTClientClient for simple MQTT communication
 CnRF24Control class for nRF24 module
 CPhysicalLayerProvides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN. Also extracts some common module-independent methods. Using this interface class allows to use the protocols on various modules without much code duplicity. Because this class is used mainly as interface, all of its virtual members must be implemented in the module class
 CRF69Control class for RF69 module. Also serves as base class for SX1231
 CRFM22Only exists as alias for Si4432, since there seems to be no difference between RFM22 and Si4432 modules
 CRFM23Only exists as alias for Si4431, since there seems to be no difference between RFM23 and Si4431 modules
 CRFM95Derived class for RFM95 modules. Overrides some methods from SX1278 due to different parameter ranges
 CRFM96Derived class for RFM96 modules. Overrides some methods from SX1278 due to different parameter ranges
 CRF69Control class for RF69 module. Also serves as base class for SX1231
 CRFM22Only exists as alias for Si4432, since there seems to be no difference between RFM22 and Si4432 modules
 CRFM23Only exists as alias for Si4431, since there seems to be no difference between RFM23 and Si4431 modules
 CRFM95Derived class for RFM95 modules. Overrides some methods from SX1278 due to different parameter ranges
 CRFM96Derived class for RFM96 modules. Overrides some methods from SX1278 due to different parameter ranges
 CRFM97Derived class for RFM97 modules. Overrides some methods from RFM95 due to different parameter ranges
 CRFM98Only exists as alias for RFM96, since there seems to be no difference between RFM96 and RFM98 modules
 CRTTYClientClient for RTTY communication. The public interface is the same as Arduino Serial
 CSi4430Derived class for Si4430 modules
 CSi4431Derived class for Si4431 modules
 CSi4432Derived class for Si4432 modules
 CSi443xBase class for Si443x series. All derived classes for Si443x (e.g. Si4431 or Si4432) inherit from this base class. This class should not be instantiated directly from Arduino sketch, only from its derived classes
 CSi443xBase class for Si443x series. All derived classes for Si443x (e.g. Si4431 or Si4432) inherit from this base class. This class should not be instantiated directly from Arduino sketch, only from its derived classes
 CSSTVClientClient for SSTV transmissions
 CSSTVMode_tStructure to save data about supported SSTV modes
 CSX1231Control class for SX1231 module. Overrides some methods from RF69 due to different register values
 CSX1231Control class for SX1231 module. Overrides some methods from RF69 due to different register values
 CSX1261Derived class for SX1261 modules
 CSX1262Derived class for SX1262 modules
 CSX1268Derived class for SX1268 modules
 CSX126xBase class for SX126x series. All derived classes for SX126x (e.g. SX1262 or SX1268) inherit from this base class. This class should not be instantiated directly from Arduino sketch, only from its derived classes
 CSX126xBase class for SX126x series. All derived classes for SX126x (e.g. SX1262 or SX1268) inherit from this base class. This class should not be instantiated directly from Arduino sketch, only from its derived classes
 CSX1272Derived class for SX1272 modules. Also used as base class for SX1273. Both modules use the same basic hardware and only differ in parameter ranges
 CSX1273Derived class for SX1273 modules. Overrides some methods from SX1272 due to different parameter ranges
 CSX1276Derived class for SX1276 modules. Overrides some methods from SX1278 due to different parameter ranges
 CSX1277Derived class for SX1277 modules. Overrides some methods from SX1278 due to different parameter ranges
 CSX1276Derived class for SX1276 modules. Overrides some methods from SX1278 due to different parameter ranges
 CSX1277Derived class for SX1277 modules. Overrides some methods from SX1278 due to different parameter ranges
 CSX1278Derived class for SX1278 modules. Also used as base class for SX1276, SX1277, SX1279, RFM95 and RFM96. All of these modules use the same basic hardware and only differ in parameter ranges (and names)
 CSX1279Derived class for SX1279 modules. Overrides some methods from SX1278 due to different parameter ranges
 CSX127xBase class for SX127x series. All derived classes for SX127x (e.g. SX1278 or SX1272) inherit from this base class. This class should not be instantiated directly from Arduino sketch, only from its derived classes
 CSX1279Derived class for SX1279 modules. Overrides some methods from SX1278 due to different parameter ranges
 CSX127xBase class for SX127x series. All derived classes for SX127x (e.g. SX1278 or SX1272) inherit from this base class. This class should not be instantiated directly from Arduino sketch, only from its derived classes
 CSX1280Derived class for SX1280 modules
 CSX1281Derived class for SX1281 modules
 CSX1282Derived class for SX1282 modules
 CSX128xBase class for SX128x series. All derived classes for SX128x (e.g. SX1280 or SX1281) inherit from this base class. This class should not be instantiated directly from Arduino sketch, only from its derived classes
 CSX128xBase class for SX128x series. All derived classes for SX128x (e.g. SX1280 or SX1281) inherit from this base class. This class should not be instantiated directly from Arduino sketch, only from its derived classes
 Ctone_tStructure to save data about tone
 CTransportLayerProvides common interface for protocols that run on modules with Internet connectivity, such as HTTP or MQTT. Because this class is used mainly as interface, all of its virtual members must be implemented in the module class
 CXBeeControl class for XBee modules
- + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -103,7 +105,7 @@ $(document).ready(function(){initNavTree('class_a_f_s_k_client.html','');});
diff --git a/class_a_f_s_k_client.html b/class_a_f_s_k_client.html index 6e748866..ee5b8d95 100644 --- a/class_a_f_s_k_client.html +++ b/class_a_f_s_k_client.html @@ -1,9 +1,9 @@ - + - + RadioLib: AFSKClient Class Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -89,7 +91,7 @@ $(document).ready(function(){initNavTree('class_a_f_s_k_client.html','');});
-

Client for audio-based transmissions. Requires Arduino tone() function, and a module capable of direct mode transmission using DIO pins. +

Client for audio-based transmissions. Requires Arduino tone() function, and a module capable of direct mode transmission using DIO pins. More...

#include <AFSK.h>

@@ -97,16 +99,16 @@ $(document).ready(function(){initNavTree('class_a_f_s_k_client.html','');});

Public Member Functions

 AFSKClient (PhysicalLayer *phy, RADIOLIB_PIN_TYPE pin) - Default contructor. More...
+ Default contructor. More...
  int16_t begin () - Initialization method. More...
+ Initialization method. More...
  int16_t tone (uint16_t freq, bool autoStart=true) - Start transmitting audio tone. More...
+ Start transmitting audio tone. More...
  int16_t noTone () - Stops transmitting audio tone. More...
+ Stops transmitting audio tone. More...
  <

@@ -128,7 +130,7 @@ class 

AX25Client
 

Detailed Description

-

Client for audio-based transmissions. Requires Arduino tone() function, and a module capable of direct mode transmission using DIO pins.

+

Client for audio-based transmissions. Requires Arduino tone() function, and a module capable of direct mode transmission using DIO pins.

Constructor & Destructor Documentation

◆ AFSKClient()

@@ -159,7 +161,7 @@ class AX25Client<

Default contructor.

Parameters
- +
phyPointer to the wireless module providing PhysicalLayer communication.
phyPointer to the wireless module providing PhysicalLayer communication.
pinThe pin that will be used for audio output.
@@ -258,7 +260,7 @@ class AX25Client< + doxygen 1.8.17
diff --git a/class_a_x25_client-members.html b/class_a_x25_client-members.html index 322762c9..7612e37e 100644 --- a/class_a_x25_client-members.html +++ b/class_a_x25_client-members.html @@ -1,9 +1,9 @@ - + - + RadioLib: Member List @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@
- + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -99,7 +101,7 @@ $(document).ready(function(){initNavTree('class_a_x25_client.html','');});
diff --git a/class_a_x25_client.html b/class_a_x25_client.html index b4203dea..8e964fd8 100644 --- a/class_a_x25_client.html +++ b/class_a_x25_client.html @@ -1,9 +1,9 @@ - + - + RadioLib: AX25Client Class Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -96,19 +98,19 @@ $(document).ready(function(){initNavTree('class_a_x25_client.html','');});

Public Member Functions

 AX25Client (PhysicalLayer *phy) - Constructor for 2-FSK mode. More...
+ Constructor for 2-FSK mode. More...
   AX25Client (AFSKClient *audio) - Constructor for AFSK mode. More...
+ Constructor for AFSK mode. More...
  int16_t begin (const char *srcCallsign, uint8_t srcSSID=0x00, uint8_t preambleLen=8) - Initialization method. More...
+ Initialization method. More...
  int16_t transmit (const char *str, const char *destCallsign, uint8_t destSSID=0x00) - Transmit unnumbered information (UI) frame. More...
+ Transmit unnumbered information (UI) frame. More...
  int16_t sendFrame (AX25Frame *frame) - Transmit arbitrary AX.25 frame. More...
+ Transmit arbitrary AX.25 frame. More...
 

Detailed Description

@@ -141,7 +143,7 @@ Public Member Functions

Constructor for 2-FSK mode.

Parameters
- +
phyPointer to the wireless module providing PhysicalLayer communication.
phyPointer to the wireless module providing PhysicalLayer communication.
@@ -312,7 +314,7 @@ Public Member Functions + doxygen 1.8.17
diff --git a/class_a_x25_frame-members.html b/class_a_x25_frame-members.html index 42eb49b5..364c437c 100644 --- a/class_a_x25_frame-members.html +++ b/class_a_x25_frame-members.html @@ -1,9 +1,9 @@ - + - + RadioLib: Member List @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -116,7 +118,7 @@ $(document).ready(function(){initNavTree('class_a_x25_frame.html','');});
diff --git a/class_a_x25_frame.html b/class_a_x25_frame.html index e112d1e5..3ccb3c7d 100644 --- a/class_a_x25_frame.html +++ b/class_a_x25_frame.html @@ -1,9 +1,9 @@ - + - + RadioLib: AX25Frame Class Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -97,32 +99,32 @@ $(document).ready(function(){initNavTree('class_a_x25_frame.html','');});

Public Member Functions

 AX25Frame (const char *destCallsign, uint8_t destSSID, const char *srcCallsign, uint8_t srcSSID, uint8_t control) - Overloaded constructor, for frames without info field. More...
+ Overloaded constructor, for frames without info field. More...
   AX25Frame (const char *destCallsign, uint8_t destSSID, const char *srcCallsign, uint8_t srcSSID, uint8_t control, uint8_t protocolID, const char *info) - Overloaded constructor, for frames with C-string info field. More...
+ Overloaded constructor, for frames with C-string info field. More...
   AX25Frame (const char *destCallsign, uint8_t destSSID, const char *srcCallsign, uint8_t srcSSID, uint8_t control, uint8_t protocolID, uint8_t *info, uint16_t infoLen) - Default constructor. More...
+ Default constructor. More...
   AX25Frame (const AX25Frame &frame) - Copy constructor. More...
+ Copy constructor. More...
   ~AX25Frame ()  Default destructor.
  AX25Frameoperator= (const AX25Frame &frame) - Overload for assignment operator. More...
+ Overload for assignment operator. More...
  int16_t setRepeaters (char **repeaterCallsigns, uint8_t *repeaterSSIDs, uint8_t numRepeaters) - Method to set the repeater callsigns and SSIDs. More...
+ Method to set the repeater callsigns and SSIDs. More...
  void setRecvSequence (uint8_t seqNumber) - Method to set receive sequence number. More...
+ Method to set receive sequence number. More...
  void setSendSequence (uint8_t seqNumber) - Method to set send sequence number. More...
+ Method to set send sequence number. More...
 

@@ -411,7 +413,7 @@ uint8_t * 

Copy constructor.

Parameters
- +
frameAX25Frame instance to copy.
frameAX25Frame instance to copy.
@@ -438,7 +440,7 @@ uint8_t * 
Overload for assignment operator.

Parameters
- +
framervalue AX25Frame.
framervalue AX25Frame.
@@ -554,7 +556,7 @@ uint8_t * 
AX25Frame + doxygen 1.8.17 diff --git a/class_c_c1101-members.html b/class_c_c1101-members.html index 435a9dec..3586f6ce 100644 --- a/class_c_c1101-members.html +++ b/class_c_c1101-members.html @@ -1,9 +1,9 @@ - + - + RadioLib: Member List @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@
- + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -106,8 +108,12 @@ $(document).ready(function(){initNavTree('class_c_c1101.html','');}); PhysicalLayer::random(int32_t max)PhysicalLayer PhysicalLayer::random(int32_t min, int32_t max)PhysicalLayer readData(uint8_t *data, size_t len) overrideCC1101virtual + readData(String &str, size_t len=0)CC1101 + readData(uint8_t *data, size_t len)=0CC1101 PhysicalLayer::readData(String &str, size_t len=0)PhysicalLayer receive(uint8_t *data, size_t len) overrideCC1101virtual + receive(String &str, size_t len=0)CC1101 + receive(uint8_t *data, size_t len)=0CC1101 PhysicalLayer::receive(String &str, size_t len=0)PhysicalLayer receiveDirect() overrideCC1101virtual setBitRate(float br)CC1101 @@ -131,14 +137,21 @@ $(document).ready(function(){initNavTree('class_c_c1101.html','');}); startDirect()PhysicalLayer startReceive()CC1101 startTransmit(uint8_t *data, size_t len, uint8_t addr=0) overrideCC1101virtual - PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer - PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer - transmit(uint8_t *data, size_t len, uint8_t addr=0) overrideCC1101virtual - PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer - PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer - PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer - transmitDirect(uint32_t frf=0) overrideCC1101virtual - variablePacketLengthMode(uint8_t maxLen=CC1101_MAX_PACKET_LENGTH)CC1101 + startTransmit(String &str, uint8_t addr=0)CC1101 + startTransmit(const char *str, uint8_t addr=0)CC1101 + startTransmit(uint8_t *data, size_t len, uint8_t addr=0)=0CC1101 + PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer + PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer + transmit(uint8_t *data, size_t len, uint8_t addr=0) overrideCC1101virtual + transmit(__FlashStringHelper *fstr, uint8_t addr=0)CC1101 + transmit(String &str, uint8_t addr=0)CC1101 + transmit(const char *str, uint8_t addr=0)CC1101 + transmit(uint8_t *data, size_t len, uint8_t addr=0)=0CC1101 + PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer + PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer + PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer + transmitDirect(uint32_t frf=0) overrideCC1101virtual + variablePacketLengthMode(uint8_t maxLen=CC1101_MAX_PACKET_LENGTH)CC1101
@@ -146,7 +159,7 @@ $(document).ready(function(){initNavTree('class_c_c1101.html','');}); diff --git a/class_c_c1101.html b/class_c_c1101.html index d9f8899d..21cb6ece 100644 --- a/class_c_c1101.html +++ b/class_c_c1101.html @@ -1,9 +1,9 @@ - + - + RadioLib: CC1101 Class Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -98,135 +100,168 @@ Inheritance diagram for CC1101:
-PhysicalLayer - -
+PhysicalLayer + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -287,7 +322,7 @@ void  + doxygen 1.8.17 diff --git a/class_h_c05-members.html b/class_h_c05-members.html index 0f485b2d..61e7764f 100644 --- a/class_h_c05-members.html +++ b/class_h_c05-members.html @@ -1,9 +1,9 @@ - + - +RadioLib: Member List @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@

Public Member Functions

 CC1101 (Module *module)
 Default constructor. More...
 Default constructor. More...
 
int16_t begin (float freq=434.0, float br=48.0, float freqDev=48.0, float rxBw=135.0, int8_t power=10, uint8_t preambleLength=16)
 Initialization method. More...
 Initialization method. More...
 
int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0) override
 Blocking binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 Blocking binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 
int16_t receive (uint8_t *data, size_t len) override
 Blocking binary receive method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 Blocking binary receive method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 
int16_t standby () override
 Sets the module to standby mode. More...
 Sets the module to standby mode. More...
 
int16_t transmitDirect (uint32_t frf=0) override
 Starts direct mode transmission. More...
 Starts direct mode transmission. More...
 
int16_t receiveDirect () override
 Starts direct mode reception. More...
 Starts direct mode reception. More...
 
int16_t packetMode ()
 Stops direct mode. It is required to call this method to switch from direct transmissions to packet-based transmissions.
 
void setGdo0Action (void(*func)(void), RADIOLIB_INTERRUPT_STATUS dir=FALLING)
 Sets interrupt service routine to call when GDO0 activates. More...
 Sets interrupt service routine to call when GDO0 activates. More...
 
void clearGdo0Action ()
 Clears interrupt service routine to call when GDO0 activates.
 
void setGdo2Action (void(*func)(void), RADIOLIB_INTERRUPT_STATUS dir=FALLING)
 Sets interrupt service routine to call when GDO2 activates. More...
 Sets interrupt service routine to call when GDO2 activates. More...
 
void clearGdo2Action ()
 Clears interrupt service routine to call when GDO0 activates.
 
int16_t startTransmit (uint8_t *data, size_t len, uint8_t addr=0) override
 Interrupt-driven binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 Interrupt-driven binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 
int16_t startReceive ()
 Interrupt-driven receive method. GDO0 will be activated when full packet is received. More...
 Interrupt-driven receive method. GDO0 will be activated when full packet is received. More...
 
int16_t readData (uint8_t *data, size_t len) override
 Reads data received after calling startReceive method. More...
 Reads data received after calling startReceive method. More...
 
int16_t setFrequency (float freq)
 Sets carrier frequency. Allowed values are in bands 300.0 to 348.0 MHz, 387.0 to 464.0 MHz and 779.0 to 928.0 MHz. More...
 Sets carrier frequency. Allowed values are in bands 300.0 to 348.0 MHz, 387.0 to 464.0 MHz and 779.0 to 928.0 MHz. More...
 
int16_t setBitRate (float br)
 Sets bit rate. Allowed values range from 0.025 to 600.0 kbps. More...
 Sets bit rate. Allowed values range from 0.025 to 600.0 kbps. More...
 
int16_t setRxBandwidth (float rxBw)
 Sets receiver bandwidth. Allowed values range from 58.0 to 812.0 kHz. More...
 Sets receiver bandwidth. Allowed values range from 58.0 to 812.0 kHz. More...
 
int16_t setFrequencyDeviation (float freqDev) override
 Sets frequency deviation. Allowed values range from 1.587 to 380.8 kHz. More...
 Sets frequency deviation. Allowed values range from 1.587 to 380.8 kHz. More...
 
int16_t setOutputPower (int8_t power)
 Sets output power. Allowed values are -30, -20, -15, -10, 0, 5, 7 or 10 dBm. More...
 Sets output power. Allowed values are -30, -20, -15, -10, 0, 5, 7 or 10 dBm. More...
 
int16_t setSyncWord (uint8_t syncH, uint8_t syncL, uint8_t maxErrBits=0, bool requireCarrierSense=false)
 Sets 16-bit sync word as a two byte value. More...
 Sets 16-bit sync word as a two byte value. More...
 
int16_t setSyncWord (uint8_t *syncWord, uint8_t len, uint8_t maxErrBits=0, bool requireCarrierSense=false)
 Sets 1 or 2 bytes of sync word. More...
 Sets 1 or 2 bytes of sync word. More...
 
int16_t setPreambleLength (uint8_t preambleLength)
 Sets preamble length. More...
 Sets preamble length. More...
 
int16_t setNodeAddress (uint8_t nodeAddr, uint8_t numBroadcastAddrs=0)
 Sets node and broadcast addresses. Calling this method will also enable address filtering. More...
 Sets node and broadcast addresses. Calling this method will also enable address filtering. More...
 
int16_t disableAddressFiltering ()
 Disables address filtering. Calling this method will also erase previously set addresses. More...
 Disables address filtering. Calling this method will also erase previously set addresses. More...
 
int16_t setOOK (bool enableOOK)
 Enables/disables OOK modulation instead of FSK. More...
 Enables/disables OOK modulation instead of FSK. More...
 
float getRSSI () const
 Gets RSSI (Recorded Signal Strength Indicator) of the last received packet. More...
 Gets RSSI (Recorded Signal Strength Indicator) of the last received packet. More...
 
uint8_t getLQI () const
 Gets LQI (Link Quality Indicator) of the last received packet. More...
 Gets LQI (Link Quality Indicator) of the last received packet. More...
 
size_t getPacketLength (bool update=true) override
 Query modem for the packet length of received payload. More...
 Query modem for the packet length of received payload. More...
 
int16_t fixedPacketLengthMode (uint8_t len=CC1101_MAX_PACKET_LENGTH)
 Set modem in fixed packet length mode. More...
 Set modem in fixed packet length mode. More...
 
int16_t variablePacketLengthMode (uint8_t maxLen=CC1101_MAX_PACKET_LENGTH)
 Set modem in variable packet length mode. More...
 Set modem in variable packet length mode. More...
 
int16_t enableSyncWordFiltering (uint8_t maxErrBits=0, bool requireCarrierSense=false)
 Enable sync word filtering and generation. More...
 Enable sync word filtering and generation. More...
 
int16_t disableSyncWordFiltering (bool requireCarrierSense=false)
 Disable preamble and sync word filtering and generation. More...
 Disable preamble and sync word filtering and generation. More...
 
int16_t setCrcFiltering (bool crcOn=true)
 Enable CRC filtering and generation. More...
 Enable CRC filtering and generation. More...
 
int16_t setPromiscuousMode (bool promiscuous=true)
 Set modem in "sniff" mode: no packet filtering (e.g., no preamble, sync word, address, CRC). More...
 Set modem in "sniff" mode: no packet filtering (e.g., no preamble, sync word, address, CRC). More...
 
int16_t setDataShaping (uint8_t sh) override
 Sets Gaussian filter bandwidth-time product that will be used for data shaping. Allowed value is RADIOLIB_SHAPING_0_5. Set to RADIOLIB_SHAPING_NONE to disable data shaping. More...
 Sets Gaussian filter bandwidth-time product that will be used for data shaping. Allowed value is RADIOLIB_SHAPING_0_5. Set to RADIOLIB_SHAPING_NONE to disable data shaping. More...
 
int16_t setEncoding (uint8_t encoding) override
 Sets transmission encoding. Allowed values are RADIOLIB_ENCODING_NRZ and RADIOLIB_ENCODING_WHITENING. More...
 Sets transmission encoding. Allowed values are RADIOLIB_ENCODING_NRZ and RADIOLIB_ENCODING_WHITENING. More...
 
void setRfSwitchPins (RADIOLIB_PIN_TYPE rxEn, RADIOLIB_PIN_TYPE txEn)
 Some modules contain external RF switch controlled by two pins. This function gives RadioLib control over those two pins to automatically switch Rx and Tx state. When using automatic RF switch control, DO NOT change the pin mode of rxEn or txEn from Arduino sketch! More...
 Some modules contain external RF switch controlled by two pins. This function gives RadioLib control over those two pins to automatically switch Rx and Tx state. When using automatic RF switch control, DO NOT change the pin mode of rxEn or txEn from Arduino sketch! More...
 
uint8_t random ()
 Get one truly random byte from RSSI noise. More...
 Get one truly random byte from RSSI noise. More...
 
int16_t getChipVersion ()
 Read version SPI register. Should return CC1101_VERSION_LEGACY (0x04) or CC1101_VERSION_CURRENT (0x14) if CC1101 is connected and working. More...
 Read version SPI register. Should return CC1101_VERSION_LEGACY (0x04) or CC1101_VERSION_CURRENT (0x14) if CC1101 is connected and working. More...
 
int16_t transmit (__FlashStringHelper *fstr, uint8_t addr=0)
 Arduino Flash String transmit method. More...
 
int16_t transmit (String &str, uint8_t addr=0)
 Arduino String transmit method. More...
 
int16_t transmit (const char *str, uint8_t addr=0)
 C-string transmit method. More...
 
virtual int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Binary transmit method. Must be implemented in module class. More...
 
int16_t receive (String &str, size_t len=0)
 Arduino String receive method. More...
 
virtual int16_t receive (uint8_t *data, size_t len)=0
 Binary receive method. Must be implemented in module class. More...
 
int16_t startTransmit (String &str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
int16_t startTransmit (const char *str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
virtual int16_t startTransmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Interrupt-driven binary transmit method. More...
 
int16_t readData (String &str, size_t len=0)
 Reads data that was received after calling startReceive method. More...
 
virtual int16_t readData (uint8_t *data, size_t len)=0
 Reads data that was received after calling startReceive method. More...
 
- Public Member Functions inherited from PhysicalLayer
 PhysicalLayer (float freqStep, size_t maxPacketLength)
 Default constructor. More...
Parameters
- +
modInstance of Module that will be used to communicate with the radio.
modInstance of Module that will be used to communicate with the radio.
@@ -488,7 +523,7 @@ void 
-

Read version SPI register. Should return CC1101_VERSION_LEGACY (0x04) or CC1101_VERSION_CURRENT (0x14) if CC1101 is connected and working.

+

Read version SPI register. Should return CC1101_VERSION_LEGACY (0x04) or CC1101_VERSION_CURRENT (0x14) if CC1101 is connected and working.

Returns
Version register contents or Status Codes
@@ -598,10 +633,34 @@ void 
PhysicalLayer.

+ + + +

◆ readData() [1/3]

+ +
+
+ + + + +
int16_t PhysicalLayer::readData
+
+ +

Reads data that was received after calling startReceive method.

+
Parameters
+ + + +
strAddress of Arduino String to save the received data.
lenExpected number of characters in the message.
+
+
+
Returns
Status Codes
+
-

◆ readData()

+

◆ readData() [2/3]

@@ -646,10 +705,58 @@ void 
PhysicalLayer.

+ + + +

◆ readData() [3/3]

+ +
+
+ + + + +
virtual int16_t PhysicalLayer::readData
+
+ +

Reads data that was received after calling startReceive method.

+
Parameters
+ + + +
dataPointer to array to save the received binary data.
lenNumber of bytes that will be received. Must be known in advance for binary transmissions.
+
+
+
Returns
Status Codes
+ +
+
+ +

◆ receive() [1/3]

+ +
+
+ + + + +
int16_t PhysicalLayer::receive
+
+ +

Arduino String receive method.

+
Parameters
+ + + +
strAddress of Arduino String to save the received data.
lenExpected number of characters in the message. Leave as 0 if expecting a unknown size packet
+
+
+
Returns
Status Codes
+
-

◆ receive()

+

◆ receive() [2/3]

@@ -682,7 +789,7 @@ void 
-

Blocking binary receive method. Overloads for string-based transmissions are implemented in PhysicalLayer.

+

Blocking binary receive method. Overloads for string-based transmissions are implemented in PhysicalLayer.

Parameters
@@ -694,6 +801,30 @@ void 

Default constructor.

Parameters
dataBinary data to be sent.
PhysicalLayer.

+ + + +

◆ receive() [3/3]

+ +
+
+ + + + +
virtual int16_t PhysicalLayer::receive
+
+ +

Binary receive method. Must be implemented in module class.

+
Parameters
+ + + +
dataPointer to array to save the received binary data.
lenNumber of bytes that will be received. Must be known in advance for binary transmissions.
+
+
+
Returns
Status Codes
+
@@ -1200,62 +1331,10 @@ void 
Returns
Status Codes
- - - -

◆ setSyncWord() [1/2]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int16_t CC1101::setSyncWord (uint8_t syncH,
uint8_t syncL,
uint8_t maxErrBits = 0,
bool requireCarrierSense = false 
)
-
- -

Sets 16-bit sync word as a two byte value.

-
Parameters
- - - - - -
syncHMSB of the sync word.
syncLLSB of the sync word.
maxErrBitsMaximum allowed number of bit errors in received sync word. Defaults to 0.
requireCarrierSenseRequire carrier sense above threshold in addition to sync word.
-
-
-
Returns
Status Codes
-
-

◆ setSyncWord() [2/2]

+

◆ setSyncWord() [1/2]

@@ -1304,6 +1383,58 @@ void 
Returns
Status Codes
+ + + +

◆ setSyncWord() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int16_t CC1101::setSyncWord (uint8_t syncH,
uint8_t syncL,
uint8_t maxErrBits = 0,
bool requireCarrierSense = false 
)
+
+ +

Sets 16-bit sync word as a two byte value.

+
Parameters
+ + + + + +
syncHMSB of the sync word.
syncLLSB of the sync word.
maxErrBitsMaximum allowed number of bit errors in received sync word. Defaults to 0.
requireCarrierSenseRequire carrier sense above threshold in addition to sync word.
+
+
+
Returns
Status Codes
+
@@ -1354,10 +1485,58 @@ void 
Returns
Status Codes
+ + + +

◆ startTransmit() [1/4]

+ +
+
+ + + + +
int16_t PhysicalLayer::startTransmit
+
+ +

Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes.

+
Parameters
+ + + +
strC-string that will be transmitted.
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+ +
+
+ +

◆ startTransmit() [2/4]

+ +
+
+ + + + +
int16_t PhysicalLayer::startTransmit
+
+ +

Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes.

+
Parameters
+ + + +
strAddress of Arduino String that will be transmitted.
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+
-

◆ startTransmit()

+

◆ startTransmit() [3/4]

@@ -1396,7 +1575,7 @@ void 
-

Interrupt-driven binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer.

+

Interrupt-driven binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer.

Parameters
@@ -1409,10 +1588,107 @@ void 
dataBinary data to be sent.
PhysicalLayer.

+ + + +

◆ startTransmit() [4/4]

+ +
+
+ + + + +
virtual int16_t PhysicalLayer::startTransmit
+
+ +

Interrupt-driven binary transmit method.

+
Parameters
+ + + + +
dataBinary data that will be transmitted.
lenLength of binary data to transmit (in bytes).
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+ +
+
+ +

◆ transmit() [1/5]

+ +
+
+ + + + +
int16_t PhysicalLayer::transmit
+
+ +

Arduino Flash String transmit method.

+
Parameters
+ + + +
strPointer to Arduino Flash String that will be transmitted.
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+ +
+
+ +

◆ transmit() [2/5]

+ +
+
+ + + + +
int16_t PhysicalLayer::transmit
+
+ +

C-string transmit method.

+
Parameters
+ + + +
strC-string that will be transmitted.
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+ +
+
+ +

◆ transmit() [3/5]

+ +
+
+ + + + +
int16_t PhysicalLayer::transmit
+
+ +

Arduino String transmit method.

+
Parameters
+ + + +
strAddress of Arduino string that will be transmitted.
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+
-

◆ transmit()

+

◆ transmit() [4/5]

@@ -1451,7 +1727,7 @@ void 
-

Blocking binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer.

+

Blocking binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer.

Parameters
@@ -1464,6 +1740,31 @@ void 
dataBinary data to be sent.
PhysicalLayer.

+ + + +

◆ transmit() [5/5]

+ +
+
+ + + + +
virtual int16_t PhysicalLayer::transmit
+
+ +

Binary transmit method. Must be implemented in module class.

+
Parameters
+ + + + +
dataBinary data that will be transmitted.
lenLength of binary data to transmit (in bytes).
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+
@@ -1542,7 +1843,7 @@ void 
CC1101 + doxygen 1.8.17 diff --git a/class_c_c1101.js b/class_c_c1101.js index dedde23b..687efbf7 100644 --- a/class_c_c1101.js +++ b/class_c_c1101.js @@ -14,8 +14,12 @@ var class_c_c1101 = [ "getRSSI", "class_c_c1101.html#a48fd0452d6f7d7d51ea7d23b2dbe1551", null ], [ "packetMode", "class_c_c1101.html#a38f6978c757b0dd73e3ef98164a735a2", null ], [ "random", "class_c_c1101.html#aeea507b71f1a3dfab5be4c3a1606b8fd", null ], + [ "readData", "class_c_c1101.html#ae8eed0e888a7c8742e89d2b850977de2", null ], [ "readData", "class_c_c1101.html#a8c79975a7bbe8a37f8214ecd1f69ba22", null ], + [ "readData", "class_c_c1101.html#ae8b6c756eb4b92855433ca389d73c632", null ], + [ "receive", "class_c_c1101.html#afb1b090348d9091bfa3a0b5ba3d85b36", null ], [ "receive", "class_c_c1101.html#aedc1067d0334bb69ed5316146014097d", null ], + [ "receive", "class_c_c1101.html#a2ad4c6a8ac267f8ac590260414ffcda3", null ], [ "receiveDirect", "class_c_c1101.html#ab053c185330519d58f364790108d29ac", null ], [ "setBitRate", "class_c_c1101.html#aa53427cabcda0778f287ed1d850bbe37", null ], [ "setCrcFiltering", "class_c_c1101.html#aafac40359c4a1bb01aae12da6b03be26", null ], @@ -32,12 +36,19 @@ var class_c_c1101 = [ "setPromiscuousMode", "class_c_c1101.html#a2911d49d1c293542f7a374c9af60df0e", null ], [ "setRfSwitchPins", "class_c_c1101.html#a45ab4e3f4f9db367185333d36ba21ed2", null ], [ "setRxBandwidth", "class_c_c1101.html#a381d0059d7a0ccd8a2f54d7d3376f9b6", null ], - [ "setSyncWord", "class_c_c1101.html#a433f1a40b33be6c84d3665a1b4cd57d6", null ], [ "setSyncWord", "class_c_c1101.html#ab89b0932dbacadc34d049a2bd2292001", null ], + [ "setSyncWord", "class_c_c1101.html#a433f1a40b33be6c84d3665a1b4cd57d6", null ], [ "standby", "class_c_c1101.html#a7612bf81e48086004c62548de2682266", null ], [ "startReceive", "class_c_c1101.html#af727750d05be0bcef4bb8ac260d110e3", null ], + [ "startTransmit", "class_c_c1101.html#a923654706eff5118ef6e84214e837f27", null ], + [ "startTransmit", "class_c_c1101.html#af068e6e862c99e39d0261a7971dd56db", null ], [ "startTransmit", "class_c_c1101.html#a0df2938e2509a8f2746b20ae0558d4ea", null ], + [ "startTransmit", "class_c_c1101.html#a41a1de0ebffe7b65de6fd8cceb9a5123", null ], + [ "transmit", "class_c_c1101.html#ab139a34e03a6fd5a781cd54da21d308f", null ], + [ "transmit", "class_c_c1101.html#a492b2d057dd803c3884fa1adc8e22534", null ], + [ "transmit", "class_c_c1101.html#aeb62c5a521aafc1e0525c58e9364482b", null ], [ "transmit", "class_c_c1101.html#a7cb99a9200b21829b50e3fc3878573f4", null ], + [ "transmit", "class_c_c1101.html#af81565ee82ef9a7de9c5663c745f4ef7", null ], [ "transmitDirect", "class_c_c1101.html#a240eef8fa7d838d76f3c11086dc50e46", null ], [ "variablePacketLengthMode", "class_c_c1101.html#a881122ec3457c5f95760859f8e0297c7", null ] ]; \ No newline at end of file diff --git a/class_e_s_p8266-members.html b/class_e_s_p8266-members.html index ebac77c8..103663d1 100644 --- a/class_e_s_p8266-members.html +++ b/class_e_s_p8266-members.html @@ -1,9 +1,9 @@ - + - + RadioLib: Member List @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@
- + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -104,7 +106,7 @@ $(document).ready(function(){initNavTree('class_e_s_p8266.html','');});
    + doxygen 1.8.17
diff --git a/class_e_s_p8266.html b/class_e_s_p8266.html index 90ae53bf..b7c03f0d 100644 --- a/class_e_s_p8266.html +++ b/class_e_s_p8266.html @@ -1,9 +1,9 @@ - + - + RadioLib: ESP8266 Class Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@
- + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -88,7 +90,7 @@ $(document).ready(function(){initNavTree('class_e_s_p8266.html','');});
-

Control class for ESP8266 module. Implements TransportLayer methods. +

Control class for ESP8266 module. Implements TransportLayer methods. More...

#include <ESP8266.h>

@@ -98,45 +100,45 @@ Inheritance diagram for ESP8266:
-TransportLayer - -
+TransportLayer + + - + - + - + - + - + - + - + - + - + - +

Public Member Functions

 ESP8266 (Module *module)
 Default constructor. More...
 Default constructor. More...
 
int16_t begin (long speed)
 Initialization method. More...
 Initialization method. More...
 
int16_t reset ()
 Resets module using AT command. More...
 Resets module using AT command. More...
 
int16_t join (const char *ssid, const char *password)
 Joins access point. More...
 Joins access point. More...
 
int16_t openTransportConnection (const char *host, const char *protocol, uint16_t port, uint16_t tcpKeepAlive=0) override
 Open transport layer connection. More...
 Open transport layer connection. More...
 
int16_t closeTransportConnection () override
 Close transport layer connection. More...
 Close transport layer connection. More...
 
int16_t send (const char *data) override
 Send string-based data. More...
 Send string-based data. More...
 
int16_t send (uint8_t *data, size_t len) override
 Send arbitrary binary data. More...
 Send arbitrary binary data. More...
 
size_t receive (uint8_t *data, size_t len, uint32_t timeout=10000) override
 Receive data. More...
 Receive data. More...
 
size_t getNumBytes (uint32_t timeout=10000, size_t minBytes=10) override
 Get number of received bytes. More...
 Get number of received bytes. More...
 

Detailed Description

-

Control class for ESP8266 module. Implements TransportLayer methods.

+

Control class for ESP8266 module. Implements TransportLayer methods.

Constructor & Destructor Documentation

◆ ESP8266()

@@ -157,7 +159,7 @@ Public Member Functions
- +
modInstance of Module that will be used to communicate with the radio.
modInstance of Module that will be used to communicate with the radio.
@@ -541,7 +543,7 @@ Public Member Functions
- + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -126,7 +128,7 @@ $(document).ready(function(){initNavTree('class_h_c05.html','');});
diff --git a/class_h_c05.html b/class_h_c05.html index 64dec59a..e7b5e3ef 100644 --- a/class_h_c05.html +++ b/class_h_c05.html @@ -1,9 +1,9 @@ - + - + RadioLib: HC05 Class Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -88,7 +90,7 @@ $(document).ready(function(){initNavTree('class_h_c05.html','');});
-

Control class for HC05 module. Most methods supported by this module are implemented in ISerial interface. +

Control class for HC05 module. Most methods supported by this module are implemented in ISerial interface. More...

#include <HC05.h>

@@ -98,17 +100,17 @@ Inheritance diagram for HC05:
-ISerial - -
+ISerial + + - + - +

Public Member Functions

 HC05 (Module *mod)
 Default constructor. More...
 Default constructor. More...
 
void begin (long speed)
 Initialization method. More...
 Initialization method. More...
 
- Public Member Functions inherited from ISerial
@@ -206,7 +208,7 @@ size_t println (void)<
 

Detailed Description

-

Control class for HC05 module. Most methods supported by this module are implemented in ISerial interface.

+

Control class for HC05 module. Most methods supported by this module are implemented in ISerial interface.

Constructor & Destructor Documentation

◆ HC05()

@@ -227,7 +229,7 @@ size_t println (void)<

Default constructor.

Parameters
- +
modInstance of Module that will be used to communicate with the radio.
modInstance of Module that will be used to communicate with the radio.
@@ -273,7 +275,7 @@ size_t println (void)< + doxygen 1.8.17
diff --git a/class_h_t_t_p_client-members.html b/class_h_t_t_p_client-members.html index 3f720b3c..86d389e0 100644 --- a/class_h_t_t_p_client-members.html +++ b/class_h_t_t_p_client-members.html @@ -1,9 +1,9 @@ - + - + RadioLib: Member List @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -98,7 +100,7 @@ $(document).ready(function(){initNavTree('class_h_t_t_p_client.html','');});
diff --git a/class_h_t_t_p_client.html b/class_h_t_t_p_client.html index 42af1835..39ecc0e6 100644 --- a/class_h_t_t_p_client.html +++ b/class_h_t_t_p_client.html @@ -1,9 +1,9 @@ - + - + RadioLib: HTTPClient Class Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -96,16 +98,16 @@ $(document).ready(function(){initNavTree('class_h_t_t_p_client.html','');});

Public Member Functions

 HTTPClient (TransportLayer *tl, uint16_t port=80) - Default constructor. More...
+ Default constructor. More...
  int16_t get (String &url, String &response) - Sends HTTP GET request. More...
+ Sends HTTP GET request. More...
  int16_t get (const char *url, String &response) - Sends HTTP GET request. More...
+ Sends HTTP GET request. More...
  int16_t post (const char *url, const char *content, String &response, const char *contentType="text/plain") - Sends HTTP POST request. More...
+ Sends HTTP POST request. More...
 

Detailed Description

@@ -148,7 +150,7 @@ Public Member Functions

Default constructor.

Parameters
- +
tlPointer to the wireless module providing TransportLayer communication.
tlPointer to the wireless module providing TransportLayer communication.
portPort to be used for HTTP. Defaults to 80.
@@ -157,8 +159,8 @@ Public Member Functions

Member Function Documentation

- -

◆ get() [1/2]

+ +

◆ get() [1/2]

@@ -166,7 +168,7 @@ Public Member Functions int16_t HTTPClient::get ( - String &  + const char *  url, @@ -195,8 +197,8 @@ Public Member Functions
- -

◆ get() [2/2]

+ +

◆ get() [2/2]

@@ -204,7 +206,7 @@ Public Member Functions int16_t HTTPClient::get ( - const char *  + String &  url, @@ -297,7 +299,7 @@ Public Member Functions + doxygen 1.8.17
diff --git a/class_h_t_t_p_client.js b/class_h_t_t_p_client.js index 5367970d..7593c588 100644 --- a/class_h_t_t_p_client.js +++ b/class_h_t_t_p_client.js @@ -1,7 +1,7 @@ var class_h_t_t_p_client = [ [ "HTTPClient", "class_h_t_t_p_client.html#a7c6fdd5681e55437ebddaac785f35557", null ], - [ "get", "class_h_t_t_p_client.html#abc505d06d29fdc774d27c163e0be7ff8", null ], [ "get", "class_h_t_t_p_client.html#a7ae493bf7db12ca2201cd6cead54c64f", null ], + [ "get", "class_h_t_t_p_client.html#abc505d06d29fdc774d27c163e0be7ff8", null ], [ "post", "class_h_t_t_p_client.html#ac1119b889b6fed7bd4d119d3e4842acb", null ] ]; \ No newline at end of file diff --git a/class_hell_client-members.html b/class_hell_client-members.html index 591f5e13..8be762cc 100644 --- a/class_hell_client-members.html +++ b/class_hell_client-members.html @@ -1,9 +1,9 @@ - + - + RadioLib: Member List @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@
- + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -122,7 +124,7 @@ $(document).ready(function(){initNavTree('class_hell_client.html','');});
diff --git a/class_hell_client.html b/class_hell_client.html index 3cbb6b3c..3444a3f7 100644 --- a/class_hell_client.html +++ b/class_hell_client.html @@ -1,9 +1,9 @@ - + - + RadioLib: HellClient Class Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -96,16 +98,16 @@ $(document).ready(function(){initNavTree('class_hell_client.html','');});

Public Member Functions

 HellClient (PhysicalLayer *phy) - Constructor for 2-FSK mode. More...
+ Constructor for 2-FSK mode. More...
   HellClient (AFSKClient *audio) - Constructor for AFSK mode. More...
+ Constructor for AFSK mode. More...
  int16_t begin (float base, float rate=122.5) - Initialization method. More...
+ Initialization method. More...
  size_t printGlyph (uint8_t *buff) - Method to "print" a buffer of pixels, this is exposed to allow users to send custom characters. More...
+ Method to "print" a buffer of pixels, this is exposed to allow users to send custom characters. More...
  size_t write (const char *str) @@ -210,7 +212,7 @@ size_t println (double

Constructor for 2-FSK mode.

Parameters
- +
phyPointer to the wireless module providing PhysicalLayer communication.
phyPointer to the wireless module providing PhysicalLayer communication.
@@ -327,7 +329,7 @@ size_t println (double + doxygen 1.8.17
diff --git a/class_hell_client.js b/class_hell_client.js index 60d06a5a..161e0860 100644 --- a/class_hell_client.js +++ b/class_hell_client.js @@ -4,27 +4,27 @@ var class_hell_client = [ "HellClient", "class_hell_client.html#afeb347f04148700427ad40614fd057c3", null ], [ "begin", "class_hell_client.html#a225775fe87f9ed3c3a04142697641242", null ], [ "print", "class_hell_client.html#a0ff4b94104bc9058884f7129c629a6d3", null ], - [ "print", "class_hell_client.html#a68683a4d8c8b2f4a4d987d5c08a027d0", null ], - [ "print", "class_hell_client.html#aa6a4e522a21ffd337de213f7f5ead190", null ], [ "print", "class_hell_client.html#a96110fc9b723c92455e0427d4fc7563f", null ], - [ "print", "class_hell_client.html#a0dcf129b97dda7cd7f343344dabfa2ec", null ], - [ "print", "class_hell_client.html#a0b47e81258fd838dc8c587daad9c75ef", null ], - [ "print", "class_hell_client.html#aed7039049b21c0ae5acf650449f6d001", null ], - [ "print", "class_hell_client.html#ac3fa4949b30186a215bcdc4eedb8ef7a", null ], - [ "print", "class_hell_client.html#a079475eb50465c6b9c8e5e568648925d", null ], + [ "print", "class_hell_client.html#aa6a4e522a21ffd337de213f7f5ead190", null ], + [ "print", "class_hell_client.html#a68683a4d8c8b2f4a4d987d5c08a027d0", null ], [ "print", "class_hell_client.html#a41acb11ec5afacce7217d94a038442b6", null ], + [ "print", "class_hell_client.html#a0b47e81258fd838dc8c587daad9c75ef", null ], + [ "print", "class_hell_client.html#ac3fa4949b30186a215bcdc4eedb8ef7a", null ], + [ "print", "class_hell_client.html#a0dcf129b97dda7cd7f343344dabfa2ec", null ], + [ "print", "class_hell_client.html#aed7039049b21c0ae5acf650449f6d001", null ], + [ "print", "class_hell_client.html#a079475eb50465c6b9c8e5e568648925d", null ], [ "printGlyph", "class_hell_client.html#ac527806ef871dc12555afe7c43a72ed9", null ], - [ "println", "class_hell_client.html#aeded114263fcd3c023a5a7b177041449", null ], [ "println", "class_hell_client.html#aab738dbdadc60e5aec75e877d8d64143", null ], - [ "println", "class_hell_client.html#aabac8ec885594abbd85ec2e7b4e07d95", null ], - [ "println", "class_hell_client.html#a9c8af8fbfefda966f5400d06dfa10d76", null ], [ "println", "class_hell_client.html#a3f6a25662f28c525fb8ed727358890ea", null ], - [ "println", "class_hell_client.html#afd39423e75134b2587983418a6a37682", null ], - [ "println", "class_hell_client.html#a5be90660b3fa491fcfa80609b8f29f56", null ], - [ "println", "class_hell_client.html#ac7eab91507bf0413563c097cfca5196f", null ], - [ "println", "class_hell_client.html#a236dc21d338d36fd3b7130fe2c46e85e", null ], - [ "println", "class_hell_client.html#a72ee891123decbb2d883b8c120e30c18", null ], + [ "println", "class_hell_client.html#a9c8af8fbfefda966f5400d06dfa10d76", null ], + [ "println", "class_hell_client.html#aabac8ec885594abbd85ec2e7b4e07d95", null ], [ "println", "class_hell_client.html#ad929fdea641afb17dd56cfcc6e47a438", null ], + [ "println", "class_hell_client.html#a5be90660b3fa491fcfa80609b8f29f56", null ], + [ "println", "class_hell_client.html#a236dc21d338d36fd3b7130fe2c46e85e", null ], + [ "println", "class_hell_client.html#afd39423e75134b2587983418a6a37682", null ], + [ "println", "class_hell_client.html#ac7eab91507bf0413563c097cfca5196f", null ], + [ "println", "class_hell_client.html#a72ee891123decbb2d883b8c120e30c18", null ], + [ "println", "class_hell_client.html#aeded114263fcd3c023a5a7b177041449", null ], [ "write", "class_hell_client.html#ad82abc52034fafdea84c15530039a6f5", null ], [ "write", "class_hell_client.html#a472555cea11854700db91843c335bded", null ], [ "write", "class_hell_client.html#a5c5117dadbe33da1cda5fd4981b405eb", null ] diff --git a/class_i_serial-members.html b/class_i_serial-members.html index 031d1b94..7309289f 100644 --- a/class_i_serial-members.html +++ b/class_i_serial-members.html @@ -1,9 +1,9 @@ - + - + RadioLib: Member List @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -125,7 +127,7 @@ $(document).ready(function(){initNavTree('class_i_serial.html','');});
diff --git a/class_i_serial.html b/class_i_serial.html index 45c3d9f6..78b41703 100644 --- a/class_i_serial.html +++ b/class_i_serial.html @@ -1,9 +1,9 @@ - + - + RadioLib: ISerial Class Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -101,8 +103,8 @@ Inheritance diagram for ISerial:
HC05 JDY08 XBeeSerial - - + + @@ -214,7 +216,7 @@ size_t 

Public Member Functions

println (void)< + doxygen 1.8.17 diff --git a/class_i_serial.js b/class_i_serial.js index 147443da..4edd93f5 100644 --- a/class_i_serial.js +++ b/class_i_serial.js @@ -6,28 +6,28 @@ var class_i_serial = [ "end", "class_i_serial.html#a9ab275543e32bbd26093936e93901a64", null ], [ "flush", "class_i_serial.html#a5073d939918c6ae56e1eb28da4362fc8", null ], [ "peek", "class_i_serial.html#aaec3e37c852ab96dc0cb406f25927020", null ], - [ "print", "class_i_serial.html#a71ff41667bb4cb865fae0cb392ba2480", null ], - [ "print", "class_i_serial.html#afa73455a632e6c6819a2552ad58d3e4a", null ], - [ "print", "class_i_serial.html#a50a1a3292b06f0b0283bb365e4274e74", null ], [ "print", "class_i_serial.html#a37e78871669df20cc65ddd0b3f98eba4", null ], - [ "print", "class_i_serial.html#aa7de5539ed01b0abd7c3c5c5767b855a", null ], - [ "print", "class_i_serial.html#a6cbd12b7b47005ab0153066c34f28426", null ], - [ "print", "class_i_serial.html#a86997b02021c420e2c1bd7fdd11b1e14", null ], - [ "print", "class_i_serial.html#a8e5003afc67d7488af5c546f51c9222c", null ], - [ "print", "class_i_serial.html#a466ab09bad9fbcb514ffef6528de5d7f", null ], - [ "print", "class_i_serial.html#af66546833df21b2949b26e4771a9f9d6", null ], + [ "print", "class_i_serial.html#a71ff41667bb4cb865fae0cb392ba2480", null ], + [ "print", "class_i_serial.html#a50a1a3292b06f0b0283bb365e4274e74", null ], [ "print", "class_i_serial.html#a54f478dbde6921d212fe5b2159f4ee93", null ], - [ "println", "class_i_serial.html#a16eaec118c2c38db031cc0e9b641b203", null ], - [ "println", "class_i_serial.html#a94f1c1b1e6a94ea418251c666b72eac5", null ], - [ "println", "class_i_serial.html#a7a91c6fc4dd9e70b438a4ebc2c62b881", null ], + [ "print", "class_i_serial.html#afa73455a632e6c6819a2552ad58d3e4a", null ], + [ "print", "class_i_serial.html#af66546833df21b2949b26e4771a9f9d6", null ], + [ "print", "class_i_serial.html#a6cbd12b7b47005ab0153066c34f28426", null ], + [ "print", "class_i_serial.html#a8e5003afc67d7488af5c546f51c9222c", null ], + [ "print", "class_i_serial.html#aa7de5539ed01b0abd7c3c5c5767b855a", null ], + [ "print", "class_i_serial.html#a86997b02021c420e2c1bd7fdd11b1e14", null ], + [ "print", "class_i_serial.html#a466ab09bad9fbcb514ffef6528de5d7f", null ], [ "println", "class_i_serial.html#a0ab1d33067885e6456ab61b3b51f07b4", null ], - [ "println", "class_i_serial.html#a0b669c99851a4a36945bc7d9b26f1c15", null ], - [ "println", "class_i_serial.html#ae96f7b598e2e9bdb5f8bf5b7feb56983", null ], - [ "println", "class_i_serial.html#a85f3dff9f42387e12be59049cb020a88", null ], - [ "println", "class_i_serial.html#aaa489fda4cc41dac95ed157105f08de6", null ], - [ "println", "class_i_serial.html#ac46c8197c06b703bcb83ed3947492a4f", null ], - [ "println", "class_i_serial.html#a5e25366fa6386a413bb46dd4a62e1931", null ], + [ "println", "class_i_serial.html#a16eaec118c2c38db031cc0e9b641b203", null ], + [ "println", "class_i_serial.html#a7a91c6fc4dd9e70b438a4ebc2c62b881", null ], [ "println", "class_i_serial.html#a0607b2c508006f1e43d685404be50f23", null ], + [ "println", "class_i_serial.html#a94f1c1b1e6a94ea418251c666b72eac5", null ], + [ "println", "class_i_serial.html#a5e25366fa6386a413bb46dd4a62e1931", null ], + [ "println", "class_i_serial.html#ae96f7b598e2e9bdb5f8bf5b7feb56983", null ], + [ "println", "class_i_serial.html#aaa489fda4cc41dac95ed157105f08de6", null ], + [ "println", "class_i_serial.html#a0b669c99851a4a36945bc7d9b26f1c15", null ], + [ "println", "class_i_serial.html#a85f3dff9f42387e12be59049cb020a88", null ], + [ "println", "class_i_serial.html#ac46c8197c06b703bcb83ed3947492a4f", null ], [ "println", "class_i_serial.html#ab9bb40acf5dd420afed4ea80d7989a20", null ], [ "read", "class_i_serial.html#a59bdc39fa8633f3bb6154dacb043ae10", null ], [ "write", "class_i_serial.html#a0e3eac99b53d90cd8c725a5cc409e438", null ] diff --git a/class_i_t_a2_string-members.html b/class_i_t_a2_string-members.html index 1837793f..8deacb58 100644 --- a/class_i_t_a2_string-members.html +++ b/class_i_t_a2_string-members.html @@ -1,9 +1,9 @@ - + - + RadioLib: Member List @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@
- + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -99,7 +101,7 @@ $(document).ready(function(){initNavTree('class_i_t_a2_string.html','');});
diff --git a/class_i_t_a2_string.html b/class_i_t_a2_string.html index 880f3dd9..2ff4da1b 100644 --- a/class_i_t_a2_string.html +++ b/class_i_t_a2_string.html @@ -1,9 +1,9 @@ - + - + RadioLib: ITA2String Class Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -96,20 +98,20 @@ $(document).ready(function(){initNavTree('class_i_t_a2_string.html','');});

Public Member Functions

 ITA2String (char c) - Default single-character constructor. More...
+ Default single-character constructor. More...
   ITA2String (const char *str) - Default string constructor. More...
+ Default string constructor. More...
   ~ITA2String ()  Default destructor.
  size_t length () - Gets the length of the ITA2 string. This number is not the same as the length of ASCII-encoded string! More...
+ Gets the length of the ITA2 string. This number is not the same as the length of ASCII-encoded string! More...
  uint8_t * byteArr () - Gets the ITA2 representation of the ASCII string set in constructor. More...
+ Gets the ITA2 representation of the ASCII string set in constructor. More...
 

Detailed Description

@@ -236,7 +238,7 @@ Public Member Functions + doxygen 1.8.17
diff --git a/class_j_d_y08-members.html b/class_j_d_y08-members.html index f8aabbb7..18a5c359 100644 --- a/class_j_d_y08-members.html +++ b/class_j_d_y08-members.html @@ -1,9 +1,9 @@ - + - + RadioLib: Member List @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -126,7 +128,7 @@ $(document).ready(function(){initNavTree('class_j_d_y08.html','');});
diff --git a/class_j_d_y08.html b/class_j_d_y08.html index 007361c3..a9f08ba3 100644 --- a/class_j_d_y08.html +++ b/class_j_d_y08.html @@ -1,9 +1,9 @@ - + - + RadioLib: JDY08 Class Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -88,7 +90,7 @@ $(document).ready(function(){initNavTree('class_j_d_y08.html','');});
-

Control class for JDY08 module. Most methods supported by this module are implemented in ISerial interface. +

Control class for JDY08 module. Most methods supported by this module are implemented in ISerial interface. More...

#include <JDY08.h>

@@ -98,17 +100,17 @@ Inheritance diagram for JDY08:
-ISerial - -
+ISerial + + - + - +

Public Member Functions

 JDY08 (Module *mod)
 Default constructor. More...
 Default constructor. More...
 
void begin (long speed)
 Initialization method. More...
 Initialization method. More...
 
- Public Member Functions inherited from ISerial
@@ -206,7 +208,7 @@ size_t println (void)<
 

Detailed Description

-

Control class for JDY08 module. Most methods supported by this module are implemented in ISerial interface.

+

Control class for JDY08 module. Most methods supported by this module are implemented in ISerial interface.

Constructor & Destructor Documentation

◆ JDY08()

@@ -227,7 +229,7 @@ size_t println (void)<

Default constructor.

Parameters
- +
modInstance of Module that will be used to communicate with the radio.
modInstance of Module that will be used to communicate with the radio.
@@ -273,7 +275,7 @@ size_t println (void)< + doxygen 1.8.17
diff --git a/class_m_q_t_t_client-members.html b/class_m_q_t_t_client-members.html index 81d98024..6017c49d 100644 --- a/class_m_q_t_t_client-members.html +++ b/class_m_q_t_t_client-members.html @@ -1,9 +1,9 @@ - + - + RadioLib: Member List @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -103,7 +105,7 @@ $(document).ready(function(){initNavTree('class_m_q_t_t_client.html','');});
diff --git a/class_m_q_t_t_client.html b/class_m_q_t_t_client.html index dec71df3..90b18c30 100644 --- a/class_m_q_t_t_client.html +++ b/class_m_q_t_t_client.html @@ -1,9 +1,9 @@ - + - + RadioLib: MQTTClient Class Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -96,31 +98,31 @@ $(document).ready(function(){initNavTree('class_m_q_t_t_client.html','');});

Public Member Functions

 MQTTClient (TransportLayer *tl, uint16_t port=1883) - Default constructor. More...
+ Default constructor. More...
  int16_t connect (const char *host, const char *clientId, const char *userName="", const char *password="", uint16_t keepAlive=60, bool cleanSession=true, const char *willTopic="", const char *willMessage="") - Connects to MQTT broker (/server). More...
+ Connects to MQTT broker (/server). More...
  int16_t disconnect () - Disconnect from MQTT broker. More...
+ Disconnect from MQTT broker. More...
  int16_t publish (String &topic, String &message) - Publish MQTT message. More...
+ Publish MQTT message. More...
  int16_t publish (const char *topic, const char *message) - Publish MQTT message. More...
+ Publish MQTT message. More...
  int16_t subscribe (const char *topicFilter) - Subscribe to MQTT topic. More...
+ Subscribe to MQTT topic. More...
  int16_t unsubscribe (const char *topicFilter) - Unsubscribe from MQTT topic. More...
+ Unsubscribe from MQTT topic. More...
  int16_t ping () - Ping MQTT broker. This method can be used to keep connection open. More...
+ Ping MQTT broker. This method can be used to keep connection open. More...
  int16_t check (void(*func)(const char *, const char *)) - Set function to be called when checking new messages in subscribed topics. More...
+ Set function to be called when checking new messages in subscribed topics. More...
 

Detailed Description

@@ -163,7 +165,7 @@ Public Member Functions

Default constructor.

Parameters
- +
tlPointer to the wireless module providing TransportLayer communication.
tlPointer to the wireless module providing TransportLayer communication.
@@ -310,48 +312,10 @@ Public Member Functions

Ping MQTT broker. This method can be used to keep connection open.

Returns
Status Codes
-
- - -

◆ publish() [1/2]

- -
-
- - - - - - - - - - - - - - - - - - -
int16_t MQTTClient::publish (String & topic,
String & message 
)
-
- -

Publish MQTT message.

-
Parameters
- - - -
topicMQTT topic to which the message will be published.
messageMessage to be published.
-
-
-
Returns
Status Codes
-
-

◆ publish() [2/2]

+

◆ publish() [1/2]

@@ -387,6 +351,44 @@ Public Member Functions
Returns
Status Codes
Todo:
implement QoS > 0 and PUBACK response checking
+
+
+ +

◆ publish() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
int16_t MQTTClient::publish (String & topic,
String & message 
)
+
+ +

Publish MQTT message.

+
Parameters
+ + + +
topicMQTT topic to which the message will be published.
messageMessage to be published.
+
+
+
Returns
Status Codes
+
@@ -455,7 +457,7 @@ Public Member Functions + doxygen 1.8.17 diff --git a/class_m_q_t_t_client.js b/class_m_q_t_t_client.js index d9cb5458..fce8e925 100644 --- a/class_m_q_t_t_client.js +++ b/class_m_q_t_t_client.js @@ -5,8 +5,8 @@ var class_m_q_t_t_client = [ "connect", "class_m_q_t_t_client.html#ac15b32e89df903b20b066113bf8c4a88", null ], [ "disconnect", "class_m_q_t_t_client.html#af10176e2cf67bd652823d44f3203a96e", null ], [ "ping", "class_m_q_t_t_client.html#aea3fb930ed43a0b3122ccc90efebb99d", null ], - [ "publish", "class_m_q_t_t_client.html#ace3ee45313dea2f853207accf20b7c87", null ], [ "publish", "class_m_q_t_t_client.html#ab59a1174098dfdf514d8ec6d0bd9d015", null ], + [ "publish", "class_m_q_t_t_client.html#ace3ee45313dea2f853207accf20b7c87", null ], [ "subscribe", "class_m_q_t_t_client.html#a9488df90534953c33d76e9183965a300", null ], [ "unsubscribe", "class_m_q_t_t_client.html#a782158f20b289746b7b6884fd922a22c", null ] ]; \ No newline at end of file diff --git a/class_module-members.html b/class_module-members.html index 3ab40201..7f75a3ea 100644 --- a/class_module-members.html +++ b/class_module-members.html @@ -1,9 +1,9 @@ - + - + RadioLib: Member List @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -142,7 +144,7 @@ $(document).ready(function(){initNavTree('class_module.html','');});
diff --git a/class_module.html b/class_module.html index 21b824cf..70631116 100644 --- a/class_module.html +++ b/class_module.html @@ -1,9 +1,9 @@ - + - + RadioLib: Module Class Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -98,132 +100,132 @@ $(document).ready(function(){initNavTree('class_module.html','');});

Public Member Functions

 Module (RADIOLIB_PIN_TYPE rx, RADIOLIB_PIN_TYPE tx, HardwareSerial *serial=nullptr, RADIOLIB_PIN_TYPE rst=RADIOLIB_NC) - UART-based module constructor. More...
+ UART-based module constructor. More...
   Module (RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst) - SPI-based module constructor. Will use the default SPI interface automatically initialize it. More...
+ SPI-based module constructor. Will use the default SPI interface automatically initialize it. More...
   Module (RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE gpio) - Extended SPI-based module constructor. Will use the default SPI interface automatically initialize it. More...
+ Extended SPI-based module constructor. Will use the default SPI interface automatically initialize it. More...
   Module (RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, SPIClass &spi, SPISettings spiSettings) - SPI-based module constructor. More...
+ SPI-based module constructor. More...
   Module (RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE gpio, SPIClass &spi, SPISettings spiSettings=SPISettings(2000000, MSBFIRST, SPI_MODE0)) - Extended SPI-based module constructor. More...
+ Extended SPI-based module constructor. More...
   Module (RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE rx, RADIOLIB_PIN_TYPE tx, SPIClass &spi=RADIOLIB_DEFAULT_SPI, SPISettings spiSettings=SPISettings(2000000, MSBFIRST, SPI_MODE0), HardwareSerial *serial=nullptr) - Generic module constructor. More...
+ Generic module constructor. More...
   Module (const Module &mod) - Copy constructor. More...
+ Copy constructor. More...
  Moduleoperator= (const Module &mod) - Overload for assignment operator. More...
+ Overload for assignment operator. More...
  void init (uint8_t interface) - Initialize low-level module control. More...
+ Initialize low-level module control. More...
  void term (uint8_t interface) - Terminate low-level module control. More...
+ Terminate low-level module control. More...
  void ATemptyBuffer ()  Empty internal AT buffer.
  bool ATgetResponse () - Get response after sending AT command. More...
+ Get response after sending AT command. More...
  bool ATsendCommand (const char *cmd) - Send AT command. Will also call ATgetResponse. More...
+ Send AT command. Will also call ATgetResponse. More...
  bool ATsendData (uint8_t *data, uint32_t len) - Send raw AT data. Will also call ATgetResponse. More...
+ Send raw AT data. Will also call ATgetResponse. More...
  int16_t SPIgetRegValue (uint8_t reg, uint8_t msb=7, uint8_t lsb=0) - SPI read method that automatically masks unused bits. This method is the preferred SPI read mechanism. More...
+ SPI read method that automatically masks unused bits. This method is the preferred SPI read mechanism. More...
  int16_t SPIsetRegValue (uint8_t reg, uint8_t value, uint8_t msb=7, uint8_t lsb=0, uint8_t checkInterval=2) - Overwrite-safe SPI write method with verification. This method is the preferred SPI write mechanism. More...
+ Overwrite-safe SPI write method with verification. This method is the preferred SPI write mechanism. More...
  void SPIreadRegisterBurst (uint8_t reg, uint8_t numBytes, uint8_t *inBytes) - SPI burst read method. More...
+ SPI burst read method. More...
  uint8_t SPIreadRegister (uint8_t reg) - SPI basic read method. Use of this method is reserved for special cases, SPIgetRegValue should be used instead. More...
+ SPI basic read method. Use of this method is reserved for special cases, SPIgetRegValue should be used instead. More...
  void SPIwriteRegisterBurst (uint8_t reg, uint8_t *data, uint8_t numBytes) - SPI burst write method. More...
+ SPI burst write method. More...
  void SPIwriteRegister (uint8_t reg, uint8_t data) - SPI basic write method. Use of this method is reserved for special cases, SPIsetRegValue should be used instead. More...
+ SPI basic write method. Use of this method is reserved for special cases, SPIsetRegValue should be used instead. More...
  void SPItransfer (uint8_t cmd, uint8_t reg, uint8_t *dataOut, uint8_t *dataIn, uint8_t numBytes) - SPI single transfer method. More...
+ SPI single transfer method. More...
  RADIOLIB_PIN_TYPE getCs () const - Access method to get the pin number of SPI chip select. More...
+ Access method to get the pin number of SPI chip select. More...
  RADIOLIB_PIN_TYPE getIrq () const - Access method to get the pin number of interrupt/GPIO. More...
+ Access method to get the pin number of interrupt/GPIO. More...
  RADIOLIB_PIN_TYPE getRst () const - Access method to get the pin number of hardware reset pin. More...
+ Access method to get the pin number of hardware reset pin. More...
  RADIOLIB_PIN_TYPE getGpio () const - Access method to get the pin number of second interrupt/GPIO. More...
+ Access method to get the pin number of second interrupt/GPIO. More...
  RADIOLIB_PIN_TYPE getRx () const - Access method to get the pin number of UART Rx. More...
+ Access method to get the pin number of UART Rx. More...
  RADIOLIB_PIN_TYPE getTx () const - Access method to get the pin number of UART Rx. More...
+ Access method to get the pin number of UART Rx. More...
  SPIClass * getSpi () const - Access method to get the SPI interface. More...
+ Access method to get the SPI interface. More...
  SPISettings getSpiSettings () const - Access method to get the SPI interface settings. More...
+ Access method to get the SPI interface settings. More...
  void setRfSwitchPins (RADIOLIB_PIN_TYPE rxEn, RADIOLIB_PIN_TYPE txEn) - Some modules contain external RF switch controlled by two pins. This function gives RadioLib control over those two pins to automatically switch Rx and Tx state. When using automatic RF switch control, DO NOT change the pin mode of rxEn or txEn from Arduino sketch! More...
+ Some modules contain external RF switch controlled by two pins. This function gives RadioLib control over those two pins to automatically switch Rx and Tx state. When using automatic RF switch control, DO NOT change the pin mode of rxEn or txEn from Arduino sketch! More...
  void setRfSwitchState (RADIOLIB_PIN_STATUS rxPinState, RADIOLIB_PIN_STATUS txPinState) - Set RF switch state. More...
+ Set RF switch state. More...
  - + - + - + - + - + - + - + - + - + @@ -627,7 +629,7 @@ uint8_t 

Static Public Member Functions

static void pinMode (RADIOLIB_PIN_TYPE pin, RADIOLIB_PIN_MODE mode)
 Arduino core pinMode override that checks RADIOLIB_NC as alias for unused pin. More...
 Arduino core pinMode override that checks RADIOLIB_NC as alias for unused pin. More...
 
static void digitalWrite (RADIOLIB_PIN_TYPE pin, RADIOLIB_PIN_STATUS value)
 Arduino core digitalWrite override that checks RADIOLIB_NC as alias for unused pin. More...
 Arduino core digitalWrite override that checks RADIOLIB_NC as alias for unused pin. More...
 
static RADIOLIB_PIN_STATUS digitalRead (RADIOLIB_PIN_TYPE pin)
 Arduino core digitalWrite override that checks RADIOLIB_NC as alias for unused pin. More...
 Arduino core digitalWrite override that checks RADIOLIB_NC as alias for unused pin. More...
 
static void tone (RADIOLIB_PIN_TYPE pin, uint16_t value)
 Arduino core tone override that checks RADIOLIB_NC as alias for unused pin and RADIOLIB_TONE_UNSUPPORTED to make sure the platform does support tone. More...
 Arduino core tone override that checks RADIOLIB_NC as alias for unused pin and RADIOLIB_TONE_UNSUPPORTED to make sure the platform does support tone. More...
 
static void noTone (RADIOLIB_PIN_TYPE pin)
 Arduino core noTone override that checks RADIOLIB_NC as alias for unused pin and RADIOLIB_TONE_UNSUPPORTED to make sure the platform does support tone. More...
 Arduino core noTone override that checks RADIOLIB_NC as alias for unused pin and RADIOLIB_TONE_UNSUPPORTED to make sure the platform does support tone. More...
 
static void attachInterrupt (RADIOLIB_PIN_TYPE interruptNum, void(*userFunc)(void), RADIOLIB_INTERRUPT_STATUS mode)
 Arduino core attachInterrupt override. More...
 Arduino core attachInterrupt override. More...
 
static void detachInterrupt (RADIOLIB_PIN_TYPE interruptNum)
 Arduino core detachInterrupt override. More...
 Arduino core detachInterrupt override. More...
 
static void yield ()
 Arduino core yield override.
 
static void delay (uint32_t ms)
 Arduino core delay override. More...
 Arduino core delay override. More...
 
static void delayMicroseconds (uint32_t us)
 Arduino core delayMicroseconds override. More...
 Arduino core delayMicroseconds override. More...
 
static uint32_t millis ()
Parameters
- +
modModule instance to copy.
modModule instance to copy.
@@ -1257,7 +1259,7 @@ uint8_t 
Parameters
- +
framervalue Module.
framervalue Module.
@@ -1780,7 +1782,7 @@ uint8_t 
Module + doxygen 1.8.17 diff --git a/class_morse_client-members.html b/class_morse_client-members.html index e48fd8f9..8aac89fd 100644 --- a/class_morse_client-members.html +++ b/class_morse_client-members.html @@ -1,9 +1,9 @@ - + - + RadioLib: Member List @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@
- + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -122,7 +124,7 @@ $(document).ready(function(){initNavTree('class_morse_client.html','');});
diff --git a/class_morse_client.html b/class_morse_client.html index 81452575..b94438d2 100644 --- a/class_morse_client.html +++ b/class_morse_client.html @@ -1,9 +1,9 @@ - + - + RadioLib: MorseClient Class Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -96,16 +98,16 @@ $(document).ready(function(){initNavTree('class_morse_client.html','');});

Public Member Functions

 MorseClient (PhysicalLayer *phy) - Constructor for 2-FSK mode. More...
+ Constructor for 2-FSK mode. More...
   MorseClient (AFSKClient *audio) - Constructor for AFSK mode. More...
+ Constructor for AFSK mode. More...
  int16_t begin (float base, uint8_t speed=20) - Initialization method. More...
+ Initialization method. More...
  size_t startSignal () - Send start signal. More...
+ Send start signal. More...
  size_t write (const char *str) @@ -210,7 +212,7 @@ size_t println (double

Constructor for 2-FSK mode.

Parameters
- +
phyPointer to the wireless module providing PhysicalLayer communication.
phyPointer to the wireless module providing PhysicalLayer communication.
@@ -322,7 +324,7 @@ size_t println (double + doxygen 1.8.17
diff --git a/class_morse_client.js b/class_morse_client.js index a39c9a95..e3e7c293 100644 --- a/class_morse_client.js +++ b/class_morse_client.js @@ -4,26 +4,26 @@ var class_morse_client = [ "MorseClient", "class_morse_client.html#aa5c8ec6823388877b7acfa0deab689a2", null ], [ "begin", "class_morse_client.html#a516f19bb51b87ead7f7ed149f2ca92cf", null ], [ "print", "class_morse_client.html#a051cba718c88b0d25a0f6f6dbfeb1e46", null ], - [ "print", "class_morse_client.html#a2040051afe09bbd4fada12bdf76203b1", null ], - [ "print", "class_morse_client.html#a5e0ecaccbc92e6790f73542133c34535", null ], [ "print", "class_morse_client.html#a1125d874d18a507b2e77675b687cce0f", null ], - [ "print", "class_morse_client.html#a8b54b926bcd4115822e4c901371f1e53", null ], - [ "print", "class_morse_client.html#a2fcdfba81f12782f44fff8fdf845ea0b", null ], - [ "print", "class_morse_client.html#a5714515867807053a63843d5ae647dd1", null ], - [ "print", "class_morse_client.html#a1b7a4467adf49a3afa062fc93bf6f80f", null ], - [ "print", "class_morse_client.html#abcbc1b964ddb20984c3d6f32f07c8cce", null ], + [ "print", "class_morse_client.html#a5e0ecaccbc92e6790f73542133c34535", null ], + [ "print", "class_morse_client.html#a2040051afe09bbd4fada12bdf76203b1", null ], [ "print", "class_morse_client.html#a64e20542281e100ab92ebe5e8f915c3c", null ], - [ "println", "class_morse_client.html#ae1dd17e96858c9b6948ee7e5871c7efd", null ], + [ "print", "class_morse_client.html#a2fcdfba81f12782f44fff8fdf845ea0b", null ], + [ "print", "class_morse_client.html#a1b7a4467adf49a3afa062fc93bf6f80f", null ], + [ "print", "class_morse_client.html#a8b54b926bcd4115822e4c901371f1e53", null ], + [ "print", "class_morse_client.html#a5714515867807053a63843d5ae647dd1", null ], + [ "print", "class_morse_client.html#abcbc1b964ddb20984c3d6f32f07c8cce", null ], [ "println", "class_morse_client.html#a2f4433a88741564f28f673cf51486615", null ], - [ "println", "class_morse_client.html#a83a064f138d5bf55420ffbfd534dacfb", null ], - [ "println", "class_morse_client.html#a178726e7279d49d873c715371d558751", null ], [ "println", "class_morse_client.html#aa26d803db2d9ab6f3b13f843811f923f", null ], - [ "println", "class_morse_client.html#a7eecc8f5a61115b39fa67f1f7be4747e", null ], - [ "println", "class_morse_client.html#aa930ef3852b22e973129daf2ceaf58c3", null ], - [ "println", "class_morse_client.html#a9094ea2ccb2528be5a830485575e2b5e", null ], - [ "println", "class_morse_client.html#afea22f16b6360e122116da4b7b6cc2f7", null ], - [ "println", "class_morse_client.html#a95d0edd2ab9a590668c6aaa67a893c49", null ], + [ "println", "class_morse_client.html#a178726e7279d49d873c715371d558751", null ], + [ "println", "class_morse_client.html#a83a064f138d5bf55420ffbfd534dacfb", null ], [ "println", "class_morse_client.html#af466855a342b3cc70b496a79caf65232", null ], + [ "println", "class_morse_client.html#aa930ef3852b22e973129daf2ceaf58c3", null ], + [ "println", "class_morse_client.html#afea22f16b6360e122116da4b7b6cc2f7", null ], + [ "println", "class_morse_client.html#a7eecc8f5a61115b39fa67f1f7be4747e", null ], + [ "println", "class_morse_client.html#a9094ea2ccb2528be5a830485575e2b5e", null ], + [ "println", "class_morse_client.html#a95d0edd2ab9a590668c6aaa67a893c49", null ], + [ "println", "class_morse_client.html#ae1dd17e96858c9b6948ee7e5871c7efd", null ], [ "startSignal", "class_morse_client.html#a3c718208786f8fe55f30eee990ec28e3", null ], [ "write", "class_morse_client.html#a1be826249b4936e2b0bca20311714726", null ], [ "write", "class_morse_client.html#a9b46b2755abd59ece4abd69fab4f7808", null ], diff --git a/class_physical_layer-members.html b/class_physical_layer-members.html index 726a4085..9147a642 100644 --- a/class_physical_layer-members.html +++ b/class_physical_layer-members.html @@ -1,9 +1,9 @@ - + - + RadioLib: Member List @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -118,7 +120,7 @@ $(document).ready(function(){initNavTree('class_physical_layer.html','');});
diff --git a/class_physical_layer.html b/class_physical_layer.html index 727e8594..dca34cdc 100644 --- a/class_physical_layer.html +++ b/class_physical_layer.html @@ -1,9 +1,9 @@ - + - + RadioLib: PhysicalLayer Class Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -98,106 +100,106 @@ Inheritance diagram for PhysicalLayer:
-CC1101 -nRF24 -RF69 +CC1101 +nRF24 +RF69 Si443x SX126x SX127x SX128x -SX1231 -Si4432 -SX1262 -SX1268 +SX1231 +Si4432 +SX1262 +SX1268 SX1272 -SX1278 -SX1281 -Si4430 -Si4431 -SX1261 +SX1278 +SX1281 +Si4430 +Si4431 +SX1261 SX1273 RFM95 RFM96 SX1276 SX1277 SX1279 -SX1280 - -
+SX1280 + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +

Public Member Functions

 PhysicalLayer (float freqStep, size_t maxPacketLength)
 Default constructor. More...
 Default constructor. More...
 
int16_t transmit (__FlashStringHelper *fstr, uint8_t addr=0)
 Arduino Flash String transmit method. More...
 Arduino Flash String transmit method. More...
 
int16_t transmit (String &str, uint8_t addr=0)
 Arduino String transmit method. More...
 Arduino String transmit method. More...
 
int16_t transmit (const char *str, uint8_t addr=0)
 C-string transmit method. More...
 C-string transmit method. More...
 
virtual int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Binary transmit method. Must be implemented in module class. More...
 Binary transmit method. Must be implemented in module class. More...
 
int16_t receive (String &str, size_t len=0)
 Arduino String receive method. More...
 Arduino String receive method. More...
 
virtual int16_t standby ()=0
 Sets module to standby. More...
 Sets module to standby. More...
 
virtual int16_t receive (uint8_t *data, size_t len)=0
 Binary receive method. Must be implemented in module class. More...
 Binary receive method. Must be implemented in module class. More...
 
int16_t startTransmit (String &str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
int16_t startTransmit (const char *str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
virtual int16_t startTransmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Interrupt-driven binary transmit method. More...
 Interrupt-driven binary transmit method. More...
 
int16_t readData (String &str, size_t len=0)
 Reads data that was received after calling startReceive method. More...
 Reads data that was received after calling startReceive method. More...
 
virtual int16_t readData (uint8_t *data, size_t len)=0
 Reads data that was received after calling startReceive method. More...
 Reads data that was received after calling startReceive method. More...
 
virtual int16_t transmitDirect (uint32_t frf=0)=0
 Enables direct transmission mode on pins DIO1 (clock) and DIO2 (data). Must be implemented in module class. While in direct mode, the module will not be able to transmit or receive packets. Can only be activated in FSK mode. More...
 Enables direct transmission mode on pins DIO1 (clock) and DIO2 (data). Must be implemented in module class. While in direct mode, the module will not be able to transmit or receive packets. Can only be activated in FSK mode. More...
 
virtual int16_t receiveDirect ()=0
 Enables direct reception mode on pins DIO1 (clock) and DIO2 (data). Must be implemented in module class. While in direct mode, the module will not be able to transmit or receive packets. Can only be activated in FSK mode. More...
 Enables direct reception mode on pins DIO1 (clock) and DIO2 (data). Must be implemented in module class. While in direct mode, the module will not be able to transmit or receive packets. Can only be activated in FSK mode. More...
 
virtual int16_t setFrequencyDeviation (float freqDev)=0
 Sets FSK frequency deviation from carrier frequency. Allowed values depend on bit rate setting and must be lower than 200 kHz. Only available in FSK mode. Must be implemented in module class. More...
 Sets FSK frequency deviation from carrier frequency. Allowed values depend on bit rate setting and must be lower than 200 kHz. Only available in FSK mode. Must be implemented in module class. More...
 
virtual int16_t setDataShaping (uint8_t sh)=0
 Sets GFSK data shaping. Only available in FSK mode. Must be implemented in module class. More...
 Sets GFSK data shaping. Only available in FSK mode. Must be implemented in module class. More...
 
virtual int16_t setEncoding (uint8_t encoding)=0
 Sets FSK data encoding. Only available in FSK mode. Must be implemented in module class. More...
 Sets FSK data encoding. Only available in FSK mode. Must be implemented in module class. More...
 
float getFreqStep () const
 Gets the module frequency step size that was set in constructor. More...
 Gets the module frequency step size that was set in constructor. More...
 
virtual size_t getPacketLength (bool update=true)=0
 Query modem for the packet length of received payload. Must be implemented in module class. More...
 Query modem for the packet length of received payload. Must be implemented in module class. More...
 
int32_t random (int32_t max)
 Get truly random number in range 0 - max. More...
 Get truly random number in range 0 - max. More...
 
int32_t random (int32_t min, int32_t max)
 Get truly random number in range min - max. More...
 Get truly random number in range min - max. More...
 
virtual uint8_t random ()=0
 Get one truly random byte from RSSI noise. Must be implemented in module class. More...
 Get one truly random byte from RSSI noise. Must be implemented in module class. More...
 
int16_t startDirect ()
 Configure module parameters for direct modes. Must be called prior to "ham" modes like RTTY or AX.25. Only available in FSK mode. More...
 Configure module parameters for direct modes. Must be called prior to "ham" modes like RTTY or AX.25. Only available in FSK mode. More...
 

Detailed Description

@@ -296,10 +298,40 @@ Public Member Functions

Implemented in SX127x, CC1101, SX126x, Si443x, RF69, SX128x, and nRF24.

+ + + +

◆ random() [1/3]

+ +
+
+ + + + + +
+ + + + + + + +
virtual uint8_t PhysicalLayer::random ()
+
+pure virtual
+
+ +

Get one truly random byte from RSSI noise. Must be implemented in module class.

+
Returns
TRNG byte.
+ +

Implemented in SX127x, SX126x, CC1101, RF69, Si443x, SX128x, and nRF24.

+
-

◆ random() [1/3]

+

◆ random() [2/3]

@@ -326,7 +358,7 @@ Public Member Functions
-

◆ random() [2/3]

+

◆ random() [3/3]

@@ -361,36 +393,6 @@ Public Member Functions
Returns
Random number.
-
-
- -

◆ random() [3/3]

- -
-
- - - - - -
- - - - - - - -
virtual uint8_t PhysicalLayer::random ()
-
-pure virtual
-
- -

Get one truly random byte from RSSI noise. Must be implemented in module class.

-
Returns
TRNG byte.
- -

Implemented in SX127x, SX126x, CC1101, RF69, Si443x, SX128x, and nRF24.

-
@@ -754,48 +756,10 @@ Public Member Functions

Configure module parameters for direct modes. Must be called prior to "ham" modes like RTTY or AX.25. Only available in FSK mode.

Returns
Status Codes
- - - -

◆ startTransmit() [1/3]

- -
-
- - - - - - - - - - - - - - - - - - -
int16_t PhysicalLayer::startTransmit (String & str,
uint8_t addr = 0 
)
-
- -

Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes.

-
Parameters
- - - -
strAddress of Arduino String that will be transmitted.
addrNode address to transmit the packet to. Only used in FSK mode.
-
-
-
Returns
Status Codes
-
-

◆ startTransmit() [2/3]

+

◆ startTransmit() [1/3]

@@ -830,6 +794,44 @@ Public Member Functions
Returns
Status Codes
+
+
+ +

◆ startTransmit() [2/3]

+ +
+
+ + + + + + + + + + + + + + + + + + +
int16_t PhysicalLayer::startTransmit (String & str,
uint8_t addr = 0 
)
+
+ +

Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes.

+
Parameters
+ + + +
strAddress of Arduino String that will be transmitted.
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+
@@ -923,48 +925,10 @@ Public Member Functions
Returns
Status Codes
- - - -

◆ transmit() [2/4]

- -
-
- - - - - - - - - - - - - - - - - - -
int16_t PhysicalLayer::transmit (String & str,
uint8_t addr = 0 
)
-
- -

Arduino String transmit method.

-
Parameters
- - - -
strAddress of Arduino string that will be transmitted.
addrNode address to transmit the packet to. Only used in FSK mode.
-
-
-
Returns
Status Codes
-
-

◆ transmit() [3/4]

+

◆ transmit() [2/4]

@@ -999,6 +963,44 @@ Public Member Functions
Returns
Status Codes
+
+
+ +

◆ transmit() [3/4]

+ +
+
+ + + + + + + + + + + + + + + + + + +
int16_t PhysicalLayer::transmit (String & str,
uint8_t addr = 0 
)
+
+ +

Arduino String transmit method.

+
Parameters
+ + + +
strAddress of Arduino string that will be transmitted.
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+
@@ -1105,7 +1107,7 @@ Public Member Functions + doxygen 1.8.17 diff --git a/class_physical_layer.js b/class_physical_layer.js index e36a4889..4782e4fa 100644 --- a/class_physical_layer.js +++ b/class_physical_layer.js @@ -3,9 +3,9 @@ var class_physical_layer = [ "PhysicalLayer", "class_physical_layer.html#a5e02457f1d519cf81b1590a182321c62", null ], [ "getFreqStep", "class_physical_layer.html#a977e5236693960bb1c79090a201e9e1c", null ], [ "getPacketLength", "class_physical_layer.html#a0bd6046e068ef63e3f2b6bead48e02a7", null ], + [ "random", "class_physical_layer.html#a5bf5bac5b015aa9312025255ca503d4f", null ], [ "random", "class_physical_layer.html#acd9171bd71aa80fb86113b612c42de53", null ], [ "random", "class_physical_layer.html#a76113e10481743094a1cd0280692b0a9", null ], - [ "random", "class_physical_layer.html#a5bf5bac5b015aa9312025255ca503d4f", null ], [ "readData", "class_physical_layer.html#ae8eed0e888a7c8742e89d2b850977de2", null ], [ "readData", "class_physical_layer.html#ae8b6c756eb4b92855433ca389d73c632", null ], [ "receive", "class_physical_layer.html#afb1b090348d9091bfa3a0b5ba3d85b36", null ], @@ -16,12 +16,12 @@ var class_physical_layer = [ "setFrequencyDeviation", "class_physical_layer.html#ab9060e8ab7a2da192b3bf53b3501553b", null ], [ "standby", "class_physical_layer.html#a0e77da761a2cbb5c9535df0bdea993f9", null ], [ "startDirect", "class_physical_layer.html#a88a10657bd2215a11a2331f937414b55", null ], - [ "startTransmit", "class_physical_layer.html#af068e6e862c99e39d0261a7971dd56db", null ], [ "startTransmit", "class_physical_layer.html#a923654706eff5118ef6e84214e837f27", null ], + [ "startTransmit", "class_physical_layer.html#af068e6e862c99e39d0261a7971dd56db", null ], [ "startTransmit", "class_physical_layer.html#a41a1de0ebffe7b65de6fd8cceb9a5123", null ], [ "transmit", "class_physical_layer.html#ab139a34e03a6fd5a781cd54da21d308f", null ], - [ "transmit", "class_physical_layer.html#aeb62c5a521aafc1e0525c58e9364482b", null ], [ "transmit", "class_physical_layer.html#a492b2d057dd803c3884fa1adc8e22534", null ], + [ "transmit", "class_physical_layer.html#aeb62c5a521aafc1e0525c58e9364482b", null ], [ "transmit", "class_physical_layer.html#af81565ee82ef9a7de9c5663c745f4ef7", null ], [ "transmitDirect", "class_physical_layer.html#a4b04eb6155b06d8ef400131c647d54e7", null ] ]; \ No newline at end of file diff --git a/class_r_f69-members.html b/class_r_f69-members.html index afb0cc19..e565f59f 100644 --- a/class_r_f69-members.html +++ b/class_r_f69-members.html @@ -1,9 +1,9 @@ - + - + RadioLib: Member List @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -107,8 +109,12 @@ $(document).ready(function(){initNavTree('class_r_f69.html','');}); PhysicalLayer::random(int32_t max)PhysicalLayer PhysicalLayer::random(int32_t min, int32_t max)PhysicalLayer readData(uint8_t *data, size_t len) overrideRF69virtual + readData(String &str, size_t len=0)RF69 + readData(uint8_t *data, size_t len)=0RF69 PhysicalLayer::readData(String &str, size_t len=0)PhysicalLayer receive(uint8_t *data, size_t len) overrideRF69virtual + receive(String &str, size_t len=0)RF69 + receive(uint8_t *data, size_t len)=0RF69 PhysicalLayer::receive(String &str, size_t len=0)PhysicalLayer receiveDirect() overrideRF69virtual reset()RF69 @@ -136,14 +142,21 @@ $(document).ready(function(){initNavTree('class_r_f69.html','');}); startDirect()PhysicalLayer startReceive()RF69 startTransmit(uint8_t *data, size_t len, uint8_t addr=0) overrideRF69virtual - PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer - PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer - transmit(uint8_t *data, size_t len, uint8_t addr=0) overrideRF69virtual - PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer - PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer - PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer - transmitDirect(uint32_t frf=0) overrideRF69virtual - variablePacketLengthMode(uint8_t maxLen=RF69_MAX_PACKET_LENGTH)RF69 + startTransmit(String &str, uint8_t addr=0)RF69 + startTransmit(const char *str, uint8_t addr=0)RF69 + startTransmit(uint8_t *data, size_t len, uint8_t addr=0)=0RF69 + PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer + PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer + transmit(uint8_t *data, size_t len, uint8_t addr=0) overrideRF69virtual + transmit(__FlashStringHelper *fstr, uint8_t addr=0)RF69 + transmit(String &str, uint8_t addr=0)RF69 + transmit(const char *str, uint8_t addr=0)RF69 + transmit(uint8_t *data, size_t len, uint8_t addr=0)=0RF69 + PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer + PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer + PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer + transmitDirect(uint32_t frf=0) overrideRF69virtual + variablePacketLengthMode(uint8_t maxLen=RF69_MAX_PACKET_LENGTH)RF69
@@ -151,7 +164,7 @@ $(document).ready(function(){initNavTree('class_r_f69.html','');}); diff --git a/class_r_f69.html b/class_r_f69.html index 58eb266b..228ed0bf 100644 --- a/class_r_f69.html +++ b/class_r_f69.html @@ -1,9 +1,9 @@ - + - + RadioLib: RF69 Class Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -88,7 +90,7 @@ $(document).ready(function(){initNavTree('class_r_f69.html','');});
-

Control class for RF69 module. Also serves as base class for SX1231. +

Control class for RF69 module. Also serves as base class for SX1231. More...

#include <RF69.h>

@@ -98,152 +100,185 @@ Inheritance diagram for RF69:
-PhysicalLayer -SX1231 - -
+PhysicalLayer +SX1231 + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -283,7 +318,7 @@ void 

Public Member Functions

 RF69 (Module *module)
 Default constructor. More...
 Default constructor. More...
 
int16_t begin (float freq=434.0, float br=48.0, float freqDev=50.0, float rxBw=125.0, int8_t power=10, uint8_t preambleLen=16)
 Initialization method. More...
 Initialization method. More...
 
void reset ()
 Reset method. Will reset the chip to the default state using RST pin.
 
int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0) override
 Blocking binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 Blocking binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 
int16_t receive (uint8_t *data, size_t len) override
 Blocking binary receive method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 Blocking binary receive method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 
int16_t sleep ()
 Sets the module to sleep mode. More...
 Sets the module to sleep mode. More...
 
int16_t standby () override
 Sets the module to standby mode. More...
 Sets the module to standby mode. More...
 
int16_t transmitDirect (uint32_t frf=0) override
 Starts direct mode transmission. More...
 Starts direct mode transmission. More...
 
int16_t receiveDirect () override
 Starts direct mode reception. More...
 Starts direct mode reception. More...
 
int16_t packetMode ()
 Stops direct mode. It is required to call this method to switch from direct transmissions to packet-based transmissions.
 
void setAESKey (uint8_t *key)
 Sets AES key. More...
 Sets AES key. More...
 
int16_t enableAES ()
 Enables AES encryption. More...
 Enables AES encryption. More...
 
int16_t disableAES ()
 Disables AES encryption. More...
 Disables AES encryption. More...
 
void setDio0Action (void(*func)(void))
 Sets interrupt service routine to call when DIO0 activates. More...
 Sets interrupt service routine to call when DIO0 activates. More...
 
void clearDio0Action ()
 Clears interrupt service routine to call when DIO0 activates.
 
void setDio1Action (void(*func)(void))
 Sets interrupt service routine to call when DIO1 activates. More...
 Sets interrupt service routine to call when DIO1 activates. More...
 
void clearDio1Action ()
 Clears interrupt service routine to call when DIO1 activates.
 
int16_t startTransmit (uint8_t *data, size_t len, uint8_t addr=0) override
 Interrupt-driven binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 Interrupt-driven binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 
int16_t startReceive ()
 Interrupt-driven receive method. GDO0 will be activated when full packet is received. More...
 Interrupt-driven receive method. GDO0 will be activated when full packet is received. More...
 
int16_t readData (uint8_t *data, size_t len) override
 Reads data received after calling startReceive method. More...
 Reads data received after calling startReceive method. More...
 
int16_t setFrequency (float freq)
 Sets carrier frequency. Allowed values are in bands 290.0 to 340.0 MHz, 431.0 to 510.0 MHz and 862.0 to 1020.0 MHz. More...
 Sets carrier frequency. Allowed values are in bands 290.0 to 340.0 MHz, 431.0 to 510.0 MHz and 862.0 to 1020.0 MHz. More...
 
int16_t setBitRate (float br)
 Sets bit rate. Allowed values range from 1.2 to 300.0 kbps. More...
 Sets bit rate. Allowed values range from 1.2 to 300.0 kbps. More...
 
int16_t setRxBandwidth (float rxBw)
 Sets receiver bandwidth. Allowed values are 2.6, 3.1, 3.9, 5.2, 6.3, 7.8, 10.4, 12.5, 15.6, 20.8, 25.0, 31.3, 41.7, 50.0, 62.5, 83.3, 100.0, 125.0, 166.7, 200.0, 250.0, 333.3, 400.0 and 500.0 kHz. More...
 Sets receiver bandwidth. Allowed values are 2.6, 3.1, 3.9, 5.2, 6.3, 7.8, 10.4, 12.5, 15.6, 20.8, 25.0, 31.3, 41.7, 50.0, 62.5, 83.3, 100.0, 125.0, 166.7, 200.0, 250.0, 333.3, 400.0 and 500.0 kHz. More...
 
int16_t setFrequencyDeviation (float freqDev) override
 Sets frequency deviation. More...
 Sets frequency deviation. More...
 
int16_t setOutputPower (int8_t power, bool highPower=false)
 Sets output power. Allowed values range from -18 to 13 dBm for low power modules (RF69C/CW) or -2 to 20 dBm (RF69H/HC/HCW). More...
 Sets output power. Allowed values range from -18 to 13 dBm for low power modules (RF69C/CW) or -2 to 20 dBm (RF69H/HC/HCW). More...
 
int16_t setSyncWord (uint8_t *syncWord, size_t len, uint8_t maxErrBits=0)
 Sets sync word. Up to 8 bytes can be set as sync word. More...
 Sets sync word. Up to 8 bytes can be set as sync word. More...
 
int16_t setPreambleLength (uint8_t preambleLen)
 Sets preamble length. More...
 Sets preamble length. More...
 
int16_t setNodeAddress (uint8_t nodeAddr)
 Sets node address. Calling this method will also enable address filtering for node address only. More...
 Sets node address. Calling this method will also enable address filtering for node address only. More...
 
int16_t setBroadcastAddress (uint8_t broadAddr)
 Sets broadcast address. Calling this method will also enable address filtering for node and broadcast address. More...
 Sets broadcast address. Calling this method will also enable address filtering for node and broadcast address. More...
 
int16_t disableAddressFiltering ()
 Disables address filtering. Calling this method will also erase previously set addresses. More...
 Disables address filtering. Calling this method will also erase previously set addresses. More...
 
void setAmbientTemperature (int16_t tempAmbient)
 Sets ambient temperature. Required to correct values from on-board temperature sensor. More...
 Sets ambient temperature. Required to correct values from on-board temperature sensor. More...
 
int16_t getTemperature ()
 Measures temperature. More...
 Measures temperature. More...
 
size_t getPacketLength (bool update=true) override
 Query modem for the packet length of received payload. More...
 Query modem for the packet length of received payload. More...
 
int16_t fixedPacketLengthMode (uint8_t len=RF69_MAX_PACKET_LENGTH)
 Set modem in fixed packet length mode. More...
 Set modem in fixed packet length mode. More...
 
int16_t variablePacketLengthMode (uint8_t maxLen=RF69_MAX_PACKET_LENGTH)
 Set modem in variable packet length mode. More...
 Set modem in variable packet length mode. More...
 
int16_t enableSyncWordFiltering (uint8_t maxErrBits=0)
 Enable sync word filtering and generation. More...
 Enable sync word filtering and generation. More...
 
int16_t disableSyncWordFiltering ()
 Disable preamble and sync word filtering and generation. More...
 Disable preamble and sync word filtering and generation. More...
 
int16_t setCrcFiltering (bool crcOn=true)
 Enable CRC filtering and generation. More...
 Enable CRC filtering and generation. More...
 
int16_t setPromiscuousMode (bool promiscuous=true)
 Set modem in "sniff" mode: no packet filtering (e.g., no preamble, sync word, address, CRC). More...
 Set modem in "sniff" mode: no packet filtering (e.g., no preamble, sync word, address, CRC). More...
 
int16_t setDataShaping (uint8_t sh) override
 Sets Gaussian filter bandwidth-time product that will be used for data shaping. Allowed values are RADIOLIB_SHAPING_0_3, RADIOLIB_SHAPING_0_5 or RADIOLIB_SHAPING_1_0. Set to RADIOLIB_SHAPING_NONE to disable data shaping. More...
 Sets Gaussian filter bandwidth-time product that will be used for data shaping. Allowed values are RADIOLIB_SHAPING_0_3, RADIOLIB_SHAPING_0_5 or RADIOLIB_SHAPING_1_0. Set to RADIOLIB_SHAPING_NONE to disable data shaping. More...
 
int16_t setEncoding (uint8_t encoding) override
 Sets transmission encoding. Allowed values are RADIOLIB_ENCODING_NRZ, RADIOLIB_ENCODING_MANCHESTER and RADIOLIB_ENCODING_WHITENING. More...
 Sets transmission encoding. Allowed values are RADIOLIB_ENCODING_NRZ, RADIOLIB_ENCODING_MANCHESTER and RADIOLIB_ENCODING_WHITENING. More...
 
float getRSSI ()
 Gets RSSI (Recorded Signal Strength Indicator) of the last received packet. More...
 Gets RSSI (Recorded Signal Strength Indicator) of the last received packet. More...
 
void setRfSwitchPins (RADIOLIB_PIN_TYPE rxEn, RADIOLIB_PIN_TYPE txEn)
 Some modules contain external RF switch controlled by two pins. This function gives RadioLib control over those two pins to automatically switch Rx and Tx state. When using automatic RF switch control, DO NOT change the pin mode of rxEn or txEn from Arduino sketch! More...
 Some modules contain external RF switch controlled by two pins. This function gives RadioLib control over those two pins to automatically switch Rx and Tx state. When using automatic RF switch control, DO NOT change the pin mode of rxEn or txEn from Arduino sketch! More...
 
uint8_t random ()
 Get one truly random byte from RSSI noise. More...
 Get one truly random byte from RSSI noise. More...
 
int16_t getChipVersion ()
 Read version SPI register. Should return RF69_CHIP_VERSION (0x24) if SX127x is connected and working. More...
 Read version SPI register. Should return RF69_CHIP_VERSION (0x24) if SX127x is connected and working. More...
 
int16_t transmit (__FlashStringHelper *fstr, uint8_t addr=0)
 Arduino Flash String transmit method. More...
 
int16_t transmit (String &str, uint8_t addr=0)
 Arduino String transmit method. More...
 
int16_t transmit (const char *str, uint8_t addr=0)
 C-string transmit method. More...
 
virtual int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Binary transmit method. Must be implemented in module class. More...
 
int16_t receive (String &str, size_t len=0)
 Arduino String receive method. More...
 
virtual int16_t receive (uint8_t *data, size_t len)=0
 Binary receive method. Must be implemented in module class. More...
 
int16_t startTransmit (String &str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
int16_t startTransmit (const char *str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
virtual int16_t startTransmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Interrupt-driven binary transmit method. More...
 
int16_t readData (String &str, size_t len=0)
 Reads data that was received after calling startReceive method. More...
 
virtual int16_t readData (uint8_t *data, size_t len)=0
 Reads data that was received after calling startReceive method. More...
 
- Public Member Functions inherited from PhysicalLayer
 PhysicalLayer (float freqStep, size_t maxPacketLength)
 Default constructor. More...
 

Detailed Description

-

Control class for RF69 module. Also serves as base class for SX1231.

+

Control class for RF69 module. Also serves as base class for SX1231.

Constructor & Destructor Documentation

◆ RF69()

@@ -304,7 +339,7 @@ void 
Parameters
- +
modInstance of Module that will be used to communicate with the radio.
modInstance of Module that will be used to communicate with the radio.
@@ -637,10 +672,34 @@ void 
PhysicalLayer.

+
+ + +

◆ readData() [1/3]

+ +
+
+ + + + +
int16_t PhysicalLayer::readData
+
+ +

Reads data that was received after calling startReceive method.

+
Parameters
+ + + +
strAddress of Arduino String to save the received data.
lenExpected number of characters in the message.
+
+
+
Returns
Status Codes
+
-

◆ readData()

+

◆ readData() [2/3]

@@ -685,10 +744,58 @@ void PhysicalLayer.

+
+
+ +

◆ readData() [3/3]

+ +
+
+ + + + +
virtual int16_t PhysicalLayer::readData
+
+ +

Reads data that was received after calling startReceive method.

+
Parameters
+ + + +
dataPointer to array to save the received binary data.
lenNumber of bytes that will be received. Must be known in advance for binary transmissions.
+
+
+
Returns
Status Codes
+ +
+
+ +

◆ receive() [1/3]

+ +
+
+ + + + +
int16_t PhysicalLayer::receive
+
+ +

Arduino String receive method.

+
Parameters
+ + + +
strAddress of Arduino String to save the received data.
lenExpected number of characters in the message. Leave as 0 if expecting a unknown size packet
+
+
+
Returns
Status Codes
+
-

◆ receive()

+

◆ receive() [2/3]

@@ -721,7 +828,7 @@ void  -

Blocking binary receive method. Overloads for string-based transmissions are implemented in PhysicalLayer.

+

Blocking binary receive method. Overloads for string-based transmissions are implemented in PhysicalLayer.

Parameters
@@ -733,6 +840,30 @@ void 
dataBinary data to be sent.
PhysicalLayer.

+ + + +

◆ receive() [3/3]

+ +
+
+ + + + +
virtual int16_t PhysicalLayer::receive
+
+ +

Binary receive method. Must be implemented in module class.

+
Parameters
+ + + +
dataPointer to array to save the received binary data.
lenNumber of bytes that will be received. Must be known in advance for binary transmissions.
+
+
+
Returns
Status Codes
+
@@ -1383,10 +1514,58 @@ void 
Returns
Status Codes
+ + + +

◆ startTransmit() [1/4]

+ +
+
+ + + + +
int16_t PhysicalLayer::startTransmit
+
+ +

Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes.

+
Parameters
+ + + +
strC-string that will be transmitted.
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+ +
+
+ +

◆ startTransmit() [2/4]

+ +
+
+ + + + +
int16_t PhysicalLayer::startTransmit
+
+ +

Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes.

+
Parameters
+ + + +
strAddress of Arduino String that will be transmitted.
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+
-

◆ startTransmit()

+

◆ startTransmit() [3/4]

@@ -1425,7 +1604,7 @@ void 
-

Interrupt-driven binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer.

+

Interrupt-driven binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer.

Parameters
@@ -1438,10 +1617,107 @@ void 
dataBinary data to be sent.
PhysicalLayer.

+ + + +

◆ startTransmit() [4/4]

+ +
+
+ + + + +
virtual int16_t PhysicalLayer::startTransmit
+
+ +

Interrupt-driven binary transmit method.

+
Parameters
+ + + + +
dataBinary data that will be transmitted.
lenLength of binary data to transmit (in bytes).
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+ +
+
+ +

◆ transmit() [1/5]

+ +
+
+ + + + +
int16_t PhysicalLayer::transmit
+
+ +

Arduino Flash String transmit method.

+
Parameters
+ + + +
strPointer to Arduino Flash String that will be transmitted.
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+ +
+
+ +

◆ transmit() [2/5]

+ +
+
+ + + + +
int16_t PhysicalLayer::transmit
+
+ +

C-string transmit method.

+
Parameters
+ + + +
strC-string that will be transmitted.
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+ +
+
+ +

◆ transmit() [3/5]

+ +
+
+ + + + +
int16_t PhysicalLayer::transmit
+
+ +

Arduino String transmit method.

+
Parameters
+ + + +
strAddress of Arduino string that will be transmitted.
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+
-

◆ transmit()

+

◆ transmit() [4/5]

@@ -1480,7 +1756,7 @@ void 
-

Blocking binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer.

+

Blocking binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer.

Parameters
@@ -1493,6 +1769,31 @@ void 
dataBinary data to be sent.
PhysicalLayer.

+ + + +

◆ transmit() [5/5]

+ +
+
+ + + + +
virtual int16_t PhysicalLayer::transmit
+
+ +

Binary transmit method. Must be implemented in module class.

+
Parameters
+ + + + +
dataBinary data that will be transmitted.
lenLength of binary data to transmit (in bytes).
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+
@@ -1571,7 +1872,7 @@ void 
RF69 + doxygen 1.8.17 diff --git a/class_r_f69.js b/class_r_f69.js index 2e1f2470..b4463051 100644 --- a/class_r_f69.js +++ b/class_r_f69.js @@ -16,8 +16,12 @@ var class_r_f69 = [ "getTemperature", "class_r_f69.html#a0526ce6ea3722fd258f96d9677a60853", null ], [ "packetMode", "class_r_f69.html#a6a67dd698b3cc6afcaf18c3710ad5f0f", null ], [ "random", "class_r_f69.html#a54cd7be92e166659b50bd6ed4433db4c", null ], + [ "readData", "class_r_f69.html#ae8eed0e888a7c8742e89d2b850977de2", null ], [ "readData", "class_r_f69.html#a3983b66c83818b4082805bcafc712f00", null ], + [ "readData", "class_r_f69.html#ae8b6c756eb4b92855433ca389d73c632", null ], + [ "receive", "class_r_f69.html#afb1b090348d9091bfa3a0b5ba3d85b36", null ], [ "receive", "class_r_f69.html#ae36e8e6042245621a182b29526fe2245", null ], + [ "receive", "class_r_f69.html#a2ad4c6a8ac267f8ac590260414ffcda3", null ], [ "receiveDirect", "class_r_f69.html#abd556b0f455f9510213b17588a4baf1b", null ], [ "reset", "class_r_f69.html#af953ee17aca5392f1e62ea4fe690550a", null ], [ "setAESKey", "class_r_f69.html#abe5b378d7cc274fd8b75881e7d604bf3", null ], @@ -41,8 +45,15 @@ var class_r_f69 = [ "sleep", "class_r_f69.html#a472a04041551cb38d2223fb34f71d8eb", null ], [ "standby", "class_r_f69.html#a20242499eb926ff7b7da6e3f74a9ece1", null ], [ "startReceive", "class_r_f69.html#afae38fa64242043de34096bf497725f1", null ], + [ "startTransmit", "class_r_f69.html#a923654706eff5118ef6e84214e837f27", null ], + [ "startTransmit", "class_r_f69.html#af068e6e862c99e39d0261a7971dd56db", null ], [ "startTransmit", "class_r_f69.html#a855dc194947b095b821ec1524ba6814c", null ], + [ "startTransmit", "class_r_f69.html#a41a1de0ebffe7b65de6fd8cceb9a5123", null ], + [ "transmit", "class_r_f69.html#ab139a34e03a6fd5a781cd54da21d308f", null ], + [ "transmit", "class_r_f69.html#a492b2d057dd803c3884fa1adc8e22534", null ], + [ "transmit", "class_r_f69.html#aeb62c5a521aafc1e0525c58e9364482b", null ], [ "transmit", "class_r_f69.html#a09ba80f60ee7974011a4b4f6c18c6847", null ], + [ "transmit", "class_r_f69.html#af81565ee82ef9a7de9c5663c745f4ef7", null ], [ "transmitDirect", "class_r_f69.html#a222682569338abb49d6952430b6eebdd", null ], [ "variablePacketLengthMode", "class_r_f69.html#af62ebde1ea34a394b9781a21ae348c39", null ] ]; \ No newline at end of file diff --git a/class_r_f_m22.html b/class_r_f_m22.html index d0e4fe5f..77982f86 100644 --- a/class_r_f_m22.html +++ b/class_r_f_m22.html @@ -1,9 +1,9 @@ - + - + RadioLib: RFM22 Class Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@
- + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -85,12 +87,12 @@ $(document).ready(function(){initNavTree('class_r_f_m22.html','');});
-

Only exists as alias for Si4432, since there seems to be no difference between RFM22 and Si4432 modules. +

Only exists as alias for Si4432, since there seems to be no difference between RFM22 and Si4432 modules. More...

#include <RFM22.h>

Detailed Description

-

Only exists as alias for Si4432, since there seems to be no difference between RFM22 and Si4432 modules.

+

Only exists as alias for Si4432, since there seems to be no difference between RFM22 and Si4432 modules.


The documentation for this class was generated from the following file: @@ -102,7 +104,7 @@ $(document).ready(function(){initNavTree('class_r_f_m22.html','');}); + doxygen 1.8.17
diff --git a/class_r_f_m23.html b/class_r_f_m23.html index 4982f65c..cf6e5e98 100644 --- a/class_r_f_m23.html +++ b/class_r_f_m23.html @@ -1,9 +1,9 @@ - + - + RadioLib: RFM23 Class Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@
- + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -85,12 +87,12 @@ $(document).ready(function(){initNavTree('class_r_f_m23.html','');});
-

Only exists as alias for Si4431, since there seems to be no difference between RFM23 and Si4431 modules. +

Only exists as alias for Si4431, since there seems to be no difference between RFM23 and Si4431 modules. More...

#include <RFM23.h>

Detailed Description

-

Only exists as alias for Si4431, since there seems to be no difference between RFM23 and Si4431 modules.

+

Only exists as alias for Si4431, since there seems to be no difference between RFM23 and Si4431 modules.


The documentation for this class was generated from the following file: @@ -102,7 +104,7 @@ $(document).ready(function(){initNavTree('class_r_f_m23.html','');}); + doxygen 1.8.17
diff --git a/class_r_f_m95-members.html b/class_r_f_m95-members.html index 6cb707c5..ea2a7787 100644 --- a/class_r_f_m95-members.html +++ b/class_r_f_m95-members.html @@ -1,9 +1,9 @@ - + - + RadioLib: Member List @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@
- + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -116,8 +118,12 @@ $(document).ready(function(){initNavTree('class_r_f_m95.html','');}); PhysicalLayer::random(int32_t max)PhysicalLayer PhysicalLayer::random(int32_t min, int32_t max)PhysicalLayer readData(uint8_t *data, size_t len) overrideSX127xvirtual + readData(String &str, size_t len=0)SX127x + readData(uint8_t *data, size_t len)=0SX127x PhysicalLayer::readData(String &str, size_t len=0)PhysicalLayer receive(uint8_t *data, size_t len) overrideSX127xvirtual + receive(String &str, size_t len=0)SX127x + receive(uint8_t *data, size_t len)=0SX127x PhysicalLayer::receive(String &str, size_t len=0)PhysicalLayer receiveDirect() overrideSX127xvirtual reset() overrideSX1278virtual @@ -152,16 +158,23 @@ $(document).ready(function(){initNavTree('class_r_f_m95.html','');}); startDirect()PhysicalLayer startReceive(uint8_t len=0, uint8_t mode=SX127X_RXCONTINUOUS)SX127x startTransmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX127xvirtual - PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer - PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer - SX1278(Module *mod)SX1278 - SX127x(Module *mod)SX127x - transmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX127xvirtual - PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer - PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer - PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer - transmitDirect(uint32_t frf=0) overrideSX127xvirtual - variablePacketLengthMode(uint8_t maxLen=SX127X_MAX_PACKET_LENGTH_FSK)SX127x + startTransmit(String &str, uint8_t addr=0)SX127x + startTransmit(const char *str, uint8_t addr=0)SX127x + startTransmit(uint8_t *data, size_t len, uint8_t addr=0)=0SX127x + PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer + PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer + SX1278(Module *mod)SX1278 + SX127x(Module *mod)SX127x + transmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX127xvirtual + transmit(__FlashStringHelper *fstr, uint8_t addr=0)SX127x + transmit(String &str, uint8_t addr=0)SX127x + transmit(const char *str, uint8_t addr=0)SX127x + transmit(uint8_t *data, size_t len, uint8_t addr=0)=0SX127x + PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer + PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer + PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer + transmitDirect(uint32_t frf=0) overrideSX127xvirtual + variablePacketLengthMode(uint8_t maxLen=SX127X_MAX_PACKET_LENGTH_FSK)SX127x
@@ -169,7 +182,7 @@ $(document).ready(function(){initNavTree('class_r_f_m95.html','');}); diff --git a/class_r_f_m95.html b/class_r_f_m95.html index 49485109..8767f781 100644 --- a/class_r_f_m95.html +++ b/class_r_f_m95.html @@ -1,9 +1,9 @@ - + - + RadioLib: RFM95 Class Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -88,7 +90,7 @@ $(document).ready(function(){initNavTree('class_r_f_m95.html','');});
-

Derived class for RFM95 modules. Overrides some methods from SX1278 due to different parameter ranges. +

Derived class for RFM95 modules. Overrides some methods from SX1278 due to different parameter ranges. More...

#include <RFM95.h>

@@ -98,23 +100,23 @@ Inheritance diagram for RFM95:
-SX1278 +SX1278 SX127x -PhysicalLayer -RFM97 - -
+PhysicalLayer +RFM97 + + - + - + - + @@ -161,7 +163,7 @@ void  - + @@ -183,10 +185,10 @@ void  - + - + @@ -307,6 +309,39 @@ void  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -346,7 +381,7 @@ void 

Public Member Functions

 RFM95 (Module *mod)
 Default constructor. Called from Arduino sketch when creating new LoRa instance. More...
 Default constructor. Called from Arduino sketch when creating new LoRa instance. More...
 
int16_t begin (float freq=915.0, float bw=125.0, uint8_t sf=9, uint8_t cr=7, uint8_t syncWord=SX127X_SYNC_WORD, int8_t power=10, uint16_t preambleLength=8, uint8_t gain=0)
 LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the module. More...
 LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the module. More...
 
int16_t setFrequency (float freq)
 Sets carrier frequency. Allowed values range from 868.0 MHz to 915.0 MHz. More...
 Sets carrier frequency. Allowed values range from 868.0 MHz to 915.0 MHz. More...
 
- Public Member Functions inherited from SX1278
 SX1278 (Module *mod)
 Enables/disables CRC check of received packets. More...
 
int16_t forceLDRO (bool enable)
 Forces LoRa low data rate optimization. Only available in LoRa mode. After calling this method, LDRO will always be set to the provided value, regardless of symbol length. To re-enable automatic LDRO configuration, call SX1278::autoLDRO() More...
 Forces LoRa low data rate optimization. Only available in LoRa mode. After calling this method, LDRO will always be set to the provided value, regardless of symbol length. To re-enable automatic LDRO configuration, call SX1278::autoLDRO() More...
 
int16_t autoLDRO ()
 Re-enables automatic LDRO configuration. Only available in LoRa mode. After calling this method, LDRO will be enabled automatically when symbol length exceeds 16 ms. More...
 Initialization method for FSK modem. Will be called with appropriate parameters when calling FSK initialization method from derived class. More...
 
int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0) override
 Binary transmit method. Will transmit arbitrary binary data up to 255 bytes long using LoRa or up to 63 bytes using FSK modem. For overloads to transmit Arduino String or C-string, see PhysicalLayer::transmit. More...
 Binary transmit method. Will transmit arbitrary binary data up to 255 bytes long using LoRa or up to 63 bytes using FSK modem. For overloads to transmit Arduino String or C-string, see PhysicalLayer::transmit. More...
 
int16_t receive (uint8_t *data, size_t len) override
 Binary receive method. Will attempt to receive arbitrary binary data up to 255 bytes long using LoRa or up to 63 bytes using FSK modem. For overloads to receive Arduino String, see PhysicalLayer::receive. More...
 Binary receive method. Will attempt to receive arbitrary binary data up to 255 bytes long using LoRa or up to 63 bytes using FSK modem. For overloads to receive Arduino String, see PhysicalLayer::receive. More...
 
int16_t scanChannel ()
 Performs scan for valid LoRa preamble in the current channel. More...
int16_t invertIQ (bool invertIQ)
 Enables/disables Invert the LoRa I and Q signals. More...
 
int16_t transmit (__FlashStringHelper *fstr, uint8_t addr=0)
 Arduino Flash String transmit method. More...
 
int16_t transmit (String &str, uint8_t addr=0)
 Arduino String transmit method. More...
 
int16_t transmit (const char *str, uint8_t addr=0)
 C-string transmit method. More...
 
virtual int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Binary transmit method. Must be implemented in module class. More...
 
int16_t receive (String &str, size_t len=0)
 Arduino String receive method. More...
 
virtual int16_t receive (uint8_t *data, size_t len)=0
 Binary receive method. Must be implemented in module class. More...
 
int16_t startTransmit (String &str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
int16_t startTransmit (const char *str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
virtual int16_t startTransmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Interrupt-driven binary transmit method. More...
 
int16_t readData (String &str, size_t len=0)
 Reads data that was received after calling startReceive method. More...
 
virtual int16_t readData (uint8_t *data, size_t len)=0
 Reads data that was received after calling startReceive method. More...
 
- Public Member Functions inherited from PhysicalLayer
 PhysicalLayer (float freqStep, size_t maxPacketLength)
 Default constructor. More...
 

Detailed Description

-

Derived class for RFM95 modules. Overrides some methods from SX1278 due to different parameter ranges.

+

Derived class for RFM95 modules. Overrides some methods from SX1278 due to different parameter ranges.

Constructor & Destructor Documentation

◆ RFM95()

@@ -367,7 +402,7 @@ void 
Parameters
- +
modInstance of Module that will be used to communicate with the LoRa chip.
modInstance of Module that will be used to communicate with the LoRa chip.
@@ -494,7 +529,7 @@ void 
RFM95 + doxygen 1.8.17
diff --git a/class_r_f_m96-members.html b/class_r_f_m96-members.html index be7a0b53..9f96ea7e 100644 --- a/class_r_f_m96-members.html +++ b/class_r_f_m96-members.html @@ -1,9 +1,9 @@ - + - + RadioLib: Member List @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -116,8 +118,12 @@ $(document).ready(function(){initNavTree('class_r_f_m96.html','');}); PhysicalLayer::random(int32_t max)PhysicalLayer PhysicalLayer::random(int32_t min, int32_t max)PhysicalLayer readData(uint8_t *data, size_t len) overrideSX127xvirtual + readData(String &str, size_t len=0)SX127x + readData(uint8_t *data, size_t len)=0SX127x PhysicalLayer::readData(String &str, size_t len=0)PhysicalLayer receive(uint8_t *data, size_t len) overrideSX127xvirtual + receive(String &str, size_t len=0)SX127x + receive(uint8_t *data, size_t len)=0SX127x PhysicalLayer::receive(String &str, size_t len=0)PhysicalLayer receiveDirect() overrideSX127xvirtual reset() overrideSX1278virtual @@ -152,16 +158,23 @@ $(document).ready(function(){initNavTree('class_r_f_m96.html','');}); startDirect()PhysicalLayer startReceive(uint8_t len=0, uint8_t mode=SX127X_RXCONTINUOUS)SX127x startTransmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX127xvirtual - PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer - PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer - SX1278(Module *mod)SX1278 - SX127x(Module *mod)SX127x - transmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX127xvirtual - PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer - PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer - PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer - transmitDirect(uint32_t frf=0) overrideSX127xvirtual - variablePacketLengthMode(uint8_t maxLen=SX127X_MAX_PACKET_LENGTH_FSK)SX127x + startTransmit(String &str, uint8_t addr=0)SX127x + startTransmit(const char *str, uint8_t addr=0)SX127x + startTransmit(uint8_t *data, size_t len, uint8_t addr=0)=0SX127x + PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer + PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer + SX1278(Module *mod)SX1278 + SX127x(Module *mod)SX127x + transmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX127xvirtual + transmit(__FlashStringHelper *fstr, uint8_t addr=0)SX127x + transmit(String &str, uint8_t addr=0)SX127x + transmit(const char *str, uint8_t addr=0)SX127x + transmit(uint8_t *data, size_t len, uint8_t addr=0)=0SX127x + PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer + PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer + PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer + transmitDirect(uint32_t frf=0) overrideSX127xvirtual + variablePacketLengthMode(uint8_t maxLen=SX127X_MAX_PACKET_LENGTH_FSK)SX127x
@@ -169,7 +182,7 @@ $(document).ready(function(){initNavTree('class_r_f_m96.html','');}); diff --git a/class_r_f_m96.html b/class_r_f_m96.html index 711800c5..c63e99ac 100644 --- a/class_r_f_m96.html +++ b/class_r_f_m96.html @@ -1,9 +1,9 @@ - + - + RadioLib: RFM96 Class Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -88,7 +90,7 @@ $(document).ready(function(){initNavTree('class_r_f_m96.html','');});
-

Derived class for RFM96 modules. Overrides some methods from SX1278 due to different parameter ranges. +

Derived class for RFM96 modules. Overrides some methods from SX1278 due to different parameter ranges. More...

#include <RFM96.h>

@@ -98,22 +100,22 @@ Inheritance diagram for RFM96:
-SX1278 +SX1278 SX127x -PhysicalLayer - -
+PhysicalLayer + + - + - + - + @@ -160,7 +162,7 @@ void  - + @@ -182,10 +184,10 @@ void  - + - + @@ -306,6 +308,39 @@ void  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -345,7 +380,7 @@ void 

Public Member Functions

 RFM96 (Module *mod)
 Default constructor. Called from Arduino sketch when creating new LoRa instance. More...
 Default constructor. Called from Arduino sketch when creating new LoRa instance. More...
 
int16_t begin (float freq=434.0, float bw=125.0, uint8_t sf=9, uint8_t cr=7, uint8_t syncWord=SX127X_SYNC_WORD, int8_t power=10, uint16_t preambleLength=8, uint8_t gain=0)
 LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the module. More...
 LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the module. More...
 
int16_t setFrequency (float freq)
 Sets carrier frequency. Allowed values range from 433.0 MHz to 470.0 MHz. More...
 Sets carrier frequency. Allowed values range from 433.0 MHz to 470.0 MHz. More...
 
- Public Member Functions inherited from SX1278
 SX1278 (Module *mod)
 Enables/disables CRC check of received packets. More...
 
int16_t forceLDRO (bool enable)
 Forces LoRa low data rate optimization. Only available in LoRa mode. After calling this method, LDRO will always be set to the provided value, regardless of symbol length. To re-enable automatic LDRO configuration, call SX1278::autoLDRO() More...
 Forces LoRa low data rate optimization. Only available in LoRa mode. After calling this method, LDRO will always be set to the provided value, regardless of symbol length. To re-enable automatic LDRO configuration, call SX1278::autoLDRO() More...
 
int16_t autoLDRO ()
 Re-enables automatic LDRO configuration. Only available in LoRa mode. After calling this method, LDRO will be enabled automatically when symbol length exceeds 16 ms. More...
 Initialization method for FSK modem. Will be called with appropriate parameters when calling FSK initialization method from derived class. More...
 
int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0) override
 Binary transmit method. Will transmit arbitrary binary data up to 255 bytes long using LoRa or up to 63 bytes using FSK modem. For overloads to transmit Arduino String or C-string, see PhysicalLayer::transmit. More...
 Binary transmit method. Will transmit arbitrary binary data up to 255 bytes long using LoRa or up to 63 bytes using FSK modem. For overloads to transmit Arduino String or C-string, see PhysicalLayer::transmit. More...
 
int16_t receive (uint8_t *data, size_t len) override
 Binary receive method. Will attempt to receive arbitrary binary data up to 255 bytes long using LoRa or up to 63 bytes using FSK modem. For overloads to receive Arduino String, see PhysicalLayer::receive. More...
 Binary receive method. Will attempt to receive arbitrary binary data up to 255 bytes long using LoRa or up to 63 bytes using FSK modem. For overloads to receive Arduino String, see PhysicalLayer::receive. More...
 
int16_t scanChannel ()
 Performs scan for valid LoRa preamble in the current channel. More...
int16_t invertIQ (bool invertIQ)
 Enables/disables Invert the LoRa I and Q signals. More...
 
int16_t transmit (__FlashStringHelper *fstr, uint8_t addr=0)
 Arduino Flash String transmit method. More...
 
int16_t transmit (String &str, uint8_t addr=0)
 Arduino String transmit method. More...
 
int16_t transmit (const char *str, uint8_t addr=0)
 C-string transmit method. More...
 
virtual int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Binary transmit method. Must be implemented in module class. More...
 
int16_t receive (String &str, size_t len=0)
 Arduino String receive method. More...
 
virtual int16_t receive (uint8_t *data, size_t len)=0
 Binary receive method. Must be implemented in module class. More...
 
int16_t startTransmit (String &str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
int16_t startTransmit (const char *str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
virtual int16_t startTransmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Interrupt-driven binary transmit method. More...
 
int16_t readData (String &str, size_t len=0)
 Reads data that was received after calling startReceive method. More...
 
virtual int16_t readData (uint8_t *data, size_t len)=0
 Reads data that was received after calling startReceive method. More...
 
- Public Member Functions inherited from PhysicalLayer
 PhysicalLayer (float freqStep, size_t maxPacketLength)
 Default constructor. More...
 

Detailed Description

-

Derived class for RFM96 modules. Overrides some methods from SX1278 due to different parameter ranges.

+

Derived class for RFM96 modules. Overrides some methods from SX1278 due to different parameter ranges.

Constructor & Destructor Documentation

◆ RFM96()

@@ -366,7 +401,7 @@ void 
Parameters
- +
modInstance of Module that will be used to communicate with the LoRa chip.
modInstance of Module that will be used to communicate with the LoRa chip.
@@ -493,7 +528,7 @@ void 
RFM96 + doxygen 1.8.17
diff --git a/class_r_f_m97-members.html b/class_r_f_m97-members.html index 1b4e9324..0493d299 100644 --- a/class_r_f_m97-members.html +++ b/class_r_f_m97-members.html @@ -1,9 +1,9 @@ - + - + RadioLib: Member List @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -116,8 +118,12 @@ $(document).ready(function(){initNavTree('class_r_f_m97.html','');}); PhysicalLayer::random(int32_t max)PhysicalLayer PhysicalLayer::random(int32_t min, int32_t max)PhysicalLayer readData(uint8_t *data, size_t len) overrideSX127xvirtual + readData(String &str, size_t len=0)SX127x + readData(uint8_t *data, size_t len)=0SX127x PhysicalLayer::readData(String &str, size_t len=0)PhysicalLayer receive(uint8_t *data, size_t len) overrideSX127xvirtual + receive(String &str, size_t len=0)SX127x + receive(uint8_t *data, size_t len)=0SX127x PhysicalLayer::receive(String &str, size_t len=0)PhysicalLayer receiveDirect() overrideSX127xvirtual reset() overrideSX1278virtual @@ -153,16 +159,23 @@ $(document).ready(function(){initNavTree('class_r_f_m97.html','');}); startDirect()PhysicalLayer startReceive(uint8_t len=0, uint8_t mode=SX127X_RXCONTINUOUS)SX127x startTransmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX127xvirtual - PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer - PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer - SX1278(Module *mod)SX1278 - SX127x(Module *mod)SX127x - transmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX127xvirtual - PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer - PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer - PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer - transmitDirect(uint32_t frf=0) overrideSX127xvirtual - variablePacketLengthMode(uint8_t maxLen=SX127X_MAX_PACKET_LENGTH_FSK)SX127x + startTransmit(String &str, uint8_t addr=0)SX127x + startTransmit(const char *str, uint8_t addr=0)SX127x + startTransmit(uint8_t *data, size_t len, uint8_t addr=0)=0SX127x + PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer + PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer + SX1278(Module *mod)SX1278 + SX127x(Module *mod)SX127x + transmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX127xvirtual + transmit(__FlashStringHelper *fstr, uint8_t addr=0)SX127x + transmit(String &str, uint8_t addr=0)SX127x + transmit(const char *str, uint8_t addr=0)SX127x + transmit(uint8_t *data, size_t len, uint8_t addr=0)=0SX127x + PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer + PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer + PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer + transmitDirect(uint32_t frf=0) overrideSX127xvirtual + variablePacketLengthMode(uint8_t maxLen=SX127X_MAX_PACKET_LENGTH_FSK)SX127x
@@ -170,7 +183,7 @@ $(document).ready(function(){initNavTree('class_r_f_m97.html','');}); diff --git a/class_r_f_m97.html b/class_r_f_m97.html index 86a1ae19..9b3e1163 100644 --- a/class_r_f_m97.html +++ b/class_r_f_m97.html @@ -1,9 +1,9 @@ - + - + RadioLib: RFM97 Class Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -99,19 +101,19 @@ Inheritance diagram for RFM97:
RFM95 -SX1278 +SX1278 SX127x -PhysicalLayer - - +PhysicalLayer + + - + - + @@ -168,7 +170,7 @@ void  - + @@ -190,10 +192,10 @@ void  - + - + @@ -314,6 +316,39 @@ void  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -374,7 +409,7 @@ void 

Public Member Functions

 RFM97 (Module *mod)
 Default constructor. Called from Arduino sketch when creating new LoRa instance. More...
 Default constructor. Called from Arduino sketch when creating new LoRa instance. More...
 
int16_t setSpreadingFactor (uint8_t sf)
 Sets LoRa link spreading factor. Allowed values range from 6 to 9. Only available in LoRa mode. More...
 Sets LoRa link spreading factor. Allowed values range from 6 to 9. Only available in LoRa mode. More...
 
- Public Member Functions inherited from RFM95
 RFM95 (Module *mod)
 Enables/disables CRC check of received packets. More...
 
int16_t forceLDRO (bool enable)
 Forces LoRa low data rate optimization. Only available in LoRa mode. After calling this method, LDRO will always be set to the provided value, regardless of symbol length. To re-enable automatic LDRO configuration, call SX1278::autoLDRO() More...
 Forces LoRa low data rate optimization. Only available in LoRa mode. After calling this method, LDRO will always be set to the provided value, regardless of symbol length. To re-enable automatic LDRO configuration, call SX1278::autoLDRO() More...
 
int16_t autoLDRO ()
 Re-enables automatic LDRO configuration. Only available in LoRa mode. After calling this method, LDRO will be enabled automatically when symbol length exceeds 16 ms. More...
 Initialization method for FSK modem. Will be called with appropriate parameters when calling FSK initialization method from derived class. More...
 
int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0) override
 Binary transmit method. Will transmit arbitrary binary data up to 255 bytes long using LoRa or up to 63 bytes using FSK modem. For overloads to transmit Arduino String or C-string, see PhysicalLayer::transmit. More...
 Binary transmit method. Will transmit arbitrary binary data up to 255 bytes long using LoRa or up to 63 bytes using FSK modem. For overloads to transmit Arduino String or C-string, see PhysicalLayer::transmit. More...
 
int16_t receive (uint8_t *data, size_t len) override
 Binary receive method. Will attempt to receive arbitrary binary data up to 255 bytes long using LoRa or up to 63 bytes using FSK modem. For overloads to receive Arduino String, see PhysicalLayer::receive. More...
 Binary receive method. Will attempt to receive arbitrary binary data up to 255 bytes long using LoRa or up to 63 bytes using FSK modem. For overloads to receive Arduino String, see PhysicalLayer::receive. More...
 
int16_t scanChannel ()
 Performs scan for valid LoRa preamble in the current channel. More...
int16_t invertIQ (bool invertIQ)
 Enables/disables Invert the LoRa I and Q signals. More...
 
int16_t transmit (__FlashStringHelper *fstr, uint8_t addr=0)
 Arduino Flash String transmit method. More...
 
int16_t transmit (String &str, uint8_t addr=0)
 Arduino String transmit method. More...
 
int16_t transmit (const char *str, uint8_t addr=0)
 C-string transmit method. More...
 
virtual int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Binary transmit method. Must be implemented in module class. More...
 
int16_t receive (String &str, size_t len=0)
 Arduino String receive method. More...
 
virtual int16_t receive (uint8_t *data, size_t len)=0
 Binary receive method. Must be implemented in module class. More...
 
int16_t startTransmit (String &str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
int16_t startTransmit (const char *str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
virtual int16_t startTransmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Interrupt-driven binary transmit method. More...
 
int16_t readData (String &str, size_t len=0)
 Reads data that was received after calling startReceive method. More...
 
virtual int16_t readData (uint8_t *data, size_t len)=0
 Reads data that was received after calling startReceive method. More...
 
- Public Member Functions inherited from PhysicalLayer
 PhysicalLayer (float freqStep, size_t maxPacketLength)
 Default constructor. More...
Parameters
- +
modInstance of Module that will be used to communicate with the LoRa chip.
modInstance of Module that will be used to communicate with the LoRa chip.
@@ -421,7 +456,7 @@ void 
RFM97 + doxygen 1.8.17 diff --git a/class_r_f_m98.html b/class_r_f_m98.html index 9584db34..37281e85 100644 --- a/class_r_f_m98.html +++ b/class_r_f_m98.html @@ -1,9 +1,9 @@ - + - + RadioLib: RFM98 Class Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@
- + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -102,7 +104,7 @@ $(document).ready(function(){initNavTree('class_r_f_m98.html','');}); + doxygen 1.8.17
diff --git a/class_r_t_t_y_client-members.html b/class_r_t_t_y_client-members.html index 385823fa..721ea360 100644 --- a/class_r_t_t_y_client-members.html +++ b/class_r_t_t_y_client-members.html @@ -1,9 +1,9 @@ - + - + RadioLib: Member List @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -124,7 +126,7 @@ $(document).ready(function(){initNavTree('class_r_t_t_y_client.html','');});
diff --git a/class_r_t_t_y_client.html b/class_r_t_t_y_client.html index 680e8d09..0d532ad9 100644 --- a/class_r_t_t_y_client.html +++ b/class_r_t_t_y_client.html @@ -1,9 +1,9 @@ - + - + RadioLib: RTTYClient Class Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -96,13 +98,13 @@ $(document).ready(function(){initNavTree('class_r_t_t_y_client.html','');});

Public Member Functions

 RTTYClient (PhysicalLayer *phy) - Constructor for 2-FSK mode. More...
+ Constructor for 2-FSK mode. More...
   RTTYClient (AFSKClient *audio) - Constructor for AFSK mode. More...
+ Constructor for AFSK mode. More...
  int16_t begin (float base, uint32_t shift, uint16_t rate, uint8_t encoding=ASCII, uint8_t stopBits=1) - Initialization method. More...
+ Initialization method. More...
  void idle () @@ -217,7 +219,7 @@ size_t println (double

Constructor for 2-FSK mode.

Parameters
- +
phyPointer to the wireless module providing PhysicalLayer communication.
phyPointer to the wireless module providing PhysicalLayer communication.
@@ -330,7 +332,7 @@ size_t println (double + doxygen 1.8.17
diff --git a/class_r_t_t_y_client.js b/class_r_t_t_y_client.js index 8d111395..7fa6113e 100644 --- a/class_r_t_t_y_client.js +++ b/class_r_t_t_y_client.js @@ -5,28 +5,28 @@ var class_r_t_t_y_client = [ "begin", "class_r_t_t_y_client.html#ad8856bc336b9a70f8239084740c22c10", null ], [ "idle", "class_r_t_t_y_client.html#ac477e65ea756e56bb9043d778a51b4bc", null ], [ "print", "class_r_t_t_y_client.html#ab31265a133757ae99b1fd6de074a1824", null ], - [ "print", "class_r_t_t_y_client.html#a7f45fcc2c241a95939d34560f5631664", null ], - [ "print", "class_r_t_t_y_client.html#a0b131a635864b56e8e4ed7450d69c593", null ], - [ "print", "class_r_t_t_y_client.html#a05633ffc5007424aaa97b55f9bb4832f", null ], [ "print", "class_r_t_t_y_client.html#a5fc5f8235ec0a330ae602b162e09c8bb", null ], - [ "print", "class_r_t_t_y_client.html#a59962fb30c431d5e975cd82fcfb0b86d", null ], - [ "print", "class_r_t_t_y_client.html#ac6b22c13d227bca5ac80ce3fa855f75a", null ], - [ "print", "class_r_t_t_y_client.html#a3854b00703118c3f024eb032216b3d6d", null ], - [ "print", "class_r_t_t_y_client.html#a523a0617c3729989e18405096e5283d5", null ], - [ "print", "class_r_t_t_y_client.html#a4dc1637ed62069b787d27779c7a5982f", null ], + [ "print", "class_r_t_t_y_client.html#a05633ffc5007424aaa97b55f9bb4832f", null ], + [ "print", "class_r_t_t_y_client.html#a0b131a635864b56e8e4ed7450d69c593", null ], [ "print", "class_r_t_t_y_client.html#a7a2c72461356b6569a2076436a14d94b", null ], - [ "println", "class_r_t_t_y_client.html#ac5d60281fe24f0724ffd727034d2851d", null ], + [ "print", "class_r_t_t_y_client.html#ac6b22c13d227bca5ac80ce3fa855f75a", null ], + [ "print", "class_r_t_t_y_client.html#a7f45fcc2c241a95939d34560f5631664", null ], + [ "print", "class_r_t_t_y_client.html#a523a0617c3729989e18405096e5283d5", null ], + [ "print", "class_r_t_t_y_client.html#a59962fb30c431d5e975cd82fcfb0b86d", null ], + [ "print", "class_r_t_t_y_client.html#a3854b00703118c3f024eb032216b3d6d", null ], + [ "print", "class_r_t_t_y_client.html#a4dc1637ed62069b787d27779c7a5982f", null ], [ "println", "class_r_t_t_y_client.html#a7201a35a28f1c43ab16c71b69153e232", null ], - [ "println", "class_r_t_t_y_client.html#a02feea7bcdeaee42f91507d34399777d", null ], - [ "println", "class_r_t_t_y_client.html#af51f7af5ca169a1dcfab604789b466dc", null ], - [ "println", "class_r_t_t_y_client.html#a7ec7cc1dd981198972a0d4ad031dd987", null ], [ "println", "class_r_t_t_y_client.html#a9086c57441dc8712d940a0186e3c573e", null ], - [ "println", "class_r_t_t_y_client.html#a73281624d10f9c05810527f4762fdeb9", null ], - [ "println", "class_r_t_t_y_client.html#ac1ce7543eccd14a22865c1cb7b1bc69f", null ], - [ "println", "class_r_t_t_y_client.html#a56981a884b5d76d820493dddb7d605ec", null ], - [ "println", "class_r_t_t_y_client.html#a6c005f4bf067d1bfa6ef7793ffb25d16", null ], - [ "println", "class_r_t_t_y_client.html#a4cdfebbf555f3e02e650df8eef2386b8", null ], + [ "println", "class_r_t_t_y_client.html#a7ec7cc1dd981198972a0d4ad031dd987", null ], + [ "println", "class_r_t_t_y_client.html#af51f7af5ca169a1dcfab604789b466dc", null ], [ "println", "class_r_t_t_y_client.html#ae4f9506d85cde12c8265d71b5088dec6", null ], + [ "println", "class_r_t_t_y_client.html#ac1ce7543eccd14a22865c1cb7b1bc69f", null ], + [ "println", "class_r_t_t_y_client.html#a02feea7bcdeaee42f91507d34399777d", null ], + [ "println", "class_r_t_t_y_client.html#a6c005f4bf067d1bfa6ef7793ffb25d16", null ], + [ "println", "class_r_t_t_y_client.html#a73281624d10f9c05810527f4762fdeb9", null ], + [ "println", "class_r_t_t_y_client.html#a56981a884b5d76d820493dddb7d605ec", null ], + [ "println", "class_r_t_t_y_client.html#a4cdfebbf555f3e02e650df8eef2386b8", null ], + [ "println", "class_r_t_t_y_client.html#ac5d60281fe24f0724ffd727034d2851d", null ], [ "write", "class_r_t_t_y_client.html#a094aa9c3506c0620d01e9c5e04a60e3e", null ], [ "write", "class_r_t_t_y_client.html#a49169d8cf3b4121f6930a9c70e3dc9dc", null ], [ "write", "class_r_t_t_y_client.html#a077a21423deee0393cead0b3a239691f", null ] diff --git a/class_s_s_t_v_client-members.html b/class_s_s_t_v_client-members.html index 537a0e93..72feb1f2 100644 --- a/class_s_s_t_v_client-members.html +++ b/class_s_s_t_v_client-members.html @@ -1,9 +1,9 @@ - + - + RadioLib: Member List @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -102,7 +104,7 @@ $(document).ready(function(){initNavTree('class_s_s_t_v_client.html','');});
diff --git a/class_s_s_t_v_client.html b/class_s_s_t_v_client.html index 43e0347b..ec6c24f2 100644 --- a/class_s_s_t_v_client.html +++ b/class_s_s_t_v_client.html @@ -1,9 +1,9 @@ - + - + RadioLib: SSTVClient Class Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -96,16 +98,16 @@ $(document).ready(function(){initNavTree('class_s_s_t_v_client.html','');});

Public Member Functions

 SSTVClient (PhysicalLayer *phy) - Constructor for 2-FSK mode. More...
+ Constructor for 2-FSK mode. More...
   SSTVClient (AFSKClient *audio) - Constructor for AFSK mode. More...
+ Constructor for AFSK mode. More...
  int16_t begin (float base, const SSTVMode_t &mode, float correction=1.0) - Initialization method for 2-FSK. More...
+ Initialization method for 2-FSK. More...
  int16_t begin (const SSTVMode_t &mode, float correction=1.0) - Initialization method for AFSK. More...
+ Initialization method for AFSK. More...
  void idle () @@ -116,10 +118,10 @@ void  Sends synchronization header for the SSTV mode set in begin method.
  void 
sendLine (uint32_t *imgLine) - Sends single picture line in the currently configured SSTV mode. More...
+ Sends single picture line in the currently configured SSTV mode. More...
  uint16_t getPictureHeight () const - Get picture height of the currently configured SSTV mode. More...
+ Get picture height of the currently configured SSTV mode. More...
 

Detailed Description

@@ -152,7 +154,7 @@ void 
Parameters
- +
phyPointer to the wireless module providing PhysicalLayer communication.
phyPointer to the wireless module providing PhysicalLayer communication.
@@ -194,8 +196,46 @@ void 
Member Function Documentation + +

◆ begin() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
int16_t SSTVClient::begin (const SSTVMode_tmode,
float correction = 1.0 
)
+
+ +

Initialization method for AFSK.

+
Parameters
+ + + +
modeSSTV mode to be used. Currently supported modes are Scottie1, Scottie2, ScottieDX, Martin1, Martin2, Wrasse, PasokonP3, PasokonP5 and PasokonP7.
correctionTiming correction factor, used to adjust the length of timing pulses. Less than 1.0 leads to shorter timing pulses, defaults to 1.0 (no correction).
+
+
+
Returns
Status Codes
+ +
+
-

◆ begin() [1/2]

+

◆ begin() [2/2]

@@ -237,44 +277,6 @@ void 
Returns
Status Codes
-
-
- -

◆ begin() [2/2]

- -
-
- - - - - - - - - - - - - - - - - - -
int16_t SSTVClient::begin (const SSTVMode_tmode,
float correction = 1.0 
)
-
- -

Initialization method for AFSK.

-
Parameters
- - - -
modeSSTV mode to be used. Currently supported modes are Scottie1, Scottie2, ScottieDX, Martin1, Martin2, Wrasse, PasokonP3, PasokonP5 and PasokonP7.
correctionTiming correction factor, used to adjust the length of timing pulses. Less than 1.0 leads to shorter timing pulses, defaults to 1.0 (no correction).
-
-
-
Returns
Status Codes
-
@@ -335,7 +337,7 @@ void SSTVClient + doxygen 1.8.17
diff --git a/class_s_s_t_v_client.js b/class_s_s_t_v_client.js index 96f0d955..10b35046 100644 --- a/class_s_s_t_v_client.js +++ b/class_s_s_t_v_client.js @@ -2,8 +2,8 @@ var class_s_s_t_v_client = [ [ "SSTVClient", "class_s_s_t_v_client.html#af15cf501c00172270d2d2c43d7a7100a", null ], [ "SSTVClient", "class_s_s_t_v_client.html#a99e46bec8403dfc36b9e5b102b1f7cf1", null ], - [ "begin", "class_s_s_t_v_client.html#a3d85be3941250366eec2cd9a147a4f5c", null ], [ "begin", "class_s_s_t_v_client.html#a8606cf73f86f6f1b29cea9ae9b46c81e", null ], + [ "begin", "class_s_s_t_v_client.html#a3d85be3941250366eec2cd9a147a4f5c", null ], [ "getPictureHeight", "class_s_s_t_v_client.html#ad66e5082788b507f0f18e6e0e255314d", null ], [ "idle", "class_s_s_t_v_client.html#a0126ac04934f589b8cb04a038c342044", null ], [ "sendHeader", "class_s_s_t_v_client.html#a30741de183c81492402187b9d6d8c11e", null ], diff --git a/class_s_x1231-members.html b/class_s_x1231-members.html index 2921a665..9a39c815 100644 --- a/class_s_x1231-members.html +++ b/class_s_x1231-members.html @@ -1,9 +1,9 @@ - + - + RadioLib: Member List @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -107,8 +109,12 @@ $(document).ready(function(){initNavTree('class_s_x1231.html','');}); PhysicalLayer::random(int32_t max)PhysicalLayer PhysicalLayer::random(int32_t min, int32_t max)PhysicalLayer readData(uint8_t *data, size_t len) overrideRF69virtual + readData(String &str, size_t len=0)RF69 + readData(uint8_t *data, size_t len)=0RF69 PhysicalLayer::readData(String &str, size_t len=0)PhysicalLayer receive(uint8_t *data, size_t len) overrideRF69virtual + receive(String &str, size_t len=0)RF69 + receive(uint8_t *data, size_t len)=0RF69 PhysicalLayer::receive(String &str, size_t len=0)PhysicalLayer receiveDirect() overrideRF69virtual reset()RF69 @@ -136,15 +142,22 @@ $(document).ready(function(){initNavTree('class_s_x1231.html','');}); startDirect()PhysicalLayer startReceive()RF69 startTransmit(uint8_t *data, size_t len, uint8_t addr=0) overrideRF69virtual - PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer - PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer - SX1231(Module *mod)SX1231 - transmit(uint8_t *data, size_t len, uint8_t addr=0) overrideRF69virtual - PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer - PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer - PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer - transmitDirect(uint32_t frf=0) overrideRF69virtual - variablePacketLengthMode(uint8_t maxLen=RF69_MAX_PACKET_LENGTH)RF69 + startTransmit(String &str, uint8_t addr=0)RF69 + startTransmit(const char *str, uint8_t addr=0)RF69 + startTransmit(uint8_t *data, size_t len, uint8_t addr=0)=0RF69 + PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer + PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer + SX1231(Module *mod)SX1231 + transmit(uint8_t *data, size_t len, uint8_t addr=0) overrideRF69virtual + transmit(__FlashStringHelper *fstr, uint8_t addr=0)RF69 + transmit(String &str, uint8_t addr=0)RF69 + transmit(const char *str, uint8_t addr=0)RF69 + transmit(uint8_t *data, size_t len, uint8_t addr=0)=0RF69 + PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer + PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer + PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer + transmitDirect(uint32_t frf=0) overrideRF69virtual + variablePacketLengthMode(uint8_t maxLen=RF69_MAX_PACKET_LENGTH)RF69
@@ -152,7 +165,7 @@ $(document).ready(function(){initNavTree('class_s_x1231.html','');}); diff --git a/class_s_x1231.html b/class_s_x1231.html index a58f381c..5da9be8b 100644 --- a/class_s_x1231.html +++ b/class_s_x1231.html @@ -1,9 +1,9 @@ - + - + RadioLib: SX1231 Class Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -88,7 +90,7 @@ $(document).ready(function(){initNavTree('class_s_x1231.html','');});
-

Control class for SX1231 module. Overrides some methods from RF69 due to different register values. +

Control class for SX1231 module. Overrides some methods from RF69 due to different register values. More...

#include <SX1231.h>

@@ -98,18 +100,18 @@ Inheritance diagram for SX1231:
-RF69 -PhysicalLayer - -
+RF69 +PhysicalLayer + + - + - + @@ -123,10 +125,10 @@ void  - + - + @@ -168,7 +170,7 @@ void  - + @@ -251,6 +253,39 @@ void  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -290,7 +325,7 @@ void 

Public Member Functions

 SX1231 (Module *mod)
 Default constructor. More...
 Default constructor. More...
 
int16_t begin (float freq=434.0, float br=48.0, float rxBw=125.0, float freqDev=50.0, int8_t power=10, uint8_t preambleLen=16)
 Initialization method. More...
 Initialization method. More...
 
- Public Member Functions inherited from RF69
 RF69 (Module *module)
 Reset method. Will reset the chip to the default state using RST pin.
 
int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0) override
 Blocking binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 Blocking binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 
int16_t receive (uint8_t *data, size_t len) override
 Blocking binary receive method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 Blocking binary receive method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 
int16_t sleep ()
 Sets the module to sleep mode. More...
 Clears interrupt service routine to call when DIO1 activates.
 
int16_t startTransmit (uint8_t *data, size_t len, uint8_t addr=0) override
 Interrupt-driven binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 Interrupt-driven binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 
int16_t startReceive ()
 Interrupt-driven receive method. GDO0 will be activated when full packet is received. More...
int16_t getChipVersion ()
 Read version SPI register. Should return RF69_CHIP_VERSION (0x24) if SX127x is connected and working. More...
 
int16_t transmit (__FlashStringHelper *fstr, uint8_t addr=0)
 Arduino Flash String transmit method. More...
 
int16_t transmit (String &str, uint8_t addr=0)
 Arduino String transmit method. More...
 
int16_t transmit (const char *str, uint8_t addr=0)
 C-string transmit method. More...
 
virtual int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Binary transmit method. Must be implemented in module class. More...
 
int16_t receive (String &str, size_t len=0)
 Arduino String receive method. More...
 
virtual int16_t receive (uint8_t *data, size_t len)=0
 Binary receive method. Must be implemented in module class. More...
 
int16_t startTransmit (String &str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
int16_t startTransmit (const char *str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
virtual int16_t startTransmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Interrupt-driven binary transmit method. More...
 
int16_t readData (String &str, size_t len=0)
 Reads data that was received after calling startReceive method. More...
 
virtual int16_t readData (uint8_t *data, size_t len)=0
 Reads data that was received after calling startReceive method. More...
 
- Public Member Functions inherited from PhysicalLayer
 PhysicalLayer (float freqStep, size_t maxPacketLength)
 Default constructor. More...
 

Detailed Description

-

Control class for SX1231 module. Overrides some methods from RF69 due to different register values.

+

Control class for SX1231 module. Overrides some methods from RF69 due to different register values.

Constructor & Destructor Documentation

◆ SX1231()

@@ -311,7 +346,7 @@ void 
Parameters
- +
modInstance of Module that will be used to communicate with the radio.
modInstance of Module that will be used to communicate with the radio.
@@ -397,7 +432,7 @@ void 
SX1231 + doxygen 1.8.17
diff --git a/class_s_x1261-members.html b/class_s_x1261-members.html index a9285367..c0777c00 100644 --- a/class_s_x1261-members.html +++ b/class_s_x1261-members.html @@ -1,9 +1,9 @@ - + - + RadioLib: Member List @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -111,8 +113,12 @@ $(document).ready(function(){initNavTree('class_s_x1261.html','');}); PhysicalLayer::random(int32_t max)PhysicalLayer PhysicalLayer::random(int32_t min, int32_t max)PhysicalLayer readData(uint8_t *data, size_t len) overrideSX126xvirtual + readData(String &str, size_t len=0)SX126x + readData(uint8_t *data, size_t len)=0SX126x PhysicalLayer::readData(String &str, size_t len=0)PhysicalLayer receive(uint8_t *data, size_t len) overrideSX126xvirtual + receive(String &str, size_t len=0)SX126x + receive(uint8_t *data, size_t len)=0SX126x PhysicalLayer::receive(String &str, size_t len=0)PhysicalLayer receiveDirect() overrideSX126xvirtual reset(bool verify=true)SX126x @@ -150,17 +156,24 @@ $(document).ready(function(){initNavTree('class_s_x1261.html','');}); startReceiveDutyCycle(uint32_t rxPeriod, uint32_t sleepPeriod)SX126x startReceiveDutyCycleAuto(uint16_t senderPreambleLength=0, uint16_t minSymbols=8)SX126x startTransmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX126xvirtual - PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer - PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer - SX1261(Module *mod)SX1261 - SX1262(Module *mod)SX1262 - SX126x(Module *mod)SX126x - transmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX126xvirtual - PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer - PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer - PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer - transmitDirect(uint32_t frf=0) overrideSX126xvirtual - variablePacketLengthMode(uint8_t maxLen=SX126X_MAX_PACKET_LENGTH)SX126x + startTransmit(String &str, uint8_t addr=0)SX126x + startTransmit(const char *str, uint8_t addr=0)SX126x + startTransmit(uint8_t *data, size_t len, uint8_t addr=0)=0SX126x + PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer + PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer + SX1261(Module *mod)SX1261 + SX1262(Module *mod)SX1262 + SX126x(Module *mod)SX126x + transmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX126xvirtual + transmit(__FlashStringHelper *fstr, uint8_t addr=0)SX126x + transmit(String &str, uint8_t addr=0)SX126x + transmit(const char *str, uint8_t addr=0)SX126x + transmit(uint8_t *data, size_t len, uint8_t addr=0)=0SX126x + PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer + PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer + PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer + transmitDirect(uint32_t frf=0) overrideSX126xvirtual + variablePacketLengthMode(uint8_t maxLen=SX126X_MAX_PACKET_LENGTH)SX126x
@@ -168,7 +181,7 @@ $(document).ready(function(){initNavTree('class_s_x1261.html','');}); diff --git a/class_s_x1261.html b/class_s_x1261.html index d0f7d32b..4b0bc1c8 100644 --- a/class_s_x1261.html +++ b/class_s_x1261.html @@ -1,9 +1,9 @@ - + - + RadioLib: SX1261 Class Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -98,19 +100,19 @@ Inheritance diagram for SX1261:
-SX1262 +SX1262 SX126x -PhysicalLayer - -
+PhysicalLayer + + - + - + @@ -142,16 +144,16 @@ Public Member Functions - + - + - + @@ -160,7 +162,7 @@ Public Member Functions - + @@ -173,7 +175,7 @@ void  - + @@ -284,13 +286,13 @@ void  - + - + @@ -298,6 +300,39 @@ void  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -358,7 +393,7 @@ void 

Public Member Functions

 SX1261 (Module *mod)
 Default constructor. More...
 Default constructor. More...
 
int16_t setOutputPower (int8_t power)
 Sets output power. Allowed values are in range from -17 to 14 dBm. More...
 Sets output power. Allowed values are in range from -17 to 14 dBm. More...
 
- Public Member Functions inherited from SX1262
 SX1262 (Module *mod)
 Reset method. Will reset the chip to the default state using RST pin. More...
 
int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0) override
 Blocking binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 Blocking binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 
int16_t receive (uint8_t *data, size_t len) override
 Blocking binary receive method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 Blocking binary receive method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 
int16_t transmitDirect (uint32_t frf=0) override
 Starts direct mode transmission. More...
 
int16_t receiveDirect () override
 Starts direct mode reception. Only implemented for PhysicalLayer compatibility, as SX126x series does not support direct mode reception. Will always return ERR_UNKNOWN. More...
 Starts direct mode reception. Only implemented for PhysicalLayer compatibility, as SX126x series does not support direct mode reception. Will always return ERR_UNKNOWN. More...
 
int16_t scanChannel ()
 Performs scan for LoRa transmission in the current channel. Detects both preamble and payload. More...
 Sets the module to sleep mode. More...
 
int16_t standby () override
 Sets the module to standby mode (overload for PhysicalLayer compatibility, uses 13 MHz RC oscillator). More...
 Sets the module to standby mode (overload for PhysicalLayer compatibility, uses 13 MHz RC oscillator). More...
 
int16_t standby (uint8_t mode)
 Sets the module to standby mode. More...
 Clears interrupt service routine to call when DIO1 activates.
 
int16_t startTransmit (uint8_t *data, size_t len, uint8_t addr=0) override
 Interrupt-driven binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 Interrupt-driven binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 
int16_t startReceive (uint32_t timeout=SX126X_RX_TIMEOUT_INF)
 Interrupt-driven receive method. DIO1 will be activated when full packet is received. More...
 Set regulator mode to DC-DC. More...
 
int16_t setEncoding (uint8_t encoding) override
 Sets transmission encoding. Available in FSK mode only. Serves only as alias for PhysicalLayer compatibility. More...
 Sets transmission encoding. Available in FSK mode only. Serves only as alias for PhysicalLayer compatibility. More...
 
void setRfSwitchPins (RADIOLIB_PIN_TYPE rxEn, RADIOLIB_PIN_TYPE txEn)
 Some modules contain external RF switch controlled by two pins. This function gives RadioLib control over those two pins to automatically switch Rx and Tx state. When using automatic RF switch control, DO NOT change the pin mode of rxEn or txEn from Arduino sketch! More...
 
int16_t forceLDRO (bool enable)
 Forces LoRa low data rate optimization. Only available in LoRa mode. After calling this method, LDRO will always be set to the provided value, regardless of symbol length. To re-enable automatic LDRO configuration, call SX126x::autoLDRO() More...
 Forces LoRa low data rate optimization. Only available in LoRa mode. After calling this method, LDRO will always be set to the provided value, regardless of symbol length. To re-enable automatic LDRO configuration, call SX126x::autoLDRO() More...
 
int16_t autoLDRO ()
 Re-enables automatic LDRO configuration. Only available in LoRa mode. After calling this method, LDRO will be enabled automatically when symbol length exceeds 16 ms. More...
uint8_t random ()
 Get one truly random byte from RSSI noise. More...
 
int16_t transmit (__FlashStringHelper *fstr, uint8_t addr=0)
 Arduino Flash String transmit method. More...
 
int16_t transmit (String &str, uint8_t addr=0)
 Arduino String transmit method. More...
 
int16_t transmit (const char *str, uint8_t addr=0)
 C-string transmit method. More...
 
virtual int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Binary transmit method. Must be implemented in module class. More...
 
int16_t receive (String &str, size_t len=0)
 Arduino String receive method. More...
 
virtual int16_t receive (uint8_t *data, size_t len)=0
 Binary receive method. Must be implemented in module class. More...
 
int16_t startTransmit (String &str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
int16_t startTransmit (const char *str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
virtual int16_t startTransmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Interrupt-driven binary transmit method. More...
 
int16_t readData (String &str, size_t len=0)
 Reads data that was received after calling startReceive method. More...
 
virtual int16_t readData (uint8_t *data, size_t len)=0
 Reads data that was received after calling startReceive method. More...
 
- Public Member Functions inherited from PhysicalLayer
 PhysicalLayer (float freqStep, size_t maxPacketLength)
 Default constructor. More...
Parameters
- +
modInstance of Module that will be used to communicate with the radio.
modInstance of Module that will be used to communicate with the radio.
@@ -406,7 +441,7 @@ void 
SX1261 + doxygen 1.8.17 diff --git a/class_s_x1262-members.html b/class_s_x1262-members.html index 7d31435a..041f5fe5 100644 --- a/class_s_x1262-members.html +++ b/class_s_x1262-members.html @@ -1,9 +1,9 @@ - + - + RadioLib: Member List @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@
- + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -111,8 +113,12 @@ $(document).ready(function(){initNavTree('class_s_x1262.html','');}); PhysicalLayer::random(int32_t max)PhysicalLayer PhysicalLayer::random(int32_t min, int32_t max)PhysicalLayer readData(uint8_t *data, size_t len) overrideSX126xvirtual + readData(String &str, size_t len=0)SX126x + readData(uint8_t *data, size_t len)=0SX126x PhysicalLayer::readData(String &str, size_t len=0)PhysicalLayer receive(uint8_t *data, size_t len) overrideSX126xvirtual + receive(String &str, size_t len=0)SX126x + receive(uint8_t *data, size_t len)=0SX126x PhysicalLayer::receive(String &str, size_t len=0)PhysicalLayer receiveDirect() overrideSX126xvirtual reset(bool verify=true)SX126x @@ -150,16 +156,23 @@ $(document).ready(function(){initNavTree('class_s_x1262.html','');}); startReceiveDutyCycle(uint32_t rxPeriod, uint32_t sleepPeriod)SX126x startReceiveDutyCycleAuto(uint16_t senderPreambleLength=0, uint16_t minSymbols=8)SX126x startTransmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX126xvirtual - PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer - PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer - SX1262(Module *mod)SX1262 - SX126x(Module *mod)SX126x - transmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX126xvirtual - PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer - PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer - PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer - transmitDirect(uint32_t frf=0) overrideSX126xvirtual - variablePacketLengthMode(uint8_t maxLen=SX126X_MAX_PACKET_LENGTH)SX126x + startTransmit(String &str, uint8_t addr=0)SX126x + startTransmit(const char *str, uint8_t addr=0)SX126x + startTransmit(uint8_t *data, size_t len, uint8_t addr=0)=0SX126x + PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer + PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer + SX1262(Module *mod)SX1262 + SX126x(Module *mod)SX126x + transmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX126xvirtual + transmit(__FlashStringHelper *fstr, uint8_t addr=0)SX126x + transmit(String &str, uint8_t addr=0)SX126x + transmit(const char *str, uint8_t addr=0)SX126x + transmit(uint8_t *data, size_t len, uint8_t addr=0)=0SX126x + PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer + PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer + PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer + transmitDirect(uint32_t frf=0) overrideSX126xvirtual + variablePacketLengthMode(uint8_t maxLen=SX126X_MAX_PACKET_LENGTH)SX126x
@@ -167,7 +180,7 @@ $(document).ready(function(){initNavTree('class_s_x1262.html','');}); diff --git a/class_s_x1262.html b/class_s_x1262.html index 4e1ae7b5..6a781681 100644 --- a/class_s_x1262.html +++ b/class_s_x1262.html @@ -1,9 +1,9 @@ - + - + RadioLib: SX1262 Class Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -99,27 +101,27 @@ Inheritance diagram for SX1262:
SX126x -PhysicalLayer -SX1261 - - +PhysicalLayer +SX1261 + + - + - + - + - + - + @@ -135,16 +137,16 @@ Public Member Functions - + - + - + @@ -153,7 +155,7 @@ Public Member Functions - + @@ -166,7 +168,7 @@ void  - + @@ -277,13 +279,13 @@ void  - + - + @@ -291,6 +293,39 @@ void  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -351,7 +386,7 @@ void  + + + + @@ -150,16 +156,23 @@ $(document).ready(function(){initNavTree('class_s_x1268.html','');}); - - - - - - - - - - + + + + + + + + + + + + + + + + +

Public Member Functions

 SX1262 (Module *mod)
 Default constructor. More...
 Default constructor. More...
 
int16_t begin (float freq=434.0, float bw=125.0, uint8_t sf=9, uint8_t cr=7, uint8_t syncWord=SX126X_SYNC_WORD_PRIVATE, int8_t power=10, uint16_t preambleLength=8, float tcxoVoltage=1.6, bool useRegulatorLDO=false)
 Initialization method for LoRa modem. More...
 Initialization method for LoRa modem. More...
 
int16_t beginFSK (float freq=434.0, float br=48.0, float freqDev=50.0, float rxBw=156.2, int8_t power=10, uint16_t preambleLength=16, float tcxoVoltage=1.6, bool useRegulatorLDO=false)
 Initialization method for FSK modem. More...
 Initialization method for FSK modem. More...
 
int16_t setFrequency (float freq, bool calibrate=true)
 Sets carrier frequency. Allowed values are in range from 150.0 to 960.0 MHz. More...
 Sets carrier frequency. Allowed values are in range from 150.0 to 960.0 MHz. More...
 
int16_t setOutputPower (int8_t power)
 Sets output power. Allowed values are in range from -17 to 22 dBm. More...
 Sets output power. Allowed values are in range from -17 to 22 dBm. More...
 
- Public Member Functions inherited from SX126x
 SX126x (Module *mod)
 Reset method. Will reset the chip to the default state using RST pin. More...
 
int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0) override
 Blocking binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 Blocking binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 
int16_t receive (uint8_t *data, size_t len) override
 Blocking binary receive method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 Blocking binary receive method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 
int16_t transmitDirect (uint32_t frf=0) override
 Starts direct mode transmission. More...
 
int16_t receiveDirect () override
 Starts direct mode reception. Only implemented for PhysicalLayer compatibility, as SX126x series does not support direct mode reception. Will always return ERR_UNKNOWN. More...
 Starts direct mode reception. Only implemented for PhysicalLayer compatibility, as SX126x series does not support direct mode reception. Will always return ERR_UNKNOWN. More...
 
int16_t scanChannel ()
 Performs scan for LoRa transmission in the current channel. Detects both preamble and payload. More...
 Sets the module to sleep mode. More...
 
int16_t standby () override
 Sets the module to standby mode (overload for PhysicalLayer compatibility, uses 13 MHz RC oscillator). More...
 Sets the module to standby mode (overload for PhysicalLayer compatibility, uses 13 MHz RC oscillator). More...
 
int16_t standby (uint8_t mode)
 Sets the module to standby mode. More...
 Clears interrupt service routine to call when DIO1 activates.
 
int16_t startTransmit (uint8_t *data, size_t len, uint8_t addr=0) override
 Interrupt-driven binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 Interrupt-driven binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 
int16_t startReceive (uint32_t timeout=SX126X_RX_TIMEOUT_INF)
 Interrupt-driven receive method. DIO1 will be activated when full packet is received. More...
 Set regulator mode to DC-DC. More...
 
int16_t setEncoding (uint8_t encoding) override
 Sets transmission encoding. Available in FSK mode only. Serves only as alias for PhysicalLayer compatibility. More...
 Sets transmission encoding. Available in FSK mode only. Serves only as alias for PhysicalLayer compatibility. More...
 
void setRfSwitchPins (RADIOLIB_PIN_TYPE rxEn, RADIOLIB_PIN_TYPE txEn)
 Some modules contain external RF switch controlled by two pins. This function gives RadioLib control over those two pins to automatically switch Rx and Tx state. When using automatic RF switch control, DO NOT change the pin mode of rxEn or txEn from Arduino sketch! More...
 
int16_t forceLDRO (bool enable)
 Forces LoRa low data rate optimization. Only available in LoRa mode. After calling this method, LDRO will always be set to the provided value, regardless of symbol length. To re-enable automatic LDRO configuration, call SX126x::autoLDRO() More...
 Forces LoRa low data rate optimization. Only available in LoRa mode. After calling this method, LDRO will always be set to the provided value, regardless of symbol length. To re-enable automatic LDRO configuration, call SX126x::autoLDRO() More...
 
int16_t autoLDRO ()
 Re-enables automatic LDRO configuration. Only available in LoRa mode. After calling this method, LDRO will be enabled automatically when symbol length exceeds 16 ms. More...
uint8_t random ()
 Get one truly random byte from RSSI noise. More...
 
int16_t transmit (__FlashStringHelper *fstr, uint8_t addr=0)
 Arduino Flash String transmit method. More...
 
int16_t transmit (String &str, uint8_t addr=0)
 Arduino String transmit method. More...
 
int16_t transmit (const char *str, uint8_t addr=0)
 C-string transmit method. More...
 
virtual int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Binary transmit method. Must be implemented in module class. More...
 
int16_t receive (String &str, size_t len=0)
 Arduino String receive method. More...
 
virtual int16_t receive (uint8_t *data, size_t len)=0
 Binary receive method. Must be implemented in module class. More...
 
int16_t startTransmit (String &str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
int16_t startTransmit (const char *str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
virtual int16_t startTransmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Interrupt-driven binary transmit method. More...
 
int16_t readData (String &str, size_t len=0)
 Reads data that was received after calling startReceive method. More...
 
virtual int16_t readData (uint8_t *data, size_t len)=0
 Reads data that was received after calling startReceive method. More...
 
- Public Member Functions inherited from PhysicalLayer
 PhysicalLayer (float freqStep, size_t maxPacketLength)
 Default constructor. More...
Parameters
- +
modInstance of Module that will be used to communicate with the radio.
modInstance of Module that will be used to communicate with the radio.
@@ -518,7 +553,7 @@ void 
Parameters
@@ -608,7 +643,7 @@ void 
tcxoVoltageTCXO reference voltage to be set on DIO3. Defaults to 1.6 V, set to 0 to skip.
SX1262 + doxygen 1.8.17 diff --git a/class_s_x1268-members.html b/class_s_x1268-members.html index e397d8b1..df701840 100644 --- a/class_s_x1268-members.html +++ b/class_s_x1268-members.html @@ -1,9 +1,9 @@ - + - + RadioLib: Member List @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@
- + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -111,8 +113,12 @@ $(document).ready(function(){initNavTree('class_s_x1268.html','');});
PhysicalLayer::random(int32_t max)PhysicalLayer
PhysicalLayer::random(int32_t min, int32_t max)PhysicalLayer
readData(uint8_t *data, size_t len) overrideSX126xvirtual
readData(String &str, size_t len=0)SX126x
readData(uint8_t *data, size_t len)=0SX126x
PhysicalLayer::readData(String &str, size_t len=0)PhysicalLayer
receive(uint8_t *data, size_t len) overrideSX126xvirtual
receive(String &str, size_t len=0)SX126x
receive(uint8_t *data, size_t len)=0SX126x
PhysicalLayer::receive(String &str, size_t len=0)PhysicalLayer
receiveDirect() overrideSX126xvirtual
reset(bool verify=true)SX126x
startReceiveDutyCycle(uint32_t rxPeriod, uint32_t sleepPeriod)SX126x
startReceiveDutyCycleAuto(uint16_t senderPreambleLength=0, uint16_t minSymbols=8)SX126x
startTransmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX126xvirtual
PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer
PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer
SX1268(Module *mod)SX1268
SX126x(Module *mod)SX126x
transmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX126xvirtual
PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer
PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer
PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer
transmitDirect(uint32_t frf=0) overrideSX126xvirtual
variablePacketLengthMode(uint8_t maxLen=SX126X_MAX_PACKET_LENGTH)SX126x
startTransmit(String &str, uint8_t addr=0)SX126x
startTransmit(const char *str, uint8_t addr=0)SX126x
startTransmit(uint8_t *data, size_t len, uint8_t addr=0)=0SX126x
PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer
PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer
SX1268(Module *mod)SX1268
SX126x(Module *mod)SX126x
transmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX126xvirtual
transmit(__FlashStringHelper *fstr, uint8_t addr=0)SX126x
transmit(String &str, uint8_t addr=0)SX126x
transmit(const char *str, uint8_t addr=0)SX126x
transmit(uint8_t *data, size_t len, uint8_t addr=0)=0SX126x
PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer
PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer
PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer
transmitDirect(uint32_t frf=0) overrideSX126xvirtual
variablePacketLengthMode(uint8_t maxLen=SX126X_MAX_PACKET_LENGTH)SX126x
@@ -167,7 +180,7 @@ $(document).ready(function(){initNavTree('class_s_x1268.html','');}); diff --git a/class_s_x1268.html b/class_s_x1268.html index db0c8807..f7d41fc4 100644 --- a/class_s_x1268.html +++ b/class_s_x1268.html @@ -1,9 +1,9 @@ - + - + RadioLib: SX1268 Class Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -99,26 +101,26 @@ Inheritance diagram for SX1268:
SX126x -PhysicalLayer - - +PhysicalLayer + + - + - + - + - + - + @@ -134,16 +136,16 @@ Public Member Functions - + - + - + @@ -152,7 +154,7 @@ Public Member Functions - + @@ -165,7 +167,7 @@ void  - + @@ -276,13 +278,13 @@ void  - + - + @@ -290,6 +292,39 @@ void  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -350,7 +385,7 @@ void  + + + + @@ -146,15 +152,22 @@ $(document).ready(function(){initNavTree('class_s_x126x.html','');}); - - - - - - - - - + + + + + + + + + + + + + + + +

Public Member Functions

 SX1268 (Module *mod)
 Default constructor. More...
 Default constructor. More...
 
int16_t begin (float freq=434.0, float bw=125.0, uint8_t sf=9, uint8_t cr=7, uint8_t syncWord=SX126X_SYNC_WORD_PRIVATE, int8_t power=10, uint16_t preambleLength=8, float tcxoVoltage=1.6, bool useRegulatorLDO=false)
 Initialization method for LoRa modem. More...
 Initialization method for LoRa modem. More...
 
int16_t beginFSK (float freq=434.0, float br=48.0, float freqDev=50.0, float rxBw=156.2, int8_t power=10, uint16_t preambleLength=16, float tcxoVoltage=1.6, bool useRegulatorLDO=false)
 Initialization method for FSK modem. More...
 Initialization method for FSK modem. More...
 
int16_t setFrequency (float freq, bool calibrate=true)
 Sets carrier frequency. Allowed values are in range from 410.0 to 810.0 MHz. More...
 Sets carrier frequency. Allowed values are in range from 410.0 to 810.0 MHz. More...
 
int16_t setOutputPower (int8_t power)
 Sets output power. Allowed values are in range from -9 to 22 dBm. More...
 Sets output power. Allowed values are in range from -9 to 22 dBm. More...
 
- Public Member Functions inherited from SX126x
 SX126x (Module *mod)
 Reset method. Will reset the chip to the default state using RST pin. More...
 
int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0) override
 Blocking binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 Blocking binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 
int16_t receive (uint8_t *data, size_t len) override
 Blocking binary receive method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 Blocking binary receive method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 
int16_t transmitDirect (uint32_t frf=0) override
 Starts direct mode transmission. More...
 
int16_t receiveDirect () override
 Starts direct mode reception. Only implemented for PhysicalLayer compatibility, as SX126x series does not support direct mode reception. Will always return ERR_UNKNOWN. More...
 Starts direct mode reception. Only implemented for PhysicalLayer compatibility, as SX126x series does not support direct mode reception. Will always return ERR_UNKNOWN. More...
 
int16_t scanChannel ()
 Performs scan for LoRa transmission in the current channel. Detects both preamble and payload. More...
 Sets the module to sleep mode. More...
 
int16_t standby () override
 Sets the module to standby mode (overload for PhysicalLayer compatibility, uses 13 MHz RC oscillator). More...
 Sets the module to standby mode (overload for PhysicalLayer compatibility, uses 13 MHz RC oscillator). More...
 
int16_t standby (uint8_t mode)
 Sets the module to standby mode. More...
 Clears interrupt service routine to call when DIO1 activates.
 
int16_t startTransmit (uint8_t *data, size_t len, uint8_t addr=0) override
 Interrupt-driven binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 Interrupt-driven binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 
int16_t startReceive (uint32_t timeout=SX126X_RX_TIMEOUT_INF)
 Interrupt-driven receive method. DIO1 will be activated when full packet is received. More...
 Set regulator mode to DC-DC. More...
 
int16_t setEncoding (uint8_t encoding) override
 Sets transmission encoding. Available in FSK mode only. Serves only as alias for PhysicalLayer compatibility. More...
 Sets transmission encoding. Available in FSK mode only. Serves only as alias for PhysicalLayer compatibility. More...
 
void setRfSwitchPins (RADIOLIB_PIN_TYPE rxEn, RADIOLIB_PIN_TYPE txEn)
 Some modules contain external RF switch controlled by two pins. This function gives RadioLib control over those two pins to automatically switch Rx and Tx state. When using automatic RF switch control, DO NOT change the pin mode of rxEn or txEn from Arduino sketch! More...
 
int16_t forceLDRO (bool enable)
 Forces LoRa low data rate optimization. Only available in LoRa mode. After calling this method, LDRO will always be set to the provided value, regardless of symbol length. To re-enable automatic LDRO configuration, call SX126x::autoLDRO() More...
 Forces LoRa low data rate optimization. Only available in LoRa mode. After calling this method, LDRO will always be set to the provided value, regardless of symbol length. To re-enable automatic LDRO configuration, call SX126x::autoLDRO() More...
 
int16_t autoLDRO ()
 Re-enables automatic LDRO configuration. Only available in LoRa mode. After calling this method, LDRO will be enabled automatically when symbol length exceeds 16 ms. More...
uint8_t random ()
 Get one truly random byte from RSSI noise. More...
 
int16_t transmit (__FlashStringHelper *fstr, uint8_t addr=0)
 Arduino Flash String transmit method. More...
 
int16_t transmit (String &str, uint8_t addr=0)
 Arduino String transmit method. More...
 
int16_t transmit (const char *str, uint8_t addr=0)
 C-string transmit method. More...
 
virtual int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Binary transmit method. Must be implemented in module class. More...
 
int16_t receive (String &str, size_t len=0)
 Arduino String receive method. More...
 
virtual int16_t receive (uint8_t *data, size_t len)=0
 Binary receive method. Must be implemented in module class. More...
 
int16_t startTransmit (String &str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
int16_t startTransmit (const char *str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
virtual int16_t startTransmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Interrupt-driven binary transmit method. More...
 
int16_t readData (String &str, size_t len=0)
 Reads data that was received after calling startReceive method. More...
 
virtual int16_t readData (uint8_t *data, size_t len)=0
 Reads data that was received after calling startReceive method. More...
 
- Public Member Functions inherited from PhysicalLayer
 PhysicalLayer (float freqStep, size_t maxPacketLength)
 Default constructor. More...
Parameters
- +
modInstance of Module that will be used to communicate with the radio.
modInstance of Module that will be used to communicate with the radio.
@@ -517,7 +552,7 @@ void 
Parameters
@@ -608,7 +643,7 @@ void 
tcxoVoltageTCXO reference voltage to be set on DIO3. Defaults to 1.6 V, set to 0 to skip.
SX1268 + doxygen 1.8.17 diff --git a/class_s_x126x-members.html b/class_s_x126x-members.html index f0f80bfa..f276293c 100644 --- a/class_s_x126x-members.html +++ b/class_s_x126x-members.html @@ -1,9 +1,9 @@ - + - + RadioLib: Member List @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@
- + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -109,8 +111,12 @@ $(document).ready(function(){initNavTree('class_s_x126x.html','');});
PhysicalLayer::random(int32_t max)PhysicalLayer
PhysicalLayer::random(int32_t min, int32_t max)PhysicalLayer
readData(uint8_t *data, size_t len) overrideSX126xvirtual
readData(String &str, size_t len=0)SX126x
readData(uint8_t *data, size_t len)=0SX126x
PhysicalLayer::readData(String &str, size_t len=0)PhysicalLayer
receive(uint8_t *data, size_t len) overrideSX126xvirtual
receive(String &str, size_t len=0)SX126x
receive(uint8_t *data, size_t len)=0SX126x
PhysicalLayer::receive(String &str, size_t len=0)PhysicalLayer
receiveDirect() overrideSX126xvirtual
reset(bool verify=true)SX126x
startReceiveDutyCycle(uint32_t rxPeriod, uint32_t sleepPeriod)SX126x
startReceiveDutyCycleAuto(uint16_t senderPreambleLength=0, uint16_t minSymbols=8)SX126x
startTransmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX126xvirtual
PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer
PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer
SX126x(Module *mod)SX126x
transmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX126xvirtual
PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer
PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer
PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer
transmitDirect(uint32_t frf=0) overrideSX126xvirtual
variablePacketLengthMode(uint8_t maxLen=SX126X_MAX_PACKET_LENGTH)SX126x
startTransmit(String &str, uint8_t addr=0)SX126x
startTransmit(const char *str, uint8_t addr=0)SX126x
startTransmit(uint8_t *data, size_t len, uint8_t addr=0)=0SX126x
PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer
PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer
SX126x(Module *mod)SX126x
transmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX126xvirtual
transmit(__FlashStringHelper *fstr, uint8_t addr=0)SX126x
transmit(String &str, uint8_t addr=0)SX126x
transmit(const char *str, uint8_t addr=0)SX126x
transmit(uint8_t *data, size_t len, uint8_t addr=0)=0SX126x
PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer
PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer
PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer
transmitDirect(uint32_t frf=0) overrideSX126xvirtual
variablePacketLengthMode(uint8_t maxLen=SX126X_MAX_PACKET_LENGTH)SX126x
@@ -162,7 +175,7 @@ $(document).ready(function(){initNavTree('class_s_x126x.html','');}); diff --git a/class_s_x126x.html b/class_s_x126x.html index b0bfda7c..cbb4a345 100644 --- a/class_s_x126x.html +++ b/class_s_x126x.html @@ -1,9 +1,9 @@ - + - + RadioLib: SX126x Class Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -88,7 +90,7 @@ $(document).ready(function(){initNavTree('class_s_x126x.html','');});
-

Base class for SX126x series. All derived classes for SX126x (e.g. SX1262 or SX1268) inherit from this base class. This class should not be instantiated directly from Arduino sketch, only from its derived classes. +

Base class for SX126x series. All derived classes for SX126x (e.g. SX1262 or SX1268) inherit from this base class. This class should not be instantiated directly from Arduino sketch, only from its derived classes. More...

#include <SX126x.h>

@@ -98,184 +100,217 @@ Inheritance diagram for SX126x:
-PhysicalLayer -SX1262 -SX1268 -SX1261 - -
+PhysicalLayer +SX1262 +SX1268 +SX1261 + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -315,7 +350,7 @@ void 

Public Member Functions

 SX126x (Module *mod)
 Default constructor. More...
 Default constructor. More...
 
int16_t begin (float bw, uint8_t sf, uint8_t cr, uint8_t syncWord, uint16_t preambleLength, float tcxoVoltage, bool useRegulatorLDO=false)
 Initialization method for LoRa modem. More...
 Initialization method for LoRa modem. More...
 
int16_t beginFSK (float br, float freqDev, float rxBw, uint16_t preambleLength, float tcxoVoltage, bool useRegulatorLDO=false)
 Initialization method for FSK modem. More...
 Initialization method for FSK modem. More...
 
int16_t reset (bool verify=true)
 Reset method. Will reset the chip to the default state using RST pin. More...
 Reset method. Will reset the chip to the default state using RST pin. More...
 
int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0) override
 Blocking binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 Blocking binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 
int16_t receive (uint8_t *data, size_t len) override
 Blocking binary receive method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 Blocking binary receive method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 
int16_t transmitDirect (uint32_t frf=0) override
 Starts direct mode transmission. More...
 Starts direct mode transmission. More...
 
int16_t receiveDirect () override
 Starts direct mode reception. Only implemented for PhysicalLayer compatibility, as SX126x series does not support direct mode reception. Will always return ERR_UNKNOWN. More...
 Starts direct mode reception. Only implemented for PhysicalLayer compatibility, as SX126x series does not support direct mode reception. Will always return ERR_UNKNOWN. More...
 
int16_t scanChannel ()
 Performs scan for LoRa transmission in the current channel. Detects both preamble and payload. More...
 Performs scan for LoRa transmission in the current channel. Detects both preamble and payload. More...
 
int16_t sleep (bool retainConfig=true)
 Sets the module to sleep mode. More...
 Sets the module to sleep mode. More...
 
int16_t standby () override
 Sets the module to standby mode (overload for PhysicalLayer compatibility, uses 13 MHz RC oscillator). More...
 Sets the module to standby mode (overload for PhysicalLayer compatibility, uses 13 MHz RC oscillator). More...
 
int16_t standby (uint8_t mode)
 Sets the module to standby mode. More...
 Sets the module to standby mode. More...
 
void setDio1Action (void(*func)(void))
 Sets interrupt service routine to call when DIO1 activates. More...
 Sets interrupt service routine to call when DIO1 activates. More...
 
void clearDio1Action ()
 Clears interrupt service routine to call when DIO1 activates.
 
int16_t startTransmit (uint8_t *data, size_t len, uint8_t addr=0) override
 Interrupt-driven binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 Interrupt-driven binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 
int16_t startReceive (uint32_t timeout=SX126X_RX_TIMEOUT_INF)
 Interrupt-driven receive method. DIO1 will be activated when full packet is received. More...
 Interrupt-driven receive method. DIO1 will be activated when full packet is received. More...
 
int16_t startReceiveDutyCycle (uint32_t rxPeriod, uint32_t sleepPeriod)
 Interrupt-driven receive method where the device mostly sleeps and periodically wakes to listen. Note that this function assumes the unit will take 500us + TCXO_delay to change state. See datasheet section 13.1.7, version 1.2. More...
 Interrupt-driven receive method where the device mostly sleeps and periodically wakes to listen. Note that this function assumes the unit will take 500us + TCXO_delay to change state. See datasheet section 13.1.7, version 1.2. More...
 
int16_t startReceiveDutyCycleAuto (uint16_t senderPreambleLength=0, uint16_t minSymbols=8)
 Calls startReceiveDutyCycle with rxPeriod and sleepPeriod set so the unit shouldn't miss any messages. More...
 Calls startReceiveDutyCycle with rxPeriod and sleepPeriod set so the unit shouldn't miss any messages. More...
 
int16_t readData (uint8_t *data, size_t len) override
 Reads data received after calling startReceive method. More...
 Reads data received after calling startReceive method. More...
 
int16_t setBandwidth (float bw)
 Sets LoRa bandwidth. Allowed values are 7.8, 10.4, 15.6, 20.8, 31.25, 41.7, 62.5, 125.0, 250.0 and 500.0 kHz. More...
 Sets LoRa bandwidth. Allowed values are 7.8, 10.4, 15.6, 20.8, 31.25, 41.7, 62.5, 125.0, 250.0 and 500.0 kHz. More...
 
int16_t setSpreadingFactor (uint8_t sf)
 Sets LoRa spreading factor. Allowed values range from 5 to 12. More...
 Sets LoRa spreading factor. Allowed values range from 5 to 12. More...
 
int16_t setCodingRate (uint8_t cr)
 Sets LoRa coding rate denominator. Allowed values range from 5 to 8. More...
 Sets LoRa coding rate denominator. Allowed values range from 5 to 8. More...
 
int16_t setSyncWord (uint8_t syncWord, uint8_t controlBits=0x44)
 Sets LoRa sync word. More...
 Sets LoRa sync word. More...
 
int16_t setCurrentLimit (float currentLimit)
 Sets current protection limit. Can be set in 0.25 mA steps. More...
 Sets current protection limit. Can be set in 0.25 mA steps. More...
 
float getCurrentLimit ()
 Reads current protection limit. More...
 Reads current protection limit. More...
 
int16_t setPreambleLength (uint16_t preambleLength)
 Sets preamble length for LoRa or FSK modem. Allowed values range from 1 to 65535. More...
 Sets preamble length for LoRa or FSK modem. Allowed values range from 1 to 65535. More...
 
int16_t setFrequencyDeviation (float freqDev) override
 Sets FSK frequency deviation. Allowed values range from 0.0 to 200.0 kHz. More...
 Sets FSK frequency deviation. Allowed values range from 0.0 to 200.0 kHz. More...
 
int16_t setBitRate (float br)
 Sets FSK bit rate. Allowed values range from 0.6 to 300.0 kbps. More...
 Sets FSK bit rate. Allowed values range from 0.6 to 300.0 kbps. More...
 
int16_t setRxBandwidth (float rxBw)
 Sets FSK receiver bandwidth. Allowed values are 4.8, 5.8, 7.3, 9.7, 11.7, 14.6, 19.5, 23.4, 29.3, 39.0, 46.9, 58.6, 78.2, 93.8, 117.3, 156.2, 187.2, 234.3, 312.0, 373.6 and 467.0 kHz. More...
 Sets FSK receiver bandwidth. Allowed values are 4.8, 5.8, 7.3, 9.7, 11.7, 14.6, 19.5, 23.4, 29.3, 39.0, 46.9, 58.6, 78.2, 93.8, 117.3, 156.2, 187.2, 234.3, 312.0, 373.6 and 467.0 kHz. More...
 
int16_t setDataShaping (uint8_t sh) override
 Sets time-bandwidth product of Gaussian filter applied for shaping. Allowed values are RADIOLIB_SHAPING_0_3, RADIOLIB_SHAPING_0_5, RADIOLIB_SHAPING_0_7 or RADIOLIB_SHAPING_1_0. Set to RADIOLIB_SHAPING_NONE to disable data shaping. More...
 Sets time-bandwidth product of Gaussian filter applied for shaping. Allowed values are RADIOLIB_SHAPING_0_3, RADIOLIB_SHAPING_0_5, RADIOLIB_SHAPING_0_7 or RADIOLIB_SHAPING_1_0. Set to RADIOLIB_SHAPING_NONE to disable data shaping. More...
 
int16_t setSyncWord (uint8_t *syncWord, uint8_t len)
 Sets FSK sync word in the form of array of up to 8 bytes. More...
 Sets FSK sync word in the form of array of up to 8 bytes. More...
 
int16_t setSyncBits (uint8_t *syncWord, uint8_t bitsLen)
 Sets FSK sync word in the form of array of up to 8 bytes. More...
 Sets FSK sync word in the form of array of up to 8 bytes. More...
 
int16_t setNodeAddress (uint8_t nodeAddr)
 Sets node address. Calling this method will also enable address filtering for node address only. More...
 Sets node address. Calling this method will also enable address filtering for node address only. More...
 
int16_t setBroadcastAddress (uint8_t broadAddr)
 Sets broadcast address. Calling this method will also enable address filtering for node and broadcast address. More...
 Sets broadcast address. Calling this method will also enable address filtering for node and broadcast address. More...
 
int16_t disableAddressFiltering ()
 Disables address filtering. Calling this method will also erase previously set addresses. More...
 Disables address filtering. Calling this method will also erase previously set addresses. More...
 
int16_t setCRC (uint8_t len, uint16_t initial=0x1D0F, uint16_t polynomial=0x1021, bool inverted=true)
 Sets CRC configuration. More...
 Sets CRC configuration. More...
 
int16_t setWhitening (bool enabled, uint16_t initial=0x0100)
 Sets FSK whitening parameters. More...
 Sets FSK whitening parameters. More...
 
int16_t setTCXO (float voltage, uint32_t delay=5000)
 Sets TCXO (Temperature Compensated Crystal Oscillator) configuration. More...
 Sets TCXO (Temperature Compensated Crystal Oscillator) configuration. More...
 
int16_t setDio2AsRfSwitch (bool enable=true)
 Set DIO2 to function as RF switch (default in Semtech example designs). More...
 Set DIO2 to function as RF switch (default in Semtech example designs). More...
 
float getDataRate () const
 Gets effective data rate for the last transmitted packet. The value is calculated only for payload bytes. More...
 Gets effective data rate for the last transmitted packet. The value is calculated only for payload bytes. More...
 
float getRSSI ()
 Gets RSSI (Recorded Signal Strength Indicator) of the last received packet. More...
 Gets RSSI (Recorded Signal Strength Indicator) of the last received packet. More...
 
float getSNR ()
 Gets SNR (Signal to Noise Ratio) of the last received packet. Only available for LoRa modem. More...
 Gets SNR (Signal to Noise Ratio) of the last received packet. Only available for LoRa modem. More...
 
size_t getPacketLength (bool update=true) override
 Query modem for the packet length of received payload. More...
 Query modem for the packet length of received payload. More...
 
int16_t fixedPacketLengthMode (uint8_t len=SX126X_MAX_PACKET_LENGTH)
 Set modem in fixed packet length mode. Available in FSK mode only. More...
 Set modem in fixed packet length mode. Available in FSK mode only. More...
 
int16_t variablePacketLengthMode (uint8_t maxLen=SX126X_MAX_PACKET_LENGTH)
 Set modem in variable packet length mode. Available in FSK mode only. More...
 Set modem in variable packet length mode. Available in FSK mode only. More...
 
uint32_t getTimeOnAir (size_t len)
 Get expected time-on-air for a given size of payload. More...
 Get expected time-on-air for a given size of payload. More...
 
float getRSSIInst ()
 Get instantaneous RSSI value during recption of the packet. Should switch to FSK receive mode for LBT implementation. More...
 Get instantaneous RSSI value during recption of the packet. Should switch to FSK receive mode for LBT implementation. More...
 
int16_t implicitHeader (size_t len)
 Set implicit header mode for future reception/transmission. More...
 Set implicit header mode for future reception/transmission. More...
 
int16_t explicitHeader ()
 Set explicit header mode for future reception/transmission. More...
 Set explicit header mode for future reception/transmission. More...
 
int16_t setRegulatorLDO ()
 Set regulator mode to LDO. More...
 Set regulator mode to LDO. More...
 
int16_t setRegulatorDCDC ()
 Set regulator mode to DC-DC. More...
 Set regulator mode to DC-DC. More...
 
int16_t setEncoding (uint8_t encoding) override
 Sets transmission encoding. Available in FSK mode only. Serves only as alias for PhysicalLayer compatibility. More...
 Sets transmission encoding. Available in FSK mode only. Serves only as alias for PhysicalLayer compatibility. More...
 
void setRfSwitchPins (RADIOLIB_PIN_TYPE rxEn, RADIOLIB_PIN_TYPE txEn)
 Some modules contain external RF switch controlled by two pins. This function gives RadioLib control over those two pins to automatically switch Rx and Tx state. When using automatic RF switch control, DO NOT change the pin mode of rxEn or txEn from Arduino sketch! More...
 Some modules contain external RF switch controlled by two pins. This function gives RadioLib control over those two pins to automatically switch Rx and Tx state. When using automatic RF switch control, DO NOT change the pin mode of rxEn or txEn from Arduino sketch! More...
 
int16_t forceLDRO (bool enable)
 Forces LoRa low data rate optimization. Only available in LoRa mode. After calling this method, LDRO will always be set to the provided value, regardless of symbol length. To re-enable automatic LDRO configuration, call SX126x::autoLDRO() More...
 Forces LoRa low data rate optimization. Only available in LoRa mode. After calling this method, LDRO will always be set to the provided value, regardless of symbol length. To re-enable automatic LDRO configuration, call SX126x::autoLDRO() More...
 
int16_t autoLDRO ()
 Re-enables automatic LDRO configuration. Only available in LoRa mode. After calling this method, LDRO will be enabled automatically when symbol length exceeds 16 ms. More...
 Re-enables automatic LDRO configuration. Only available in LoRa mode. After calling this method, LDRO will be enabled automatically when symbol length exceeds 16 ms. More...
 
uint8_t random ()
 Get one truly random byte from RSSI noise. More...
 Get one truly random byte from RSSI noise. More...
 
int16_t transmit (__FlashStringHelper *fstr, uint8_t addr=0)
 Arduino Flash String transmit method. More...
 
int16_t transmit (String &str, uint8_t addr=0)
 Arduino String transmit method. More...
 
int16_t transmit (const char *str, uint8_t addr=0)
 C-string transmit method. More...
 
virtual int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Binary transmit method. Must be implemented in module class. More...
 
int16_t receive (String &str, size_t len=0)
 Arduino String receive method. More...
 
virtual int16_t receive (uint8_t *data, size_t len)=0
 Binary receive method. Must be implemented in module class. More...
 
int16_t startTransmit (String &str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
int16_t startTransmit (const char *str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
virtual int16_t startTransmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Interrupt-driven binary transmit method. More...
 
int16_t readData (String &str, size_t len=0)
 Reads data that was received after calling startReceive method. More...
 
virtual int16_t readData (uint8_t *data, size_t len)=0
 Reads data that was received after calling startReceive method. More...
 
- Public Member Functions inherited from PhysicalLayer
 PhysicalLayer (float freqStep, size_t maxPacketLength)
 Default constructor. More...
 

Detailed Description

-

Base class for SX126x series. All derived classes for SX126x (e.g. SX1262 or SX1268) inherit from this base class. This class should not be instantiated directly from Arduino sketch, only from its derived classes.

+

Base class for SX126x series. All derived classes for SX126x (e.g. SX1262 or SX1268) inherit from this base class. This class should not be instantiated directly from Arduino sketch, only from its derived classes.

Constructor & Destructor Documentation

◆ SX126x()

@@ -336,7 +371,7 @@ void 
Parameters
- +
modInstance of Module that will be used to communicate with the radio.
modInstance of Module that will be used to communicate with the radio.
@@ -592,7 +627,7 @@ void 
-

Forces LoRa low data rate optimization. Only available in LoRa mode. After calling this method, LDRO will always be set to the provided value, regardless of symbol length. To re-enable automatic LDRO configuration, call SX126x::autoLDRO()

+

Forces LoRa low data rate optimization. Only available in LoRa mode. After calling this method, LDRO will always be set to the provided value, regardless of symbol length. To re-enable automatic LDRO configuration, call SX126x::autoLDRO()

Parameters
@@ -816,10 +851,34 @@ void  + + + + @@ -151,17 +157,24 @@ $(document).ready(function(){initNavTree('class_s_x1276.html','');}); - - - - - - - - - - - + + + + + + + + + + + + + + + + + +
enableForce LDRO to be always enabled (true) or disabled (false).
PhysicalLayer.

+ + + +

◆ readData() [1/3]

+ +
+
+ + + + +
int16_t PhysicalLayer::readData
+
+ +

Reads data that was received after calling startReceive method.

+
Parameters
+ + + +
strAddress of Arduino String to save the received data.
lenExpected number of characters in the message.
+
+
+
Returns
Status Codes
+
-

◆ readData()

+

◆ readData() [2/3]

@@ -864,10 +923,58 @@ void 
PhysicalLayer.

+ + + +

◆ readData() [3/3]

+ +
+
+ + + + +
virtual int16_t PhysicalLayer::readData
+
+ +

Reads data that was received after calling startReceive method.

+
Parameters
+ + + +
dataPointer to array to save the received binary data.
lenNumber of bytes that will be received. Must be known in advance for binary transmissions.
+
+
+
Returns
Status Codes
+ +
+
+ +

◆ receive() [1/3]

+ +
+
+ + + + +
int16_t PhysicalLayer::receive
+
+ +

Arduino String receive method.

+
Parameters
+ + + +
strAddress of Arduino String to save the received data.
lenExpected number of characters in the message. Leave as 0 if expecting a unknown size packet
+
+
+
Returns
Status Codes
+
-

◆ receive()

+

◆ receive() [2/3]

@@ -900,7 +1007,7 @@ void 
-

Blocking binary receive method. Overloads for string-based transmissions are implemented in PhysicalLayer.

+

Blocking binary receive method. Overloads for string-based transmissions are implemented in PhysicalLayer.

Parameters
@@ -912,6 +1019,30 @@ void 
dataBinary data to be sent.
PhysicalLayer.

+ + + +

◆ receive() [3/3]

+ +
+
+ + + + +
virtual int16_t PhysicalLayer::receive
+
+ +

Binary receive method. Must be implemented in module class.

+
Parameters
+ + + +
dataPointer to array to save the received binary data.
lenNumber of bytes that will be received. Must be known in advance for binary transmissions.
+
+
+
Returns
Status Codes
+
@@ -937,7 +1068,7 @@ void 
-

Starts direct mode reception. Only implemented for PhysicalLayer compatibility, as SX126x series does not support direct mode reception. Will always return ERR_UNKNOWN.

+

Starts direct mode reception. Only implemented for PhysicalLayer compatibility, as SX126x series does not support direct mode reception. Will always return ERR_UNKNOWN.

Returns
Status Codes

Implements PhysicalLayer.

@@ -1286,7 +1417,7 @@ void 
-

Sets transmission encoding. Available in FSK mode only. Serves only as alias for PhysicalLayer compatibility.

+

Sets transmission encoding. Available in FSK mode only. Serves only as alias for PhysicalLayer compatibility.

Parameters
@@ -1557,48 +1688,10 @@ void 
encodingEncoding to be used. Set to 0 for NRZ, and 2 for whitening.
Returns
Status Codes
- - - -

◆ setSyncWord() [1/2]

- -
-
- - - - - - - - - - - - - - - - - - -
int16_t SX126x::setSyncWord (uint8_t syncWord,
uint8_t controlBits = 0x44 
)
-
- -

Sets LoRa sync word.

-
Parameters
- - - -
syncWordLoRa sync word to be set.
controlBitsUndocumented control bits, required for compatibility purposes.
-
-
-
Returns
Status Codes
-
-

◆ setSyncWord() [2/2]

+

◆ setSyncWord() [1/2]

@@ -1633,6 +1726,44 @@ void 
Returns
Status Codes
+ + + +

◆ setSyncWord() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
int16_t SX126x::setSyncWord (uint8_t syncWord,
uint8_t controlBits = 0x44 
)
+
+ +

Sets LoRa sync word.

+
Parameters
+ + + +
syncWordLoRa sync word to be set.
controlBitsUndocumented control bits, required for compatibility purposes.
+
+
+
Returns
Status Codes
+
@@ -1761,7 +1892,7 @@ void 
-

Sets the module to standby mode (overload for PhysicalLayer compatibility, uses 13 MHz RC oscillator).

+

Sets the module to standby mode (overload for PhysicalLayer compatibility, uses 13 MHz RC oscillator).

Returns
Status Codes

Implements PhysicalLayer.

@@ -1896,10 +2027,58 @@ void 
Returns
Status Codes
+ + + +

◆ startTransmit() [1/4]

+ +
+
+ + + + +
int16_t PhysicalLayer::startTransmit
+
+ +

Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes.

+
Parameters
+ + + +
strC-string that will be transmitted.
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+ +
+
+ +

◆ startTransmit() [2/4]

+ +
+
+ + + + +
int16_t PhysicalLayer::startTransmit
+
+ +

Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes.

+
Parameters
+ + + +
strAddress of Arduino String that will be transmitted.
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+
-

◆ startTransmit()

+

◆ startTransmit() [3/4]

@@ -1938,7 +2117,7 @@ void 
-

Interrupt-driven binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer.

+

Interrupt-driven binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer.

Parameters
@@ -1951,10 +2130,107 @@ void  + + + + @@ -151,16 +157,23 @@ $(document).ready(function(){initNavTree('class_s_x1272.html','');}); - - - - - - - - - - + + + + + + + + + + + + + + + + +
dataBinary data to be sent.
PhysicalLayer.

+ + + +

◆ startTransmit() [4/4]

+ +
+
+ + + + +
virtual int16_t PhysicalLayer::startTransmit
+
+ +

Interrupt-driven binary transmit method.

+
Parameters
+ + + + +
dataBinary data that will be transmitted.
lenLength of binary data to transmit (in bytes).
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+ +
+
+ +

◆ transmit() [1/5]

+ +
+
+ + + + +
int16_t PhysicalLayer::transmit
+
+ +

Arduino Flash String transmit method.

+
Parameters
+ + + +
strPointer to Arduino Flash String that will be transmitted.
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+ +
+
+ +

◆ transmit() [2/5]

+ +
+
+ + + + +
int16_t PhysicalLayer::transmit
+
+ +

C-string transmit method.

+
Parameters
+ + + +
strC-string that will be transmitted.
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+ +
+
+ +

◆ transmit() [3/5]

+ +
+
+ + + + +
int16_t PhysicalLayer::transmit
+
+ +

Arduino String transmit method.

+
Parameters
+ + + +
strAddress of Arduino string that will be transmitted.
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+
-

◆ transmit()

+

◆ transmit() [4/5]

@@ -1993,7 +2269,7 @@ void 
-

Blocking binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer.

+

Blocking binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer.

Parameters
@@ -2006,6 +2282,31 @@ void 
dataBinary data to be sent.
PhysicalLayer.

+ + + +

◆ transmit() [5/5]

+ +
+
+ + + + +
virtual int16_t PhysicalLayer::transmit
+
+ +

Binary transmit method. Must be implemented in module class.

+
Parameters
+ + + + +
dataBinary data that will be transmitted.
lenLength of binary data to transmit (in bytes).
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+
@@ -2084,7 +2385,7 @@ void 
SX126x + doxygen 1.8.17 diff --git a/class_s_x126x.js b/class_s_x126x.js index f8878c50..4c4d2c5c 100644 --- a/class_s_x126x.js +++ b/class_s_x126x.js @@ -18,8 +18,12 @@ var class_s_x126x = [ "getTimeOnAir", "class_s_x126x.html#a7e342ddbef84cf845bef8f4448b8da10", null ], [ "implicitHeader", "class_s_x126x.html#adec09cba71494bd927ad1da786606ca6", null ], [ "random", "class_s_x126x.html#a3dd88861454d8b6e742470dee04961be", null ], + [ "readData", "class_s_x126x.html#ae8eed0e888a7c8742e89d2b850977de2", null ], [ "readData", "class_s_x126x.html#a3350cbfab628956c1a456383ac7bb2b2", null ], + [ "readData", "class_s_x126x.html#ae8b6c756eb4b92855433ca389d73c632", null ], + [ "receive", "class_s_x126x.html#afb1b090348d9091bfa3a0b5ba3d85b36", null ], [ "receive", "class_s_x126x.html#ae3db6b29c482d94eef8a43cd8b5751c0", null ], + [ "receive", "class_s_x126x.html#a2ad4c6a8ac267f8ac590260414ffcda3", null ], [ "receiveDirect", "class_s_x126x.html#a8a18aee2bf05793aa29b5cf6b47bb435", null ], [ "reset", "class_s_x126x.html#a9aa6dd05dd32ef717a06cc8ba28ff71f", null ], [ "scanChannel", "class_s_x126x.html#ae9f24414bd684434c310df54b3558f21", null ], @@ -42,8 +46,8 @@ var class_s_x126x = [ "setRxBandwidth", "class_s_x126x.html#a59d443c02d4620cda32c63a00c6bcc22", null ], [ "setSpreadingFactor", "class_s_x126x.html#ae5993359ace652fbdc862eb23fdd263d", null ], [ "setSyncBits", "class_s_x126x.html#ac594fbb30c5010658c970a64654c7162", null ], - [ "setSyncWord", "class_s_x126x.html#a9d92dce566f8aefa836fe8f332e9560f", null ], [ "setSyncWord", "class_s_x126x.html#a38e6d7831f35893a5b8328c10a2901bf", null ], + [ "setSyncWord", "class_s_x126x.html#a9d92dce566f8aefa836fe8f332e9560f", null ], [ "setTCXO", "class_s_x126x.html#a57bee6f4b3a3b7ec646ac8de347ee0d6", null ], [ "setWhitening", "class_s_x126x.html#a67702de41ae866b9f9d73234fc9ae376", null ], [ "sleep", "class_s_x126x.html#afb5509f0705cdd971065251ed6b2fb4e", null ], @@ -52,8 +56,15 @@ var class_s_x126x = [ "startReceive", "class_s_x126x.html#a5052dc09f4b10ee22e169129f368685f", null ], [ "startReceiveDutyCycle", "class_s_x126x.html#adc46b6adda2d0e82e25ed1fc78274136", null ], [ "startReceiveDutyCycleAuto", "class_s_x126x.html#a6b50cb78f02a3d93939437eb48489d3f", null ], + [ "startTransmit", "class_s_x126x.html#a923654706eff5118ef6e84214e837f27", null ], + [ "startTransmit", "class_s_x126x.html#af068e6e862c99e39d0261a7971dd56db", null ], [ "startTransmit", "class_s_x126x.html#ab843614658a79db7aa24e48d5b6e84f1", null ], + [ "startTransmit", "class_s_x126x.html#a41a1de0ebffe7b65de6fd8cceb9a5123", null ], + [ "transmit", "class_s_x126x.html#ab139a34e03a6fd5a781cd54da21d308f", null ], + [ "transmit", "class_s_x126x.html#a492b2d057dd803c3884fa1adc8e22534", null ], + [ "transmit", "class_s_x126x.html#aeb62c5a521aafc1e0525c58e9364482b", null ], [ "transmit", "class_s_x126x.html#aab18364237ddac0c56aeaf63f08cf009", null ], + [ "transmit", "class_s_x126x.html#af81565ee82ef9a7de9c5663c745f4ef7", null ], [ "transmitDirect", "class_s_x126x.html#a921aa8afb8d33b2660731c1f8d67664b", null ], [ "variablePacketLengthMode", "class_s_x126x.html#aa11ab2c6f4488daf2ece93288e05c504", null ] ]; \ No newline at end of file diff --git a/class_s_x1272-members.html b/class_s_x1272-members.html index b42bd2c2..20b11007 100644 --- a/class_s_x1272-members.html +++ b/class_s_x1272-members.html @@ -1,9 +1,9 @@ - + - + RadioLib: Member List @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@
- + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -116,8 +118,12 @@ $(document).ready(function(){initNavTree('class_s_x1272.html','');});
PhysicalLayer::random(int32_t max)PhysicalLayer
PhysicalLayer::random(int32_t min, int32_t max)PhysicalLayer
readData(uint8_t *data, size_t len) overrideSX127xvirtual
readData(String &str, size_t len=0)SX127x
readData(uint8_t *data, size_t len)=0SX127x
PhysicalLayer::readData(String &str, size_t len=0)PhysicalLayer
receive(uint8_t *data, size_t len) overrideSX127xvirtual
receive(String &str, size_t len=0)SX127x
receive(uint8_t *data, size_t len)=0SX127x
PhysicalLayer::receive(String &str, size_t len=0)PhysicalLayer
receiveDirect() overrideSX127xvirtual
reset() overrideSX1272virtual
startDirect()PhysicalLayer
startReceive(uint8_t len=0, uint8_t mode=SX127X_RXCONTINUOUS)SX127x
startTransmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX127xvirtual
PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer
PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer
SX1272(Module *mod)SX1272
SX127x(Module *mod)SX127x
transmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX127xvirtual
PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer
PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer
PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer
transmitDirect(uint32_t frf=0) overrideSX127xvirtual
variablePacketLengthMode(uint8_t maxLen=SX127X_MAX_PACKET_LENGTH_FSK)SX127x
startTransmit(String &str, uint8_t addr=0)SX127x
startTransmit(const char *str, uint8_t addr=0)SX127x
startTransmit(uint8_t *data, size_t len, uint8_t addr=0)=0SX127x
PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer
PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer
SX1272(Module *mod)SX1272
SX127x(Module *mod)SX127x
transmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX127xvirtual
transmit(__FlashStringHelper *fstr, uint8_t addr=0)SX127x
transmit(String &str, uint8_t addr=0)SX127x
transmit(const char *str, uint8_t addr=0)SX127x
transmit(uint8_t *data, size_t len, uint8_t addr=0)=0SX127x
PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer
PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer
PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer
transmitDirect(uint32_t frf=0) overrideSX127xvirtual
variablePacketLengthMode(uint8_t maxLen=SX127X_MAX_PACKET_LENGTH_FSK)SX127x
@@ -168,7 +181,7 @@ $(document).ready(function(){initNavTree('class_s_x1272.html','');});
    + doxygen 1.8.17
diff --git a/class_s_x1272.html b/class_s_x1272.html index 19a6bcdc..1fb6e7d7 100644 --- a/class_s_x1272.html +++ b/class_s_x1272.html @@ -1,9 +1,9 @@ - + - + RadioLib: SX1272 Class Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@
- + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -99,67 +101,67 @@ Inheritance diagram for SX1272:
SX127x -PhysicalLayer +PhysicalLayer SX1273 - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -172,10 +174,10 @@ void  - + - + @@ -296,6 +298,39 @@ void  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -356,7 +391,7 @@ void  + + + + @@ -151,17 +157,24 @@ $(document).ready(function(){initNavTree('class_s_x1273.html','');}); - - - - - - - - - - - + + + + + + + + + + + + + + + + + +

Public Member Functions

 SX1272 (Module *mod)
 Default constructor. Called from Arduino sketch when creating new LoRa instance. More...
 Default constructor. Called from Arduino sketch when creating new LoRa instance. More...
 
int16_t begin (float freq=915.0, float bw=125.0, uint8_t sf=9, uint8_t cr=7, uint8_t syncWord=SX127X_SYNC_WORD, int8_t power=10, uint16_t preambleLength=8, uint8_t gain=0)
 LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the module. More...
 LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the module. More...
 
int16_t beginFSK (float freq=915.0, float br=48.0, float rxBw=125.0, float freqDev=50.0, int8_t power=10, uint16_t preambleLength=16, bool enableOOK=false)
 FSK modem initialization method. Must be called at least once from Arduino sketch to initialize the module. More...
 FSK modem initialization method. Must be called at least once from Arduino sketch to initialize the module. More...
 
void reset () override
 Reset method. Will reset the chip to the default state using RST pin.
 
int16_t setFrequency (float freq)
 Sets carrier frequency. Allowed values range from 860.0 MHz to 1020.0 MHz. More...
 Sets carrier frequency. Allowed values range from 860.0 MHz to 1020.0 MHz. More...
 
int16_t setBandwidth (float bw)
 Sets LoRa link bandwidth. Allowed values are 125, 250 and 500 kHz. Only available in LoRa mode. More...
 Sets LoRa link bandwidth. Allowed values are 125, 250 and 500 kHz. Only available in LoRa mode. More...
 
int16_t setSpreadingFactor (uint8_t sf)
 Sets LoRa link spreading factor. Allowed values range from 6 to 12. Only available in LoRa mode. More...
 Sets LoRa link spreading factor. Allowed values range from 6 to 12. Only available in LoRa mode. More...
 
int16_t setCodingRate (uint8_t cr)
 Sets LoRa link coding rate denominator. Allowed values range from 5 to 8. Only available in LoRa mode. More...
 Sets LoRa link coding rate denominator. Allowed values range from 5 to 8. Only available in LoRa mode. More...
 
int16_t setOutputPower (int8_t power)
 Sets transmission output power. Allowed values range from 2 to 17 dBm. More...
 Sets transmission output power. Allowed values range from 2 to 17 dBm. More...
 
int16_t setGain (uint8_t gain)
 Sets gain of receiver LNA (low-noise amplifier). Can be set to any integer in range 1 to 6 where 1 is the highest gain. Set to 0 to enable automatic gain control (recommended). Only available in LoRa mode. More...
 Sets gain of receiver LNA (low-noise amplifier). Can be set to any integer in range 1 to 6 where 1 is the highest gain. Set to 0 to enable automatic gain control (recommended). Only available in LoRa mode. More...
 
int16_t setDataShaping (uint8_t sh) override
 Sets Gaussian filter bandwidth-time product that will be used for data shaping. Only available in FSK mode with FSK modulation. Allowed values are RADIOLIB_SHAPING_0_3, RADIOLIB_SHAPING_0_5 or RADIOLIB_SHAPING_1_0. Set to RADIOLIB_SHAPING_NONE to disable data shaping. More...
 Sets Gaussian filter bandwidth-time product that will be used for data shaping. Only available in FSK mode with FSK modulation. Allowed values are RADIOLIB_SHAPING_0_3, RADIOLIB_SHAPING_0_5 or RADIOLIB_SHAPING_1_0. Set to RADIOLIB_SHAPING_NONE to disable data shaping. More...
 
int16_t setDataShapingOOK (uint8_t sh)
 Sets filter cutoff frequency that will be used for data shaping. Allowed values are 1 for frequency equal to bit rate and 2 for frequency equal to 2x bit rate. Set to 0 to disable data shaping. Only available in FSK mode with OOK modulation. More...
 Sets filter cutoff frequency that will be used for data shaping. Allowed values are 1 for frequency equal to bit rate and 2 for frequency equal to 2x bit rate. Set to 0 to disable data shaping. Only available in FSK mode with OOK modulation. More...
 
float getRSSI ()
 Gets recorded signal strength indicator of the latest received packet for LoRa modem, or current RSSI level for FSK modem. More...
 Gets recorded signal strength indicator of the latest received packet for LoRa modem, or current RSSI level for FSK modem. More...
 
int16_t setCRC (bool enableCRC)
 Enables/disables CRC check of received packets. More...
 Enables/disables CRC check of received packets. More...
 
int16_t forceLDRO (bool enable)
 Forces LoRa low data rate optimization. Only available in LoRa mode. After calling this method, LDRO will always be set to the provided value, regardless of symbol length. To re-enable automatic LDRO configuration, call SX1278::autoLDRO() More...
 Forces LoRa low data rate optimization. Only available in LoRa mode. After calling this method, LDRO will always be set to the provided value, regardless of symbol length. To re-enable automatic LDRO configuration, call SX1278::autoLDRO() More...
 
int16_t autoLDRO ()
 Re-enables automatic LDRO configuration. Only available in LoRa mode. After calling this method, LDRO will be enabled automatically when symbol length exceeds 16 ms. More...
 Re-enables automatic LDRO configuration. Only available in LoRa mode. After calling this method, LDRO will be enabled automatically when symbol length exceeds 16 ms. More...
 
int16_t implicitHeader (size_t len)
 Set implicit header mode for future reception/transmission. More...
 Set implicit header mode for future reception/transmission. More...
 
int16_t explicitHeader ()
 Set explicit header mode for future reception/transmission. More...
 Set explicit header mode for future reception/transmission. More...
 
- Public Member Functions inherited from SX127x
 SX127x (Module *mod)
 Initialization method for FSK modem. Will be called with appropriate parameters when calling FSK initialization method from derived class. More...
 
int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0) override
 Binary transmit method. Will transmit arbitrary binary data up to 255 bytes long using LoRa or up to 63 bytes using FSK modem. For overloads to transmit Arduino String or C-string, see PhysicalLayer::transmit. More...
 Binary transmit method. Will transmit arbitrary binary data up to 255 bytes long using LoRa or up to 63 bytes using FSK modem. For overloads to transmit Arduino String or C-string, see PhysicalLayer::transmit. More...
 
int16_t receive (uint8_t *data, size_t len) override
 Binary receive method. Will attempt to receive arbitrary binary data up to 255 bytes long using LoRa or up to 63 bytes using FSK modem. For overloads to receive Arduino String, see PhysicalLayer::receive. More...
 Binary receive method. Will attempt to receive arbitrary binary data up to 255 bytes long using LoRa or up to 63 bytes using FSK modem. For overloads to receive Arduino String, see PhysicalLayer::receive. More...
 
int16_t scanChannel ()
 Performs scan for valid LoRa preamble in the current channel. More...
int16_t invertIQ (bool invertIQ)
 Enables/disables Invert the LoRa I and Q signals. More...
 
int16_t transmit (__FlashStringHelper *fstr, uint8_t addr=0)
 Arduino Flash String transmit method. More...
 
int16_t transmit (String &str, uint8_t addr=0)
 Arduino String transmit method. More...
 
int16_t transmit (const char *str, uint8_t addr=0)
 C-string transmit method. More...
 
virtual int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Binary transmit method. Must be implemented in module class. More...
 
int16_t receive (String &str, size_t len=0)
 Arduino String receive method. More...
 
virtual int16_t receive (uint8_t *data, size_t len)=0
 Binary receive method. Must be implemented in module class. More...
 
int16_t startTransmit (String &str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
int16_t startTransmit (const char *str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
virtual int16_t startTransmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Interrupt-driven binary transmit method. More...
 
int16_t readData (String &str, size_t len=0)
 Reads data that was received after calling startReceive method. More...
 
virtual int16_t readData (uint8_t *data, size_t len)=0
 Reads data that was received after calling startReceive method. More...
 
- Public Member Functions inherited from PhysicalLayer
 PhysicalLayer (float freqStep, size_t maxPacketLength)
 Default constructor. More...
Parameters
- +
modInstance of Module that will be used to communicate with the LoRa chip.
modInstance of Module that will be used to communicate with the LoRa chip.
@@ -579,7 +614,7 @@ void 
-

Forces LoRa low data rate optimization. Only available in LoRa mode. After calling this method, LDRO will always be set to the provided value, regardless of symbol length. To re-enable automatic LDRO configuration, call SX1278::autoLDRO()

+

Forces LoRa low data rate optimization. Only available in LoRa mode. After calling this method, LDRO will always be set to the provided value, regardless of symbol length. To re-enable automatic LDRO configuration, call SX1278::autoLDRO()

Parameters
@@ -896,7 +931,7 @@ void 
enableForce LDRO to be always enabled (true) or disabled (false).
SX1272 + doxygen 1.8.17 diff --git a/class_s_x1273-members.html b/class_s_x1273-members.html index 0054d562..16fb191e 100644 --- a/class_s_x1273-members.html +++ b/class_s_x1273-members.html @@ -1,9 +1,9 @@ - + - + RadioLib: Member List @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@
- + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -116,8 +118,12 @@ $(document).ready(function(){initNavTree('class_s_x1273.html','');});
PhysicalLayer::random(int32_t max)PhysicalLayer
PhysicalLayer::random(int32_t min, int32_t max)PhysicalLayer
readData(uint8_t *data, size_t len) overrideSX127xvirtual
readData(String &str, size_t len=0)SX127x
readData(uint8_t *data, size_t len)=0SX127x
PhysicalLayer::readData(String &str, size_t len=0)PhysicalLayer
receive(uint8_t *data, size_t len) overrideSX127xvirtual
receive(String &str, size_t len=0)SX127x
receive(uint8_t *data, size_t len)=0SX127x
PhysicalLayer::receive(String &str, size_t len=0)PhysicalLayer
receiveDirect() overrideSX127xvirtual
reset() overrideSX1272virtual
startDirect()PhysicalLayer
startReceive(uint8_t len=0, uint8_t mode=SX127X_RXCONTINUOUS)SX127x
startTransmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX127xvirtual
PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer
PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer
SX1272(Module *mod)SX1272
SX1273(Module *mod)SX1273
SX127x(Module *mod)SX127x
transmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX127xvirtual
PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer
PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer
PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer
transmitDirect(uint32_t frf=0) overrideSX127xvirtual
variablePacketLengthMode(uint8_t maxLen=SX127X_MAX_PACKET_LENGTH_FSK)SX127x
startTransmit(String &str, uint8_t addr=0)SX127x
startTransmit(const char *str, uint8_t addr=0)SX127x
startTransmit(uint8_t *data, size_t len, uint8_t addr=0)=0SX127x
PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer
PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer
SX1272(Module *mod)SX1272
SX1273(Module *mod)SX1273
SX127x(Module *mod)SX127x
transmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX127xvirtual
transmit(__FlashStringHelper *fstr, uint8_t addr=0)SX127x
transmit(String &str, uint8_t addr=0)SX127x
transmit(const char *str, uint8_t addr=0)SX127x
transmit(uint8_t *data, size_t len, uint8_t addr=0)=0SX127x
PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer
PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer
PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer
transmitDirect(uint32_t frf=0) overrideSX127xvirtual
variablePacketLengthMode(uint8_t maxLen=SX127X_MAX_PACKET_LENGTH_FSK)SX127x
@@ -169,7 +182,7 @@ $(document).ready(function(){initNavTree('class_s_x1273.html','');});
    + doxygen 1.8.17
diff --git a/class_s_x1273.html b/class_s_x1273.html index aa3831b3..aa745de7 100644 --- a/class_s_x1273.html +++ b/class_s_x1273.html @@ -1,9 +1,9 @@ - + - + RadioLib: SX1273 Class Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@
- + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -100,20 +102,20 @@ Inheritance diagram for SX1273:
SX1272 SX127x -PhysicalLayer - - +PhysicalLayer + + - + - + - + @@ -160,7 +162,7 @@ void  - + @@ -182,10 +184,10 @@ void  - + - + @@ -306,6 +308,39 @@ void  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -366,7 +401,7 @@ void 

Public Member Functions

 SX1273 (Module *mod)
 Default constructor. Called from Arduino sketch when creating new LoRa instance. More...
 Default constructor. Called from Arduino sketch when creating new LoRa instance. More...
 
int16_t begin (float freq=915.0, float bw=125.0, uint8_t sf=9, uint8_t cr=7, uint8_t syncWord=SX127X_SYNC_WORD, int8_t power=10, uint16_t preambleLength=8, uint8_t gain=0)
 LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the module. More...
 LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the module. More...
 
int16_t setSpreadingFactor (uint8_t sf)
 Sets LoRa link spreading factor. Allowed values range from 6 to 9. Only available in LoRa mode. More...
 Sets LoRa link spreading factor. Allowed values range from 6 to 9. Only available in LoRa mode. More...
 
- Public Member Functions inherited from SX1272
 SX1272 (Module *mod)
 Enables/disables CRC check of received packets. More...
 
int16_t forceLDRO (bool enable)
 Forces LoRa low data rate optimization. Only available in LoRa mode. After calling this method, LDRO will always be set to the provided value, regardless of symbol length. To re-enable automatic LDRO configuration, call SX1278::autoLDRO() More...
 Forces LoRa low data rate optimization. Only available in LoRa mode. After calling this method, LDRO will always be set to the provided value, regardless of symbol length. To re-enable automatic LDRO configuration, call SX1278::autoLDRO() More...
 
int16_t autoLDRO ()
 Re-enables automatic LDRO configuration. Only available in LoRa mode. After calling this method, LDRO will be enabled automatically when symbol length exceeds 16 ms. More...
 Initialization method for FSK modem. Will be called with appropriate parameters when calling FSK initialization method from derived class. More...
 
int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0) override
 Binary transmit method. Will transmit arbitrary binary data up to 255 bytes long using LoRa or up to 63 bytes using FSK modem. For overloads to transmit Arduino String or C-string, see PhysicalLayer::transmit. More...
 Binary transmit method. Will transmit arbitrary binary data up to 255 bytes long using LoRa or up to 63 bytes using FSK modem. For overloads to transmit Arduino String or C-string, see PhysicalLayer::transmit. More...
 
int16_t receive (uint8_t *data, size_t len) override
 Binary receive method. Will attempt to receive arbitrary binary data up to 255 bytes long using LoRa or up to 63 bytes using FSK modem. For overloads to receive Arduino String, see PhysicalLayer::receive. More...
 Binary receive method. Will attempt to receive arbitrary binary data up to 255 bytes long using LoRa or up to 63 bytes using FSK modem. For overloads to receive Arduino String, see PhysicalLayer::receive. More...
 
int16_t scanChannel ()
 Performs scan for valid LoRa preamble in the current channel. More...
int16_t invertIQ (bool invertIQ)
 Enables/disables Invert the LoRa I and Q signals. More...
 
int16_t transmit (__FlashStringHelper *fstr, uint8_t addr=0)
 Arduino Flash String transmit method. More...
 
int16_t transmit (String &str, uint8_t addr=0)
 Arduino String transmit method. More...
 
int16_t transmit (const char *str, uint8_t addr=0)
 C-string transmit method. More...
 
virtual int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Binary transmit method. Must be implemented in module class. More...
 
int16_t receive (String &str, size_t len=0)
 Arduino String receive method. More...
 
virtual int16_t receive (uint8_t *data, size_t len)=0
 Binary receive method. Must be implemented in module class. More...
 
int16_t startTransmit (String &str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
int16_t startTransmit (const char *str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
virtual int16_t startTransmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Interrupt-driven binary transmit method. More...
 
int16_t readData (String &str, size_t len=0)
 Reads data that was received after calling startReceive method. More...
 
virtual int16_t readData (uint8_t *data, size_t len)=0
 Reads data that was received after calling startReceive method. More...
 
- Public Member Functions inherited from PhysicalLayer
 PhysicalLayer (float freqStep, size_t maxPacketLength)
 Default constructor. More...
Parameters
- +
modInstance of Module that will be used to communicate with the LoRa chip.
modInstance of Module that will be used to communicate with the LoRa chip.
@@ -493,7 +528,7 @@ void 
SX1273 + doxygen 1.8.17 diff --git a/class_s_x1276-members.html b/class_s_x1276-members.html index 3e51057a..a7b4f0d1 100644 --- a/class_s_x1276-members.html +++ b/class_s_x1276-members.html @@ -1,9 +1,9 @@ - + - + RadioLib: Member List @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@
- + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -116,8 +118,12 @@ $(document).ready(function(){initNavTree('class_s_x1276.html','');});
PhysicalLayer::random(int32_t max)PhysicalLayer
PhysicalLayer::random(int32_t min, int32_t max)PhysicalLayer
readData(uint8_t *data, size_t len) overrideSX127xvirtual
readData(String &str, size_t len=0)SX127x
readData(uint8_t *data, size_t len)=0SX127x
PhysicalLayer::readData(String &str, size_t len=0)PhysicalLayer
receive(uint8_t *data, size_t len) overrideSX127xvirtual
receive(String &str, size_t len=0)SX127x
receive(uint8_t *data, size_t len)=0SX127x
PhysicalLayer::receive(String &str, size_t len=0)PhysicalLayer
receiveDirect() overrideSX127xvirtual
reset() overrideSX1278virtual
startDirect()PhysicalLayer
startReceive(uint8_t len=0, uint8_t mode=SX127X_RXCONTINUOUS)SX127x
startTransmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX127xvirtual
PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer
PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer
SX1276(Module *mod)SX1276
SX1278(Module *mod)SX1278
SX127x(Module *mod)SX127x
transmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX127xvirtual
PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer
PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer
PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer
transmitDirect(uint32_t frf=0) overrideSX127xvirtual
variablePacketLengthMode(uint8_t maxLen=SX127X_MAX_PACKET_LENGTH_FSK)SX127x
startTransmit(String &str, uint8_t addr=0)SX127x
startTransmit(const char *str, uint8_t addr=0)SX127x
startTransmit(uint8_t *data, size_t len, uint8_t addr=0)=0SX127x
PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer
PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer
SX1276(Module *mod)SX1276
SX1278(Module *mod)SX1278
SX127x(Module *mod)SX127x
transmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX127xvirtual
transmit(__FlashStringHelper *fstr, uint8_t addr=0)SX127x
transmit(String &str, uint8_t addr=0)SX127x
transmit(const char *str, uint8_t addr=0)SX127x
transmit(uint8_t *data, size_t len, uint8_t addr=0)=0SX127x
PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer
PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer
PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer
transmitDirect(uint32_t frf=0) overrideSX127xvirtual
variablePacketLengthMode(uint8_t maxLen=SX127X_MAX_PACKET_LENGTH_FSK)SX127x
@@ -169,7 +182,7 @@ $(document).ready(function(){initNavTree('class_s_x1276.html','');}); diff --git a/class_s_x1276.html b/class_s_x1276.html index 0e8deb7c..2a4f6011 100644 --- a/class_s_x1276.html +++ b/class_s_x1276.html @@ -1,9 +1,9 @@ - + - + RadioLib: SX1276 Class Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -88,7 +90,7 @@ $(document).ready(function(){initNavTree('class_s_x1276.html','');});
-

Derived class for SX1276 modules. Overrides some methods from SX1278 due to different parameter ranges. +

Derived class for SX1276 modules. Overrides some methods from SX1278 due to different parameter ranges. More...

#include <SX1276.h>

@@ -98,25 +100,25 @@ Inheritance diagram for SX1276:
-SX1278 +SX1278 SX127x -PhysicalLayer - -
+PhysicalLayer + + - + - + - + - + @@ -163,7 +165,7 @@ void  - + @@ -185,10 +187,10 @@ void  - + - + @@ -309,6 +311,39 @@ void  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -348,7 +383,7 @@ void 

Public Member Functions

 SX1276 (Module *mod)
 Default constructor. Called from Arduino sketch when creating new LoRa instance. More...
 Default constructor. Called from Arduino sketch when creating new LoRa instance. More...
 
int16_t begin (float freq=434.0, float bw=125.0, uint8_t sf=9, uint8_t cr=7, uint8_t syncWord=SX127X_SYNC_WORD, int8_t power=10, uint16_t preambleLength=8, uint8_t gain=0)
 LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the module. More...
 LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the module. More...
 
int16_t beginFSK (float freq=434.0, float br=48.0, float freqDev=50.0, float rxBw=125.0, int8_t power=10, uint16_t preambleLength=16, bool enableOOK=false)
 FSK modem initialization method. Must be called at least once from Arduino sketch to initialize the module. More...
 FSK modem initialization method. Must be called at least once from Arduino sketch to initialize the module. More...
 
int16_t setFrequency (float freq)
 Sets carrier frequency. Allowed values range from 137.0 MHz to 1020.0 MHz. More...
 Sets carrier frequency. Allowed values range from 137.0 MHz to 1020.0 MHz. More...
 
- Public Member Functions inherited from SX1278
 SX1278 (Module *mod)
 Enables/disables CRC check of received packets. More...
 
int16_t forceLDRO (bool enable)
 Forces LoRa low data rate optimization. Only available in LoRa mode. After calling this method, LDRO will always be set to the provided value, regardless of symbol length. To re-enable automatic LDRO configuration, call SX1278::autoLDRO() More...
 Forces LoRa low data rate optimization. Only available in LoRa mode. After calling this method, LDRO will always be set to the provided value, regardless of symbol length. To re-enable automatic LDRO configuration, call SX1278::autoLDRO() More...
 
int16_t autoLDRO ()
 Re-enables automatic LDRO configuration. Only available in LoRa mode. After calling this method, LDRO will be enabled automatically when symbol length exceeds 16 ms. More...
 Initialization method for FSK modem. Will be called with appropriate parameters when calling FSK initialization method from derived class. More...
 
int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0) override
 Binary transmit method. Will transmit arbitrary binary data up to 255 bytes long using LoRa or up to 63 bytes using FSK modem. For overloads to transmit Arduino String or C-string, see PhysicalLayer::transmit. More...
 Binary transmit method. Will transmit arbitrary binary data up to 255 bytes long using LoRa or up to 63 bytes using FSK modem. For overloads to transmit Arduino String or C-string, see PhysicalLayer::transmit. More...
 
int16_t receive (uint8_t *data, size_t len) override
 Binary receive method. Will attempt to receive arbitrary binary data up to 255 bytes long using LoRa or up to 63 bytes using FSK modem. For overloads to receive Arduino String, see PhysicalLayer::receive. More...
 Binary receive method. Will attempt to receive arbitrary binary data up to 255 bytes long using LoRa or up to 63 bytes using FSK modem. For overloads to receive Arduino String, see PhysicalLayer::receive. More...
 
int16_t scanChannel ()
 Performs scan for valid LoRa preamble in the current channel. More...
int16_t invertIQ (bool invertIQ)
 Enables/disables Invert the LoRa I and Q signals. More...
 
int16_t transmit (__FlashStringHelper *fstr, uint8_t addr=0)
 Arduino Flash String transmit method. More...
 
int16_t transmit (String &str, uint8_t addr=0)
 Arduino String transmit method. More...
 
int16_t transmit (const char *str, uint8_t addr=0)
 C-string transmit method. More...
 
virtual int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Binary transmit method. Must be implemented in module class. More...
 
int16_t receive (String &str, size_t len=0)
 Arduino String receive method. More...
 
virtual int16_t receive (uint8_t *data, size_t len)=0
 Binary receive method. Must be implemented in module class. More...
 
int16_t startTransmit (String &str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
int16_t startTransmit (const char *str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
virtual int16_t startTransmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Interrupt-driven binary transmit method. More...
 
int16_t readData (String &str, size_t len=0)
 Reads data that was received after calling startReceive method. More...
 
virtual int16_t readData (uint8_t *data, size_t len)=0
 Reads data that was received after calling startReceive method. More...
 
- Public Member Functions inherited from PhysicalLayer
 PhysicalLayer (float freqStep, size_t maxPacketLength)
 Default constructor. More...
 

Detailed Description

-

Derived class for SX1276 modules. Overrides some methods from SX1278 due to different parameter ranges.

+

Derived class for SX1276 modules. Overrides some methods from SX1278 due to different parameter ranges.

Constructor & Destructor Documentation

◆ SX1276()

@@ -369,7 +404,7 @@ void 
Parameters
- +
modInstance of Module that will be used to communicate with the LoRa chip.
modInstance of Module that will be used to communicate with the LoRa chip.
@@ -569,7 +604,7 @@ void 
SX1276 + doxygen 1.8.17
diff --git a/class_s_x1277-members.html b/class_s_x1277-members.html index 0e1ec3fe..42f46a43 100644 --- a/class_s_x1277-members.html +++ b/class_s_x1277-members.html @@ -1,9 +1,9 @@ - + - + RadioLib: Member List @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -116,8 +118,12 @@ $(document).ready(function(){initNavTree('class_s_x1277.html','');}); PhysicalLayer::random(int32_t max)PhysicalLayer PhysicalLayer::random(int32_t min, int32_t max)PhysicalLayer readData(uint8_t *data, size_t len) overrideSX127xvirtual + readData(String &str, size_t len=0)SX127x + readData(uint8_t *data, size_t len)=0SX127x PhysicalLayer::readData(String &str, size_t len=0)PhysicalLayer receive(uint8_t *data, size_t len) overrideSX127xvirtual + receive(String &str, size_t len=0)SX127x + receive(uint8_t *data, size_t len)=0SX127x PhysicalLayer::receive(String &str, size_t len=0)PhysicalLayer receiveDirect() overrideSX127xvirtual reset() overrideSX1278virtual @@ -151,17 +157,24 @@ $(document).ready(function(){initNavTree('class_s_x1277.html','');}); startDirect()PhysicalLayer startReceive(uint8_t len=0, uint8_t mode=SX127X_RXCONTINUOUS)SX127x startTransmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX127xvirtual - PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer - PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer - SX1277(Module *mod)SX1277 - SX1278(Module *mod)SX1278 - SX127x(Module *mod)SX127x - transmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX127xvirtual - PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer - PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer - PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer - transmitDirect(uint32_t frf=0) overrideSX127xvirtual - variablePacketLengthMode(uint8_t maxLen=SX127X_MAX_PACKET_LENGTH_FSK)SX127x + startTransmit(String &str, uint8_t addr=0)SX127x + startTransmit(const char *str, uint8_t addr=0)SX127x + startTransmit(uint8_t *data, size_t len, uint8_t addr=0)=0SX127x + PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer + PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer + SX1277(Module *mod)SX1277 + SX1278(Module *mod)SX1278 + SX127x(Module *mod)SX127x + transmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX127xvirtual + transmit(__FlashStringHelper *fstr, uint8_t addr=0)SX127x + transmit(String &str, uint8_t addr=0)SX127x + transmit(const char *str, uint8_t addr=0)SX127x + transmit(uint8_t *data, size_t len, uint8_t addr=0)=0SX127x + PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer + PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer + PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer + transmitDirect(uint32_t frf=0) overrideSX127xvirtual + variablePacketLengthMode(uint8_t maxLen=SX127X_MAX_PACKET_LENGTH_FSK)SX127x
@@ -169,7 +182,7 @@ $(document).ready(function(){initNavTree('class_s_x1277.html','');}); diff --git a/class_s_x1277.html b/class_s_x1277.html index 867093f5..67bc1bfd 100644 --- a/class_s_x1277.html +++ b/class_s_x1277.html @@ -1,9 +1,9 @@ - + - + RadioLib: SX1277 Class Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -88,7 +90,7 @@ $(document).ready(function(){initNavTree('class_s_x1277.html','');});
-

Derived class for SX1277 modules. Overrides some methods from SX1278 due to different parameter ranges. +

Derived class for SX1277 modules. Overrides some methods from SX1278 due to different parameter ranges. More...

#include <SX1277.h>

@@ -98,28 +100,28 @@ Inheritance diagram for SX1277:
-SX1278 +SX1278 SX127x -PhysicalLayer - -
+PhysicalLayer + + - + - + - + - + - + @@ -166,7 +168,7 @@ void  - + @@ -188,10 +190,10 @@ void  - + - + @@ -312,6 +314,39 @@ void  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -351,7 +386,7 @@ void 

Public Member Functions

 SX1277 (Module *mod)
 Default constructor. Called from Arduino sketch when creating new LoRa instance. More...
 Default constructor. Called from Arduino sketch when creating new LoRa instance. More...
 
int16_t begin (float freq=434.0, float bw=125.0, uint8_t sf=9, uint8_t cr=7, uint8_t syncWord=SX127X_SYNC_WORD, int8_t power=10, uint16_t preambleLength=8, uint8_t gain=0)
 LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the module. More...
 LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the module. More...
 
int16_t beginFSK (float freq=434.0, float br=48.0, float freqDev=50.0, float rxBw=125.0, int8_t power=10, uint16_t preambleLength=16, bool enableOOK=false)
 FSK modem initialization method. Must be called at least once from Arduino sketch to initialize the module. More...
 FSK modem initialization method. Must be called at least once from Arduino sketch to initialize the module. More...
 
int16_t setFrequency (float freq)
 Sets carrier frequency. Allowed values range from 137.0 MHz to 1020.0 MHz. More...
 Sets carrier frequency. Allowed values range from 137.0 MHz to 1020.0 MHz. More...
 
int16_t setSpreadingFactor (uint8_t sf)
 Sets LoRa link spreading factor. Allowed values range from 6 to 9. Only available in LoRa mode. More...
 Sets LoRa link spreading factor. Allowed values range from 6 to 9. Only available in LoRa mode. More...
 
- Public Member Functions inherited from SX1278
 SX1278 (Module *mod)
 Enables/disables CRC check of received packets. More...
 
int16_t forceLDRO (bool enable)
 Forces LoRa low data rate optimization. Only available in LoRa mode. After calling this method, LDRO will always be set to the provided value, regardless of symbol length. To re-enable automatic LDRO configuration, call SX1278::autoLDRO() More...
 Forces LoRa low data rate optimization. Only available in LoRa mode. After calling this method, LDRO will always be set to the provided value, regardless of symbol length. To re-enable automatic LDRO configuration, call SX1278::autoLDRO() More...
 
int16_t autoLDRO ()
 Re-enables automatic LDRO configuration. Only available in LoRa mode. After calling this method, LDRO will be enabled automatically when symbol length exceeds 16 ms. More...
 Initialization method for FSK modem. Will be called with appropriate parameters when calling FSK initialization method from derived class. More...
 
int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0) override
 Binary transmit method. Will transmit arbitrary binary data up to 255 bytes long using LoRa or up to 63 bytes using FSK modem. For overloads to transmit Arduino String or C-string, see PhysicalLayer::transmit. More...
 Binary transmit method. Will transmit arbitrary binary data up to 255 bytes long using LoRa or up to 63 bytes using FSK modem. For overloads to transmit Arduino String or C-string, see PhysicalLayer::transmit. More...
 
int16_t receive (uint8_t *data, size_t len) override
 Binary receive method. Will attempt to receive arbitrary binary data up to 255 bytes long using LoRa or up to 63 bytes using FSK modem. For overloads to receive Arduino String, see PhysicalLayer::receive. More...
 Binary receive method. Will attempt to receive arbitrary binary data up to 255 bytes long using LoRa or up to 63 bytes using FSK modem. For overloads to receive Arduino String, see PhysicalLayer::receive. More...
 
int16_t scanChannel ()
 Performs scan for valid LoRa preamble in the current channel. More...
int16_t invertIQ (bool invertIQ)
 Enables/disables Invert the LoRa I and Q signals. More...
 
int16_t transmit (__FlashStringHelper *fstr, uint8_t addr=0)
 Arduino Flash String transmit method. More...
 
int16_t transmit (String &str, uint8_t addr=0)
 Arduino String transmit method. More...
 
int16_t transmit (const char *str, uint8_t addr=0)
 C-string transmit method. More...
 
virtual int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Binary transmit method. Must be implemented in module class. More...
 
int16_t receive (String &str, size_t len=0)
 Arduino String receive method. More...
 
virtual int16_t receive (uint8_t *data, size_t len)=0
 Binary receive method. Must be implemented in module class. More...
 
int16_t startTransmit (String &str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
int16_t startTransmit (const char *str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
virtual int16_t startTransmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Interrupt-driven binary transmit method. More...
 
int16_t readData (String &str, size_t len=0)
 Reads data that was received after calling startReceive method. More...
 
virtual int16_t readData (uint8_t *data, size_t len)=0
 Reads data that was received after calling startReceive method. More...
 
- Public Member Functions inherited from PhysicalLayer
 PhysicalLayer (float freqStep, size_t maxPacketLength)
 Default constructor. More...
 

Detailed Description

-

Derived class for SX1277 modules. Overrides some methods from SX1278 due to different parameter ranges.

+

Derived class for SX1277 modules. Overrides some methods from SX1278 due to different parameter ranges.

Constructor & Destructor Documentation

◆ SX1277()

@@ -372,7 +407,7 @@ void 
Parameters
- +
modInstance of Module that will be used to communicate with the LoRa chip.
modInstance of Module that will be used to communicate with the LoRa chip.
@@ -599,7 +634,7 @@ void 
SX1277 + doxygen 1.8.17
diff --git a/class_s_x1278-members.html b/class_s_x1278-members.html index 10fa3f3a..986aad7e 100644 --- a/class_s_x1278-members.html +++ b/class_s_x1278-members.html @@ -1,9 +1,9 @@ - + - + RadioLib: Member List @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -116,8 +118,12 @@ $(document).ready(function(){initNavTree('class_s_x1278.html','');}); PhysicalLayer::random(int32_t max)PhysicalLayer PhysicalLayer::random(int32_t min, int32_t max)PhysicalLayer readData(uint8_t *data, size_t len) overrideSX127xvirtual + readData(String &str, size_t len=0)SX127x + readData(uint8_t *data, size_t len)=0SX127x PhysicalLayer::readData(String &str, size_t len=0)PhysicalLayer receive(uint8_t *data, size_t len) overrideSX127xvirtual + receive(String &str, size_t len=0)SX127x + receive(uint8_t *data, size_t len)=0SX127x PhysicalLayer::receive(String &str, size_t len=0)PhysicalLayer receiveDirect() overrideSX127xvirtual reset() overrideSX1278virtual @@ -151,16 +157,23 @@ $(document).ready(function(){initNavTree('class_s_x1278.html','');}); startDirect()PhysicalLayer startReceive(uint8_t len=0, uint8_t mode=SX127X_RXCONTINUOUS)SX127x startTransmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX127xvirtual - PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer - PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer - SX1278(Module *mod)SX1278 - SX127x(Module *mod)SX127x - transmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX127xvirtual - PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer - PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer - PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer - transmitDirect(uint32_t frf=0) overrideSX127xvirtual - variablePacketLengthMode(uint8_t maxLen=SX127X_MAX_PACKET_LENGTH_FSK)SX127x + startTransmit(String &str, uint8_t addr=0)SX127x + startTransmit(const char *str, uint8_t addr=0)SX127x + startTransmit(uint8_t *data, size_t len, uint8_t addr=0)=0SX127x + PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer + PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer + SX1278(Module *mod)SX1278 + SX127x(Module *mod)SX127x + transmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX127xvirtual + transmit(__FlashStringHelper *fstr, uint8_t addr=0)SX127x + transmit(String &str, uint8_t addr=0)SX127x + transmit(const char *str, uint8_t addr=0)SX127x + transmit(uint8_t *data, size_t len, uint8_t addr=0)=0SX127x + PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer + PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer + PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer + transmitDirect(uint32_t frf=0) overrideSX127xvirtual + variablePacketLengthMode(uint8_t maxLen=SX127X_MAX_PACKET_LENGTH_FSK)SX127x
@@ -168,7 +181,7 @@ $(document).ready(function(){initNavTree('class_s_x1278.html','');}); diff --git a/class_s_x1278.html b/class_s_x1278.html index ed67d11f..e5602956 100644 --- a/class_s_x1278.html +++ b/class_s_x1278.html @@ -1,9 +1,9 @@ - + - + RadioLib: SX1278 Class Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -99,72 +101,72 @@ Inheritance diagram for SX1278:
SX127x -PhysicalLayer +PhysicalLayer RFM95 RFM96 SX1276 SX1277 SX1279 -RFM97 - - +RFM97 + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -177,10 +179,10 @@ void  - + - + @@ -301,6 +303,39 @@ void  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -361,7 +396,7 @@ void  + + + + @@ -151,17 +157,24 @@ $(document).ready(function(){initNavTree('class_s_x1279.html','');}); - - - - - - - - - - - + + + + + + + + + + + + + + + + + +

Public Member Functions

 SX1278 (Module *mod)
 Default constructor. Called from Arduino sketch when creating new LoRa instance. More...
 Default constructor. Called from Arduino sketch when creating new LoRa instance. More...
 
int16_t begin (float freq=434.0, float bw=125.0, uint8_t sf=9, uint8_t cr=7, uint8_t syncWord=SX127X_SYNC_WORD, int8_t power=10, uint16_t preambleLength=8, uint8_t gain=0)
 LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the module. More...
 LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the module. More...
 
int16_t beginFSK (float freq=434.0, float br=48.0, float freqDev=50.0, float rxBw=125.0, int8_t power=10, uint16_t preambleLength=16, bool enableOOK=false)
 FSK modem initialization method. Must be called at least once from Arduino sketch to initialize the module. More...
 FSK modem initialization method. Must be called at least once from Arduino sketch to initialize the module. More...
 
void reset () override
 Reset method. Will reset the chip to the default state using RST pin.
 
int16_t setFrequency (float freq)
 Sets carrier frequency. Allowed values range from 137.0 MHz to 525.0 MHz. More...
 Sets carrier frequency. Allowed values range from 137.0 MHz to 525.0 MHz. More...
 
int16_t setBandwidth (float bw)
 Sets LoRa link bandwidth. Allowed values are 10.4, 15.6, 20.8, 31.25, 41.7, 62.5, 125, 250 and 500 kHz. Only available in LoRa mode. More...
 Sets LoRa link bandwidth. Allowed values are 10.4, 15.6, 20.8, 31.25, 41.7, 62.5, 125, 250 and 500 kHz. Only available in LoRa mode. More...
 
int16_t setSpreadingFactor (uint8_t sf)
 Sets LoRa link spreading factor. Allowed values range from 6 to 12. Only available in LoRa mode. More...
 Sets LoRa link spreading factor. Allowed values range from 6 to 12. Only available in LoRa mode. More...
 
int16_t setCodingRate (uint8_t cr)
 Sets LoRa link coding rate denominator. Allowed values range from 5 to 8. Only available in LoRa mode. More...
 Sets LoRa link coding rate denominator. Allowed values range from 5 to 8. Only available in LoRa mode. More...
 
int16_t setOutputPower (int8_t power)
 Sets transmission output power. Allowed values range from 2 to 17 dBm. More...
 Sets transmission output power. Allowed values range from 2 to 17 dBm. More...
 
int16_t setGain (uint8_t gain)
 Sets gain of receiver LNA (low-noise amplifier). Can be set to any integer in range 1 to 6 where 1 is the highest gain. Set to 0 to enable automatic gain control (recommended). Only available in LoRa mode. More...
 Sets gain of receiver LNA (low-noise amplifier). Can be set to any integer in range 1 to 6 where 1 is the highest gain. Set to 0 to enable automatic gain control (recommended). Only available in LoRa mode. More...
 
int16_t setDataShaping (uint8_t sh) override
 Sets Gaussian filter bandwidth-time product that will be used for data shaping. Only available in FSK mode with FSK modulation. Allowed values are RADIOLIB_SHAPING_0_3, RADIOLIB_SHAPING_0_5 or RADIOLIB_SHAPING_1_0. Set to RADIOLIB_SHAPING_NONE to disable data shaping. More...
 Sets Gaussian filter bandwidth-time product that will be used for data shaping. Only available in FSK mode with FSK modulation. Allowed values are RADIOLIB_SHAPING_0_3, RADIOLIB_SHAPING_0_5 or RADIOLIB_SHAPING_1_0. Set to RADIOLIB_SHAPING_NONE to disable data shaping. More...
 
int16_t setDataShapingOOK (uint8_t sh)
 Sets filter cutoff frequency that will be used for data shaping. Allowed values are 1 for frequency equal to bit rate and 2 for frequency equal to 2x bit rate. Set to 0 to disable data shaping. Only available in FSK mode with OOK modulation. More...
 Sets filter cutoff frequency that will be used for data shaping. Allowed values are 1 for frequency equal to bit rate and 2 for frequency equal to 2x bit rate. Set to 0 to disable data shaping. Only available in FSK mode with OOK modulation. More...
 
float getRSSI ()
 Gets recorded signal strength indicator of the latest received packet for LoRa modem, or current RSSI level for FSK modem. More...
 Gets recorded signal strength indicator of the latest received packet for LoRa modem, or current RSSI level for FSK modem. More...
 
int16_t setCRC (bool enableCRC)
 Enables/disables CRC check of received packets. More...
 Enables/disables CRC check of received packets. More...
 
int16_t forceLDRO (bool enable)
 Forces LoRa low data rate optimization. Only available in LoRa mode. After calling this method, LDRO will always be set to the provided value, regardless of symbol length. To re-enable automatic LDRO configuration, call SX1278::autoLDRO() More...
 Forces LoRa low data rate optimization. Only available in LoRa mode. After calling this method, LDRO will always be set to the provided value, regardless of symbol length. To re-enable automatic LDRO configuration, call SX1278::autoLDRO() More...
 
int16_t autoLDRO ()
 Re-enables automatic LDRO configuration. Only available in LoRa mode. After calling this method, LDRO will be enabled automatically when symbol length exceeds 16 ms. More...
 Re-enables automatic LDRO configuration. Only available in LoRa mode. After calling this method, LDRO will be enabled automatically when symbol length exceeds 16 ms. More...
 
int16_t implicitHeader (size_t len)
 Set implicit header mode for future reception/transmission. More...
 Set implicit header mode for future reception/transmission. More...
 
int16_t explicitHeader ()
 Set explicit header mode for future reception/transmission. More...
 Set explicit header mode for future reception/transmission. More...
 
- Public Member Functions inherited from SX127x
 SX127x (Module *mod)
 Initialization method for FSK modem. Will be called with appropriate parameters when calling FSK initialization method from derived class. More...
 
int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0) override
 Binary transmit method. Will transmit arbitrary binary data up to 255 bytes long using LoRa or up to 63 bytes using FSK modem. For overloads to transmit Arduino String or C-string, see PhysicalLayer::transmit. More...
 Binary transmit method. Will transmit arbitrary binary data up to 255 bytes long using LoRa or up to 63 bytes using FSK modem. For overloads to transmit Arduino String or C-string, see PhysicalLayer::transmit. More...
 
int16_t receive (uint8_t *data, size_t len) override
 Binary receive method. Will attempt to receive arbitrary binary data up to 255 bytes long using LoRa or up to 63 bytes using FSK modem. For overloads to receive Arduino String, see PhysicalLayer::receive. More...
 Binary receive method. Will attempt to receive arbitrary binary data up to 255 bytes long using LoRa or up to 63 bytes using FSK modem. For overloads to receive Arduino String, see PhysicalLayer::receive. More...
 
int16_t scanChannel ()
 Performs scan for valid LoRa preamble in the current channel. More...
int16_t invertIQ (bool invertIQ)
 Enables/disables Invert the LoRa I and Q signals. More...
 
int16_t transmit (__FlashStringHelper *fstr, uint8_t addr=0)
 Arduino Flash String transmit method. More...
 
int16_t transmit (String &str, uint8_t addr=0)
 Arduino String transmit method. More...
 
int16_t transmit (const char *str, uint8_t addr=0)
 C-string transmit method. More...
 
virtual int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Binary transmit method. Must be implemented in module class. More...
 
int16_t receive (String &str, size_t len=0)
 Arduino String receive method. More...
 
virtual int16_t receive (uint8_t *data, size_t len)=0
 Binary receive method. Must be implemented in module class. More...
 
int16_t startTransmit (String &str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
int16_t startTransmit (const char *str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
virtual int16_t startTransmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Interrupt-driven binary transmit method. More...
 
int16_t readData (String &str, size_t len=0)
 Reads data that was received after calling startReceive method. More...
 
virtual int16_t readData (uint8_t *data, size_t len)=0
 Reads data that was received after calling startReceive method. More...
 
- Public Member Functions inherited from PhysicalLayer
 PhysicalLayer (float freqStep, size_t maxPacketLength)
 Default constructor. More...
Parameters
- +
modInstance of Module that will be used to communicate with the LoRa chip.
modInstance of Module that will be used to communicate with the LoRa chip.
@@ -584,7 +619,7 @@ void 
-

Forces LoRa low data rate optimization. Only available in LoRa mode. After calling this method, LDRO will always be set to the provided value, regardless of symbol length. To re-enable automatic LDRO configuration, call SX1278::autoLDRO()

+

Forces LoRa low data rate optimization. Only available in LoRa mode. After calling this method, LDRO will always be set to the provided value, regardless of symbol length. To re-enable automatic LDRO configuration, call SX1278::autoLDRO()

Parameters
@@ -901,7 +936,7 @@ void 
enableForce LDRO to be always enabled (true) or disabled (false).
SX1278 + doxygen 1.8.17 diff --git a/class_s_x1279-members.html b/class_s_x1279-members.html index a2043908..29c174b4 100644 --- a/class_s_x1279-members.html +++ b/class_s_x1279-members.html @@ -1,9 +1,9 @@ - + - + RadioLib: Member List @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@
- + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -116,8 +118,12 @@ $(document).ready(function(){initNavTree('class_s_x1279.html','');});
PhysicalLayer::random(int32_t max)PhysicalLayer
PhysicalLayer::random(int32_t min, int32_t max)PhysicalLayer
readData(uint8_t *data, size_t len) overrideSX127xvirtual
readData(String &str, size_t len=0)SX127x
readData(uint8_t *data, size_t len)=0SX127x
PhysicalLayer::readData(String &str, size_t len=0)PhysicalLayer
receive(uint8_t *data, size_t len) overrideSX127xvirtual
receive(String &str, size_t len=0)SX127x
receive(uint8_t *data, size_t len)=0SX127x
PhysicalLayer::receive(String &str, size_t len=0)PhysicalLayer
receiveDirect() overrideSX127xvirtual
reset() overrideSX1278virtual
startDirect()PhysicalLayer
startReceive(uint8_t len=0, uint8_t mode=SX127X_RXCONTINUOUS)SX127x
startTransmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX127xvirtual
PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer
PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer
SX1278(Module *mod)SX1278
SX1279(Module *mod)SX1279
SX127x(Module *mod)SX127x
transmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX127xvirtual
PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer
PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer
PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer
transmitDirect(uint32_t frf=0) overrideSX127xvirtual
variablePacketLengthMode(uint8_t maxLen=SX127X_MAX_PACKET_LENGTH_FSK)SX127x
startTransmit(String &str, uint8_t addr=0)SX127x
startTransmit(const char *str, uint8_t addr=0)SX127x
startTransmit(uint8_t *data, size_t len, uint8_t addr=0)=0SX127x
PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer
PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer
SX1278(Module *mod)SX1278
SX1279(Module *mod)SX1279
SX127x(Module *mod)SX127x
transmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX127xvirtual
transmit(__FlashStringHelper *fstr, uint8_t addr=0)SX127x
transmit(String &str, uint8_t addr=0)SX127x
transmit(const char *str, uint8_t addr=0)SX127x
transmit(uint8_t *data, size_t len, uint8_t addr=0)=0SX127x
PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer
PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer
PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer
transmitDirect(uint32_t frf=0) overrideSX127xvirtual
variablePacketLengthMode(uint8_t maxLen=SX127X_MAX_PACKET_LENGTH_FSK)SX127x
@@ -169,7 +182,7 @@ $(document).ready(function(){initNavTree('class_s_x1279.html','');}); diff --git a/class_s_x1279.html b/class_s_x1279.html index fbfbc7ed..d1bb01eb 100644 --- a/class_s_x1279.html +++ b/class_s_x1279.html @@ -1,9 +1,9 @@ - + - + RadioLib: SX1279 Class Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -88,7 +90,7 @@ $(document).ready(function(){initNavTree('class_s_x1279.html','');});
-

Derived class for SX1279 modules. Overrides some methods from SX1278 due to different parameter ranges. +

Derived class for SX1279 modules. Overrides some methods from SX1278 due to different parameter ranges. More...

#include <SX1279.h>

@@ -98,25 +100,25 @@ Inheritance diagram for SX1279:
-SX1278 +SX1278 SX127x -PhysicalLayer - -
+PhysicalLayer + + - + - + - + - + @@ -163,7 +165,7 @@ void  - + @@ -185,10 +187,10 @@ void  - + - + @@ -309,6 +311,39 @@ void  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -348,7 +383,7 @@ void 

Public Member Functions

 SX1279 (Module *mod)
 Default constructor. Called from Arduino sketch when creating new LoRa instance. More...
 Default constructor. Called from Arduino sketch when creating new LoRa instance. More...
 
int16_t begin (float freq=434.0, float bw=125.0, uint8_t sf=9, uint8_t cr=7, uint8_t syncWord=SX127X_SYNC_WORD, int8_t power=10, uint16_t preambleLength=8, uint8_t gain=0)
 LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the module. More...
 LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the module. More...
 
int16_t beginFSK (float freq=434.0, float br=48.0, float freqDev=50.0, float rxBw=125.0, int8_t power=10, uint16_t preambleLength=16, bool enableOOK=false)
 FSK modem initialization method. Must be called at least once from Arduino sketch to initialize the module. More...
 FSK modem initialization method. Must be called at least once from Arduino sketch to initialize the module. More...
 
int16_t setFrequency (float freq)
 Sets carrier frequency. Allowed values range from 137.0 MHz to 960.0 MHz. More...
 Sets carrier frequency. Allowed values range from 137.0 MHz to 960.0 MHz. More...
 
- Public Member Functions inherited from SX1278
 SX1278 (Module *mod)
 Enables/disables CRC check of received packets. More...
 
int16_t forceLDRO (bool enable)
 Forces LoRa low data rate optimization. Only available in LoRa mode. After calling this method, LDRO will always be set to the provided value, regardless of symbol length. To re-enable automatic LDRO configuration, call SX1278::autoLDRO() More...
 Forces LoRa low data rate optimization. Only available in LoRa mode. After calling this method, LDRO will always be set to the provided value, regardless of symbol length. To re-enable automatic LDRO configuration, call SX1278::autoLDRO() More...
 
int16_t autoLDRO ()
 Re-enables automatic LDRO configuration. Only available in LoRa mode. After calling this method, LDRO will be enabled automatically when symbol length exceeds 16 ms. More...
 Initialization method for FSK modem. Will be called with appropriate parameters when calling FSK initialization method from derived class. More...
 
int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0) override
 Binary transmit method. Will transmit arbitrary binary data up to 255 bytes long using LoRa or up to 63 bytes using FSK modem. For overloads to transmit Arduino String or C-string, see PhysicalLayer::transmit. More...
 Binary transmit method. Will transmit arbitrary binary data up to 255 bytes long using LoRa or up to 63 bytes using FSK modem. For overloads to transmit Arduino String or C-string, see PhysicalLayer::transmit. More...
 
int16_t receive (uint8_t *data, size_t len) override
 Binary receive method. Will attempt to receive arbitrary binary data up to 255 bytes long using LoRa or up to 63 bytes using FSK modem. For overloads to receive Arduino String, see PhysicalLayer::receive. More...
 Binary receive method. Will attempt to receive arbitrary binary data up to 255 bytes long using LoRa or up to 63 bytes using FSK modem. For overloads to receive Arduino String, see PhysicalLayer::receive. More...
 
int16_t scanChannel ()
 Performs scan for valid LoRa preamble in the current channel. More...
int16_t invertIQ (bool invertIQ)
 Enables/disables Invert the LoRa I and Q signals. More...
 
int16_t transmit (__FlashStringHelper *fstr, uint8_t addr=0)
 Arduino Flash String transmit method. More...
 
int16_t transmit (String &str, uint8_t addr=0)
 Arduino String transmit method. More...
 
int16_t transmit (const char *str, uint8_t addr=0)
 C-string transmit method. More...
 
virtual int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Binary transmit method. Must be implemented in module class. More...
 
int16_t receive (String &str, size_t len=0)
 Arduino String receive method. More...
 
virtual int16_t receive (uint8_t *data, size_t len)=0
 Binary receive method. Must be implemented in module class. More...
 
int16_t startTransmit (String &str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
int16_t startTransmit (const char *str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
virtual int16_t startTransmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Interrupt-driven binary transmit method. More...
 
int16_t readData (String &str, size_t len=0)
 Reads data that was received after calling startReceive method. More...
 
virtual int16_t readData (uint8_t *data, size_t len)=0
 Reads data that was received after calling startReceive method. More...
 
- Public Member Functions inherited from PhysicalLayer
 PhysicalLayer (float freqStep, size_t maxPacketLength)
 Default constructor. More...
 

Detailed Description

-

Derived class for SX1279 modules. Overrides some methods from SX1278 due to different parameter ranges.

+

Derived class for SX1279 modules. Overrides some methods from SX1278 due to different parameter ranges.

Constructor & Destructor Documentation

◆ SX1279()

@@ -369,7 +404,7 @@ void 
Parameters
- +
modInstance of Module that will be used to communicate with the LoRa chip.
modInstance of Module that will be used to communicate with the LoRa chip.
@@ -569,7 +604,7 @@ void 
SX1279 + doxygen 1.8.17
diff --git a/class_s_x127x-members.html b/class_s_x127x-members.html index 6dfda5a6..6b4e04af 100644 --- a/class_s_x127x-members.html +++ b/class_s_x127x-members.html @@ -1,9 +1,9 @@ - + - + RadioLib: Member List @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -109,8 +111,12 @@ $(document).ready(function(){initNavTree('class_s_x127x.html','');}); PhysicalLayer::random(int32_t max)PhysicalLayer PhysicalLayer::random(int32_t min, int32_t max)PhysicalLayer readData(uint8_t *data, size_t len) overrideSX127xvirtual + readData(String &str, size_t len=0)SX127x + readData(uint8_t *data, size_t len)=0SX127x PhysicalLayer::readData(String &str, size_t len=0)PhysicalLayer receive(uint8_t *data, size_t len) overrideSX127xvirtual + receive(String &str, size_t len=0)SX127x + receive(uint8_t *data, size_t len)=0SX127x PhysicalLayer::receive(String &str, size_t len=0)PhysicalLayer receiveDirect() overrideSX127xvirtual reset()=0SX127xpure virtual @@ -136,15 +142,22 @@ $(document).ready(function(){initNavTree('class_s_x127x.html','');}); startDirect()PhysicalLayer startReceive(uint8_t len=0, uint8_t mode=SX127X_RXCONTINUOUS)SX127x startTransmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX127xvirtual - PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer - PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer - SX127x(Module *mod)SX127x - transmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX127xvirtual - PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer - PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer - PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer - transmitDirect(uint32_t frf=0) overrideSX127xvirtual - variablePacketLengthMode(uint8_t maxLen=SX127X_MAX_PACKET_LENGTH_FSK)SX127x + startTransmit(String &str, uint8_t addr=0)SX127x + startTransmit(const char *str, uint8_t addr=0)SX127x + startTransmit(uint8_t *data, size_t len, uint8_t addr=0)=0SX127x + PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer + PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer + SX127x(Module *mod)SX127x + transmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX127xvirtual + transmit(__FlashStringHelper *fstr, uint8_t addr=0)SX127x + transmit(String &str, uint8_t addr=0)SX127x + transmit(const char *str, uint8_t addr=0)SX127x + transmit(uint8_t *data, size_t len, uint8_t addr=0)=0SX127x + PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer + PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer + PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer + transmitDirect(uint32_t frf=0) overrideSX127xvirtual + variablePacketLengthMode(uint8_t maxLen=SX127X_MAX_PACKET_LENGTH_FSK)SX127x
@@ -152,7 +165,7 @@ $(document).ready(function(){initNavTree('class_s_x127x.html','');}); diff --git a/class_s_x127x.html b/class_s_x127x.html index 4b6db3b8..7e6c89c6 100644 --- a/class_s_x127x.html +++ b/class_s_x127x.html @@ -1,9 +1,9 @@ - + - + RadioLib: SX127x Class Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -88,7 +90,7 @@ $(document).ready(function(){initNavTree('class_s_x127x.html','');});
-

Base class for SX127x series. All derived classes for SX127x (e.g. SX1278 or SX1272) inherit from this base class. This class should not be instantiated directly from Arduino sketch, only from its derived classes. +

Base class for SX127x series. All derived classes for SX127x (e.g. SX1278 or SX1272) inherit from this base class. This class should not be instantiated directly from Arduino sketch, only from its derived classes. More...

#include <SX127x.h>

@@ -98,159 +100,192 @@ Inheritance diagram for SX127x:
-PhysicalLayer +PhysicalLayer SX1272 -SX1278 +SX1278 SX1273 RFM95 RFM96 SX1276 SX1277 SX1279 -RFM97 - -
+RFM97 + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -293,7 +328,7 @@ void 

Public Member Functions

 SX127x (Module *mod)
 Default constructor. Called internally when creating new LoRa instance. More...
 Default constructor. Called internally when creating new LoRa instance. More...
 
int16_t begin (uint8_t chipVersion, uint8_t syncWord, uint16_t preambleLength)
 Initialization method. Will be called with appropriate parameters when calling initialization method from derived class. More...
 Initialization method. Will be called with appropriate parameters when calling initialization method from derived class. More...
 
virtual void reset ()=0
 Reset method. Will reset the chip to the default state using RST pin. Declared pure virtual since SX1272 and SX1278 implementations differ.
 Reset method. Will reset the chip to the default state using RST pin. Declared pure virtual since SX1272 and SX1278 implementations differ.
 
int16_t beginFSK (uint8_t chipVersion, float br, float freqDev, float rxBw, uint16_t preambleLength, bool enableOOK)
 Initialization method for FSK modem. Will be called with appropriate parameters when calling FSK initialization method from derived class. More...
 Initialization method for FSK modem. Will be called with appropriate parameters when calling FSK initialization method from derived class. More...
 
int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0) override
 Binary transmit method. Will transmit arbitrary binary data up to 255 bytes long using LoRa or up to 63 bytes using FSK modem. For overloads to transmit Arduino String or C-string, see PhysicalLayer::transmit. More...
 Binary transmit method. Will transmit arbitrary binary data up to 255 bytes long using LoRa or up to 63 bytes using FSK modem. For overloads to transmit Arduino String or C-string, see PhysicalLayer::transmit. More...
 
int16_t receive (uint8_t *data, size_t len) override
 Binary receive method. Will attempt to receive arbitrary binary data up to 255 bytes long using LoRa or up to 63 bytes using FSK modem. For overloads to receive Arduino String, see PhysicalLayer::receive. More...
 Binary receive method. Will attempt to receive arbitrary binary data up to 255 bytes long using LoRa or up to 63 bytes using FSK modem. For overloads to receive Arduino String, see PhysicalLayer::receive. More...
 
int16_t scanChannel ()
 Performs scan for valid LoRa preamble in the current channel. More...
 Performs scan for valid LoRa preamble in the current channel. More...
 
int16_t sleep ()
 Sets the LoRa module to sleep to save power. Module will not be able to transmit or receive any data while in sleep mode. Module will wake up automatically when methods like transmit or receive are called. More...
 Sets the LoRa module to sleep to save power. Module will not be able to transmit or receive any data while in sleep mode. Module will wake up automatically when methods like transmit or receive are called. More...
 
int16_t standby () override
 Sets the LoRa module to standby. More...
 Sets the LoRa module to standby. More...
 
int16_t transmitDirect (uint32_t frf=0) override
 Enables direct transmission mode on pins DIO1 (clock) and DIO2 (data). While in direct mode, the module will not be able to transmit or receive packets. Can only be activated in FSK mode. More...
 Enables direct transmission mode on pins DIO1 (clock) and DIO2 (data). While in direct mode, the module will not be able to transmit or receive packets. Can only be activated in FSK mode. More...
 
int16_t receiveDirect () override
 Enables direct reception mode on pins DIO1 (clock) and DIO2 (data). While in direct mode, the module will not be able to transmit or receive packets. Can only be activated in FSK mode. More...
 Enables direct reception mode on pins DIO1 (clock) and DIO2 (data). While in direct mode, the module will not be able to transmit or receive packets. Can only be activated in FSK mode. More...
 
int16_t packetMode ()
 Disables direct mode and enables packet mode, allowing the module to receive packets. Can only be activated in FSK mode. More...
 Disables direct mode and enables packet mode, allowing the module to receive packets. Can only be activated in FSK mode. More...
 
void setDio0Action (void(*func)(void))
 Set interrupt service routine function to call when DIO0 activates. More...
 Set interrupt service routine function to call when DIO0 activates. More...
 
void clearDio0Action ()
 Clears interrupt service routine to call when DIO0 activates.
 
void setDio1Action (void(*func)(void))
 Set interrupt service routine function to call when DIO1 activates. More...
 Set interrupt service routine function to call when DIO1 activates. More...
 
void clearDio1Action ()
 Clears interrupt service routine to call when DIO1 activates.
 
int16_t startTransmit (uint8_t *data, size_t len, uint8_t addr=0) override
 Interrupt-driven binary transmit method. Will start transmitting arbitrary binary data up to 255 bytes long using LoRa or up to 63 bytes using FSK modem. More...
 Interrupt-driven binary transmit method. Will start transmitting arbitrary binary data up to 255 bytes long using LoRa or up to 63 bytes using FSK modem. More...
 
int16_t startReceive (uint8_t len=0, uint8_t mode=SX127X_RXCONTINUOUS)
 Interrupt-driven receive method. DIO0 will be activated when full valid packet is received. More...
 Interrupt-driven receive method. DIO0 will be activated when full valid packet is received. More...
 
int16_t readData (uint8_t *data, size_t len) override
 Reads data that was received after calling startReceive method. This method reads len characters. More...
 Reads data that was received after calling startReceive method. This method reads len characters. More...
 
int16_t setSyncWord (uint8_t syncWord)
 Sets LoRa sync word. Only available in LoRa mode. More...
 Sets LoRa sync word. Only available in LoRa mode. More...
 
int16_t setCurrentLimit (uint8_t currentLimit)
 Sets current limit for over current protection at transmitter amplifier. Allowed values range from 45 to 120 mA in 5 mA steps and 120 to 240 mA in 10 mA steps. More...
 Sets current limit for over current protection at transmitter amplifier. Allowed values range from 45 to 120 mA in 5 mA steps and 120 to 240 mA in 10 mA steps. More...
 
int16_t setPreambleLength (uint16_t preambleLength)
 Sets LoRa or FSK preamble length. Allowed values range from 6 to 65535 in LoRa mode or 0 to 65535 in FSK mode. More...
 Sets LoRa or FSK preamble length. Allowed values range from 6 to 65535 in LoRa mode or 0 to 65535 in FSK mode. More...
 
float getFrequencyError (bool autoCorrect=false)
 Gets frequency error of the latest received packet. More...
 Gets frequency error of the latest received packet. More...
 
float getSNR ()
 Gets signal-to-noise ratio of the latest received packet. More...
 Gets signal-to-noise ratio of the latest received packet. More...
 
float getDataRate () const
 Get data rate of the latest transmitted packet. More...
 Get data rate of the latest transmitted packet. More...
 
int16_t setBitRate (float br)
 Sets FSK bit rate. Allowed values range from 1.2 to 300 kbps. Only available in FSK mode. More...
 Sets FSK bit rate. Allowed values range from 1.2 to 300 kbps. Only available in FSK mode. More...
 
int16_t setFrequencyDeviation (float freqDev) override
 Sets FSK frequency deviation from carrier frequency. Allowed values depend on bit rate setting and must be lower than 200 kHz. Only available in FSK mode. More...
 Sets FSK frequency deviation from carrier frequency. Allowed values depend on bit rate setting and must be lower than 200 kHz. Only available in FSK mode. More...
 
int16_t setRxBandwidth (float rxBw)
 Sets FSK receiver bandwidth. Allowed values range from 2.6 to 250 kHz. Only available in FSK mode. More...
 Sets FSK receiver bandwidth. Allowed values range from 2.6 to 250 kHz. Only available in FSK mode. More...
 
int16_t setSyncWord (uint8_t *syncWord, size_t len)
 Sets FSK sync word. Allowed sync words are up to 8 bytes long and can not contain null bytes. Only available in FSK mode. More...
 Sets FSK sync word. Allowed sync words are up to 8 bytes long and can not contain null bytes. Only available in FSK mode. More...
 
int16_t setNodeAddress (uint8_t nodeAddr)
 Sets FSK node address. Calling this method will enable address filtering. Only available in FSK mode. More...
 Sets FSK node address. Calling this method will enable address filtering. Only available in FSK mode. More...
 
int16_t setBroadcastAddress (uint8_t broadAddr)
 Sets FSK broadcast address. Calling this method will enable address filtering. Only available in FSK mode. More...
 Sets FSK broadcast address. Calling this method will enable address filtering. Only available in FSK mode. More...
 
int16_t disableAddressFiltering ()
 Disables FSK address filtering. More...
 Disables FSK address filtering. More...
 
int16_t setOOK (bool enableOOK)
 Enables/disables OOK modulation instead of FSK. More...
 Enables/disables OOK modulation instead of FSK. More...
 
size_t getPacketLength (bool update=true) override
 Query modem for the packet length of received payload. More...
 Query modem for the packet length of received payload. More...
 
int16_t fixedPacketLengthMode (uint8_t len=SX127X_MAX_PACKET_LENGTH_FSK)
 Set modem in fixed packet length mode. Available in FSK mode only. More...
 Set modem in fixed packet length mode. Available in FSK mode only. More...
 
int16_t variablePacketLengthMode (uint8_t maxLen=SX127X_MAX_PACKET_LENGTH_FSK)
 Set modem in variable packet length mode. Available in FSK mode only. More...
 Set modem in variable packet length mode. Available in FSK mode only. More...
 
int16_t setRSSIConfig (uint8_t smoothingSamples, int8_t offset=0)
 Sets RSSI measurement configuration in FSK mode. More...
 Sets RSSI measurement configuration in FSK mode. More...
 
int16_t setEncoding (uint8_t encoding) override
 Sets transmission encoding. Only available in FSK mode. Allowed values are RADIOLIB_ENCODING_NRZ, RADIOLIB_ENCODING_MANCHESTER and RADIOLIB_ENCODING_WHITENING. More...
 Sets transmission encoding. Only available in FSK mode. Allowed values are RADIOLIB_ENCODING_NRZ, RADIOLIB_ENCODING_MANCHESTER and RADIOLIB_ENCODING_WHITENING. More...
 
uint16_t getIRQFlags ()
 Reads currently active IRQ flags, can be used to check which event caused an interrupt. In LoRa mode, this is the content of SX127X_REG_IRQ_FLAGS register. In FSK mode, this is the contents of SX127X_REG_IRQ_FLAGS_2 (MSB) and SX127X_REG_IRQ_FLAGS_1 (LSB) registers. More...
 Reads currently active IRQ flags, can be used to check which event caused an interrupt. In LoRa mode, this is the content of SX127X_REG_IRQ_FLAGS register. In FSK mode, this is the contents of SX127X_REG_IRQ_FLAGS_2 (MSB) and SX127X_REG_IRQ_FLAGS_1 (LSB) registers. More...
 
uint8_t getModemStatus ()
 Reads modem status. Only available in LoRa mode. More...
 Reads modem status. Only available in LoRa mode. More...
 
int8_t getTempRaw ()
 Reads uncalibrated temperature value. This function will change operating mode and should not be called during Tx, Rx or CAD. More...
 Reads uncalibrated temperature value. This function will change operating mode and should not be called during Tx, Rx or CAD. More...
 
void setRfSwitchPins (RADIOLIB_PIN_TYPE rxEn, RADIOLIB_PIN_TYPE txEn)
 Some modules contain external RF switch controlled by two pins. This function gives RadioLib control over those two pins to automatically switch Rx and Tx state. When using automatic RF switch control, DO NOT change the pin mode of rxEn or txEn from Arduino sketch! More...
 Some modules contain external RF switch controlled by two pins. This function gives RadioLib control over those two pins to automatically switch Rx and Tx state. When using automatic RF switch control, DO NOT change the pin mode of rxEn or txEn from Arduino sketch! More...
 
uint8_t random ()
 Get one truly random byte from RSSI noise. More...
 Get one truly random byte from RSSI noise. More...
 
int16_t getChipVersion ()
 Read version SPI register. Should return SX1278_CHIP_VERSION (0x12) or SX1272_CHIP_VERSION (0x22) if SX127x is connected and working. More...
 Read version SPI register. Should return SX1278_CHIP_VERSION (0x12) or SX1272_CHIP_VERSION (0x22) if SX127x is connected and working. More...
 
int16_t invertIQ (bool invertIQ)
 Enables/disables Invert the LoRa I and Q signals. More...
 Enables/disables Invert the LoRa I and Q signals. More...
 
int16_t transmit (__FlashStringHelper *fstr, uint8_t addr=0)
 Arduino Flash String transmit method. More...
 
int16_t transmit (String &str, uint8_t addr=0)
 Arduino String transmit method. More...
 
int16_t transmit (const char *str, uint8_t addr=0)
 C-string transmit method. More...
 
virtual int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Binary transmit method. Must be implemented in module class. More...
 
int16_t receive (String &str, size_t len=0)
 Arduino String receive method. More...
 
virtual int16_t receive (uint8_t *data, size_t len)=0
 Binary receive method. Must be implemented in module class. More...
 
int16_t startTransmit (String &str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
int16_t startTransmit (const char *str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
virtual int16_t startTransmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Interrupt-driven binary transmit method. More...
 
int16_t readData (String &str, size_t len=0)
 Reads data that was received after calling startReceive method. More...
 
virtual int16_t readData (uint8_t *data, size_t len)=0
 Reads data that was received after calling startReceive method. More...
 
- Public Member Functions inherited from PhysicalLayer
 PhysicalLayer (float freqStep, size_t maxPacketLength)
 Default constructor. More...
 

Detailed Description

-

Base class for SX127x series. All derived classes for SX127x (e.g. SX1278 or SX1272) inherit from this base class. This class should not be instantiated directly from Arduino sketch, only from its derived classes.

+

Base class for SX127x series. All derived classes for SX127x (e.g. SX1278 or SX1272) inherit from this base class. This class should not be instantiated directly from Arduino sketch, only from its derived classes.

Constructor & Destructor Documentation

◆ SX127x()

@@ -314,7 +349,7 @@ void 
Parameters
- +
modInstance of Module that will be used to communicate with the LoRa chip.
modInstance of Module that will be used to communicate with the LoRa chip.
@@ -739,10 +774,34 @@ void 
PhysicalLayer.

+
+ + +

◆ readData() [1/3]

+ +
+
+ + + + +
int16_t PhysicalLayer::readData
+
+ +

Reads data that was received after calling startReceive method.

+
Parameters
+ + + +
strAddress of Arduino String to save the received data.
lenExpected number of characters in the message.
+
+
+
Returns
Status Codes
+
-

◆ readData()

+

◆ readData() [2/3]

@@ -787,10 +846,58 @@ void PhysicalLayer.

+
+
+ +

◆ readData() [3/3]

+ +
+
+ + + + +
virtual int16_t PhysicalLayer::readData
+
+ +

Reads data that was received after calling startReceive method.

+
Parameters
+ + + +
dataPointer to array to save the received binary data.
lenNumber of bytes that will be received. Must be known in advance for binary transmissions.
+
+
+
Returns
Status Codes
+ +
+
+ +

◆ receive() [1/3]

+ +
+
+ + + + +
int16_t PhysicalLayer::receive
+
+ +

Arduino String receive method.

+
Parameters
+ + + +
strAddress of Arduino String to save the received data.
lenExpected number of characters in the message. Leave as 0 if expecting a unknown size packet
+
+
+
Returns
Status Codes
+
-

◆ receive()

+

◆ receive() [2/3]

@@ -823,7 +930,7 @@ void  -

Binary receive method. Will attempt to receive arbitrary binary data up to 255 bytes long using LoRa or up to 63 bytes using FSK modem. For overloads to receive Arduino String, see PhysicalLayer::receive.

+

Binary receive method. Will attempt to receive arbitrary binary data up to 255 bytes long using LoRa or up to 63 bytes using FSK modem. For overloads to receive Arduino String, see PhysicalLayer::receive.

Parameters
@@ -835,6 +942,30 @@ void  + + + + @@ -135,16 +141,23 @@ $(document).ready(function(){initNavTree('class_s_x1280.html','');}); - - - - - - - - - - + + + + + + + + + + + + + + + + +
dataPointer to array to save the received binary data.
PhysicalLayer.

+ + + +

◆ receive() [3/3]

+ +
+
+ + + + +
virtual int16_t PhysicalLayer::receive
+
+ +

Binary receive method. Must be implemented in module class.

+
Parameters
+ + + +
dataPointer to array to save the received binary data.
lenNumber of bytes that will be received. Must be known in advance for binary transmissions.
+
+
+
Returns
Status Codes
+
@@ -1276,37 +1407,10 @@ void 
Returns
Status Codes
- - - -

◆ setSyncWord() [1/2]

- -
-
- - - - - - - - -
int16_t SX127x::setSyncWord (uint8_t syncWord)
-
- -

Sets LoRa sync word. Only available in LoRa mode.

-
Parameters
- - -
syncWordSync word to be set.
-
-
-
Returns
Status Codes
-
-

◆ setSyncWord() [2/2]

+

◆ setSyncWord() [1/2]

@@ -1341,6 +1445,33 @@ void 
Returns
Status Codes
+ + + +

◆ setSyncWord() [2/2]

+ +
+
+ + + + + + + + +
int16_t SX127x::setSyncWord (uint8_t syncWord)
+
+ +

Sets LoRa sync word. Only available in LoRa mode.

+
Parameters
+ + +
syncWordSync word to be set.
+
+
+
Returns
Status Codes
+
@@ -1429,10 +1560,58 @@ void 
Returns
Status Codes
+ + + +

◆ startTransmit() [1/4]

+ +
+
+ + + + +
int16_t PhysicalLayer::startTransmit
+
+ +

Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes.

+
Parameters
+ + + +
strC-string that will be transmitted.
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+ +
+
+ +

◆ startTransmit() [2/4]

+ +
+
+ + + + +
int16_t PhysicalLayer::startTransmit
+
+ +

Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes.

+
Parameters
+ + + +
strAddress of Arduino String that will be transmitted.
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+
-

◆ startTransmit()

+

◆ startTransmit() [3/4]

@@ -1484,10 +1663,107 @@ void 
PhysicalLayer.

+ + + +

◆ startTransmit() [4/4]

+ +
+
+ + + + +
virtual int16_t PhysicalLayer::startTransmit
+
+ +

Interrupt-driven binary transmit method.

+
Parameters
+ + + + +
dataBinary data that will be transmitted.
lenLength of binary data to transmit (in bytes).
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+ +
+
+ +

◆ transmit() [1/5]

+ +
+
+ + + + +
int16_t PhysicalLayer::transmit
+
+ +

Arduino Flash String transmit method.

+
Parameters
+ + + +
strPointer to Arduino Flash String that will be transmitted.
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+ +
+
+ +

◆ transmit() [2/5]

+ +
+
+ + + + +
int16_t PhysicalLayer::transmit
+
+ +

C-string transmit method.

+
Parameters
+ + + +
strC-string that will be transmitted.
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+ +
+
+ +

◆ transmit() [3/5]

+ +
+
+ + + + +
int16_t PhysicalLayer::transmit
+
+ +

Arduino String transmit method.

+
Parameters
+ + + +
strAddress of Arduino string that will be transmitted.
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+
-

◆ transmit()

+

◆ transmit() [4/5]

@@ -1526,7 +1802,7 @@ void 
-

Binary transmit method. Will transmit arbitrary binary data up to 255 bytes long using LoRa or up to 63 bytes using FSK modem. For overloads to transmit Arduino String or C-string, see PhysicalLayer::transmit.

+

Binary transmit method. Will transmit arbitrary binary data up to 255 bytes long using LoRa or up to 63 bytes using FSK modem. For overloads to transmit Arduino String or C-string, see PhysicalLayer::transmit.

Parameters
@@ -1539,6 +1815,31 @@ void 
dataBinary data that will be transmitted.
PhysicalLayer.

+ + + +

◆ transmit() [5/5]

+ +
+
+ + + + +
virtual int16_t PhysicalLayer::transmit
+
+ +

Binary transmit method. Must be implemented in module class.

+
Parameters
+ + + + +
dataBinary data that will be transmitted.
lenLength of binary data to transmit (in bytes).
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+
@@ -1617,7 +1918,7 @@ void 
SX127x + doxygen 1.8.17 diff --git a/class_s_x127x.js b/class_s_x127x.js index 0a77d12d..d3b3558f 100644 --- a/class_s_x127x.js +++ b/class_s_x127x.js @@ -18,8 +18,12 @@ var class_s_x127x = [ "invertIQ", "class_s_x127x.html#a1f6c61b16a39a2bbb5b94b3685caae04", null ], [ "packetMode", "class_s_x127x.html#a0995088d37689a3c240a1af791df6cf1", null ], [ "random", "class_s_x127x.html#a6a03da620f9fb532c879900ba05732de", null ], + [ "readData", "class_s_x127x.html#ae8eed0e888a7c8742e89d2b850977de2", null ], [ "readData", "class_s_x127x.html#abfc840e8d6fe5e222f0143be17876745", null ], + [ "readData", "class_s_x127x.html#ae8b6c756eb4b92855433ca389d73c632", null ], + [ "receive", "class_s_x127x.html#afb1b090348d9091bfa3a0b5ba3d85b36", null ], [ "receive", "class_s_x127x.html#adfe0d3f033a23ec2f3c2a407285d357c", null ], + [ "receive", "class_s_x127x.html#a2ad4c6a8ac267f8ac590260414ffcda3", null ], [ "receiveDirect", "class_s_x127x.html#aa7ac558d537c6364c4bc82c8f33e398f", null ], [ "reset", "class_s_x127x.html#a3321ac4a7f65e73004202486db9b1d68", null ], [ "scanChannel", "class_s_x127x.html#ada007b90821258fe8c6ca7f8ae3efed5", null ], @@ -36,13 +40,20 @@ var class_s_x127x = [ "setRfSwitchPins", "class_s_x127x.html#ae9781180418c1ec9c365b74acbc98d8a", null ], [ "setRSSIConfig", "class_s_x127x.html#ad3955f85f456edae772a51025a19029b", null ], [ "setRxBandwidth", "class_s_x127x.html#a2cc53b9f9d90647c5709cb974779cf53", null ], - [ "setSyncWord", "class_s_x127x.html#ac5c7f4584352a12390594395d9c29bde", null ], [ "setSyncWord", "class_s_x127x.html#a9b7afe338fd5b81122c369ecaf0c3ebc", null ], + [ "setSyncWord", "class_s_x127x.html#ac5c7f4584352a12390594395d9c29bde", null ], [ "sleep", "class_s_x127x.html#a44501ec8f8ac6084467b94516b1337df", null ], [ "standby", "class_s_x127x.html#a760b8c5103128f122fbe489c6529ce41", null ], [ "startReceive", "class_s_x127x.html#afe8456d0f9abbce4d743f256f3e1e6c6", null ], + [ "startTransmit", "class_s_x127x.html#a923654706eff5118ef6e84214e837f27", null ], + [ "startTransmit", "class_s_x127x.html#af068e6e862c99e39d0261a7971dd56db", null ], [ "startTransmit", "class_s_x127x.html#adc2f1379573b7a7b5ee8125ea3752083", null ], + [ "startTransmit", "class_s_x127x.html#a41a1de0ebffe7b65de6fd8cceb9a5123", null ], + [ "transmit", "class_s_x127x.html#ab139a34e03a6fd5a781cd54da21d308f", null ], + [ "transmit", "class_s_x127x.html#a492b2d057dd803c3884fa1adc8e22534", null ], + [ "transmit", "class_s_x127x.html#aeb62c5a521aafc1e0525c58e9364482b", null ], [ "transmit", "class_s_x127x.html#a9c4ea3285922bf01cebd2c8a706d9a29", null ], + [ "transmit", "class_s_x127x.html#af81565ee82ef9a7de9c5663c745f4ef7", null ], [ "transmitDirect", "class_s_x127x.html#aefeeb9f7192e11a75b5dfb1ab8488e84", null ], [ "variablePacketLengthMode", "class_s_x127x.html#a9f753c0857e7b8b4b9f7f6e91c77f0fd", null ] ]; \ No newline at end of file diff --git a/class_s_x1280-members.html b/class_s_x1280-members.html index d34854c5..6a31d2c1 100644 --- a/class_s_x1280-members.html +++ b/class_s_x1280-members.html @@ -1,9 +1,9 @@ - + - + RadioLib: Member List @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@
- + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -106,8 +108,12 @@ $(document).ready(function(){initNavTree('class_s_x1280.html','');});
PhysicalLayer::random(int32_t min, int32_t max)PhysicalLayer
range(bool master, uint32_t addr)SX1280
readData(uint8_t *data, size_t len) overrideSX128xvirtual
readData(String &str, size_t len=0)SX128x
readData(uint8_t *data, size_t len)=0SX128x
PhysicalLayer::readData(String &str, size_t len=0)PhysicalLayer
receive(uint8_t *data, size_t len) overrideSX128xvirtual
receive(String &str, size_t len=0)SX128x
receive(uint8_t *data, size_t len)=0SX128x
PhysicalLayer::receive(String &str, size_t len=0)PhysicalLayer
receiveDirect() overrideSX128xvirtual
reset(bool verify=true)SX128x
startRanging(bool master, uint32_t addr)SX1280
startReceive(uint16_t timeout=SX128X_RX_TIMEOUT_INF)SX128x
startTransmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX128xvirtual
PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer
PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer
SX1280(Module *mod)SX1280
SX1281(Module *mod)SX1281
SX128x(Module *mod)SX128x
transmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX128xvirtual
PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer
PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer
PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer
transmitDirect(uint32_t frf=0) overrideSX128xvirtual
startTransmit(String &str, uint8_t addr=0)SX128x
startTransmit(const char *str, uint8_t addr=0)SX128x
startTransmit(uint8_t *data, size_t len, uint8_t addr=0)=0SX128x
PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer
PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer
SX1280(Module *mod)SX1280
SX1281(Module *mod)SX1281
SX128x(Module *mod)SX128x
transmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX128xvirtual
transmit(__FlashStringHelper *fstr, uint8_t addr=0)SX128x
transmit(String &str, uint8_t addr=0)SX128x
transmit(const char *str, uint8_t addr=0)SX128x
transmit(uint8_t *data, size_t len, uint8_t addr=0)=0SX128x
PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer
PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer
PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer
transmitDirect(uint32_t frf=0) overrideSX128xvirtual
@@ -152,7 +165,7 @@ $(document).ready(function(){initNavTree('class_s_x1280.html','');}); diff --git a/class_s_x1280.html b/class_s_x1280.html index c648b27f..fee758ac 100644 --- a/class_s_x1280.html +++ b/class_s_x1280.html @@ -1,9 +1,9 @@ - + - + RadioLib: SX1280 Class Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -98,26 +100,26 @@ Inheritance diagram for SX1280:
-SX1281 +SX1281 SX128x -PhysicalLayer -SX1282 - -
+PhysicalLayer +SX1282 + + - + - + - + - + @@ -143,16 +145,16 @@ Public Member Functions - + - + - + @@ -161,7 +163,7 @@ Public Member Functions - + @@ -174,7 +176,7 @@ void  - + @@ -240,14 +242,47 @@ void  - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -308,7 +343,7 @@ void 

Public Member Functions

 SX1280 (Module *mod)
 Default constructor. More...
 Default constructor. More...
 
int16_t range (bool master, uint32_t addr)
 Blocking ranging method. More...
 Blocking ranging method. More...
 
int16_t startRanging (bool master, uint32_t addr)
 Interrupt-driven ranging method. More...
 Interrupt-driven ranging method. More...
 
float getRangingResult ()
 Gets ranging result of the last ranging exchange. More...
 Gets ranging result of the last ranging exchange. More...
 
- Public Member Functions inherited from SX1281
 SX1281 (Module *mod)
 Reset method. Will reset the chip to the default state using RST pin. More...
 
int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0) override
 Blocking binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 Blocking binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 
int16_t receive (uint8_t *data, size_t len) override
 Blocking binary receive method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 Blocking binary receive method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 
int16_t transmitDirect (uint32_t frf=0) override
 Starts direct mode transmission. More...
 
int16_t receiveDirect () override
 Starts direct mode reception. Only implemented for PhysicalLayer compatibility, as SX128x series does not support direct mode reception. Will always return ERR_UNKNOWN. More...
 Starts direct mode reception. Only implemented for PhysicalLayer compatibility, as SX128x series does not support direct mode reception. Will always return ERR_UNKNOWN. More...
 
int16_t scanChannel ()
 Performs scan for LoRa transmission in the current channel. Detects both preamble and payload. More...
 Sets the module to sleep mode. More...
 
int16_t standby () override
 Sets the module to standby mode (overload for PhysicalLayer compatibility, uses 13 MHz RC oscillator). More...
 Sets the module to standby mode (overload for PhysicalLayer compatibility, uses 13 MHz RC oscillator). More...
 
int16_t standby (uint8_t mode)
 Sets the module to standby mode. More...
 Clears interrupt service routine to call when DIO1 activates.
 
int16_t startTransmit (uint8_t *data, size_t len, uint8_t addr=0) override
 Interrupt-driven binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 Interrupt-driven binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 
int16_t startReceive (uint16_t timeout=SX128X_RX_TIMEOUT_INF)
 Interrupt-driven receive method. DIO1 will be activated when full packet is received. More...
 Set explicit header mode for future reception/transmission. More...
 
int16_t setEncoding (uint8_t encoding) override
 Sets transmission encoding. Serves only as alias for PhysicalLayer compatibility. More...
 Sets transmission encoding. Serves only as alias for PhysicalLayer compatibility. More...
 
void setRfSwitchPins (RADIOLIB_PIN_TYPE rxEn, RADIOLIB_PIN_TYPE txEn)
 Some modules contain external RF switch controlled by two pins. This function gives RadioLib control over those two pins to automatically switch Rx and Tx state. When using automatic RF switch control, DO NOT change the pin mode of rxEn or txEn from Arduino sketch! More...
 
uint8_t random ()
 Dummy random method, to ensure PhysicalLayer compatibility. More...
 Dummy random method, to ensure PhysicalLayer compatibility. More...
 
int16_t transmit (__FlashStringHelper *fstr, uint8_t addr=0)
 Arduino Flash String transmit method. More...
 
int16_t transmit (String &str, uint8_t addr=0)
 Arduino String transmit method. More...
 
int16_t transmit (const char *str, uint8_t addr=0)
 C-string transmit method. More...
 
virtual int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Binary transmit method. Must be implemented in module class. More...
 
int16_t receive (String &str, size_t len=0)
 Arduino String receive method. More...
 
virtual int16_t receive (uint8_t *data, size_t len)=0
 Binary receive method. Must be implemented in module class. More...
 
int16_t startTransmit (String &str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
int16_t startTransmit (const char *str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
virtual int16_t startTransmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Interrupt-driven binary transmit method. More...
 
int16_t readData (String &str, size_t len=0)
 Reads data that was received after calling startReceive method. More...
 
virtual int16_t readData (uint8_t *data, size_t len)=0
 Reads data that was received after calling startReceive method. More...
 
- Public Member Functions inherited from PhysicalLayer
 PhysicalLayer (float freqStep, size_t maxPacketLength)
 Default constructor. More...
Parameters
- +
modInstance of Module that will be used to communicate with the radio.
modInstance of Module that will be used to communicate with the radio.
@@ -424,7 +459,7 @@ void 
SX1280 + doxygen 1.8.17 diff --git a/class_s_x1281-members.html b/class_s_x1281-members.html index 172b57f3..3ac61f0e 100644 --- a/class_s_x1281-members.html +++ b/class_s_x1281-members.html @@ -1,9 +1,9 @@ - + - + RadioLib: Member List @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@
- + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -104,8 +106,12 @@ $(document).ready(function(){initNavTree('class_s_x1281.html','');}); PhysicalLayer::random(int32_t max)PhysicalLayer PhysicalLayer::random(int32_t min, int32_t max)PhysicalLayer readData(uint8_t *data, size_t len) overrideSX128xvirtual + readData(String &str, size_t len=0)SX128x + readData(uint8_t *data, size_t len)=0SX128x PhysicalLayer::readData(String &str, size_t len=0)PhysicalLayer receive(uint8_t *data, size_t len) overrideSX128xvirtual + receive(String &str, size_t len=0)SX128x + receive(uint8_t *data, size_t len)=0SX128x PhysicalLayer::receive(String &str, size_t len=0)PhysicalLayer receiveDirect() overrideSX128xvirtual reset(bool verify=true)SX128x @@ -132,15 +138,22 @@ $(document).ready(function(){initNavTree('class_s_x1281.html','');}); startDirect()PhysicalLayer startReceive(uint16_t timeout=SX128X_RX_TIMEOUT_INF)SX128x startTransmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX128xvirtual - PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer - PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer - SX1281(Module *mod)SX1281 - SX128x(Module *mod)SX128x - transmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX128xvirtual - PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer - PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer - PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer - transmitDirect(uint32_t frf=0) overrideSX128xvirtual + startTransmit(String &str, uint8_t addr=0)SX128x + startTransmit(const char *str, uint8_t addr=0)SX128x + startTransmit(uint8_t *data, size_t len, uint8_t addr=0)=0SX128x + PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer + PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer + SX1281(Module *mod)SX1281 + SX128x(Module *mod)SX128x + transmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX128xvirtual + transmit(__FlashStringHelper *fstr, uint8_t addr=0)SX128x + transmit(String &str, uint8_t addr=0)SX128x + transmit(const char *str, uint8_t addr=0)SX128x + transmit(uint8_t *data, size_t len, uint8_t addr=0)=0SX128x + PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer + PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer + PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer + transmitDirect(uint32_t frf=0) overrideSX128xvirtual
@@ -148,7 +161,7 @@ $(document).ready(function(){initNavTree('class_s_x1281.html','');}); diff --git a/class_s_x1281.html b/class_s_x1281.html index 212da5a5..4290d347 100644 --- a/class_s_x1281.html +++ b/class_s_x1281.html @@ -1,9 +1,9 @@ - + - + RadioLib: SX1281 Class Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -99,16 +101,16 @@ Inheritance diagram for SX1281:
SX128x -PhysicalLayer -SX1280 -SX1282 - - +PhysicalLayer +SX1280 +SX1282 + + - + @@ -130,16 +132,16 @@ Public Member Functions - + - + - + @@ -148,7 +150,7 @@ Public Member Functions - + @@ -161,7 +163,7 @@ void  - + @@ -227,14 +229,47 @@ void  - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -295,7 +330,7 @@ void 

Public Member Functions

 SX1281 (Module *mod)
 Default constructor. More...
 Default constructor. More...
 
- Public Member Functions inherited from SX128x
 SX128x (Module *mod)
 Reset method. Will reset the chip to the default state using RST pin. More...
 
int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0) override
 Blocking binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 Blocking binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 
int16_t receive (uint8_t *data, size_t len) override
 Blocking binary receive method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 Blocking binary receive method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 
int16_t transmitDirect (uint32_t frf=0) override
 Starts direct mode transmission. More...
 
int16_t receiveDirect () override
 Starts direct mode reception. Only implemented for PhysicalLayer compatibility, as SX128x series does not support direct mode reception. Will always return ERR_UNKNOWN. More...
 Starts direct mode reception. Only implemented for PhysicalLayer compatibility, as SX128x series does not support direct mode reception. Will always return ERR_UNKNOWN. More...
 
int16_t scanChannel ()
 Performs scan for LoRa transmission in the current channel. Detects both preamble and payload. More...
 Sets the module to sleep mode. More...
 
int16_t standby () override
 Sets the module to standby mode (overload for PhysicalLayer compatibility, uses 13 MHz RC oscillator). More...
 Sets the module to standby mode (overload for PhysicalLayer compatibility, uses 13 MHz RC oscillator). More...
 
int16_t standby (uint8_t mode)
 Sets the module to standby mode. More...
 Clears interrupt service routine to call when DIO1 activates.
 
int16_t startTransmit (uint8_t *data, size_t len, uint8_t addr=0) override
 Interrupt-driven binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 Interrupt-driven binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 
int16_t startReceive (uint16_t timeout=SX128X_RX_TIMEOUT_INF)
 Interrupt-driven receive method. DIO1 will be activated when full packet is received. More...
 Set explicit header mode for future reception/transmission. More...
 
int16_t setEncoding (uint8_t encoding) override
 Sets transmission encoding. Serves only as alias for PhysicalLayer compatibility. More...
 Sets transmission encoding. Serves only as alias for PhysicalLayer compatibility. More...
 
void setRfSwitchPins (RADIOLIB_PIN_TYPE rxEn, RADIOLIB_PIN_TYPE txEn)
 Some modules contain external RF switch controlled by two pins. This function gives RadioLib control over those two pins to automatically switch Rx and Tx state. When using automatic RF switch control, DO NOT change the pin mode of rxEn or txEn from Arduino sketch! More...
 
uint8_t random ()
 Dummy random method, to ensure PhysicalLayer compatibility. More...
 Dummy random method, to ensure PhysicalLayer compatibility. More...
 
int16_t transmit (__FlashStringHelper *fstr, uint8_t addr=0)
 Arduino Flash String transmit method. More...
 
int16_t transmit (String &str, uint8_t addr=0)
 Arduino String transmit method. More...
 
int16_t transmit (const char *str, uint8_t addr=0)
 C-string transmit method. More...
 
virtual int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Binary transmit method. Must be implemented in module class. More...
 
int16_t receive (String &str, size_t len=0)
 Arduino String receive method. More...
 
virtual int16_t receive (uint8_t *data, size_t len)=0
 Binary receive method. Must be implemented in module class. More...
 
int16_t startTransmit (String &str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
int16_t startTransmit (const char *str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
virtual int16_t startTransmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Interrupt-driven binary transmit method. More...
 
int16_t readData (String &str, size_t len=0)
 Reads data that was received after calling startReceive method. More...
 
virtual int16_t readData (uint8_t *data, size_t len)=0
 Reads data that was received after calling startReceive method. More...
 
- Public Member Functions inherited from PhysicalLayer
 PhysicalLayer (float freqStep, size_t maxPacketLength)
 Default constructor. More...
Parameters
- +
modInstance of Module that will be used to communicate with the radio.
modInstance of Module that will be used to communicate with the radio.
@@ -314,7 +349,7 @@ void 
SX1281 + doxygen 1.8.17 diff --git a/class_s_x1282-members.html b/class_s_x1282-members.html index 82c6ec2f..5e5a2786 100644 --- a/class_s_x1282-members.html +++ b/class_s_x1282-members.html @@ -1,9 +1,9 @@ - + - + RadioLib: Member List @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@
- + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -106,8 +108,12 @@ $(document).ready(function(){initNavTree('class_s_x1282.html','');}); PhysicalLayer::random(int32_t min, int32_t max)PhysicalLayer range(bool master, uint32_t addr)SX1280 readData(uint8_t *data, size_t len) overrideSX128xvirtual + readData(String &str, size_t len=0)SX128x + readData(uint8_t *data, size_t len)=0SX128x PhysicalLayer::readData(String &str, size_t len=0)PhysicalLayer receive(uint8_t *data, size_t len) overrideSX128xvirtual + receive(String &str, size_t len=0)SX128x + receive(uint8_t *data, size_t len)=0SX128x PhysicalLayer::receive(String &str, size_t len=0)PhysicalLayer receiveDirect() overrideSX128xvirtual reset(bool verify=true)SX128x @@ -135,17 +141,24 @@ $(document).ready(function(){initNavTree('class_s_x1282.html','');}); startRanging(bool master, uint32_t addr)SX1280 startReceive(uint16_t timeout=SX128X_RX_TIMEOUT_INF)SX128x startTransmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX128xvirtual - PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer - PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer - SX1280(Module *mod)SX1280 - SX1281(Module *mod)SX1281 - SX1282(Module *mod)SX1282 - SX128x(Module *mod)SX128x - transmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX128xvirtual - PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer - PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer - PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer - transmitDirect(uint32_t frf=0) overrideSX128xvirtual + startTransmit(String &str, uint8_t addr=0)SX128x + startTransmit(const char *str, uint8_t addr=0)SX128x + startTransmit(uint8_t *data, size_t len, uint8_t addr=0)=0SX128x + PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer + PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer + SX1280(Module *mod)SX1280 + SX1281(Module *mod)SX1281 + SX1282(Module *mod)SX1282 + SX128x(Module *mod)SX128x + transmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX128xvirtual + transmit(__FlashStringHelper *fstr, uint8_t addr=0)SX128x + transmit(String &str, uint8_t addr=0)SX128x + transmit(const char *str, uint8_t addr=0)SX128x + transmit(uint8_t *data, size_t len, uint8_t addr=0)=0SX128x + PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer + PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer + PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer + transmitDirect(uint32_t frf=0) overrideSX128xvirtual
@@ -153,7 +166,7 @@ $(document).ready(function(){initNavTree('class_s_x1282.html','');}); diff --git a/class_s_x1282.html b/class_s_x1282.html index 9698f357..6fa72a22 100644 --- a/class_s_x1282.html +++ b/class_s_x1282.html @@ -1,9 +1,9 @@ - + - + RadioLib: SX1282 Class Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -98,17 +100,17 @@ Inheritance diagram for SX1282:
-SX1280 -SX1281 +SX1280 +SX1281 SX128x -PhysicalLayer - -
+PhysicalLayer + + - + @@ -147,16 +149,16 @@ Public Member Functions - + - + - + @@ -165,7 +167,7 @@ Public Member Functions - + @@ -178,7 +180,7 @@ void  - + @@ -244,14 +246,47 @@ void  - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -312,7 +347,7 @@ void 

Public Member Functions

 SX1282 (Module *mod)
 Default constructor. More...
 Default constructor. More...
 
- Public Member Functions inherited from SX1280
 SX1280 (Module *mod)
 Reset method. Will reset the chip to the default state using RST pin. More...
 
int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0) override
 Blocking binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 Blocking binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 
int16_t receive (uint8_t *data, size_t len) override
 Blocking binary receive method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 Blocking binary receive method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 
int16_t transmitDirect (uint32_t frf=0) override
 Starts direct mode transmission. More...
 
int16_t receiveDirect () override
 Starts direct mode reception. Only implemented for PhysicalLayer compatibility, as SX128x series does not support direct mode reception. Will always return ERR_UNKNOWN. More...
 Starts direct mode reception. Only implemented for PhysicalLayer compatibility, as SX128x series does not support direct mode reception. Will always return ERR_UNKNOWN. More...
 
int16_t scanChannel ()
 Performs scan for LoRa transmission in the current channel. Detects both preamble and payload. More...
 Sets the module to sleep mode. More...
 
int16_t standby () override
 Sets the module to standby mode (overload for PhysicalLayer compatibility, uses 13 MHz RC oscillator). More...
 Sets the module to standby mode (overload for PhysicalLayer compatibility, uses 13 MHz RC oscillator). More...
 
int16_t standby (uint8_t mode)
 Sets the module to standby mode. More...
 Clears interrupt service routine to call when DIO1 activates.
 
int16_t startTransmit (uint8_t *data, size_t len, uint8_t addr=0) override
 Interrupt-driven binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 Interrupt-driven binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 
int16_t startReceive (uint16_t timeout=SX128X_RX_TIMEOUT_INF)
 Interrupt-driven receive method. DIO1 will be activated when full packet is received. More...
 Set explicit header mode for future reception/transmission. More...
 
int16_t setEncoding (uint8_t encoding) override
 Sets transmission encoding. Serves only as alias for PhysicalLayer compatibility. More...
 Sets transmission encoding. Serves only as alias for PhysicalLayer compatibility. More...
 
void setRfSwitchPins (RADIOLIB_PIN_TYPE rxEn, RADIOLIB_PIN_TYPE txEn)
 Some modules contain external RF switch controlled by two pins. This function gives RadioLib control over those two pins to automatically switch Rx and Tx state. When using automatic RF switch control, DO NOT change the pin mode of rxEn or txEn from Arduino sketch! More...
 
uint8_t random ()
 Dummy random method, to ensure PhysicalLayer compatibility. More...
 Dummy random method, to ensure PhysicalLayer compatibility. More...
 
int16_t transmit (__FlashStringHelper *fstr, uint8_t addr=0)
 Arduino Flash String transmit method. More...
 
int16_t transmit (String &str, uint8_t addr=0)
 Arduino String transmit method. More...
 
int16_t transmit (const char *str, uint8_t addr=0)
 C-string transmit method. More...
 
virtual int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Binary transmit method. Must be implemented in module class. More...
 
int16_t receive (String &str, size_t len=0)
 Arduino String receive method. More...
 
virtual int16_t receive (uint8_t *data, size_t len)=0
 Binary receive method. Must be implemented in module class. More...
 
int16_t startTransmit (String &str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
int16_t startTransmit (const char *str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
virtual int16_t startTransmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Interrupt-driven binary transmit method. More...
 
int16_t readData (String &str, size_t len=0)
 Reads data that was received after calling startReceive method. More...
 
virtual int16_t readData (uint8_t *data, size_t len)=0
 Reads data that was received after calling startReceive method. More...
 
- Public Member Functions inherited from PhysicalLayer
 PhysicalLayer (float freqStep, size_t maxPacketLength)
 Default constructor. More...
Parameters
- +
modInstance of Module that will be used to communicate with the radio.
modInstance of Module that will be used to communicate with the radio.
@@ -332,7 +367,7 @@ void 
SX1282 + doxygen 1.8.17 diff --git a/class_s_x128x-members.html b/class_s_x128x-members.html index 6ac0000c..84529c57 100644 --- a/class_s_x128x-members.html +++ b/class_s_x128x-members.html @@ -1,9 +1,9 @@ - + - + RadioLib: Member List @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@
- + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -104,8 +106,12 @@ $(document).ready(function(){initNavTree('class_s_x128x.html','');}); PhysicalLayer::random(int32_t max)PhysicalLayer PhysicalLayer::random(int32_t min, int32_t max)PhysicalLayer readData(uint8_t *data, size_t len) overrideSX128xvirtual + readData(String &str, size_t len=0)SX128x + readData(uint8_t *data, size_t len)=0SX128x PhysicalLayer::readData(String &str, size_t len=0)PhysicalLayer receive(uint8_t *data, size_t len) overrideSX128xvirtual + receive(String &str, size_t len=0)SX128x + receive(uint8_t *data, size_t len)=0SX128x PhysicalLayer::receive(String &str, size_t len=0)PhysicalLayer receiveDirect() overrideSX128xvirtual reset(bool verify=true)SX128x @@ -132,14 +138,21 @@ $(document).ready(function(){initNavTree('class_s_x128x.html','');}); startDirect()PhysicalLayer startReceive(uint16_t timeout=SX128X_RX_TIMEOUT_INF)SX128x startTransmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX128xvirtual - PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer - PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer - SX128x(Module *mod)SX128x - transmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX128xvirtual - PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer - PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer - PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer - transmitDirect(uint32_t frf=0) overrideSX128xvirtual + startTransmit(String &str, uint8_t addr=0)SX128x + startTransmit(const char *str, uint8_t addr=0)SX128x + startTransmit(uint8_t *data, size_t len, uint8_t addr=0)=0SX128x + PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer + PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer + SX128x(Module *mod)SX128x + transmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSX128xvirtual + transmit(__FlashStringHelper *fstr, uint8_t addr=0)SX128x + transmit(String &str, uint8_t addr=0)SX128x + transmit(const char *str, uint8_t addr=0)SX128x + transmit(uint8_t *data, size_t len, uint8_t addr=0)=0SX128x + PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer + PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer + PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer + transmitDirect(uint32_t frf=0) overrideSX128xvirtual
@@ -147,7 +160,7 @@ $(document).ready(function(){initNavTree('class_s_x128x.html','');}); diff --git a/class_s_x128x.html b/class_s_x128x.html index 1d125a0c..a5ee4784 100644 --- a/class_s_x128x.html +++ b/class_s_x128x.html @@ -1,9 +1,9 @@ - + - + RadioLib: SX128x Class Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -88,7 +90,7 @@ $(document).ready(function(){initNavTree('class_s_x128x.html','');});
-

Base class for SX128x series. All derived classes for SX128x (e.g. SX1280 or SX1281) inherit from this base class. This class should not be instantiated directly from Arduino sketch, only from its derived classes. +

Base class for SX128x series. All derived classes for SX128x (e.g. SX1280 or SX1281) inherit from this base class. This class should not be instantiated directly from Arduino sketch, only from its derived classes. More...

#include <SX128x.h>

@@ -98,139 +100,172 @@ Inheritance diagram for SX128x:
-PhysicalLayer -SX1281 -SX1280 -SX1282 - -
+PhysicalLayer +SX1281 +SX1280 +SX1282 + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -270,7 +305,7 @@ void 

Public Member Functions

 SX128x (Module *mod)
 Default constructor. More...
 Default constructor. More...
 
int16_t begin (float freq=2400.0, float bw=812.5, uint8_t sf=9, uint8_t cr=7, int8_t power=10, uint16_t preambleLength=12)
 Initialization method for LoRa modem. More...
 Initialization method for LoRa modem. More...
 
int16_t beginGFSK (float freq=2400.0, uint16_t br=800, float freqDev=400.0, int8_t power=10, uint16_t preambleLength=16)
 Initialization method for GFSK modem. More...
 Initialization method for GFSK modem. More...
 
int16_t beginBLE (float freq=2400.0, uint16_t br=800, float freqDev=400.0, int8_t power=10, uint8_t dataShaping=RADIOLIB_SHAPING_0_5)
 Initialization method for BLE modem. More...
 Initialization method for BLE modem. More...
 
int16_t beginFLRC (float freq=2400.0, uint16_t br=650, uint8_t cr=3, int8_t power=10, uint16_t preambleLength=16, uint8_t dataShaping=RADIOLIB_SHAPING_0_5)
 Initialization method for FLRC modem. More...
 Initialization method for FLRC modem. More...
 
int16_t reset (bool verify=true)
 Reset method. Will reset the chip to the default state using RST pin. More...
 Reset method. Will reset the chip to the default state using RST pin. More...
 
int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0) override
 Blocking binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 Blocking binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 
int16_t receive (uint8_t *data, size_t len) override
 Blocking binary receive method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 Blocking binary receive method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 
int16_t transmitDirect (uint32_t frf=0) override
 Starts direct mode transmission. More...
 Starts direct mode transmission. More...
 
int16_t receiveDirect () override
 Starts direct mode reception. Only implemented for PhysicalLayer compatibility, as SX128x series does not support direct mode reception. Will always return ERR_UNKNOWN. More...
 Starts direct mode reception. Only implemented for PhysicalLayer compatibility, as SX128x series does not support direct mode reception. Will always return ERR_UNKNOWN. More...
 
int16_t scanChannel ()
 Performs scan for LoRa transmission in the current channel. Detects both preamble and payload. More...
 Performs scan for LoRa transmission in the current channel. Detects both preamble and payload. More...
 
int16_t sleep (bool retainConfig=true)
 Sets the module to sleep mode. More...
 Sets the module to sleep mode. More...
 
int16_t standby () override
 Sets the module to standby mode (overload for PhysicalLayer compatibility, uses 13 MHz RC oscillator). More...
 Sets the module to standby mode (overload for PhysicalLayer compatibility, uses 13 MHz RC oscillator). More...
 
int16_t standby (uint8_t mode)
 Sets the module to standby mode. More...
 Sets the module to standby mode. More...
 
void setDio1Action (void(*func)(void))
 Sets interrupt service routine to call when DIO1 activates. More...
 Sets interrupt service routine to call when DIO1 activates. More...
 
void clearDio1Action ()
 Clears interrupt service routine to call when DIO1 activates.
 
int16_t startTransmit (uint8_t *data, size_t len, uint8_t addr=0) override
 Interrupt-driven binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 Interrupt-driven binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 
int16_t startReceive (uint16_t timeout=SX128X_RX_TIMEOUT_INF)
 Interrupt-driven receive method. DIO1 will be activated when full packet is received. More...
 Interrupt-driven receive method. DIO1 will be activated when full packet is received. More...
 
int16_t readData (uint8_t *data, size_t len) override
 Reads data received after calling startReceive method. More...
 Reads data received after calling startReceive method. More...
 
int16_t setFrequency (float freq)
 Sets carrier frequency. Allowed values are in range from 2400.0 to 2500.0 MHz. More...
 Sets carrier frequency. Allowed values are in range from 2400.0 to 2500.0 MHz. More...
 
int16_t setBandwidth (float bw)
 Sets LoRa bandwidth. Allowed values are 203.125, 406.25, 812.5 and 1625.0 kHz. More...
 Sets LoRa bandwidth. Allowed values are 203.125, 406.25, 812.5 and 1625.0 kHz. More...
 
int16_t setSpreadingFactor (uint8_t sf)
 Sets LoRa spreading factor. Allowed values range from 5 to 12. More...
 Sets LoRa spreading factor. Allowed values range from 5 to 12. More...
 
int16_t setCodingRate (uint8_t cr, bool longInterleaving=false)
 Sets LoRa coding rate denominator. Allowed values range from 5 to 8. More...
 Sets LoRa coding rate denominator. Allowed values range from 5 to 8. More...
 
int16_t setOutputPower (int8_t power)
 Sets output power. Allowed values are in range from -18 to 13 dBm. More...
 Sets output power. Allowed values are in range from -18 to 13 dBm. More...
 
int16_t setPreambleLength (uint32_t preambleLength)
 Sets preamble length for currently active modem. Allowed values range from 1 to 65535. More...
 Sets preamble length for currently active modem. Allowed values range from 1 to 65535. More...
 
int16_t setBitRate (uint16_t br)
 Sets FSK or FLRC bit rate. Allowed values are 125, 250, 400, 500, 800, 1000, 1600 and 2000 kbps (for FSK modem) or 260, 325, 520, 650, 1000 and 1300 (for FLRC modem). More...
 Sets FSK or FLRC bit rate. Allowed values are 125, 250, 400, 500, 800, 1000, 1600 and 2000 kbps (for FSK modem) or 260, 325, 520, 650, 1000 and 1300 (for FLRC modem). More...
 
int16_t setFrequencyDeviation (float freqDev) override
 Sets FSK frequency deviation. Allowed values range from 0.0 to 3200.0 kHz. More...
 Sets FSK frequency deviation. Allowed values range from 0.0 to 3200.0 kHz. More...
 
int16_t setDataShaping (uint8_t sh) override
 Sets time-bandwidth product of Gaussian filter applied for shaping. Allowed values are RADIOLIB_SHAPING_0_5 or RADIOLIB_SHAPING_1_0. Set to RADIOLIB_SHAPING_NONE to disable data shaping. More...
 Sets time-bandwidth product of Gaussian filter applied for shaping. Allowed values are RADIOLIB_SHAPING_0_5 or RADIOLIB_SHAPING_1_0. Set to RADIOLIB_SHAPING_NONE to disable data shaping. More...
 
int16_t setSyncWord (uint8_t *syncWord, uint8_t len)
 Sets FSK/FLRC sync word in the form of array of up to 5 bytes (FSK). For FLRC modem, the sync word must be exactly 4 bytes long. More...
 Sets FSK/FLRC sync word in the form of array of up to 5 bytes (FSK). For FLRC modem, the sync word must be exactly 4 bytes long. More...
 
int16_t setCRC (uint8_t len, uint32_t initial=0x1D0F, uint16_t polynomial=0x1021)
 Sets CRC configuration. More...
 Sets CRC configuration. More...
 
int16_t setWhitening (bool enabled)
 Sets whitening parameters, not available for LoRa or FLRC modem. More...
 Sets whitening parameters, not available for LoRa or FLRC modem. More...
 
int16_t setAccessAddress (uint32_t addr)
 Sets BLE access address. More...
 Sets BLE access address. More...
 
float getRSSI ()
 Gets RSSI (Recorded Signal Strength Indicator) of the last received packet. More...
 Gets RSSI (Recorded Signal Strength Indicator) of the last received packet. More...
 
float getSNR ()
 Gets SNR (Signal to Noise Ratio) of the last received packet. Only available for LoRa or ranging modem. More...
 Gets SNR (Signal to Noise Ratio) of the last received packet. Only available for LoRa or ranging modem. More...
 
size_t getPacketLength (bool update=true) override
 Query modem for the packet length of received payload. More...
 Query modem for the packet length of received payload. More...
 
uint32_t getTimeOnAir (size_t len)
 Get expected time-on-air for a given size of payload. More...
 Get expected time-on-air for a given size of payload. More...
 
int16_t implicitHeader (size_t len)
 Set implicit header mode for future reception/transmission. More...
 Set implicit header mode for future reception/transmission. More...
 
int16_t explicitHeader ()
 Set explicit header mode for future reception/transmission. More...
 Set explicit header mode for future reception/transmission. More...
 
int16_t setEncoding (uint8_t encoding) override
 Sets transmission encoding. Serves only as alias for PhysicalLayer compatibility. More...
 Sets transmission encoding. Serves only as alias for PhysicalLayer compatibility. More...
 
void setRfSwitchPins (RADIOLIB_PIN_TYPE rxEn, RADIOLIB_PIN_TYPE txEn)
 Some modules contain external RF switch controlled by two pins. This function gives RadioLib control over those two pins to automatically switch Rx and Tx state. When using automatic RF switch control, DO NOT change the pin mode of rxEn or txEn from Arduino sketch! More...
 Some modules contain external RF switch controlled by two pins. This function gives RadioLib control over those two pins to automatically switch Rx and Tx state. When using automatic RF switch control, DO NOT change the pin mode of rxEn or txEn from Arduino sketch! More...
 
uint8_t random ()
 Dummy random method, to ensure PhysicalLayer compatibility. More...
 Dummy random method, to ensure PhysicalLayer compatibility. More...
 
int16_t transmit (__FlashStringHelper *fstr, uint8_t addr=0)
 Arduino Flash String transmit method. More...
 
int16_t transmit (String &str, uint8_t addr=0)
 Arduino String transmit method. More...
 
int16_t transmit (const char *str, uint8_t addr=0)
 C-string transmit method. More...
 
virtual int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Binary transmit method. Must be implemented in module class. More...
 
int16_t receive (String &str, size_t len=0)
 Arduino String receive method. More...
 
virtual int16_t receive (uint8_t *data, size_t len)=0
 Binary receive method. Must be implemented in module class. More...
 
int16_t startTransmit (String &str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
int16_t startTransmit (const char *str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
virtual int16_t startTransmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Interrupt-driven binary transmit method. More...
 
int16_t readData (String &str, size_t len=0)
 Reads data that was received after calling startReceive method. More...
 
virtual int16_t readData (uint8_t *data, size_t len)=0
 Reads data that was received after calling startReceive method. More...
 
- Public Member Functions inherited from PhysicalLayer
 PhysicalLayer (float freqStep, size_t maxPacketLength)
 Default constructor. More...
 

Detailed Description

-

Base class for SX128x series. All derived classes for SX128x (e.g. SX1280 or SX1281) inherit from this base class. This class should not be instantiated directly from Arduino sketch, only from its derived classes.

+

Base class for SX128x series. All derived classes for SX128x (e.g. SX1280 or SX1281) inherit from this base class. This class should not be instantiated directly from Arduino sketch, only from its derived classes.

Constructor & Destructor Documentation

◆ SX128x()

@@ -291,7 +326,7 @@ void 
Parameters
- +
modInstance of Module that will be used to communicate with the radio.
modInstance of Module that will be used to communicate with the radio.
@@ -484,7 +519,7 @@ void 
Parameters
@@ -549,7 +584,7 @@ void 
dataShapingTime-bandwidth product of the Gaussian filter to be used for shaping. Defaults to 0.5.
Returns
Status Codes
@@ -681,7 +716,7 @@ void 
Returns
Expected time-on-air in microseconds.
-
Todo:
implement this mess - SX1280 datasheet v3.0 section 7.4.4.2
+
Todo:
implement this mess - SX1280 datasheet v3.0 section 7.4.4.2
@@ -729,15 +764,39 @@ void 
-

Dummy random method, to ensure PhysicalLayer compatibility.

+

Dummy random method, to ensure PhysicalLayer compatibility.

Returns
Always returns 0.

Implements PhysicalLayer.

+ + + +

◆ readData() [1/3]

+ +
+
+ + + + +
int16_t PhysicalLayer::readData
+
+ +

Reads data that was received after calling startReceive method.

+
Parameters
+ + + +
strAddress of Arduino String to save the received data.
lenExpected number of characters in the message.
+
+
+
Returns
Status Codes
+
-

◆ readData()

+

◆ readData() [2/3]

@@ -782,10 +841,58 @@ void 
PhysicalLayer.

+ + + +

◆ readData() [3/3]

+ +
+
+ + + + +
virtual int16_t PhysicalLayer::readData
+
+ +

Reads data that was received after calling startReceive method.

+
Parameters
+ + + +
dataPointer to array to save the received binary data.
lenNumber of bytes that will be received. Must be known in advance for binary transmissions.
+
+
+
Returns
Status Codes
+ +
+
+ +

◆ receive() [1/3]

+ +
+
+ + + + +
int16_t PhysicalLayer::receive
+
+ +

Arduino String receive method.

+
Parameters
+ + + +
strAddress of Arduino String to save the received data.
lenExpected number of characters in the message. Leave as 0 if expecting a unknown size packet
+
+
+
Returns
Status Codes
+
-

◆ receive()

+

◆ receive() [2/3]

@@ -818,7 +925,7 @@ void 
-

Blocking binary receive method. Overloads for string-based transmissions are implemented in PhysicalLayer.

+

Blocking binary receive method. Overloads for string-based transmissions are implemented in PhysicalLayer.

Parameters
@@ -830,6 +937,30 @@ void  + + + + @@ -123,13 +129,20 @@ $(document).ready(function(){initNavTree('class_si4431.html','');}); - - - - - - - + + + + + + + + + + + + + +
dataBinary data to be sent.
PhysicalLayer.

+ + + +

◆ receive() [3/3]

+ +
+
+ + + + +
virtual int16_t PhysicalLayer::receive
+
+ +

Binary receive method. Must be implemented in module class.

+
Parameters
+ + + +
dataPointer to array to save the received binary data.
lenNumber of bytes that will be received. Must be known in advance for binary transmissions.
+
+
+
Returns
Status Codes
+
@@ -855,7 +986,7 @@ void 
-

Starts direct mode reception. Only implemented for PhysicalLayer compatibility, as SX128x series does not support direct mode reception. Will always return ERR_UNKNOWN.

+

Starts direct mode reception. Only implemented for PhysicalLayer compatibility, as SX128x series does not support direct mode reception. Will always return ERR_UNKNOWN.

Returns
Status Codes

Implements PhysicalLayer.

@@ -1160,7 +1291,7 @@ void 
-

Sets transmission encoding. Serves only as alias for PhysicalLayer compatibility.

+

Sets transmission encoding. Serves only as alias for PhysicalLayer compatibility.

Parameters
@@ -1471,7 +1602,7 @@ void 
encodingEncoding to be used. Set to 0 for NRZ, and 2 for whitening.
-

Sets the module to standby mode (overload for PhysicalLayer compatibility, uses 13 MHz RC oscillator).

+

Sets the module to standby mode (overload for PhysicalLayer compatibility, uses 13 MHz RC oscillator).

Returns
Status Codes

Implements PhysicalLayer.

@@ -1530,10 +1661,58 @@ void 
Returns
Status Codes
+ + + +

◆ startTransmit() [1/4]

+ +
+
+ + + + +
int16_t PhysicalLayer::startTransmit
+
+ +

Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes.

+
Parameters
+ + + +
strC-string that will be transmitted.
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+ +
+
+ +

◆ startTransmit() [2/4]

+ +
+
+ + + + +
int16_t PhysicalLayer::startTransmit
+
+ +

Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes.

+
Parameters
+ + + +
strAddress of Arduino String that will be transmitted.
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+
-

◆ startTransmit()

+

◆ startTransmit() [3/4]

@@ -1572,7 +1751,7 @@ void 
-

Interrupt-driven binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer.

+

Interrupt-driven binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer.

Parameters
@@ -1585,10 +1764,107 @@ void  + + + + @@ -123,13 +129,20 @@ $(document).ready(function(){initNavTree('class_si4430.html','');}); - - - - - - - + + + + + + + + + + + + + +
dataBinary data to be sent.
PhysicalLayer.

+ + + +

◆ startTransmit() [4/4]

+ +
+
+ + + + +
virtual int16_t PhysicalLayer::startTransmit
+
+ +

Interrupt-driven binary transmit method.

+
Parameters
+ + + + +
dataBinary data that will be transmitted.
lenLength of binary data to transmit (in bytes).
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+ +
+
+ +

◆ transmit() [1/5]

+ +
+
+ + + + +
int16_t PhysicalLayer::transmit
+
+ +

Arduino Flash String transmit method.

+
Parameters
+ + + +
strPointer to Arduino Flash String that will be transmitted.
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+ +
+
+ +

◆ transmit() [2/5]

+ +
+
+ + + + +
int16_t PhysicalLayer::transmit
+
+ +

C-string transmit method.

+
Parameters
+ + + +
strC-string that will be transmitted.
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+ +
+
+ +

◆ transmit() [3/5]

+ +
+
+ + + + +
int16_t PhysicalLayer::transmit
+
+ +

Arduino String transmit method.

+
Parameters
+ + + +
strAddress of Arduino string that will be transmitted.
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+
-

◆ transmit()

+

◆ transmit() [4/5]

@@ -1627,7 +1903,7 @@ void 
-

Blocking binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer.

+

Blocking binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer.

Parameters
@@ -1640,6 +1916,31 @@ void 
dataBinary data to be sent.
PhysicalLayer.

+ + + +

◆ transmit() [5/5]

+ +
+
+ + + + +
virtual int16_t PhysicalLayer::transmit
+
+ +

Binary transmit method. Must be implemented in module class.

+
Parameters
+ + + + +
dataBinary data that will be transmitted.
lenLength of binary data to transmit (in bytes).
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+
@@ -1691,7 +1992,7 @@ void 
SX128x + doxygen 1.8.17 diff --git a/class_s_x128x.js b/class_s_x128x.js index ebb74acd..59a44e6d 100644 --- a/class_s_x128x.js +++ b/class_s_x128x.js @@ -13,8 +13,12 @@ var class_s_x128x = [ "getTimeOnAir", "class_s_x128x.html#a2361a94f2e12ebc93e750a027d633232", null ], [ "implicitHeader", "class_s_x128x.html#ac69cc622020419cb3393eac5cc88915b", null ], [ "random", "class_s_x128x.html#a1cefaf76d47ee71d143fc073333a9d82", null ], + [ "readData", "class_s_x128x.html#ae8eed0e888a7c8742e89d2b850977de2", null ], [ "readData", "class_s_x128x.html#a94bca43258b09217fb476a2d8db784bb", null ], + [ "readData", "class_s_x128x.html#ae8b6c756eb4b92855433ca389d73c632", null ], + [ "receive", "class_s_x128x.html#afb1b090348d9091bfa3a0b5ba3d85b36", null ], [ "receive", "class_s_x128x.html#a32b7b674d63c36f15b7f58a2cb837a99", null ], + [ "receive", "class_s_x128x.html#a2ad4c6a8ac267f8ac590260414ffcda3", null ], [ "receiveDirect", "class_s_x128x.html#aff7d86352c98771595375e17d19a2a97", null ], [ "reset", "class_s_x128x.html#a2643ce22176293631fea2169f5e68e66", null ], [ "scanChannel", "class_s_x128x.html#a89cc916f5cd5cdfbd331bb15f8a3d5cb", null ], @@ -38,7 +42,14 @@ var class_s_x128x = [ "standby", "class_s_x128x.html#a2be8cc6c3b61b59cb6a6ca4f6a030b45", null ], [ "standby", "class_s_x128x.html#aa11ba80f0cebb3e6927c775ad5f96b4e", null ], [ "startReceive", "class_s_x128x.html#a8171d2f3de53156526580ca4fe4d647d", null ], + [ "startTransmit", "class_s_x128x.html#a923654706eff5118ef6e84214e837f27", null ], + [ "startTransmit", "class_s_x128x.html#af068e6e862c99e39d0261a7971dd56db", null ], [ "startTransmit", "class_s_x128x.html#aef221e7d463c5228ce00ed6934512848", null ], + [ "startTransmit", "class_s_x128x.html#a41a1de0ebffe7b65de6fd8cceb9a5123", null ], + [ "transmit", "class_s_x128x.html#ab139a34e03a6fd5a781cd54da21d308f", null ], + [ "transmit", "class_s_x128x.html#a492b2d057dd803c3884fa1adc8e22534", null ], + [ "transmit", "class_s_x128x.html#aeb62c5a521aafc1e0525c58e9364482b", null ], [ "transmit", "class_s_x128x.html#af253e1e45361de74aefd01a7c73c28f5", null ], + [ "transmit", "class_s_x128x.html#af81565ee82ef9a7de9c5663c745f4ef7", null ], [ "transmitDirect", "class_s_x128x.html#a53892566b0259d348158efe3c3c3601a", null ] ]; \ No newline at end of file diff --git a/class_si4430-members.html b/class_si4430-members.html index f14642a7..d63ed774 100644 --- a/class_si4430-members.html +++ b/class_si4430-members.html @@ -1,9 +1,9 @@ - + - + RadioLib: Member List @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@
- + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -99,8 +101,12 @@ $(document).ready(function(){initNavTree('class_si4430.html','');});
PhysicalLayer::random(int32_t max)PhysicalLayer
PhysicalLayer::random(int32_t min, int32_t max)PhysicalLayer
readData(uint8_t *data, size_t len) overrideSi443xvirtual
readData(String &str, size_t len=0)Si443x
readData(uint8_t *data, size_t len)=0Si443x
PhysicalLayer::readData(String &str, size_t len=0)PhysicalLayer
receive(uint8_t *data, size_t len) overrideSi443xvirtual
receive(String &str, size_t len=0)Si443x
receive(uint8_t *data, size_t len)=0Si443x
PhysicalLayer::receive(String &str, size_t len=0)PhysicalLayer
receiveDirect() overrideSi443xvirtual
reset()Si443x
startDirect()PhysicalLayer
startReceive()Si443x
startTransmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSi443xvirtual
PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer
PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer
transmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSi443xvirtual
PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer
PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer
PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer
transmitDirect(uint32_t frf=0) overrideSi443xvirtual
startTransmit(String &str, uint8_t addr=0)Si443x
startTransmit(const char *str, uint8_t addr=0)Si443x
startTransmit(uint8_t *data, size_t len, uint8_t addr=0)=0Si443x
PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer
PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer
transmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSi443xvirtual
transmit(__FlashStringHelper *fstr, uint8_t addr=0)Si443x
transmit(String &str, uint8_t addr=0)Si443x
transmit(const char *str, uint8_t addr=0)Si443x
transmit(uint8_t *data, size_t len, uint8_t addr=0)=0Si443x
PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer
PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer
PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer
transmitDirect(uint32_t frf=0) overrideSi443xvirtual
@@ -137,7 +150,7 @@ $(document).ready(function(){initNavTree('class_si4430.html','');});
    + doxygen 1.8.17
diff --git a/class_si4430.html b/class_si4430.html index fecdeda2..7bc9d9bd 100644 --- a/class_si4430.html +++ b/class_si4430.html @@ -1,9 +1,9 @@ - + - + RadioLib: Si4430 Class Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@
- + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -98,25 +100,25 @@ Inheritance diagram for Si4430:
-Si4432 +Si4432 Si443x -PhysicalLayer - -
+PhysicalLayer + + - + - + - + - + @@ -143,10 +145,10 @@ void  - + - + @@ -212,6 +214,39 @@ void  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -272,7 +307,7 @@ void 

Public Member Functions

 Si4430 (Module *mod)
 Default constructor. More...
 Default constructor. More...
 
int16_t begin (float freq=434.0, float br=48.0, float freqDev=50.0, float rxBw=181.1, int8_t power=10, uint8_t preambleLen=16)
 Initialization method. Must be called at least once from Arduino sketch to initialize the module. More...
 Initialization method. Must be called at least once from Arduino sketch to initialize the module. More...
 
int16_t setFrequency (float freq)
 Sets carrier frequency. Allowed values range from 900.0 MHz to 960.0 MHz. More...
 Sets carrier frequency. Allowed values range from 900.0 MHz to 960.0 MHz. More...
 
int16_t setOutputPower (int8_t power)
 Sets output power. Allowed values range from -8 to 13 dBm in 3 dBm steps. More...
 Sets output power. Allowed values range from -8 to 13 dBm in 3 dBm steps. More...
 
- Public Member Functions inherited from Si4432
 Si4432 (Module *mod)
 Reset method. Will reset the chip to the default state using SDN pin.
 
int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0) override
 Binary transmit method. Will transmit arbitrary binary data up to 64 bytes long. For overloads to transmit Arduino String or C-string, see PhysicalLayer::transmit. More...
 Binary transmit method. Will transmit arbitrary binary data up to 64 bytes long. For overloads to transmit Arduino String or C-string, see PhysicalLayer::transmit. More...
 
int16_t receive (uint8_t *data, size_t len) override
 Binary receive method. Will attempt to receive arbitrary binary data up to 64 bytes long. For overloads to receive Arduino String, see PhysicalLayer::receive. More...
 Binary receive method. Will attempt to receive arbitrary binary data up to 64 bytes long. For overloads to receive Arduino String, see PhysicalLayer::receive. More...
 
int16_t sleep ()
 Sets the module to sleep to save power. Module will not be able to transmit or receive any data while in sleep mode. Module will wake up automatically when methods like transmit or receive are called. More...
int16_t getChipVersion ()
 Read version SPI register. Should return SI443X_DEVICE_VERSION (0x06) if Si443x is connected and working. More...
 
int16_t transmit (__FlashStringHelper *fstr, uint8_t addr=0)
 Arduino Flash String transmit method. More...
 
int16_t transmit (String &str, uint8_t addr=0)
 Arduino String transmit method. More...
 
int16_t transmit (const char *str, uint8_t addr=0)
 C-string transmit method. More...
 
virtual int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Binary transmit method. Must be implemented in module class. More...
 
int16_t receive (String &str, size_t len=0)
 Arduino String receive method. More...
 
virtual int16_t receive (uint8_t *data, size_t len)=0
 Binary receive method. Must be implemented in module class. More...
 
int16_t startTransmit (String &str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
int16_t startTransmit (const char *str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
virtual int16_t startTransmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Interrupt-driven binary transmit method. More...
 
int16_t readData (String &str, size_t len=0)
 Reads data that was received after calling startReceive method. More...
 
virtual int16_t readData (uint8_t *data, size_t len)=0
 Reads data that was received after calling startReceive method. More...
 
- Public Member Functions inherited from PhysicalLayer
 PhysicalLayer (float freqStep, size_t maxPacketLength)
 Default constructor. More...
Parameters
- +
modInstance of Module that will be used to communicate with the radio chip.
modInstance of Module that will be used to communicate with the radio chip.
@@ -412,7 +447,7 @@ void 
Si4430 + doxygen 1.8.17 diff --git a/class_si4431-members.html b/class_si4431-members.html index 9aa1f6cf..3013ad3e 100644 --- a/class_si4431-members.html +++ b/class_si4431-members.html @@ -1,9 +1,9 @@ - + - + RadioLib: Member List @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@
- + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -99,8 +101,12 @@ $(document).ready(function(){initNavTree('class_si4431.html','');});
PhysicalLayer::random(int32_t max)PhysicalLayer
PhysicalLayer::random(int32_t min, int32_t max)PhysicalLayer
readData(uint8_t *data, size_t len) overrideSi443xvirtual
readData(String &str, size_t len=0)Si443x
readData(uint8_t *data, size_t len)=0Si443x
PhysicalLayer::readData(String &str, size_t len=0)PhysicalLayer
receive(uint8_t *data, size_t len) overrideSi443xvirtual
receive(String &str, size_t len=0)Si443x
receive(uint8_t *data, size_t len)=0Si443x
PhysicalLayer::receive(String &str, size_t len=0)PhysicalLayer
receiveDirect() overrideSi443xvirtual
reset()Si443x
startDirect()PhysicalLayer
startReceive()Si443x
startTransmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSi443xvirtual
PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer
PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer
transmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSi443xvirtual
PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer
PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer
PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer
transmitDirect(uint32_t frf=0) overrideSi443xvirtual
startTransmit(String &str, uint8_t addr=0)Si443x
startTransmit(const char *str, uint8_t addr=0)Si443x
startTransmit(uint8_t *data, size_t len, uint8_t addr=0)=0Si443x
PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer
PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer
transmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSi443xvirtual
transmit(__FlashStringHelper *fstr, uint8_t addr=0)Si443x
transmit(String &str, uint8_t addr=0)Si443x
transmit(const char *str, uint8_t addr=0)Si443x
transmit(uint8_t *data, size_t len, uint8_t addr=0)=0Si443x
PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer
PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer
PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer
transmitDirect(uint32_t frf=0) overrideSi443xvirtual
@@ -137,7 +150,7 @@ $(document).ready(function(){initNavTree('class_si4431.html','');});
    + doxygen 1.8.17
diff --git a/class_si4431.html b/class_si4431.html index 167088f0..9eaa9584 100644 --- a/class_si4431.html +++ b/class_si4431.html @@ -1,9 +1,9 @@ - + - + RadioLib: Si4431 Class Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@
- + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -98,22 +100,22 @@ Inheritance diagram for Si4431:
-Si4432 +Si4432 Si443x -PhysicalLayer - -
+PhysicalLayer + + - + - + - + @@ -140,10 +142,10 @@ void  - + - + @@ -209,6 +211,39 @@ void  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -269,7 +304,7 @@ void 

Public Member Functions

 Si4431 (Module *mod)
 Default constructor. More...
 Default constructor. More...
 
int16_t begin (float freq=434.0, float br=48.0, float freqDev=50.0, float rxBw=181.1, int8_t power=10, uint8_t preambleLen=16)
 Initialization method. Must be called at least once from Arduino sketch to initialize the module. More...
 Initialization method. Must be called at least once from Arduino sketch to initialize the module. More...
 
int16_t setOutputPower (int8_t power)
 Sets output power. Allowed values range from -8 to 13 dBm in 3 dBm steps. More...
 Sets output power. Allowed values range from -8 to 13 dBm in 3 dBm steps. More...
 
- Public Member Functions inherited from Si4432
 Si4432 (Module *mod)
 Reset method. Will reset the chip to the default state using SDN pin.
 
int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0) override
 Binary transmit method. Will transmit arbitrary binary data up to 64 bytes long. For overloads to transmit Arduino String or C-string, see PhysicalLayer::transmit. More...
 Binary transmit method. Will transmit arbitrary binary data up to 64 bytes long. For overloads to transmit Arduino String or C-string, see PhysicalLayer::transmit. More...
 
int16_t receive (uint8_t *data, size_t len) override
 Binary receive method. Will attempt to receive arbitrary binary data up to 64 bytes long. For overloads to receive Arduino String, see PhysicalLayer::receive. More...
 Binary receive method. Will attempt to receive arbitrary binary data up to 64 bytes long. For overloads to receive Arduino String, see PhysicalLayer::receive. More...
 
int16_t sleep ()
 Sets the module to sleep to save power. Module will not be able to transmit or receive any data while in sleep mode. Module will wake up automatically when methods like transmit or receive are called. More...
int16_t getChipVersion ()
 Read version SPI register. Should return SI443X_DEVICE_VERSION (0x06) if Si443x is connected and working. More...
 
int16_t transmit (__FlashStringHelper *fstr, uint8_t addr=0)
 Arduino Flash String transmit method. More...
 
int16_t transmit (String &str, uint8_t addr=0)
 Arduino String transmit method. More...
 
int16_t transmit (const char *str, uint8_t addr=0)
 C-string transmit method. More...
 
virtual int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Binary transmit method. Must be implemented in module class. More...
 
int16_t receive (String &str, size_t len=0)
 Arduino String receive method. More...
 
virtual int16_t receive (uint8_t *data, size_t len)=0
 Binary receive method. Must be implemented in module class. More...
 
int16_t startTransmit (String &str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
int16_t startTransmit (const char *str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
virtual int16_t startTransmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Interrupt-driven binary transmit method. More...
 
int16_t readData (String &str, size_t len=0)
 Reads data that was received after calling startReceive method. More...
 
virtual int16_t readData (uint8_t *data, size_t len)=0
 Reads data that was received after calling startReceive method. More...
 
- Public Member Functions inherited from PhysicalLayer
 PhysicalLayer (float freqStep, size_t maxPacketLength)
 Default constructor. More...
Parameters
- +
modInstance of Module that will be used to communicate with the radio chip.
modInstance of Module that will be used to communicate with the radio chip.
@@ -382,7 +417,7 @@ void 
Si4431 + doxygen 1.8.17 diff --git a/class_si4432-members.html b/class_si4432-members.html index 4b022791..2c0081ea 100644 --- a/class_si4432-members.html +++ b/class_si4432-members.html @@ -1,9 +1,9 @@ - + - + RadioLib: Member List @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@
- + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -99,8 +101,12 @@ $(document).ready(function(){initNavTree('class_si4432.html','');}); PhysicalLayer::random(int32_t max)PhysicalLayer PhysicalLayer::random(int32_t min, int32_t max)PhysicalLayer readData(uint8_t *data, size_t len) overrideSi443xvirtual + readData(String &str, size_t len=0)Si443x + readData(uint8_t *data, size_t len)=0Si443x PhysicalLayer::readData(String &str, size_t len=0)PhysicalLayer receive(uint8_t *data, size_t len) overrideSi443xvirtual + receive(String &str, size_t len=0)Si443x + receive(uint8_t *data, size_t len)=0Si443x PhysicalLayer::receive(String &str, size_t len=0)PhysicalLayer receiveDirect() overrideSi443xvirtual reset()Si443x @@ -122,13 +128,20 @@ $(document).ready(function(){initNavTree('class_si4432.html','');}); startDirect()PhysicalLayer startReceive()Si443x startTransmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSi443xvirtual - PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer - PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer - transmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSi443xvirtual - PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer - PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer - PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer - transmitDirect(uint32_t frf=0) overrideSi443xvirtual + startTransmit(String &str, uint8_t addr=0)Si443x + startTransmit(const char *str, uint8_t addr=0)Si443x + startTransmit(uint8_t *data, size_t len, uint8_t addr=0)=0Si443x + PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer + PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer + transmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSi443xvirtual + transmit(__FlashStringHelper *fstr, uint8_t addr=0)Si443x + transmit(String &str, uint8_t addr=0)Si443x + transmit(const char *str, uint8_t addr=0)Si443x + transmit(uint8_t *data, size_t len, uint8_t addr=0)=0Si443x + PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer + PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer + PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer + transmitDirect(uint32_t frf=0) overrideSi443xvirtual
@@ -136,7 +149,7 @@ $(document).ready(function(){initNavTree('class_si4432.html','');}); diff --git a/class_si4432.html b/class_si4432.html index 777b7133..b80692d8 100644 --- a/class_si4432.html +++ b/class_si4432.html @@ -1,9 +1,9 @@ - + - + RadioLib: Si4432 Class Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -99,25 +101,25 @@ Inheritance diagram for Si4432:
Si443x -PhysicalLayer -Si4430 -Si4431 - - +PhysicalLayer +Si4430 +Si4431 + + - + - + - + - + @@ -131,10 +133,10 @@ void  - + - + @@ -200,6 +202,39 @@ void  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -260,7 +295,7 @@ void 

Public Member Functions

 Si4432 (Module *mod)
 Default constructor. More...
 Default constructor. More...
 
int16_t begin (float freq=434.0, float br=48.0, float freqDev=50.0, float rxBw=181.1, int8_t power=10, uint8_t preambleLen=16)
 Initialization method. Must be called at least once from Arduino sketch to initialize the module. More...
 Initialization method. Must be called at least once from Arduino sketch to initialize the module. More...
 
int16_t setFrequency (float freq)
 Sets carrier frequency. Allowed values range from 240.0 MHz to 930.0 MHz. More...
 Sets carrier frequency. Allowed values range from 240.0 MHz to 930.0 MHz. More...
 
int16_t setOutputPower (int8_t power)
 Sets output power. Allowed values range from -1 to 20 dBm in 3 dBm steps. More...
 Sets output power. Allowed values range from -1 to 20 dBm in 3 dBm steps. More...
 
- Public Member Functions inherited from Si443x
 Si443x (Module *mod)
 Reset method. Will reset the chip to the default state using SDN pin.
 
int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0) override
 Binary transmit method. Will transmit arbitrary binary data up to 64 bytes long. For overloads to transmit Arduino String or C-string, see PhysicalLayer::transmit. More...
 Binary transmit method. Will transmit arbitrary binary data up to 64 bytes long. For overloads to transmit Arduino String or C-string, see PhysicalLayer::transmit. More...
 
int16_t receive (uint8_t *data, size_t len) override
 Binary receive method. Will attempt to receive arbitrary binary data up to 64 bytes long. For overloads to receive Arduino String, see PhysicalLayer::receive. More...
 Binary receive method. Will attempt to receive arbitrary binary data up to 64 bytes long. For overloads to receive Arduino String, see PhysicalLayer::receive. More...
 
int16_t sleep ()
 Sets the module to sleep to save power. Module will not be able to transmit or receive any data while in sleep mode. Module will wake up automatically when methods like transmit or receive are called. More...
int16_t getChipVersion ()
 Read version SPI register. Should return SI443X_DEVICE_VERSION (0x06) if Si443x is connected and working. More...
 
int16_t transmit (__FlashStringHelper *fstr, uint8_t addr=0)
 Arduino Flash String transmit method. More...
 
int16_t transmit (String &str, uint8_t addr=0)
 Arduino String transmit method. More...
 
int16_t transmit (const char *str, uint8_t addr=0)
 C-string transmit method. More...
 
virtual int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Binary transmit method. Must be implemented in module class. More...
 
int16_t receive (String &str, size_t len=0)
 Arduino String receive method. More...
 
virtual int16_t receive (uint8_t *data, size_t len)=0
 Binary receive method. Must be implemented in module class. More...
 
int16_t startTransmit (String &str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
int16_t startTransmit (const char *str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
virtual int16_t startTransmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Interrupt-driven binary transmit method. More...
 
int16_t readData (String &str, size_t len=0)
 Reads data that was received after calling startReceive method. More...
 
virtual int16_t readData (uint8_t *data, size_t len)=0
 Reads data that was received after calling startReceive method. More...
 
- Public Member Functions inherited from PhysicalLayer
 PhysicalLayer (float freqStep, size_t maxPacketLength)
 Default constructor. More...
Parameters
- +
modInstance of Module that will be used to communicate with the radio chip.
modInstance of Module that will be used to communicate with the radio chip.
@@ -400,7 +435,7 @@ void 
Si4432 + doxygen 1.8.17 diff --git a/class_si443x-members.html b/class_si443x-members.html index 83e72844..03bdc24b 100644 --- a/class_si443x-members.html +++ b/class_si443x-members.html @@ -1,9 +1,9 @@ - + - + RadioLib: Member List @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@
- + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -98,8 +100,12 @@ $(document).ready(function(){initNavTree('class_si443x.html','');}); PhysicalLayer::random(int32_t max)PhysicalLayer PhysicalLayer::random(int32_t min, int32_t max)PhysicalLayer readData(uint8_t *data, size_t len) overrideSi443xvirtual + readData(String &str, size_t len=0)Si443x + readData(uint8_t *data, size_t len)=0Si443x PhysicalLayer::readData(String &str, size_t len=0)PhysicalLayer receive(uint8_t *data, size_t len) overrideSi443xvirtual + receive(String &str, size_t len=0)Si443x + receive(uint8_t *data, size_t len)=0Si443x PhysicalLayer::receive(String &str, size_t len=0)PhysicalLayer receiveDirect() overrideSi443xvirtual reset()Si443x @@ -118,13 +124,20 @@ $(document).ready(function(){initNavTree('class_si443x.html','');}); startDirect()PhysicalLayer startReceive()Si443x startTransmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSi443xvirtual - PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer - PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer - transmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSi443xvirtual - PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer - PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer - PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer - transmitDirect(uint32_t frf=0) overrideSi443xvirtual + startTransmit(String &str, uint8_t addr=0)Si443x + startTransmit(const char *str, uint8_t addr=0)Si443x + startTransmit(uint8_t *data, size_t len, uint8_t addr=0)=0Si443x + PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer + PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer + transmit(uint8_t *data, size_t len, uint8_t addr=0) overrideSi443xvirtual + transmit(__FlashStringHelper *fstr, uint8_t addr=0)Si443x + transmit(String &str, uint8_t addr=0)Si443x + transmit(const char *str, uint8_t addr=0)Si443x + transmit(uint8_t *data, size_t len, uint8_t addr=0)=0Si443x + PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer + PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer + PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer + transmitDirect(uint32_t frf=0) overrideSi443xvirtual
@@ -132,7 +145,7 @@ $(document).ready(function(){initNavTree('class_si443x.html','');}); diff --git a/class_si443x.html b/class_si443x.html index dc5d7347..975aec44 100644 --- a/class_si443x.html +++ b/class_si443x.html @@ -1,9 +1,9 @@ - + - + RadioLib: Si443x Class Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -88,7 +90,7 @@ $(document).ready(function(){initNavTree('class_si443x.html','');});
-

Base class for Si443x series. All derived classes for Si443x (e.g. Si4431 or Si4432) inherit from this base class. This class should not be instantiated directly from Arduino sketch, only from its derived classes. +

Base class for Si443x series. All derived classes for Si443x (e.g. Si4431 or Si4432) inherit from this base class. This class should not be instantiated directly from Arduino sketch, only from its derived classes. More...

#include <Si443x.h>

@@ -98,95 +100,128 @@ Inheritance diagram for Si443x:
-PhysicalLayer -Si4432 -Si4430 -Si4431 - -
+PhysicalLayer +Si4432 +Si4430 +Si4431 + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -226,7 +261,7 @@ void 

Public Member Functions

 Si443x (Module *mod)
 Default constructor. More...
 Default constructor. More...
 
int16_t begin (float br, float freqDev, float rxBw, uint8_t preambleLen)
 Initialization method. More...
 Initialization method. More...
 
void reset ()
 Reset method. Will reset the chip to the default state using SDN pin.
 
int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0) override
 Binary transmit method. Will transmit arbitrary binary data up to 64 bytes long. For overloads to transmit Arduino String or C-string, see PhysicalLayer::transmit. More...
 Binary transmit method. Will transmit arbitrary binary data up to 64 bytes long. For overloads to transmit Arduino String or C-string, see PhysicalLayer::transmit. More...
 
int16_t receive (uint8_t *data, size_t len) override
 Binary receive method. Will attempt to receive arbitrary binary data up to 64 bytes long. For overloads to receive Arduino String, see PhysicalLayer::receive. More...
 Binary receive method. Will attempt to receive arbitrary binary data up to 64 bytes long. For overloads to receive Arduino String, see PhysicalLayer::receive. More...
 
int16_t sleep ()
 Sets the module to sleep to save power. Module will not be able to transmit or receive any data while in sleep mode. Module will wake up automatically when methods like transmit or receive are called. More...
 Sets the module to sleep to save power. Module will not be able to transmit or receive any data while in sleep mode. Module will wake up automatically when methods like transmit or receive are called. More...
 
int16_t standby () override
 Sets the module to standby. More...
 Sets the module to standby. More...
 
int16_t transmitDirect (uint32_t frf=0) override
 Enables direct transmission mode. While in direct mode, the module will not be able to transmit or receive packets. More...
 Enables direct transmission mode. While in direct mode, the module will not be able to transmit or receive packets. More...
 
int16_t receiveDirect () override
 Enables direct reception mode. While in direct mode, the module will not be able to transmit or receive packets. More...
 Enables direct reception mode. While in direct mode, the module will not be able to transmit or receive packets. More...
 
int16_t packetMode ()
 Disables direct mode and enables packet mode, allowing the module to receive packets. More...
 Disables direct mode and enables packet mode, allowing the module to receive packets. More...
 
void setIrqAction (void(*func)(void))
 Sets interrupt service routine to call when IRQ activates. More...
 Sets interrupt service routine to call when IRQ activates. More...
 
void clearIrqAction ()
 Clears interrupt service routine to call when IRQ activates.
 
int16_t startTransmit (uint8_t *data, size_t len, uint8_t addr=0) override
 Interrupt-driven binary transmit method. Will start transmitting arbitrary binary data up to 64 bytes long. More...
 Interrupt-driven binary transmit method. Will start transmitting arbitrary binary data up to 64 bytes long. More...
 
int16_t startReceive ()
 Interrupt-driven receive method. IRQ will be activated when full valid packet is received. More...
 Interrupt-driven receive method. IRQ will be activated when full valid packet is received. More...
 
int16_t readData (uint8_t *data, size_t len) override
 Reads data that was received after calling startReceive method. This method reads len characters. More...
 Reads data that was received after calling startReceive method. This method reads len characters. More...
 
int16_t setBitRate (float br)
 Sets FSK bit rate. Allowed values range from 0.123 to 256.0 kbps. More...
 Sets FSK bit rate. Allowed values range from 0.123 to 256.0 kbps. More...
 
int16_t setFrequencyDeviation (float freqDev) override
 Sets FSK frequency deviation from carrier frequency. Allowed values range from 0.625 to 320.0 kHz. More...
 Sets FSK frequency deviation from carrier frequency. Allowed values range from 0.625 to 320.0 kHz. More...
 
int16_t setRxBandwidth (float rxBw)
 Sets receiver bandwidth. Allowed values range from 2.6 to 620.7 kHz. More...
 Sets receiver bandwidth. Allowed values range from 2.6 to 620.7 kHz. More...
 
int16_t setSyncWord (uint8_t *syncWord, size_t len)
 Sets sync word. Up to 4 bytes can be set as sync word. More...
 Sets sync word. Up to 4 bytes can be set as sync word. More...
 
int16_t setPreambleLength (uint8_t preambleLen)
 Sets preamble length. More...
 Sets preamble length. More...
 
size_t getPacketLength (bool update=true) override
 Query modem for the packet length of received payload. More...
 Query modem for the packet length of received payload. More...
 
int16_t setEncoding (uint8_t encoding) override
 Sets transmission encoding. Only available in FSK mode. Allowed values are RADIOLIB_ENCODING_NRZ, RADIOLIB_ENCODING_MANCHESTER and RADIOLIB_ENCODING_WHITENING. More...
 Sets transmission encoding. Only available in FSK mode. Allowed values are RADIOLIB_ENCODING_NRZ, RADIOLIB_ENCODING_MANCHESTER and RADIOLIB_ENCODING_WHITENING. More...
 
int16_t setDataShaping (uint8_t sh) override
 Sets Gaussian filter bandwidth-time product that will be used for data shaping. Only available in FSK mode with FSK modulation. Allowed values are RADIOLIB_SHAPING_0_3, RADIOLIB_SHAPING_0_5 or RADIOLIB_SHAPING_1_0. Set to RADIOLIB_SHAPING_NONE to disable data shaping. More...
 Sets Gaussian filter bandwidth-time product that will be used for data shaping. Only available in FSK mode with FSK modulation. Allowed values are RADIOLIB_SHAPING_0_3, RADIOLIB_SHAPING_0_5 or RADIOLIB_SHAPING_1_0. Set to RADIOLIB_SHAPING_NONE to disable data shaping. More...
 
void setRfSwitchPins (RADIOLIB_PIN_TYPE rxEn, RADIOLIB_PIN_TYPE txEn)
 Some modules contain external RF switch controlled by two pins. This function gives RadioLib control over those two pins to automatically switch Rx and Tx state. When using automatic RF switch control, DO NOT change the pin mode of rxEn or txEn from Arduino sketch! More...
 Some modules contain external RF switch controlled by two pins. This function gives RadioLib control over those two pins to automatically switch Rx and Tx state. When using automatic RF switch control, DO NOT change the pin mode of rxEn or txEn from Arduino sketch! More...
 
uint8_t random ()
 Get one truly random byte from RSSI noise. More...
 Get one truly random byte from RSSI noise. More...
 
int16_t getChipVersion ()
 Read version SPI register. Should return SI443X_DEVICE_VERSION (0x06) if Si443x is connected and working. More...
 Read version SPI register. Should return SI443X_DEVICE_VERSION (0x06) if Si443x is connected and working. More...
 
int16_t transmit (__FlashStringHelper *fstr, uint8_t addr=0)
 Arduino Flash String transmit method. More...
 
int16_t transmit (String &str, uint8_t addr=0)
 Arduino String transmit method. More...
 
int16_t transmit (const char *str, uint8_t addr=0)
 C-string transmit method. More...
 
virtual int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Binary transmit method. Must be implemented in module class. More...
 
int16_t receive (String &str, size_t len=0)
 Arduino String receive method. More...
 
virtual int16_t receive (uint8_t *data, size_t len)=0
 Binary receive method. Must be implemented in module class. More...
 
int16_t startTransmit (String &str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
int16_t startTransmit (const char *str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
virtual int16_t startTransmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Interrupt-driven binary transmit method. More...
 
int16_t readData (String &str, size_t len=0)
 Reads data that was received after calling startReceive method. More...
 
virtual int16_t readData (uint8_t *data, size_t len)=0
 Reads data that was received after calling startReceive method. More...
 
- Public Member Functions inherited from PhysicalLayer
 PhysicalLayer (float freqStep, size_t maxPacketLength)
 Default constructor. More...
 

Detailed Description

-

Base class for Si443x series. All derived classes for Si443x (e.g. Si4431 or Si4432) inherit from this base class. This class should not be instantiated directly from Arduino sketch, only from its derived classes.

+

Base class for Si443x series. All derived classes for Si443x (e.g. Si4431 or Si4432) inherit from this base class. This class should not be instantiated directly from Arduino sketch, only from its derived classes.

Constructor & Destructor Documentation

◆ Si443x()

@@ -247,7 +282,7 @@ void 
Parameters
- +
modInstance of Module that will be used to communicate with the radio.
modInstance of Module that will be used to communicate with the radio.
@@ -413,10 +448,34 @@ void 
PhysicalLayer.

+
+ + +

◆ readData() [1/3]

+ +
+
+ + + + +
int16_t PhysicalLayer::readData
+
+ +

Reads data that was received after calling startReceive method.

+
Parameters
+ + + +
strAddress of Arduino String to save the received data.
lenExpected number of characters in the message.
+
+
+
Returns
Status Codes
+
-

◆ readData()

+

◆ readData() [2/3]

@@ -461,10 +520,58 @@ void PhysicalLayer.

+
+
+ +

◆ readData() [3/3]

+ +
+
+ + + + +
virtual int16_t PhysicalLayer::readData
+
+ +

Reads data that was received after calling startReceive method.

+
Parameters
+ + + +
dataPointer to array to save the received binary data.
lenNumber of bytes that will be received. Must be known in advance for binary transmissions.
+
+
+
Returns
Status Codes
+ +
+
+ +

◆ receive() [1/3]

+ +
+
+ + + + +
int16_t PhysicalLayer::receive
+
+ +

Arduino String receive method.

+
Parameters
+ + + +
strAddress of Arduino String to save the received data.
lenExpected number of characters in the message. Leave as 0 if expecting a unknown size packet
+
+
+
Returns
Status Codes
+
-

◆ receive()

+

◆ receive() [2/3]

@@ -497,7 +604,7 @@ void  -

Binary receive method. Will attempt to receive arbitrary binary data up to 64 bytes long. For overloads to receive Arduino String, see PhysicalLayer::receive.

+

Binary receive method. Will attempt to receive arbitrary binary data up to 64 bytes long. For overloads to receive Arduino String, see PhysicalLayer::receive.

Parameters
@@ -509,6 +616,30 @@ void 
dataPointer to array to save the received binary data.
PhysicalLayer.

+ + + +

◆ receive() [3/3]

+ +
+
+ + + + +
virtual int16_t PhysicalLayer::receive
+
+ +

Binary receive method. Must be implemented in module class.

+
Parameters
+ + + +
dataPointer to array to save the received binary data.
lenNumber of bytes that will be received. Must be known in advance for binary transmissions.
+
+
+
Returns
Status Codes
+
@@ -907,10 +1038,58 @@ void 
Returns
Status Codes
+ + + +

◆ startTransmit() [1/4]

+ +
+
+ + + + +
int16_t PhysicalLayer::startTransmit
+
+ +

Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes.

+
Parameters
+ + + +
strC-string that will be transmitted.
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+ +
+
+ +

◆ startTransmit() [2/4]

+ +
+
+ + + + +
int16_t PhysicalLayer::startTransmit
+
+ +

Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes.

+
Parameters
+ + + +
strAddress of Arduino String that will be transmitted.
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+
-

◆ startTransmit()

+

◆ startTransmit() [3/4]

@@ -964,10 +1143,107 @@ void 
PhysicalLayer.

+ + + +

◆ startTransmit() [4/4]

+ +
+
+ + + + +
virtual int16_t PhysicalLayer::startTransmit
+
+ +

Interrupt-driven binary transmit method.

+
Parameters
+ + + + +
dataBinary data that will be transmitted.
lenLength of binary data to transmit (in bytes).
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+ +
+
+ +

◆ transmit() [1/5]

+ +
+
+ + + + +
int16_t PhysicalLayer::transmit
+
+ +

Arduino Flash String transmit method.

+
Parameters
+ + + +
strPointer to Arduino Flash String that will be transmitted.
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+ +
+
+ +

◆ transmit() [2/5]

+ +
+
+ + + + +
int16_t PhysicalLayer::transmit
+
+ +

C-string transmit method.

+
Parameters
+ + + +
strC-string that will be transmitted.
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+ +
+
+ +

◆ transmit() [3/5]

+ +
+
+ + + + +
int16_t PhysicalLayer::transmit
+
+ +

Arduino String transmit method.

+
Parameters
+ + + +
strAddress of Arduino string that will be transmitted.
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+
-

◆ transmit()

+

◆ transmit() [4/5]

@@ -1006,7 +1282,7 @@ void 
-

Binary transmit method. Will transmit arbitrary binary data up to 64 bytes long. For overloads to transmit Arduino String or C-string, see PhysicalLayer::transmit.

+

Binary transmit method. Will transmit arbitrary binary data up to 64 bytes long. For overloads to transmit Arduino String or C-string, see PhysicalLayer::transmit.

Parameters
@@ -1019,6 +1295,31 @@ void 
dataBinary data that will be transmitted.
PhysicalLayer.

+ + + +

◆ transmit() [5/5]

+ +
+
+ + + + +
virtual int16_t PhysicalLayer::transmit
+
+ +

Binary transmit method. Must be implemented in module class.

+
Parameters
+ + + + +
dataBinary data that will be transmitted.
lenLength of binary data to transmit (in bytes).
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+
@@ -1071,7 +1372,7 @@ void 
Si443x + doxygen 1.8.17 diff --git a/class_si443x.js b/class_si443x.js index 5df032b2..4b25c859 100644 --- a/class_si443x.js +++ b/class_si443x.js @@ -7,8 +7,12 @@ var class_si443x = [ "getPacketLength", "class_si443x.html#a2d944669dc69ccd47f9e6c360f2ffd10", null ], [ "packetMode", "class_si443x.html#a616eb24c4b11c5d39caaade160be8092", null ], [ "random", "class_si443x.html#ad371b44fc0c4ddd3ed39e2595e85b5df", null ], + [ "readData", "class_si443x.html#ae8eed0e888a7c8742e89d2b850977de2", null ], [ "readData", "class_si443x.html#ad00ff8b58c68118ad74fee82028aa71e", null ], + [ "readData", "class_si443x.html#ae8b6c756eb4b92855433ca389d73c632", null ], + [ "receive", "class_si443x.html#afb1b090348d9091bfa3a0b5ba3d85b36", null ], [ "receive", "class_si443x.html#aabca3ba8eda212938febab1df2e764b4", null ], + [ "receive", "class_si443x.html#a2ad4c6a8ac267f8ac590260414ffcda3", null ], [ "receiveDirect", "class_si443x.html#a178b471527813a608c04db7d3c9648d6", null ], [ "reset", "class_si443x.html#ae782ee06e2c463c24f22f5d4c3dd8d97", null ], [ "setBitRate", "class_si443x.html#ad43575e731dd7e66d5ad9e6dccd27170", null ], @@ -23,7 +27,14 @@ var class_si443x = [ "sleep", "class_si443x.html#ada90718aeb67d7f0e9899da534de9695", null ], [ "standby", "class_si443x.html#ac45d2776df3ff338db154ead143fb7b8", null ], [ "startReceive", "class_si443x.html#a10f886fc534a85bbf8c1aeb9b5ffe4f2", null ], + [ "startTransmit", "class_si443x.html#a923654706eff5118ef6e84214e837f27", null ], + [ "startTransmit", "class_si443x.html#af068e6e862c99e39d0261a7971dd56db", null ], [ "startTransmit", "class_si443x.html#a402b4f5f11ba79e9cd4fb6ac0bfd9314", null ], + [ "startTransmit", "class_si443x.html#a41a1de0ebffe7b65de6fd8cceb9a5123", null ], + [ "transmit", "class_si443x.html#ab139a34e03a6fd5a781cd54da21d308f", null ], + [ "transmit", "class_si443x.html#a492b2d057dd803c3884fa1adc8e22534", null ], + [ "transmit", "class_si443x.html#aeb62c5a521aafc1e0525c58e9364482b", null ], [ "transmit", "class_si443x.html#a782748025e19ec6e597293afb6570bff", null ], + [ "transmit", "class_si443x.html#af81565ee82ef9a7de9c5663c745f4ef7", null ], [ "transmitDirect", "class_si443x.html#a5a86a2032c4b876c1c8e4a7cf4730c99", null ] ]; \ No newline at end of file diff --git a/class_transport_layer-members.html b/class_transport_layer-members.html index 2fe526f8..5fd7dfef 100644 --- a/class_transport_layer-members.html +++ b/class_transport_layer-members.html @@ -1,9 +1,9 @@ - + - + RadioLib: Member List @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@
- + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -100,7 +102,7 @@ $(document).ready(function(){initNavTree('class_transport_layer.html','');});
    + doxygen 1.8.17
diff --git a/class_transport_layer.html b/class_transport_layer.html index 2247bd33..a4306d70 100644 --- a/class_transport_layer.html +++ b/class_transport_layer.html @@ -1,9 +1,9 @@ - + - + RadioLib: TransportLayer Class Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@
- + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -98,29 +100,29 @@ Inheritance diagram for TransportLayer:
-ESP8266 - -
+ESP8266 + + - + - + - + - + - + - +

Public Member Functions

virtual int16_t openTransportConnection (const char *host, const char *protocol, uint16_t port, uint16_t tcpKeepAlive=0)=0
 Open transport layer connection. More...
 Open transport layer connection. More...
 
virtual int16_t closeTransportConnection ()=0
 Close transport layer connection. More...
 Close transport layer connection. More...
 
virtual int16_t send (const char *data)=0
 Send string-based data. More...
 Send string-based data. More...
 
virtual int16_t send (uint8_t *data, size_t len)=0
 Send arbitrary binary data. More...
 Send arbitrary binary data. More...
 
virtual size_t receive (uint8_t *data, size_t len, uint32_t timeout=10000)=0
 Receive data. More...
 Receive data. More...
 
virtual size_t getNumBytes (uint32_t timeout=10000, size_t minBytes=10)=0
 Get number of received bytes. More...
 Get number of received bytes. More...
 

Detailed Description

@@ -417,7 +419,7 @@ Public Member Functions + doxygen 1.8.17 diff --git a/class_x_bee-members.html b/class_x_bee-members.html index eb5e156f..9cb8eb93 100644 --- a/class_x_bee-members.html +++ b/class_x_bee-members.html @@ -1,9 +1,9 @@ - + - + RadioLib: Member List @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -103,7 +105,7 @@ $(document).ready(function(){initNavTree('class_x_bee.html','');});
diff --git a/class_x_bee.html b/class_x_bee.html index 8fa54640..18ea8262 100644 --- a/class_x_bee.html +++ b/class_x_bee.html @@ -1,9 +1,9 @@ - + - + RadioLib: XBee Class Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -96,32 +98,32 @@ $(document).ready(function(){initNavTree('class_x_bee.html','');});

Public Member Functions

 XBee (Module *mod) - Default constructor. More...
+ Default constructor. More...
  int16_t begin (long speed) - Initialization method. More...
+ Initialization method. More...
  void reset ()  Resets module using interrupt/GPIO pin 1.
  int16_t transmit (uint8_t *dest, const char *payload, uint8_t radius=1) - Sends data to the destination 64-bit (global) address, when destination 16-bit (local) address is unknown. More...
+ Sends data to the destination 64-bit (global) address, when destination 16-bit (local) address is unknown. More...
  int16_t transmit (uint8_t *dest, uint8_t *destNetwork, const char *payload, uint8_t radius=1) - Sends data to the destination 64-bit (global) address, when destination 16-bit (local) address is known. More...
+ Sends data to the destination 64-bit (global) address, when destination 16-bit (local) address is known. More...
  size_t available () - Gets the number of payload bytes received. More...
+ Gets the number of payload bytes received. More...
  String getPacketSource () - Gets packet source 64-bit address. More...
+ Gets packet source 64-bit address. More...
  String getPacketData () - Gets packet payload. More...
+ Gets packet payload. More...
  int16_t setPanId (uint8_t *panId) - Sets PAN (Personal Area Network) ID. All XBees must be in the same PAN in order to communicate. More...
+ Sets PAN (Personal Area Network) ID. All XBees must be in the same PAN in order to communicate. More...
 

Detailed Description

@@ -146,7 +148,7 @@ void 
Parameters
- +
modInstance of Module that will be used to communicate with the radio.
modInstance of Module that will be used to communicate with the radio.
@@ -374,7 +376,7 @@ void 
XBee + doxygen 1.8.17
diff --git a/class_x_bee_serial-members.html b/class_x_bee_serial-members.html index 2ff1b6aa..2223b752 100644 --- a/class_x_bee_serial-members.html +++ b/class_x_bee_serial-members.html @@ -1,9 +1,9 @@ - + - + RadioLib: Member List @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -129,7 +131,7 @@ $(document).ready(function(){initNavTree('class_x_bee_serial.html','');});
diff --git a/class_x_bee_serial.html b/class_x_bee_serial.html index de5f8bff..07145dfc 100644 --- a/class_x_bee_serial.html +++ b/class_x_bee_serial.html @@ -1,9 +1,9 @@ - + - + RadioLib: XBeeSerial Class Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -98,27 +100,27 @@ Inheritance diagram for XBeeSerial:
-ISerial - -
+ISerial + + - + - + - + - +

Public Member Functions

 XBeeSerial (Module *mod)
 Default constructor. More...
 Default constructor. More...
 
int16_t begin (long speed)
 Initialization method. More...
 Initialization method. More...
 
void reset ()
 Resets module using interrupt/GPIO pin 1.
 
int16_t setDestinationAddress (const char *destinationAddressHigh, const char *destinationAddressLow)
 Sets destination XBee address. More...
 Sets destination XBee address. More...
 
int16_t setPanId (const char *panId)
 Sets PAN (Personal Area Network) ID. Both XBees must be in the same PAN in order to use transparent mode. More...
 Sets PAN (Personal Area Network) ID. Both XBees must be in the same PAN in order to use transparent mode. More...
 
- Public Member Functions inherited from ISerial
@@ -237,7 +239,7 @@ size_t println (void)<

Default constructor.

Parameters
- +
modInstance of Module that will be used to communicate with the radio.
modInstance of Module that will be used to communicate with the radio.
@@ -298,11 +300,11 @@ size_t 
println (void)<
-

Sets destination XBee address.

+

Sets destination XBee address.

Parameters
- - + +
destinationAddressHighHigher 4 bytes of the destination XBee module, in the form of uppercase hexadecimal string (i.e. 8 characters).
destinationAddressLowLower 4 bytes of the destination XBee module, in the form of uppercase hexadecimal string (i.e. 8 characters).
destinationAddressHighHigher 4 bytes of the destination XBee module, in the form of uppercase hexadecimal string (i.e. 8 characters).
destinationAddressLowLower 4 bytes of the destination XBee module, in the form of uppercase hexadecimal string (i.e. 8 characters).
@@ -348,7 +350,7 @@ size_t println (void)< + doxygen 1.8.17
diff --git a/classes.html b/classes.html index 82f7c031..6d2bfd9f 100644 --- a/classes.html +++ b/classes.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class Index @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -87,36 +89,99 @@ $(document).ready(function(){initNavTree('classes.html','');});
a | c | e | h | i | j | m | n | p | r | s | t | x
- - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + - + +
  a  
-
  i  
-
  r  
-
SSTVClient   SX1282   
SSTVMode_t   SX128x   
AFSKClient   ISerial   RF69   SX1231   
  t  
-
AX25Client   ITA2String   RFM22   SX1261   
AX25Frame   
  j  
-
RFM23   SX1262   tone_t   
  i  
+
  r  
+
SSTVClient   SX1282   
SSTVMode_t   SX128x   
AFSKClient   ISerial   RF69   SX1231   
  t  
+
AX25Client   ITA2String   RFM22   SX1261   
AX25Frame   
  j  
+
RFM23   SX1262   tone_t   
  c  
-
RFM95   SX1268   TransportLayer   
JDY08   RFM96   SX126x   
  x  
-
CC1101   
  m  
-
RFM97   SX1272   
RFM95   SX1268   TransportLayer   
JDY08   RFM96   SX126x   
  x  
+
CC1101   
  m  
+
RFM97   SX1272   
  e  
-
RFM98   SX1273   XBee   
Module   RTTYClient   SX1276   XBeeSerial   
ESP8266   MorseClient   
  s  
-
SX1277   
RFM98   SX1273   XBee   
Module   RTTYClient   SX1276   XBeeSerial   
ESP8266   MorseClient   
  s  
+
SX1277   
  h  
-
MQTTClient   SX1278   
MQTTClient   SX1278   
  n  
-
Si4430   SX1279   
HC05   Si4431   SX127x   
HellClient   nRF24   Si4432   SX1280   
HTTPClient   
  p  
-
Si443x   SX1281   
Si4430   SX1279   
HC05   Si4431   SX127x   
HellClient   nRF24   Si4432   SX1280   
HTTPClient   
  p  
+
Si443x   SX1281   
PhysicalLayer   
PhysicalLayer   
a | c | e | h | i | j | m | n | p | r | s | t | x
@@ -127,7 +192,7 @@ $(document).ready(function(){initNavTree('classes.html','');});
diff --git a/classn_r_f24-members.html b/classn_r_f24-members.html index 5e990187..2e3d8fa3 100644 --- a/classn_r_f24-members.html +++ b/classn_r_f24-members.html @@ -1,9 +1,9 @@ - + - + RadioLib: Member List @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -99,8 +101,12 @@ $(document).ready(function(){initNavTree('classn_r_f24.html','');}); PhysicalLayer::random(int32_t max)PhysicalLayer PhysicalLayer::random(int32_t min, int32_t max)PhysicalLayer readData(uint8_t *data, size_t len) overridenRF24virtual + readData(String &str, size_t len=0)nRF24 + readData(uint8_t *data, size_t len)=0nRF24 PhysicalLayer::readData(String &str, size_t len=0)PhysicalLayer receive(uint8_t *data, size_t len) overridenRF24virtual + receive(String &str, size_t len=0)nRF24 + receive(uint8_t *data, size_t len)=0nRF24 PhysicalLayer::receive(String &str, size_t len=0)PhysicalLayer receiveDirect() overridenRF24virtual setAddressWidth(uint8_t addrWidth)nRF24 @@ -122,13 +128,20 @@ $(document).ready(function(){initNavTree('classn_r_f24.html','');}); startDirect()PhysicalLayer startReceive()nRF24 startTransmit(uint8_t *data, size_t len, uint8_t addr) overridenRF24virtual - PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer - PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer - transmit(uint8_t *data, size_t len, uint8_t addr) overridenRF24virtual - PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer - PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer - PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer - transmitDirect(uint32_t frf=0) overridenRF24virtual + startTransmit(String &str, uint8_t addr=0)nRF24 + startTransmit(const char *str, uint8_t addr=0)nRF24 + startTransmit(uint8_t *data, size_t len, uint8_t addr=0)=0nRF24 + PhysicalLayer::startTransmit(String &str, uint8_t addr=0)PhysicalLayer + PhysicalLayer::startTransmit(const char *str, uint8_t addr=0)PhysicalLayer + transmit(uint8_t *data, size_t len, uint8_t addr) overridenRF24virtual + transmit(__FlashStringHelper *fstr, uint8_t addr=0)nRF24 + transmit(String &str, uint8_t addr=0)nRF24 + transmit(const char *str, uint8_t addr=0)nRF24 + transmit(uint8_t *data, size_t len, uint8_t addr=0)=0nRF24 + PhysicalLayer::transmit(__FlashStringHelper *fstr, uint8_t addr=0)PhysicalLayer + PhysicalLayer::transmit(String &str, uint8_t addr=0)PhysicalLayer + PhysicalLayer::transmit(const char *str, uint8_t addr=0)PhysicalLayer + transmitDirect(uint32_t frf=0) overridenRF24virtual
@@ -136,7 +149,7 @@ $(document).ready(function(){initNavTree('classn_r_f24.html','');}); diff --git a/classn_r_f24.html b/classn_r_f24.html index 18cfa7b9..46c2c3b4 100644 --- a/classn_r_f24.html +++ b/classn_r_f24.html @@ -1,9 +1,9 @@ - + - + RadioLib: nRF24 Class Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -98,102 +100,135 @@ Inheritance diagram for nRF24:
-PhysicalLayer - -
+PhysicalLayer + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -254,7 +289,7 @@ Public Member Functions

Default constructor.

Parameters

Public Member Functions

 nRF24 (Module *mod)
 Default constructor. More...
 Default constructor. More...
 
int16_t begin (int16_t freq=2400, int16_t dataRate=1000, int8_t power=-12, uint8_t addrWidth=5)
 Initialization method. More...
 Initialization method. More...
 
int16_t sleep ()
 Sets the module to sleep mode. More...
 Sets the module to sleep mode. More...
 
int16_t standby () override
 Sets the module to standby mode. More...
 Sets the module to standby mode. More...
 
int16_t transmit (uint8_t *data, size_t len, uint8_t addr) override
 Blocking binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 Blocking binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 
int16_t receive (uint8_t *data, size_t len) override
 Blocking binary receive method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 Blocking binary receive method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 
int16_t transmitDirect (uint32_t frf=0) override
 Starts direct mode transmission. More...
 Starts direct mode transmission. More...
 
int16_t receiveDirect () override
 Dummy direct mode reception method, to ensure PhysicalLayer compatibility. More...
 Dummy direct mode reception method, to ensure PhysicalLayer compatibility. More...
 
void setIrqAction (void(*func)(void))
 Sets interrupt service routine to call when IRQ activates. More...
 Sets interrupt service routine to call when IRQ activates. More...
 
int16_t startTransmit (uint8_t *data, size_t len, uint8_t addr) override
 Interrupt-driven binary transmit method. IRQ will be activated when full packet is transmitted. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 Interrupt-driven binary transmit method. IRQ will be activated when full packet is transmitted. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 
int16_t startReceive ()
 Interrupt-driven receive method. IRQ will be activated when full packet is received. More...
 Interrupt-driven receive method. IRQ will be activated when full packet is received. More...
 
int16_t readData (uint8_t *data, size_t len) override
 Reads data received after calling startReceive method. More...
 Reads data received after calling startReceive method. More...
 
int16_t setFrequency (int16_t freq)
 Sets carrier frequency. Allowed values range from 2400 MHz to 2525 MHz. More...
 Sets carrier frequency. Allowed values range from 2400 MHz to 2525 MHz. More...
 
int16_t setDataRate (int16_t dataRate)
 Sets data rate. Allowed values are 2000, 1000 or 250 kbps. More...
 Sets data rate. Allowed values are 2000, 1000 or 250 kbps. More...
 
int16_t setOutputPower (int8_t power)
 Sets output power. Allowed values are -18, -12, -6 or 0 dBm. More...
 Sets output power. Allowed values are -18, -12, -6 or 0 dBm. More...
 
int16_t setAddressWidth (uint8_t addrWidth)
 Sets address width of transmit and receive pipes in bytes. Allowed values are 3, 4 or 5 bytes. More...
 Sets address width of transmit and receive pipes in bytes. Allowed values are 3, 4 or 5 bytes. More...
 
int16_t setTransmitPipe (uint8_t *addr)
 Sets address of transmit pipe. The address width must be the same as the same as the configured in setAddressWidth. More...
 Sets address of transmit pipe. The address width must be the same as the same as the configured in setAddressWidth. More...
 
int16_t setReceivePipe (uint8_t pipeNum, uint8_t *addr)
 Sets address of receive pipes 0 or 1. The address width must be the same as the same as the configured in setAddressWidth. More...
 Sets address of receive pipes 0 or 1. The address width must be the same as the same as the configured in setAddressWidth. More...
 
int16_t setReceivePipe (uint8_t pipeNum, uint8_t addrByte)
 Sets address of receive pipes 2 - 5. The first 2 - 4 address bytes for these pipes are the same as for address pipe 1, only the last byte can be set. More...
 Sets address of receive pipes 2 - 5. The first 2 - 4 address bytes for these pipes are the same as for address pipe 1, only the last byte can be set. More...
 
int16_t disablePipe (uint8_t pipeNum)
 Disables specified receive pipe. More...
 Disables specified receive pipe. More...
 
int16_t getStatus (uint8_t mask=0xFF)
 Gets nRF24 status register. More...
 Gets nRF24 status register. More...
 
bool isCarrierDetected ()
 Checks if carrier was detected during last RX. More...
 Checks if carrier was detected during last RX. More...
 
int16_t setFrequencyDeviation (float freqDev) override
 Dummy configuration method, to ensure PhysicalLayer compatibility. More...
 Dummy configuration method, to ensure PhysicalLayer compatibility. More...
 
size_t getPacketLength (bool update=true) override
 Query modem for the packet length of received payload. More...
 Query modem for the packet length of received payload. More...
 
int16_t setCrcFiltering (bool crcOn=true)
 Enable CRC filtering and generation. More...
 Enable CRC filtering and generation. More...
 
int16_t setAutoAck (bool autoAckOn=true)
 Enable or disable auto-acknowledge packets on all pipes. More...
 Enable or disable auto-acknowledge packets on all pipes. More...
 
int16_t setAutoAck (uint8_t pipeNum, bool autoAckOn)
 Enable or disable auto-acknowledge packets on given pipe. More...
 Enable or disable auto-acknowledge packets on given pipe. More...
 
int16_t setDataShaping (uint8_t sh) override
 Dummy data shaping configuration method, to ensure PhysicalLayer compatibility. More...
 Dummy data shaping configuration method, to ensure PhysicalLayer compatibility. More...
 
int16_t setEncoding (uint8_t encoding) override
 Dummy encoding configuration method, to ensure PhysicalLayer compatibility. More...
 Dummy encoding configuration method, to ensure PhysicalLayer compatibility. More...
 
uint8_t random ()
 Dummy random method, to ensure PhysicalLayer compatibility. More...
 Dummy random method, to ensure PhysicalLayer compatibility. More...
 
int16_t transmit (__FlashStringHelper *fstr, uint8_t addr=0)
 Arduino Flash String transmit method. More...
 
int16_t transmit (String &str, uint8_t addr=0)
 Arduino String transmit method. More...
 
int16_t transmit (const char *str, uint8_t addr=0)
 C-string transmit method. More...
 
virtual int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Binary transmit method. Must be implemented in module class. More...
 
int16_t receive (String &str, size_t len=0)
 Arduino String receive method. More...
 
virtual int16_t receive (uint8_t *data, size_t len)=0
 Binary receive method. Must be implemented in module class. More...
 
int16_t startTransmit (String &str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
int16_t startTransmit (const char *str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
virtual int16_t startTransmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Interrupt-driven binary transmit method. More...
 
int16_t readData (String &str, size_t len=0)
 Reads data that was received after calling startReceive method. More...
 
virtual int16_t readData (uint8_t *data, size_t len)=0
 Reads data that was received after calling startReceive method. More...
 
- Public Member Functions inherited from PhysicalLayer
 PhysicalLayer (float freqStep, size_t maxPacketLength)
 Default constructor. More...
- +
modInstance of Module that will be used to communicate with the radio.
modInstance of Module that will be used to communicate with the radio.
@@ -394,7 +429,7 @@ Public Member Functions
-

Gets nRF24 status register.

+

Gets nRF24 status register.

Parameters
@@ -448,15 +483,39 @@ Public Member Functions
maskBit mask to be used on the returned register value.
-

Dummy random method, to ensure PhysicalLayer compatibility.

+

Dummy random method, to ensure PhysicalLayer compatibility.

Returns
Always returns 0.

Implements PhysicalLayer.

+
+ + +

◆ readData() [1/3]

+ +
+
+ + + + +
int16_t PhysicalLayer::readData
+
+ +

Reads data that was received after calling startReceive method.

+
Parameters
+ + + +
strAddress of Arduino String to save the received data.
lenExpected number of characters in the message.
+
+
+
Returns
Status Codes
+
-

◆ readData()

+

◆ readData() [2/3]

@@ -501,10 +560,58 @@ Public Member Functions

Implements PhysicalLayer.

+
+
+ +

◆ readData() [3/3]

+ +
+
+ + + + +
virtual int16_t PhysicalLayer::readData
+
+ +

Reads data that was received after calling startReceive method.

+
Parameters
+ + + +
dataPointer to array to save the received binary data.
lenNumber of bytes that will be received. Must be known in advance for binary transmissions.
+
+
+
Returns
Status Codes
+ +
+
+ +

◆ receive() [1/3]

+ +
+
+ + + + +
int16_t PhysicalLayer::receive
+
+ +

Arduino String receive method.

+
Parameters
+ + + +
strAddress of Arduino String to save the received data.
lenExpected number of characters in the message. Leave as 0 if expecting a unknown size packet
+
+
+
Returns
Status Codes
+
-

◆ receive()

+

◆ receive() [2/3]

@@ -537,7 +644,7 @@ Public Member Functions
-

Blocking binary receive method. Overloads for string-based transmissions are implemented in PhysicalLayer.

+

Blocking binary receive method. Overloads for string-based transmissions are implemented in PhysicalLayer.

Parameters
@@ -549,6 +656,30 @@ Public Member Functions

Implements PhysicalLayer.

+ + + +

◆ receive() [3/3]

+ +
+
+
dataBinary data to be sent.
+ + + +
virtual int16_t PhysicalLayer::receive
+
+ +

Binary receive method. Must be implemented in module class.

+
Parameters
+ + + +
dataPointer to array to save the received binary data.
lenNumber of bytes that will be received. Must be known in advance for binary transmissions.
+
+
+
Returns
Status Codes
+
@@ -574,7 +705,7 @@ Public Member Functions
-

Dummy direct mode reception method, to ensure PhysicalLayer compatibility.

+

Dummy direct mode reception method, to ensure PhysicalLayer compatibility.

Returns
Status Codes

Implements PhysicalLayer.

@@ -751,7 +882,7 @@ Public Member Functions
-

Dummy data shaping configuration method, to ensure PhysicalLayer compatibility.

+

Dummy data shaping configuration method, to ensure PhysicalLayer compatibility.

Parameters
@@ -788,7 +919,7 @@ Public Member Functions
shIgnored.
-

Dummy encoding configuration method, to ensure PhysicalLayer compatibility.

+

Dummy encoding configuration method, to ensure PhysicalLayer compatibility.

Parameters
@@ -852,7 +983,7 @@ Public Member Functions
shIgnored.
-

Dummy configuration method, to ensure PhysicalLayer compatibility.

+

Dummy configuration method, to ensure PhysicalLayer compatibility.

Parameters
@@ -1089,10 +1220,58 @@ Public Member Functions

Interrupt-driven receive method. IRQ will be activated when full packet is received.

Returns
Status Codes
+ + + +

◆ startTransmit() [1/4]

+ +
+
+
freqDevDummy frequency deviation parameter, no configuration will be changed.
+ + + +
int16_t PhysicalLayer::startTransmit
+
+ +

Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes.

+
Parameters
+ + + +
strC-string that will be transmitted.
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+ +
+ + +

◆ startTransmit() [2/4]

+ +
+
+ + + + +
int16_t PhysicalLayer::startTransmit
+
+ +

Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes.

+
Parameters
+ + + +
strAddress of Arduino String that will be transmitted.
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+
-

◆ startTransmit()

+

◆ startTransmit() [3/4]

@@ -1131,12 +1310,12 @@ Public Member Functions
-

Interrupt-driven binary transmit method. IRQ will be activated when full packet is transmitted. Overloads for string-based transmissions are implemented in PhysicalLayer.

+

Interrupt-driven binary transmit method. IRQ will be activated when full packet is transmitted. Overloads for string-based transmissions are implemented in PhysicalLayer.

Parameters
- +
dataBinary data to be sent.
lenNumber of bytes to send.
addrDummy address parameter, to ensure PhysicalLayer compatibility.
addrDummy address parameter, to ensure PhysicalLayer compatibility.
@@ -1144,10 +1323,107 @@ Public Member Functions

Implements PhysicalLayer.

+
+
+ +

◆ startTransmit() [4/4]

+ +
+
+ + + + +
virtual int16_t PhysicalLayer::startTransmit
+
+ +

Interrupt-driven binary transmit method.

+
Parameters
+ + + + +
dataBinary data that will be transmitted.
lenLength of binary data to transmit (in bytes).
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+ +
+
+ +

◆ transmit() [1/5]

+ +
+
+ + + + +
int16_t PhysicalLayer::transmit
+
+ +

Arduino Flash String transmit method.

+
Parameters
+ + + +
strPointer to Arduino Flash String that will be transmitted.
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+ +
+
+ +

◆ transmit() [2/5]

+ +
+
+ + + + +
int16_t PhysicalLayer::transmit
+
+ +

C-string transmit method.

+
Parameters
+ + + +
strC-string that will be transmitted.
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+ +
+
+ +

◆ transmit() [3/5]

+ +
+
+ + + + +
int16_t PhysicalLayer::transmit
+
+ +

Arduino String transmit method.

+
Parameters
+ + + +
strAddress of Arduino string that will be transmitted.
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+
-

◆ transmit()

+

◆ transmit() [4/5]

@@ -1186,12 +1462,12 @@ Public Member Functions
-

Blocking binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer.

+

Blocking binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer.

Parameters
- +
dataBinary data to be sent.
lenNumber of bytes to send.
addrDummy address parameter, to ensure PhysicalLayer compatibility.
addrDummy address parameter, to ensure PhysicalLayer compatibility.
@@ -1199,6 +1475,31 @@ Public Member Functions

Implements PhysicalLayer.

+
+
+ +

◆ transmit() [5/5]

+ +
+
+ + + + +
virtual int16_t PhysicalLayer::transmit
+
+ +

Binary transmit method. Must be implemented in module class.

+
Parameters
+ + + + +
dataBinary data that will be transmitted.
lenLength of binary data to transmit (in bytes).
addrNode address to transmit the packet to. Only used in FSK mode.
+
+
+
Returns
Status Codes
+
@@ -1250,7 +1551,7 @@ Public Member Functions + doxygen 1.8.17 diff --git a/classn_r_f24.js b/classn_r_f24.js index e1952764..45826985 100644 --- a/classn_r_f24.js +++ b/classn_r_f24.js @@ -7,8 +7,12 @@ var classn_r_f24 = [ "getStatus", "classn_r_f24.html#a3f0b08fd8e58db36f6c1926cc3eac6a9", null ], [ "isCarrierDetected", "classn_r_f24.html#ad9204ee787b425e2c9e8422bb7939a37", null ], [ "random", "classn_r_f24.html#aeb98b92de42dec7c703888c62e061c3c", null ], + [ "readData", "classn_r_f24.html#ae8eed0e888a7c8742e89d2b850977de2", null ], [ "readData", "classn_r_f24.html#a410fb78acb4ed358818c132687b8857a", null ], + [ "readData", "classn_r_f24.html#ae8b6c756eb4b92855433ca389d73c632", null ], + [ "receive", "classn_r_f24.html#afb1b090348d9091bfa3a0b5ba3d85b36", null ], [ "receive", "classn_r_f24.html#a239e94511d9ee67ad3d64a49a5c4d7ac", null ], + [ "receive", "classn_r_f24.html#a2ad4c6a8ac267f8ac590260414ffcda3", null ], [ "receiveDirect", "classn_r_f24.html#a415d86947742e981bfcf7f2371f8605c", null ], [ "setAddressWidth", "classn_r_f24.html#a5b01677f5ce6bee54da8fc7098c339f4", null ], [ "setAutoAck", "classn_r_f24.html#aca941c9235ba1212257288554eb4b7fe", null ], @@ -27,7 +31,14 @@ var classn_r_f24 = [ "sleep", "classn_r_f24.html#a033287e33c532638c11e2775a073f297", null ], [ "standby", "classn_r_f24.html#a5957f06a891d3d9c07e87b59c239ce56", null ], [ "startReceive", "classn_r_f24.html#af4f443da5d90e032e5f2f65420515f9c", null ], + [ "startTransmit", "classn_r_f24.html#a923654706eff5118ef6e84214e837f27", null ], + [ "startTransmit", "classn_r_f24.html#af068e6e862c99e39d0261a7971dd56db", null ], [ "startTransmit", "classn_r_f24.html#a42fdc828b49f2b8e15457189bd57d917", null ], + [ "startTransmit", "classn_r_f24.html#a41a1de0ebffe7b65de6fd8cceb9a5123", null ], + [ "transmit", "classn_r_f24.html#ab139a34e03a6fd5a781cd54da21d308f", null ], + [ "transmit", "classn_r_f24.html#a492b2d057dd803c3884fa1adc8e22534", null ], + [ "transmit", "classn_r_f24.html#aeb62c5a521aafc1e0525c58e9364482b", null ], [ "transmit", "classn_r_f24.html#a583d505bd3a638ecc5576dd2dd95f044", null ], + [ "transmit", "classn_r_f24.html#af81565ee82ef9a7de9c5663c745f4ef7", null ], [ "transmitDirect", "classn_r_f24.html#a090bb64f65309efabfa1ffd86daa2303", null ] ]; \ No newline at end of file diff --git a/dir_022d1f7e87f0a3cd97fb9c4aa339f7b1.html b/dir_022d1f7e87f0a3cd97fb9c4aa339f7b1.html index 052a868c..017d86d7 100644 --- a/dir_022d1f7e87f0a3cd97fb9c4aa339f7b1.html +++ b/dir_022d1f7e87f0a3cd97fb9c4aa339f7b1.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/protocols/TransportLayer Directory Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -92,7 +94,7 @@ $(document).ready(function(){initNavTree('dir_022d1f7e87f0a3cd97fb9c4aa339f7b1.h + doxygen 1.8.17
diff --git a/dir_1496c164e9c77875dd570f4157f3157f.html b/dir_1496c164e9c77875dd570f4157f3157f.html index 0af39889..c5d9e0ba 100644 --- a/dir_1496c164e9c77875dd570f4157f3157f.html +++ b/dir_1496c164e9c77875dd570f4157f3157f.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/modules/RFM2x Directory Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -92,7 +94,7 @@ $(document).ready(function(){initNavTree('dir_1496c164e9c77875dd570f4157f3157f.h + doxygen 1.8.17
diff --git a/dir_2cdd3c47e80335731aa10f67042c391a.html b/dir_2cdd3c47e80335731aa10f67042c391a.html index 48f9b09b..2bb06a6a 100644 --- a/dir_2cdd3c47e80335731aa10f67042c391a.html +++ b/dir_2cdd3c47e80335731aa10f67042c391a.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/protocols/PhysicalLayer Directory Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -92,7 +94,7 @@ $(document).ready(function(){initNavTree('dir_2cdd3c47e80335731aa10f67042c391a.h + doxygen 1.8.17
diff --git a/dir_2d04440730a0443b949b3f3ffedccfc3.html b/dir_2d04440730a0443b949b3f3ffedccfc3.html index 55ccbb4d..f8904ba3 100644 --- a/dir_2d04440730a0443b949b3f3ffedccfc3.html +++ b/dir_2d04440730a0443b949b3f3ffedccfc3.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/protocols/AX25 Directory Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -92,7 +94,7 @@ $(document).ready(function(){initNavTree('dir_2d04440730a0443b949b3f3ffedccfc3.h + doxygen 1.8.17
diff --git a/dir_31c953e8b112b915d208fa745d66f12e.html b/dir_31c953e8b112b915d208fa745d66f12e.html index 3fa54e79..c51334a9 100644 --- a/dir_31c953e8b112b915d208fa745d66f12e.html +++ b/dir_31c953e8b112b915d208fa745d66f12e.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/modules/JDY08 Directory Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -92,7 +94,7 @@ $(document).ready(function(){initNavTree('dir_31c953e8b112b915d208fa745d66f12e.h + doxygen 1.8.17
diff --git a/dir_3a277ada553fbb989028f9b071a02542.html b/dir_3a277ada553fbb989028f9b071a02542.html index 6ed9b690..f49866ab 100644 --- a/dir_3a277ada553fbb989028f9b071a02542.html +++ b/dir_3a277ada553fbb989028f9b071a02542.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/modules/RF69 Directory Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -92,7 +94,7 @@ $(document).ready(function(){initNavTree('dir_3a277ada553fbb989028f9b071a02542.h + doxygen 1.8.17
diff --git a/dir_47c60a953c7c148861b9fe25d51850eb.html b/dir_47c60a953c7c148861b9fe25d51850eb.html index 113e042a..b138343e 100644 --- a/dir_47c60a953c7c148861b9fe25d51850eb.html +++ b/dir_47c60a953c7c148861b9fe25d51850eb.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/protocols/HTTP Directory Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -92,7 +94,7 @@ $(document).ready(function(){initNavTree('dir_47c60a953c7c148861b9fe25d51850eb.h + doxygen 1.8.17
diff --git a/dir_620e20826520c01cf981aa9c981ff885.html b/dir_620e20826520c01cf981aa9c981ff885.html index e86db7d3..7dd2d5c92 100644 --- a/dir_620e20826520c01cf981aa9c981ff885.html +++ b/dir_620e20826520c01cf981aa9c981ff885.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/protocols/RTTY Directory Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -92,7 +94,7 @@ $(document).ready(function(){initNavTree('dir_620e20826520c01cf981aa9c981ff885.h + doxygen 1.8.17
diff --git a/dir_66baa0cb3ce3b01929266fe63d8714ed.html b/dir_66baa0cb3ce3b01929266fe63d8714ed.html index f3eb2f00..10a1725b 100644 --- a/dir_66baa0cb3ce3b01929266fe63d8714ed.html +++ b/dir_66baa0cb3ce3b01929266fe63d8714ed.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/modules/HC05 Directory Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -92,7 +94,7 @@ $(document).ready(function(){initNavTree('dir_66baa0cb3ce3b01929266fe63d8714ed.h + doxygen 1.8.17
diff --git a/dir_66ce0d8112a82c480b60d648cf9cb1ca.html b/dir_66ce0d8112a82c480b60d648cf9cb1ca.html index 5b73bcb4..9fff0dda 100644 --- a/dir_66ce0d8112a82c480b60d648cf9cb1ca.html +++ b/dir_66ce0d8112a82c480b60d648cf9cb1ca.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/protocols/SSTV Directory Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -92,7 +94,7 @@ $(document).ready(function(){initNavTree('dir_66ce0d8112a82c480b60d648cf9cb1ca.h + doxygen 1.8.17
diff --git a/dir_68267d1309a1af8e8297ef4c3efbcdba.html b/dir_68267d1309a1af8e8297ef4c3efbcdba.html index 43d7a2e7..4ad4ac4b 100644 --- a/dir_68267d1309a1af8e8297ef4c3efbcdba.html +++ b/dir_68267d1309a1af8e8297ef4c3efbcdba.html @@ -1,9 +1,9 @@ - + - + RadioLib: src Directory Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -92,7 +94,7 @@ $(document).ready(function(){initNavTree('dir_68267d1309a1af8e8297ef4c3efbcdba.h + doxygen 1.8.17
diff --git a/dir_6baa7f88a31cf8c1ad1b651eaa1fd5b9.html b/dir_6baa7f88a31cf8c1ad1b651eaa1fd5b9.html index 065240d2..e6f68b14 100644 --- a/dir_6baa7f88a31cf8c1ad1b651eaa1fd5b9.html +++ b/dir_6baa7f88a31cf8c1ad1b651eaa1fd5b9.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/modules/RFM9x Directory Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -92,7 +94,7 @@ $(document).ready(function(){initNavTree('dir_6baa7f88a31cf8c1ad1b651eaa1fd5b9.h + doxygen 1.8.17
diff --git a/dir_70c194bd40717a4946dbd8bc35f09b17.html b/dir_70c194bd40717a4946dbd8bc35f09b17.html index b119e35e..854ea51e 100644 --- a/dir_70c194bd40717a4946dbd8bc35f09b17.html +++ b/dir_70c194bd40717a4946dbd8bc35f09b17.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/protocols/AFSK Directory Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -92,7 +94,7 @@ $(document).ready(function(){initNavTree('dir_70c194bd40717a4946dbd8bc35f09b17.h + doxygen 1.8.17
diff --git a/dir_747c20e84f9dfe1cc835713177129efc.html b/dir_747c20e84f9dfe1cc835713177129efc.html index 58040b4c..0cf37e72 100644 --- a/dir_747c20e84f9dfe1cc835713177129efc.html +++ b/dir_747c20e84f9dfe1cc835713177129efc.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/modules/SX126x Directory Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -92,7 +94,7 @@ $(document).ready(function(){initNavTree('dir_747c20e84f9dfe1cc835713177129efc.h + doxygen 1.8.17
diff --git a/dir_79690749eba542503bb1a9a3dbb495e1.html b/dir_79690749eba542503bb1a9a3dbb495e1.html index caa73061..781c0269 100644 --- a/dir_79690749eba542503bb1a9a3dbb495e1.html +++ b/dir_79690749eba542503bb1a9a3dbb495e1.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/protocols Directory Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -96,7 +98,7 @@ Directories + doxygen 1.8.17
diff --git a/dir_7b8feacc70eb38d5fd56f060c649a59c.html b/dir_7b8feacc70eb38d5fd56f060c649a59c.html index 691d1608..159e142c 100644 --- a/dir_7b8feacc70eb38d5fd56f060c649a59c.html +++ b/dir_7b8feacc70eb38d5fd56f060c649a59c.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/modules/XBee Directory Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -92,7 +94,7 @@ $(document).ready(function(){initNavTree('dir_7b8feacc70eb38d5fd56f060c649a59c.h + doxygen 1.8.17
diff --git a/dir_8d5439df06ea2679013aa8390703d116.html b/dir_8d5439df06ea2679013aa8390703d116.html index 41954d79..b42bc6b6 100644 --- a/dir_8d5439df06ea2679013aa8390703d116.html +++ b/dir_8d5439df06ea2679013aa8390703d116.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/modules/nRF24 Directory Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -92,7 +94,7 @@ $(document).ready(function(){initNavTree('dir_8d5439df06ea2679013aa8390703d116.h + doxygen 1.8.17
diff --git a/dir_a6b6d785787649e9a3efd5036a39108c.html b/dir_a6b6d785787649e9a3efd5036a39108c.html index 9d47574f..26d452b0 100644 --- a/dir_a6b6d785787649e9a3efd5036a39108c.html +++ b/dir_a6b6d785787649e9a3efd5036a39108c.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/protocols/MQTT Directory Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -92,7 +94,7 @@ $(document).ready(function(){initNavTree('dir_a6b6d785787649e9a3efd5036a39108c.h + doxygen 1.8.17
diff --git a/dir_a758e8e29d8436beff5e1f16d5ed2d65.html b/dir_a758e8e29d8436beff5e1f16d5ed2d65.html index b43fa30b..74426460 100644 --- a/dir_a758e8e29d8436beff5e1f16d5ed2d65.html +++ b/dir_a758e8e29d8436beff5e1f16d5ed2d65.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/modules/SX1231 Directory Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -92,7 +94,7 @@ $(document).ready(function(){initNavTree('dir_a758e8e29d8436beff5e1f16d5ed2d65.h + doxygen 1.8.17
diff --git a/dir_c14921ab4918e015c91d11c846a1924a.html b/dir_c14921ab4918e015c91d11c846a1924a.html index 9afd817a..158e719e 100644 --- a/dir_c14921ab4918e015c91d11c846a1924a.html +++ b/dir_c14921ab4918e015c91d11c846a1924a.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/protocols/Hellschreiber Directory Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -92,7 +94,7 @@ $(document).ready(function(){initNavTree('dir_c14921ab4918e015c91d11c846a1924a.h + doxygen 1.8.17
diff --git a/dir_d916eb25599dc82f14db514c97a6ae6d.html b/dir_d916eb25599dc82f14db514c97a6ae6d.html index eaa44fb0..6839af9e 100644 --- a/dir_d916eb25599dc82f14db514c97a6ae6d.html +++ b/dir_d916eb25599dc82f14db514c97a6ae6d.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/protocols/Morse Directory Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -92,7 +94,7 @@ $(document).ready(function(){initNavTree('dir_d916eb25599dc82f14db514c97a6ae6d.h + doxygen 1.8.17
diff --git a/dir_ddb4d7e95cc2d6c8e1ade10a20d7247d.html b/dir_ddb4d7e95cc2d6c8e1ade10a20d7247d.html index 26ad4f88..ef91386f 100644 --- a/dir_ddb4d7e95cc2d6c8e1ade10a20d7247d.html +++ b/dir_ddb4d7e95cc2d6c8e1ade10a20d7247d.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/modules Directory Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -96,7 +98,7 @@ Directories + doxygen 1.8.17
diff --git a/dir_e2961291c878e1b3ab9447d79b865c81.html b/dir_e2961291c878e1b3ab9447d79b865c81.html index f84fc041..985bb9a4 100644 --- a/dir_e2961291c878e1b3ab9447d79b865c81.html +++ b/dir_e2961291c878e1b3ab9447d79b865c81.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/modules/Si443x Directory Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -92,7 +94,7 @@ $(document).ready(function(){initNavTree('dir_e2961291c878e1b3ab9447d79b865c81.h + doxygen 1.8.17
diff --git a/dir_e824c1032eaf58988755f8ba9735594b.html b/dir_e824c1032eaf58988755f8ba9735594b.html index de6a04d5..5043b629 100644 --- a/dir_e824c1032eaf58988755f8ba9735594b.html +++ b/dir_e824c1032eaf58988755f8ba9735594b.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/modules/CC1101 Directory Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -92,7 +94,7 @@ $(document).ready(function(){initNavTree('dir_e824c1032eaf58988755f8ba9735594b.h + doxygen 1.8.17
diff --git a/dir_ec8372b468150f98f42c73cf97f51298.html b/dir_ec8372b468150f98f42c73cf97f51298.html index 70dbaee8..7f29568b 100644 --- a/dir_ec8372b468150f98f42c73cf97f51298.html +++ b/dir_ec8372b468150f98f42c73cf97f51298.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/modules/ESP8266 Directory Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -92,7 +94,7 @@ $(document).ready(function(){initNavTree('dir_ec8372b468150f98f42c73cf97f51298.h + doxygen 1.8.17
diff --git a/dir_ed12d23d857ca7061030f8751e72e77c.html b/dir_ed12d23d857ca7061030f8751e72e77c.html index 53629347..5d2a38be 100644 --- a/dir_ed12d23d857ca7061030f8751e72e77c.html +++ b/dir_ed12d23d857ca7061030f8751e72e77c.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/modules/SX128x Directory Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -92,7 +94,7 @@ $(document).ready(function(){initNavTree('dir_ed12d23d857ca7061030f8751e72e77c.h + doxygen 1.8.17
diff --git a/dir_f980efad9544c0545d0fa50a84ff12f2.html b/dir_f980efad9544c0545d0fa50a84ff12f2.html index 3b4a6cca..657c6f80 100644 --- a/dir_f980efad9544c0545d0fa50a84ff12f2.html +++ b/dir_f980efad9544c0545d0fa50a84ff12f2.html @@ -1,9 +1,9 @@ - + - + RadioLib: src/modules/SX127x Directory Reference @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -92,7 +94,7 @@ $(document).ready(function(){initNavTree('dir_f980efad9544c0545d0fa50a84ff12f2.h + doxygen 1.8.17
diff --git a/doxygen.css b/doxygen.css index 4f1ab919..73ecbb2c 100644 --- a/doxygen.css +++ b/doxygen.css @@ -1,4 +1,4 @@ -/* The standard CSS for doxygen 1.8.13 */ +/* The standard CSS for doxygen 1.8.17 */ body, table, div, p, dl { font: 400 14px/22px Roboto,sans-serif; @@ -53,17 +53,24 @@ dt { font-weight: bold; } -div.multicol { +ul.multicol { -moz-column-gap: 1em; -webkit-column-gap: 1em; + column-gap: 1em; -moz-column-count: 3; -webkit-column-count: 3; + column-count: 3; } p.startli, p.startdd { margin-top: 2px; } +th p.starttd, p.intertd, p.endtd { + font-size: 100%; + font-weight: 700; +} + p.starttd { margin-top: 0px; } @@ -80,6 +87,15 @@ p.endtd { margin-bottom: 2px; } +p.interli { +} + +p.interdd { +} + +p.intertd { +} + /* @end */ caption { @@ -134,12 +150,12 @@ a.qindex { a.qindexHL { font-weight: bold; background-color: #9CAFD4; - color: #ffffff; + color: #FFFFFF; border: 1px double #869DCA; } .contents a.qindexHL:visited { - color: #ffffff; + color: #FFFFFF; } a.el { @@ -163,6 +179,25 @@ dl.el { margin-left: -1cm; } +ul { + overflow: hidden; /*Fixed: list item bullets overlap floating elements*/ +} + +#side-nav ul { + overflow: visible; /* reset ul rule for scroll bar in GENERATE_TREEVIEW window */ +} + +#main-nav ul { + overflow: visible; /* reset ul rule for the navigation bar drop down lists */ +} + +.fragment { + text-align: left; + direction: ltr; + overflow-x: auto; /*Fixed: fragment lines overlap floating elements*/ + overflow-y: hidden; +} + pre.fragment { border: 1px solid #C4CFE5; background-color: #FBFCFD; @@ -177,8 +212,8 @@ pre.fragment { } div.fragment { - padding: 0px; - margin: 4px 8px 4px 2px; + padding: 0 0 1px 0; /*Fixed: last line underline overlap border*/ + margin: 4px 8px 4px 2px; background-color: #FBFCFD; border: 1px solid #C4CFE5; } @@ -248,7 +283,7 @@ span.lineno a:hover { div.ah, span.ah { background-color: black; font-weight: bold; - color: #ffffff; + color: #FFFFFF; margin-bottom: 3px; margin-top: 3px; padding: 0.2em; @@ -324,7 +359,7 @@ img.formulaDsp { } -img.formulaInl { +img.formulaInl, img.inline { vertical-align: middle; } @@ -402,6 +437,13 @@ blockquote { padding: 0 12px 0 16px; } +blockquote.DocNodeRTL { + border-left: 0; + border-right: 2px solid #9CAFD4; + margin: 0 4px 0 24px; + padding: 0 16px 0 12px; +} + /* @end */ /* @@ -498,7 +540,7 @@ table.memberdecls { white-space: nowrap; } -.memItemRight { +.memItemRight, .memTemplItemRight { width: 100%; } @@ -666,17 +708,17 @@ dl.reflist dd { padding-left: 0px; } -.params .paramname, .retval .paramname { +.params .paramname, .retval .paramname, .tparams .paramname, .exception .paramname { font-weight: bold; vertical-align: top; } -.params .paramtype { +.params .paramtype, .tparams .paramtype { font-style: italic; vertical-align: top; } -.params .paramdir { +.params .paramdir, .tparams .paramdir { font-family: "courier new",courier,monospace; vertical-align: top; } @@ -1081,72 +1123,143 @@ div.headertitle padding: 5px 5px 5px 10px; } -dl -{ - padding: 0 0 0 10px; +.PageDocRTL-title div.headertitle { + text-align: right; + direction: rtl; } -/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug */ -dl.section -{ +dl { + padding: 0 0 0 0; +} + +/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug, dl.examples */ +dl.section { margin-left: 0px; padding-left: 0px; } -dl.note -{ - margin-left:-7px; - padding-left: 3px; - border-left:4px solid; - border-color: #D0C000; +dl.section.DocNodeRTL { + margin-right: 0px; + padding-right: 0px; } -dl.warning, dl.attention -{ - margin-left:-7px; - padding-left: 3px; - border-left:4px solid; - border-color: #FF0000; +dl.note { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #D0C000; } -dl.pre, dl.post, dl.invariant -{ - margin-left:-7px; - padding-left: 3px; - border-left:4px solid; - border-color: #00D000; +dl.note.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #D0C000; } -dl.deprecated -{ - margin-left:-7px; - padding-left: 3px; - border-left:4px solid; - border-color: #505050; +dl.warning, dl.attention { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #FF0000; } -dl.todo -{ - margin-left:-7px; - padding-left: 3px; - border-left:4px solid; - border-color: #00C0E0; +dl.warning.DocNodeRTL, dl.attention.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #FF0000; } -dl.test -{ - margin-left:-7px; - padding-left: 3px; - border-left:4px solid; - border-color: #3030E0; +dl.pre, dl.post, dl.invariant { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #00D000; } -dl.bug -{ - margin-left:-7px; - padding-left: 3px; - border-left:4px solid; - border-color: #C08050; +dl.pre.DocNodeRTL, dl.post.DocNodeRTL, dl.invariant.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #00D000; +} + +dl.deprecated { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #505050; +} + +dl.deprecated.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #505050; +} + +dl.todo { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #00C0E0; +} + +dl.todo.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #00C0E0; +} + +dl.test { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #3030E0; +} + +dl.test.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #3030E0; +} + +dl.bug { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #C08050; +} + +dl.bug.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #C08050; } dl.section dd { @@ -1263,6 +1376,11 @@ div.toc { width: 200px; } +.PageDocRTL-title div.toc { + float: left !important; + text-align: right; +} + div.toc li { background: url("bdwn.png") no-repeat scroll 0 5px transparent; font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif; @@ -1271,6 +1389,12 @@ div.toc li { padding-top: 2px; } +.PageDocRTL-title div.toc li { + background-position-x: right !important; + padding-left: 0 !important; + padding-right: 10px; +} + div.toc h3 { font: bold 12px/1.2 Arial,FreeSans,sans-serif; color: #4665A2; @@ -1300,6 +1424,26 @@ div.toc li.level4 { margin-left: 45px; } +.PageDocRTL-title div.toc li.level1 { + margin-left: 0 !important; + margin-right: 0; +} + +.PageDocRTL-title div.toc li.level2 { + margin-left: 0 !important; + margin-right: 15px; +} + +.PageDocRTL-title div.toc li.level3 { + margin-left: 0 !important; + margin-right: 30px; +} + +.PageDocRTL-title div.toc li.level4 { + margin-left: 0 !important; + margin-right: 45px; +} + .inherit_header { font-weight: bold; color: gray; @@ -1413,7 +1557,7 @@ tr.heading h2 { } #powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after { - border-top-color: #ffffff; + border-top-color: #FFFFFF; border-width: 10px; margin: 0px -10px; } @@ -1441,7 +1585,7 @@ tr.heading h2 { } #powerTip.s:after, #powerTip.se:after, #powerTip.sw:after { - border-bottom-color: #ffffff; + border-bottom-color: #FFFFFF; border-width: 10px; margin: 0px -10px; } @@ -1468,7 +1612,7 @@ tr.heading h2 { left: 100%; } #powerTip.e:after { - border-left-color: #ffffff; + border-left-color: #FFFFFF; border-width: 10px; top: 50%; margin-top: -10px; @@ -1484,7 +1628,7 @@ tr.heading h2 { right: 100%; } #powerTip.w:after { - border-right-color: #ffffff; + border-right-color: #FFFFFF; border-width: 10px; top: 50%; margin-top: -10px; @@ -1592,5 +1736,36 @@ th.markdownTableHeadCenter, td.markdownTableBodyCenter { text-align: center } +.DocNodeRTL { + text-align: right; + direction: rtl; +} +.DocNodeLTR { + text-align: left; + direction: ltr; +} + +table.DocNodeRTL { + width: auto; + margin-right: 0; + margin-left: auto; +} + +table.DocNodeLTR { + width: auto; + margin-right: auto; + margin-left: 0; +} + +tt, code, kbd, samp +{ + display: inline-block; + direction:ltr; +} /* @end */ + +u { + text-decoration: underline; +} + diff --git a/dynsections.js b/dynsections.js index 85e18369..ea0a7b39 100644 --- a/dynsections.js +++ b/dynsections.js @@ -1,3 +1,26 @@ +/* + @licstart The following is the entire license notice for the + JavaScript code in this file. + + Copyright (C) 1997-2017 by Dimitri van Heesch + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + @licend The above is the entire license notice + for the JavaScript code in this file + */ function toggleVisibility(linkObj) { var base = $(linkObj).attr('id'); @@ -15,7 +38,7 @@ function toggleVisibility(linkObj) summary.hide(); $(linkObj).removeClass('closed').addClass('opened'); $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); - } + } return false; } @@ -94,4 +117,4 @@ function toggleInherit(id) $(img).attr('src',src.substring(0,src.length-10)+'open.png'); } } - +/* @license-end */ diff --git a/files.html b/files.html index 5bac0101..2aee46d9 100644 --- a/files.html +++ b/files.html @@ -1,9 +1,9 @@ - + - + RadioLib: File List @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -169,7 +171,7 @@ $(document).ready(function(){initNavTree('files.html','');});
diff --git a/files.js b/files_dup.js similarity index 86% rename from files.js rename to files_dup.js index 04b0a8ee..c3b39c49 100644 --- a/files.js +++ b/files_dup.js @@ -1,4 +1,4 @@ -var files = +var files_dup = [ [ "src", "dir_68267d1309a1af8e8297ef4c3efbcdba.html", "dir_68267d1309a1af8e8297ef4c3efbcdba" ] ]; \ No newline at end of file diff --git a/functions.html b/functions.html index 17875eec..f2d7e584 100644 --- a/functions.html +++ b/functions.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class Members @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -126,7 +128,7 @@ $(document).ready(function(){initNavTree('functions.html','');});
diff --git a/functions_b.html b/functions_b.html index cf718a78..5727d7e8 100644 --- a/functions_b.html +++ b/functions_b.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class Members @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -151,7 +153,7 @@ $(document).ready(function(){initNavTree('functions_b.html','');});
diff --git a/functions_c.html b/functions_c.html index 234ee303..b4e9c7f0 100644 --- a/functions_c.html +++ b/functions_c.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class Members @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -126,7 +128,7 @@ $(document).ready(function(){initNavTree('functions_c.html','');});
diff --git a/functions_d.html b/functions_d.html index e9303877..617a988c 100644 --- a/functions_d.html +++ b/functions_d.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class Members @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -131,7 +133,7 @@ $(document).ready(function(){initNavTree('functions_d.html','');});
diff --git a/functions_dup.js b/functions_dup.js index 26e7f381..239d9ef2 100644 --- a/functions_dup.js +++ b/functions_dup.js @@ -23,5 +23,5 @@ var functions_dup = [ "w", "functions_w.html", null ], [ "x", "functions_x.html", null ], [ "y", "functions_y.html", null ], - [ "~", "functions_0x7e.html", null ] + [ "~", "functions_~.html", null ] ]; \ No newline at end of file diff --git a/functions_e.html b/functions_e.html index f85eb610..bc911e80 100644 --- a/functions_e.html +++ b/functions_e.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class Members @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -107,7 +109,7 @@ $(document).ready(function(){initNavTree('functions_e.html','');});
diff --git a/functions_f.html b/functions_f.html index 01c847f3..c3dd5006 100644 --- a/functions_f.html +++ b/functions_f.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class Members @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -105,7 +107,7 @@ $(document).ready(function(){initNavTree('functions_f.html','');});
diff --git a/functions_func.html b/functions_func.html index 21b2c20d..841f6f67 100644 --- a/functions_func.html +++ b/functions_func.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class Members - Functions @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -123,7 +125,7 @@ $(document).ready(function(){initNavTree('functions_func.html','');});
diff --git a/functions_func.js b/functions_func.js index 6491bdf4..0509bcbc 100644 --- a/functions_func.js +++ b/functions_func.js @@ -22,5 +22,5 @@ var functions_func = [ "v", "functions_func_v.html", null ], [ "x", "functions_func_x.html", null ], [ "y", "functions_func_y.html", null ], - [ "~", "functions_func_0x7e.html", null ] + [ "~", "functions_func_~.html", null ] ]; \ No newline at end of file diff --git a/functions_func_b.html b/functions_func_b.html index 79bf64e4..2b00f99b 100644 --- a/functions_func_b.html +++ b/functions_func_b.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class Members - Functions @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -148,7 +150,7 @@ $(document).ready(function(){initNavTree('functions_func_b.html','');});
diff --git a/functions_func_c.html b/functions_func_c.html index 22c81767..7bbc1930 100644 --- a/functions_func_c.html +++ b/functions_func_c.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class Members - Functions @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -123,7 +125,7 @@ $(document).ready(function(){initNavTree('functions_func_c.html','');});
diff --git a/functions_func_d.html b/functions_func_d.html index ad92666c..009312d8 100644 --- a/functions_func_d.html +++ b/functions_func_d.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class Members - Functions @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -125,7 +127,7 @@ $(document).ready(function(){initNavTree('functions_func_d.html','');});
diff --git a/functions_func_e.html b/functions_func_e.html index 3afd462c..0567eb01 100644 --- a/functions_func_e.html +++ b/functions_func_e.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class Members - Functions @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -107,7 +109,7 @@ $(document).ready(function(){initNavTree('functions_func_e.html','');});
diff --git a/functions_func_f.html b/functions_func_f.html index 14247a43..54f51b07 100644 --- a/functions_func_f.html +++ b/functions_func_f.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class Members - Functions @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -102,7 +104,7 @@ $(document).ready(function(){initNavTree('functions_func_f.html','');});
diff --git a/functions_func_g.html b/functions_func_g.html index 64bbc9a1..43221e49 100644 --- a/functions_func_g.html +++ b/functions_func_g.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class Members - Functions @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -201,7 +203,7 @@ $(document).ready(function(){initNavTree('functions_func_g.html','');});
diff --git a/functions_func_h.html b/functions_func_h.html index 9c4866d3..6cb7e7a7 100644 --- a/functions_func_h.html +++ b/functions_func_h.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class Members - Functions @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -100,7 +102,7 @@ $(document).ready(function(){initNavTree('functions_func_h.html','');});
diff --git a/functions_func_i.html b/functions_func_i.html index 710584a9..41220ab1 100644 --- a/functions_func_i.html +++ b/functions_func_i.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class Members - Functions @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -113,7 +115,7 @@ $(document).ready(function(){initNavTree('functions_func_i.html','');});
diff --git a/functions_func_j.html b/functions_func_j.html index 2b8080bc..78b4fd00 100644 --- a/functions_func_j.html +++ b/functions_func_j.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class Members - Functions @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -97,7 +99,7 @@ $(document).ready(function(){initNavTree('functions_func_j.html','');});
diff --git a/functions_func_l.html b/functions_func_l.html index e15fe8b0..da749782 100644 --- a/functions_func_l.html +++ b/functions_func_l.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class Members - Functions @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -94,7 +96,7 @@ $(document).ready(function(){initNavTree('functions_func_l.html','');});
diff --git a/functions_func_m.html b/functions_func_m.html index 015ac6ae..70559177 100644 --- a/functions_func_m.html +++ b/functions_func_m.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class Members - Functions @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -106,7 +108,7 @@ $(document).ready(function(){initNavTree('functions_func_m.html','');});
diff --git a/functions_func_n.html b/functions_func_n.html index afc5bb5c..781ba5ca 100644 --- a/functions_func_n.html +++ b/functions_func_n.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class Members - Functions @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -98,7 +100,7 @@ $(document).ready(function(){initNavTree('functions_func_n.html','');});
diff --git a/functions_func_o.html b/functions_func_o.html index cdab1299..9e870c9d 100644 --- a/functions_func_o.html +++ b/functions_func_o.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class Members - Functions @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -99,7 +101,7 @@ $(document).ready(function(){initNavTree('functions_func_o.html','');});
diff --git a/functions_func_p.html b/functions_func_p.html index ee14dd76..a25a75df 100644 --- a/functions_func_p.html +++ b/functions_func_p.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class Members - Functions @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -115,7 +117,7 @@ $(document).ready(function(){initNavTree('functions_func_p.html','');});
diff --git a/functions_func_r.html b/functions_func_r.html index d47cec46..faba87f1 100644 --- a/functions_func_r.html +++ b/functions_func_r.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class Members - Functions @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -163,7 +165,7 @@ $(document).ready(function(){initNavTree('functions_func_r.html','');});
diff --git a/functions_func_s.html b/functions_func_s.html index b6a3d935..915a0ecd 100644 --- a/functions_func_s.html +++ b/functions_func_s.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class Members - Functions @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -498,7 +500,7 @@ $(document).ready(function(){initNavTree('functions_func_s.html','');});
diff --git a/functions_func_t.html b/functions_func_t.html index ac9f2771..96a12469 100644 --- a/functions_func_t.html +++ b/functions_func_t.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class Members - Functions @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -120,7 +122,7 @@ $(document).ready(function(){initNavTree('functions_func_t.html','');});
diff --git a/functions_func_u.html b/functions_func_u.html index 7fc63dd7..f2c80e18 100644 --- a/functions_func_u.html +++ b/functions_func_u.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class Members - Functions @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -94,7 +96,7 @@ $(document).ready(function(){initNavTree('functions_func_u.html','');});
diff --git a/functions_func_v.html b/functions_func_v.html index d4e8c1f0..88d53d83 100644 --- a/functions_func_v.html +++ b/functions_func_v.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class Members - Functions @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -97,7 +99,7 @@ $(document).ready(function(){initNavTree('functions_func_v.html','');});
diff --git a/functions_func_x.html b/functions_func_x.html index 539b1c39..93a42ad1 100644 --- a/functions_func_x.html +++ b/functions_func_x.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class Members - Functions @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -97,7 +99,7 @@ $(document).ready(function(){initNavTree('functions_func_x.html','');});
diff --git a/functions_func_y.html b/functions_func_y.html index 02250118..8c76b33c 100644 --- a/functions_func_y.html +++ b/functions_func_y.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class Members - Functions @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -94,7 +96,7 @@ $(document).ready(function(){initNavTree('functions_func_y.html','');});
diff --git a/functions_func_0x7e.html b/functions_func_~.html similarity index 83% rename from functions_func_0x7e.html rename to functions_func_~.html index 6b70e7f7..be2f852c 100644 --- a/functions_func_0x7e.html +++ b/functions_func_~.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class Members - Functions @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -82,7 +84,7 @@ $(document).ready(function(){initNavTree('functions_func_0x7e.html','');});
  -

- ~ -

    +

    - ~ -

    • ~AX25Frame() : AX25Frame
    • @@ -97,7 +99,7 @@ $(document).ready(function(){initNavTree('functions_func_0x7e.html','');});
        + doxygen 1.8.17
diff --git a/functions_g.html b/functions_g.html index b7ba4a2b..b2fa81c0 100644 --- a/functions_g.html +++ b/functions_g.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class Members @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@
- + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -201,7 +203,7 @@ $(document).ready(function(){initNavTree('functions_g.html','');});
diff --git a/functions_h.html b/functions_h.html index 132aaa88..eb46ba78 100644 --- a/functions_h.html +++ b/functions_h.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class Members @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -103,7 +105,7 @@ $(document).ready(function(){initNavTree('functions_h.html','');});
diff --git a/functions_i.html b/functions_i.html index 17342150..f463a9cf 100644 --- a/functions_i.html +++ b/functions_i.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class Members @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -119,7 +121,7 @@ $(document).ready(function(){initNavTree('functions_i.html','');});
diff --git a/functions_j.html b/functions_j.html index 54cc8216..836e4ed1 100644 --- a/functions_j.html +++ b/functions_j.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class Members @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -97,7 +99,7 @@ $(document).ready(function(){initNavTree('functions_j.html','');});
diff --git a/functions_l.html b/functions_l.html index 21b0416a..a238efa4 100644 --- a/functions_l.html +++ b/functions_l.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class Members @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -97,7 +99,7 @@ $(document).ready(function(){initNavTree('functions_l.html','');});
diff --git a/functions_m.html b/functions_m.html index 81255e75..de60023f 100644 --- a/functions_m.html +++ b/functions_m.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class Members @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -109,7 +111,7 @@ $(document).ready(function(){initNavTree('functions_m.html','');});
diff --git a/functions_n.html b/functions_n.html index a4bd09d2..9f03b4ea 100644 --- a/functions_n.html +++ b/functions_n.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class Members @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -104,7 +106,7 @@ $(document).ready(function(){initNavTree('functions_n.html','');});
diff --git a/functions_o.html b/functions_o.html index 35172600..5ed22b8d 100644 --- a/functions_o.html +++ b/functions_o.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class Members @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -99,7 +101,7 @@ $(document).ready(function(){initNavTree('functions_o.html','');});
diff --git a/functions_p.html b/functions_p.html index 2d2041e7..2d206f86 100644 --- a/functions_p.html +++ b/functions_p.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class Members @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -118,7 +120,7 @@ $(document).ready(function(){initNavTree('functions_p.html','');});
diff --git a/functions_r.html b/functions_r.html index b8ee10a6..d94beed0 100644 --- a/functions_r.html +++ b/functions_r.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class Members @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -172,7 +174,7 @@ $(document).ready(function(){initNavTree('functions_r.html','');});
diff --git a/functions_s.html b/functions_s.html index 4cfb952e..64033b5c 100644 --- a/functions_s.html +++ b/functions_s.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class Members @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -516,7 +518,7 @@ $(document).ready(function(){initNavTree('functions_s.html','');});
diff --git a/functions_t.html b/functions_t.html index c4271faf..3d07cdd5 100644 --- a/functions_t.html +++ b/functions_t.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class Members @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
@@ -62,7 +62,9 @@ $(function() {
@@ -116,7 +118,7 @@ $(document).ready(function(){initNavTree('functions_t.html','');}); , SX128x
  • type -: tone_t +: tone_t
  • @@ -126,7 +128,7 @@ $(document).ready(function(){initNavTree('functions_t.html','');}); diff --git a/functions_u.html b/functions_u.html index 6429e6fd..47fb2473 100644 --- a/functions_u.html +++ b/functions_u.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class Members @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
    @@ -62,7 +62,9 @@ $(function() {
    @@ -94,7 +96,7 @@ $(document).ready(function(){initNavTree('functions_u.html','');});
    diff --git a/functions_v.html b/functions_v.html index 7e83a818..a4e6cb99 100644 --- a/functions_v.html +++ b/functions_v.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class Members @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
    @@ -62,7 +62,9 @@ $(function() {
    @@ -100,7 +102,7 @@ $(document).ready(function(){initNavTree('functions_v.html','');});
    diff --git a/functions_vars.html b/functions_vars.html index fd6d6caf..e2029235 100644 --- a/functions_vars.html +++ b/functions_vars.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class Members - Variables @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
    @@ -62,7 +62,9 @@ $(function() {
    @@ -154,7 +156,7 @@ $(document).ready(function(){initNavTree('functions_vars.html','');}); : SSTVMode_t
  • type -: tone_t +: tone_t
  • visCode : SSTVMode_t @@ -170,7 +172,7 @@ $(document).ready(function(){initNavTree('functions_vars.html','');});
      + doxygen 1.8.17
  • diff --git a/functions_w.html b/functions_w.html index 53525606..051d2f9c 100644 --- a/functions_w.html +++ b/functions_w.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class Members @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
    @@ -62,7 +62,9 @@ $(function() {
    @@ -94,7 +96,7 @@ $(document).ready(function(){initNavTree('functions_w.html','');});
    diff --git a/functions_x.html b/functions_x.html index 94f6f4c2..e3b25b05 100644 --- a/functions_x.html +++ b/functions_x.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class Members @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
    @@ -62,7 +62,9 @@ $(function() {
    @@ -97,7 +99,7 @@ $(document).ready(function(){initNavTree('functions_x.html','');});
    diff --git a/functions_y.html b/functions_y.html index 389a87d5..0dfaa904 100644 --- a/functions_y.html +++ b/functions_y.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class Members @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
    @@ -62,7 +62,9 @@ $(function() {
    @@ -94,7 +96,7 @@ $(document).ready(function(){initNavTree('functions_y.html','');});
    diff --git a/functions_0x7e.html b/functions_~.html similarity index 83% rename from functions_0x7e.html rename to functions_~.html index ca665b26..b16252ad 100644 --- a/functions_0x7e.html +++ b/functions_~.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class Members @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
    @@ -62,7 +62,9 @@ $(function() {
    @@ -82,7 +84,7 @@ $(document).ready(function(){initNavTree('functions_0x7e.html','');});
    Here is a list of all documented class members with links to the class documentation for each member:
    -

    - ~ -

      +

      - ~ -

      • ~AX25Frame() : AX25Frame
      • @@ -97,7 +99,7 @@ $(document).ready(function(){initNavTree('functions_0x7e.html','');});
          + doxygen 1.8.17
    diff --git a/group__config__encoding.html b/group__config__encoding.html index 696ac2f0..53f6d074 100644 --- a/group__config__encoding.html +++ b/group__config__encoding.html @@ -1,9 +1,9 @@ - + - + RadioLib: Encoding type aliases. @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@
    - + +/* @license-end */
    @@ -62,7 +62,9 @@ $(function() {
    @@ -110,7 +112,7 @@ Macros
    diff --git a/group__config__shaping.html b/group__config__shaping.html index f04a907b..1635ffd5 100644 --- a/group__config__shaping.html +++ b/group__config__shaping.html @@ -1,9 +1,9 @@ - + - + RadioLib: Data shaping filter values aliases. @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
    @@ -62,7 +62,9 @@ $(function() {
    @@ -118,7 +120,7 @@ Macros
    diff --git a/group__shield__config.html b/group__shield__config.html index 51f9cf8b..48440828 100644 --- a/group__shield__config.html +++ b/group__shield__config.html @@ -1,9 +1,9 @@ - + - + RadioLib: Shield Configuration @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
    @@ -62,7 +62,9 @@ $(function() {
    @@ -110,7 +112,7 @@ Macros
    diff --git a/group__status__codes.html b/group__status__codes.html index 0a8add08..e00e9821 100644 --- a/group__status__codes.html +++ b/group__status__codes.html @@ -1,9 +1,9 @@ - + - + RadioLib: Status Codes @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
    @@ -62,7 +62,9 @@ $(function() {
    @@ -99,7 +101,7 @@ Macros   #define ERR_CHIP_NOT_FOUND   -2 - Radio chip was not found during initialization. This can be caused by specifying wrong chip type in the constructor (i.e. calling SX1272 constructor for SX1278 chip) or by a fault in your wiring (incorrect slave select pin).
    + Radio chip was not found during initialization. This can be caused by specifying wrong chip type in the constructor (i.e. calling SX1272 constructor for SX1278 chip) or by a fault in your wiring (incorrect slave select pin).
      #define ERR_MEMORY_ALLOCATION_FAILED   -3 @@ -354,19 +356,19 @@ Macros  SX126x failed to execute SPI command.
      #define ERR_INVALID_SLEEP_PERIOD   -708 - The supplied sleep period is invalid. More...
    + The supplied sleep period is invalid. More...
      #define ERR_INVALID_RX_PERIOD   -709 - The supplied Rx period is invalid. More...
    + The supplied Rx period is invalid. More...
      #define ERR_INVALID_CALLSIGN   -801 - The provided callsign is invalid. More...
    + The provided callsign is invalid. More...
      #define ERR_INVALID_NUM_REPEATERS   -802 - The provided repeater configuration is invalid. More...
    + The provided repeater configuration is invalid. More...
      #define ERR_INVALID_REPEATER_CALLSIGN   -803 - One of the provided repeater callsigns is invalid. More...
    + One of the provided repeater callsigns is invalid. More...
      #define ERR_RANGING_TIMEOUT   -901 @@ -467,7 +469,7 @@ Macros
    diff --git a/group__uart__config.html b/group__uart__config.html index 3639d497..1a4d48c6 100644 --- a/group__uart__config.html +++ b/group__uart__config.html @@ -1,9 +1,9 @@ - + - + RadioLib: UART Configuration @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
    @@ -62,7 +62,9 @@ $(function() {
    @@ -138,7 +140,7 @@ Macros
    diff --git a/hierarchy.html b/hierarchy.html index 9a916fca..3131280a 100644 --- a/hierarchy.html +++ b/hierarchy.html @@ -1,9 +1,9 @@ - + - + RadioLib: Class Hierarchy @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@ - + +/* @license-end */
    @@ -62,7 +62,9 @@ $(function() {
    @@ -86,14 +88,14 @@ $(document).ready(function(){initNavTree('hierarchy.html','');});
    This inheritance list is sorted roughly, but not completely, alphabetically:
    [detail level 12345]
    - + - - + + @@ -102,39 +104,39 @@ $(document).ready(function(){initNavTree('hierarchy.html','');}); - - - + + + - + - + - + - - - - - + + + + + - - + + - +
     CAFSKClientClient for audio-based transmissions. Requires Arduino tone() function, and a module capable of direct mode transmission using DIO pins
     CAFSKClientClient for audio-based transmissions. Requires Arduino tone() function, and a module capable of direct mode transmission using DIO pins
     CAX25ClientClient for AX25 communication
     CAX25FrameAbstraction of AX.25 frame format
     CHellClientClient for Hellschreiber transmissions
     CHTTPClientClient for simple HTTP communication
     CISerialInterface class for Arduino Serial. Only calls the appropriate methods for the active UART interface
     CHC05Control class for HC05 module. Most methods supported by this module are implemented in ISerial interface
     CJDY08Control class for JDY08 module. Most methods supported by this module are implemented in ISerial interface
     CHC05Control class for HC05 module. Most methods supported by this module are implemented in ISerial interface
     CJDY08Control class for JDY08 module. Most methods supported by this module are implemented in ISerial interface
     CXBeeSerialXBee Serial interface. This class is used for XBees in transparent mode, i.e. when two XBees act as a "wireless UART"
     CITA2StringITA2-encoded string
     CModuleImplements all common low-level SPI/UART/I2C methods to control the wireless module. Every module class contains one private instance of this class
     CPhysicalLayerProvides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN. Also extracts some common module-independent methods. Using this interface class allows to use the protocols on various modules without much code duplicity. Because this class is used mainly as interface, all of its virtual members must be implemented in the module class
     CCC1101Control class for CC1101 module
     CnRF24Control class for nRF24 module
     CRF69Control class for RF69 module. Also serves as base class for SX1231
     CSX1231Control class for SX1231 module. Overrides some methods from RF69 due to different register values
     CSi443xBase class for Si443x series. All derived classes for Si443x (e.g. Si4431 or Si4432) inherit from this base class. This class should not be instantiated directly from Arduino sketch, only from its derived classes
     CRF69Control class for RF69 module. Also serves as base class for SX1231
     CSX1231Control class for SX1231 module. Overrides some methods from RF69 due to different register values
     CSi443xBase class for Si443x series. All derived classes for Si443x (e.g. Si4431 or Si4432) inherit from this base class. This class should not be instantiated directly from Arduino sketch, only from its derived classes
     CSi4432Derived class for Si4432 modules
     CSi4430Derived class for Si4430 modules
     CSi4431Derived class for Si4431 modules
     CSX126xBase class for SX126x series. All derived classes for SX126x (e.g. SX1262 or SX1268) inherit from this base class. This class should not be instantiated directly from Arduino sketch, only from its derived classes
     CSX126xBase class for SX126x series. All derived classes for SX126x (e.g. SX1262 or SX1268) inherit from this base class. This class should not be instantiated directly from Arduino sketch, only from its derived classes
     CSX1262Derived class for SX1262 modules
     CSX1261Derived class for SX1261 modules
     CSX1268Derived class for SX1268 modules
     CSX127xBase class for SX127x series. All derived classes for SX127x (e.g. SX1278 or SX1272) inherit from this base class. This class should not be instantiated directly from Arduino sketch, only from its derived classes
     CSX127xBase class for SX127x series. All derived classes for SX127x (e.g. SX1278 or SX1272) inherit from this base class. This class should not be instantiated directly from Arduino sketch, only from its derived classes
     CSX1272Derived class for SX1272 modules. Also used as base class for SX1273. Both modules use the same basic hardware and only differ in parameter ranges
     CSX1273Derived class for SX1273 modules. Overrides some methods from SX1272 due to different parameter ranges
     CSX1278Derived class for SX1278 modules. Also used as base class for SX1276, SX1277, SX1279, RFM95 and RFM96. All of these modules use the same basic hardware and only differ in parameter ranges (and names)
     CRFM95Derived class for RFM95 modules. Overrides some methods from SX1278 due to different parameter ranges
     CRFM95Derived class for RFM95 modules. Overrides some methods from SX1278 due to different parameter ranges
     CRFM97Derived class for RFM97 modules. Overrides some methods from RFM95 due to different parameter ranges
     CRFM96Derived class for RFM96 modules. Overrides some methods from SX1278 due to different parameter ranges
     CSX1276Derived class for SX1276 modules. Overrides some methods from SX1278 due to different parameter ranges
     CSX1277Derived class for SX1277 modules. Overrides some methods from SX1278 due to different parameter ranges
     CSX1279Derived class for SX1279 modules. Overrides some methods from SX1278 due to different parameter ranges
     CSX128xBase class for SX128x series. All derived classes for SX128x (e.g. SX1280 or SX1281) inherit from this base class. This class should not be instantiated directly from Arduino sketch, only from its derived classes
     CRFM96Derived class for RFM96 modules. Overrides some methods from SX1278 due to different parameter ranges
     CSX1276Derived class for SX1276 modules. Overrides some methods from SX1278 due to different parameter ranges
     CSX1277Derived class for SX1277 modules. Overrides some methods from SX1278 due to different parameter ranges
     CSX1279Derived class for SX1279 modules. Overrides some methods from SX1278 due to different parameter ranges
     CSX128xBase class for SX128x series. All derived classes for SX128x (e.g. SX1280 or SX1281) inherit from this base class. This class should not be instantiated directly from Arduino sketch, only from its derived classes
     CSX1281Derived class for SX1281 modules
     CSX1280Derived class for SX1280 modules
     CSX1282Derived class for SX1282 modules
     CRFM22Only exists as alias for Si4432, since there seems to be no difference between RFM22 and Si4432 modules
     CRFM23Only exists as alias for Si4431, since there seems to be no difference between RFM23 and Si4431 modules
     CRFM22Only exists as alias for Si4432, since there seems to be no difference between RFM22 and Si4432 modules
     CRFM23Only exists as alias for Si4431, since there seems to be no difference between RFM23 and Si4431 modules
     CRFM98Only exists as alias for RFM96, since there seems to be no difference between RFM96 and RFM98 modules
     CRTTYClientClient for RTTY communication. The public interface is the same as Arduino Serial
     CSSTVClientClient for SSTV transmissions
     CSSTVMode_tStructure to save data about supported SSTV modes
     Ctone_tStructure to save data about tone
     CTransportLayerProvides common interface for protocols that run on modules with Internet connectivity, such as HTTP or MQTT. Because this class is used mainly as interface, all of its virtual members must be implemented in the module class
     CESP8266Control class for ESP8266 module. Implements TransportLayer methods
     CESP8266Control class for ESP8266 module. Implements TransportLayer methods
     CXBeeControl class for XBee modules
    @@ -145,7 +147,7 @@ $(document).ready(function(){initNavTree('hierarchy.html','');});
      + doxygen 1.8.17
    diff --git a/index.html b/index.html index 3b4cf54d..2e4941bd 100644 --- a/index.html +++ b/index.html @@ -1,9 +1,9 @@ - + - + RadioLib: RadioLib Documentation @@ -13,9 +13,6 @@ - @@ -37,18 +34,21 @@
    - + +/* @license-end */
    @@ -62,7 +62,9 @@ $(function() {
    @@ -79,56 +81,57 @@ $(document).ready(function(){initNavTree('index.html','');});
    -
    +
    RadioLib Documentation

    Universal wireless communication library for Arduino.

    Currently Supported Wireless Modules and Protocols
    -
    Quick Links
    Documentation for most common methods can be found in its reference page (see the list above).
    -Some methods (mainly configuration) are also overridden in derived classes, such as SX1272, SX1278, RFM96 etc. for SX127x.
    -Status Codes have their own page.
    +
    Quick Links
    Documentation for most common methods can be found in its reference page (see the list above).
    +Some methods (mainly configuration) are also overridden in derived classes, such as SX1272, SX1278, RFM96 etc. for SX127x.
    +Status Codes have their own page.
    Some modules implement methods of one or more compatibility layers, loosely based on the ISO/OSI model:
    See also
    https://github.com/jgromes/RadioLib
    -
    +
    + diff --git a/jquery.js b/jquery.js index f5343eda..103c32d7 100644 --- a/jquery.js +++ b/jquery.js @@ -1,71 +1,26 @@ +/*! jQuery v3.4.1 | (c) JS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],E=C.document,r=Object.getPrototypeOf,s=t.slice,g=t.concat,u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.4.1",k=function(e,t){return new k.fn.init(e,t)},p=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function d(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp($),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+$),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),ne=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(m.childNodes),m.childNodes),t[m.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&((e?e.ownerDocument||e:m)!==C&&T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!A[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&U.test(t)){(s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=k),o=(l=h(t)).length;while(o--)l[o]="#"+s+" "+xe(l[o]);c=l.join(","),f=ee.test(t)&&ye(e.parentNode)||e}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){A(t,!0)}finally{s===k&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[k]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:m;return r!==C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),m!==C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=k,!C.getElementsByName||!C.getElementsByName(k).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+k+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+k+"+*").length||v.push(".#.+[+~]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",$)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e===C||e.ownerDocument===m&&y(m,e)?-1:t===C||t.ownerDocument===m&&y(m,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===C?-1:t===C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]===m?-1:s[r]===m?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if((e.ownerDocument||e)!==C&&T(e),d.matchesSelector&&E&&!A[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){A(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=p[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&p(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?k.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?k.grep(e,function(e){return e===n!==r}):"string"!=typeof n?k.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(k.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||q,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:L.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),D.test(r[1])&&k.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(k):k.makeArray(e,this)}).prototype=k.fn,q=k(E);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function P(e,t){while((e=e[t])&&1!==e.nodeType);return e}k.fn.extend({has:function(e){var t=k(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,""],thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?k.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;nx",y.noCloneChecked=!!me.cloneNode(!0).lastChild.defaultValue;var Te=/^key/,Ce=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ee=/^([^.]*)(?:\.(.+)|)/;function ke(){return!0}function Se(){return!1}function Ne(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function Ae(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ae(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Se;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return k().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=k.guid++)),e.each(function(){k.event.add(this,t,i,r,n)})}function De(e,i,o){o?(Q.set(e,i,!1),k.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Q.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(k.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Q.set(this,i,r),t=o(this,i),this[i](),r!==(n=Q.get(this,i))||t?Q.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n.value}else r.length&&(Q.set(this,i,{value:k.event.trigger(k.extend(r[0],k.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Q.get(e,i)&&k.event.add(e,i,ke)}k.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.get(t);if(v){n.handler&&(n=(o=n).handler,i=o.selector),i&&k.find.matchesSelector(ie,i),n.guid||(n.guid=k.guid++),(u=v.events)||(u=v.events={}),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof k&&k.event.triggered!==e.type?k.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(R)||[""]).length;while(l--)d=g=(s=Ee.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=k.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=k.event.special[d]||{},c=k.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&k.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),k.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.hasData(e)&&Q.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(R)||[""]).length;while(l--)if(d=g=(s=Ee.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=k.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||k.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)k.event.remove(e,d+t[l],n,r,!0);k.isEmptyObject(u)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=k.event.fix(e),u=new Array(arguments.length),l=(Q.get(this,"events")||{})[s.type]||[],c=k.event.special[s.type]||{};for(u[0]=s,t=1;t\x20\t\r\n\f]*)[^>]*)\/>/gi,qe=/\s*$/g;function Oe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function Pe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Re(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Me(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(Q.hasData(e)&&(o=Q.access(e),a=Q.set(t,o),l=o.events))for(i in delete a.handle,a.events={},l)for(n=0,r=l[i].length;n")},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=oe(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Vt,Gt=[],Yt=/(=)\?(?=&|$)|\?\?/;k.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Gt.pop()||k.expando+"_"+kt++;return this[e]=!0,e}}),k.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Yt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Yt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Yt,"$1"+r):!1!==e.jsonp&&(e.url+=(St.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||k.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?k(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Gt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Vt=E.implementation.createHTMLDocument("").body).innerHTML="
    ",2===Vt.childNodes.length),k.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=D.exec(e))?[t.createElement(i[1])]:(i=we([e],t,o),o&&o.length&&k(o).remove(),k.merge([],i.childNodes)));var r,i,o},k.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(k.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){k.fn[t]=function(e){return this.on(t,e)}}),k.expr.pseudos.animated=function(t){return k.grep(k.timers,function(e){return t===e.elem}).length},k.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=k.css(e,"position"),c=k(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=k.css(e,"top"),u=k.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,k.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},k.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){k.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===k.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===k.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=k(e).offset()).top+=k.css(e,"borderTopWidth",!0),i.left+=k.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-k.css(r,"marginTop",!0),left:t.left-i.left-k.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===k.css(e,"position"))e=e.offsetParent;return e||ie})}}),k.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;k.fn[t]=function(e){return _(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),k.each(["top","left"],function(e,n){k.cssHooks[n]=ze(y.pixelPosition,function(e,t){if(t)return t=_e(e,n),$e.test(t)?k(e).position()[n]+"px":t})}),k.each({Height:"height",Width:"width"},function(a,s){k.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){k.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return _(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?k.css(e,t,i):k.style(e,t,n,i)},s,n?e:void 0,n)}})}),k.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){k.fn[n]=function(e,t){return 0a;a++)for(i in o[a])n=o[a][i],o[a].hasOwnProperty(i)&&void 0!==n&&(e[i]=t.isPlainObject(n)?t.isPlainObject(e[i])?t.widget.extend({},e[i],n):t.widget.extend({},n):n);return e},t.widget.bridge=function(e,i){var n=i.prototype.widgetFullName||e;t.fn[e]=function(o){var a="string"==typeof o,r=s.call(arguments,1),h=this;return a?this.length||"instance"!==o?this.each(function(){var i,s=t.data(this,n);return"instance"===o?(h=s,!1):s?t.isFunction(s[o])&&"_"!==o.charAt(0)?(i=s[o].apply(s,r),i!==s&&void 0!==i?(h=i&&i.jquery?h.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+o+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; "+"attempted to call method '"+o+"'")}):h=void 0:(r.length&&(o=t.widget.extend.apply(null,[o].concat(r))),this.each(function(){var e=t.data(this,n);e?(e.option(o||{}),e._init&&e._init()):t.data(this,n,new i(o,this))})),h}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"
    ",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},s=e.split("."),e=s.shift(),s.length){for(n=a[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,n;for(i in e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeClass(n,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,o){var a,r;for(r=0;i.length>r;r++)a=n.classesElementLookup[i[r]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),n.classesElementLookup[i[r]]=a,s.push(i[r]),o&&e.classes[i[r]]&&s.push(e.classes[i[r]])}var s=[],n=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(s,n){-1!==t.inArray(e.target,n)&&(i.classesElementLookup[s]=t(n.not(e.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var n="string"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleClass(this._classes(o),s),this},_on:function(e,i,s){var n,o=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,a){function r(){return e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof a?o[a]:a).apply(o,arguments):void 0}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var h=s.match(/^([\w:-]*)\s*(.*)$/),l=h[1]+o.eventNamespace,c=h[2];c?n.on(l,c,r):i.on(l,r)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget,function(){function e(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFloat(t[1])*(u.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var n,o=Math.max,a=Math.abs,r=/left|center|right/,h=/top|center|bottom/,l=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,u=/%$/,d=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==n)return n;var e,i,s=t("
    "),o=s.children()[0];return t("body").append(s),e=o.offsetWidth,s.css("overflow","scroll"),i=o.offsetWidth,e===i&&(i=s[0].clientWidth),s.remove(),n=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.widthi?"left":e>0?"right":"center",vertical:0>r?"top":s>0?"bottom":"middle"};l>p&&p>a(e+i)&&(u.horizontal="center"),c>f&&f>a(s+r)&&(u.vertical="middle"),u.important=o(a(e),a(i))>o(a(s),a(r))?"horizontal":"vertical",n.using.call(this,t,u)}),h.offset(t.extend(D,{using:r}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,h=n-r,l=r+e.collisionWidth-a-n;e.collisionWidth>a?h>0&&0>=l?(i=t.left+h+e.collisionWidth-a-n,t.left+=h-i):t.left=l>0&&0>=h?n:h>l?n+a-e.collisionWidth:n:h>0?t.left+=h:l>0?t.left-=l:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,h=n-r,l=r+e.collisionHeight-a-n;e.collisionHeight>a?h>0&&0>=l?(i=t.top+h+e.collisionHeight-a-n,t.top+=h-i):t.top=l>0&&0>=h?n:h>l?n+a-e.collisionHeight:n:h>0?t.top+=h:l>0?t.top-=l:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,r=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-h,u=l+e.collisionWidth-r-h,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-r-o,(0>i||a(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-h,(s>0||u>a(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,r=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-h,u=l+e.collisionHeight-r-h,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,m=-2*e.offset[1];0>c?(s=t.top+p+f+m+e.collisionHeight-r-o,(0>s||a(c)>s)&&(t.top+=p+f+m)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+m-h,(i>0||u>a(i))&&(t.top+=p+f+m))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.ui.position,t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,s){return!!t.data(e,s[3])}}),t.fn.extend({disableSelection:function(){var t="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}}(),enableSelection:function(){return this.off(".ui-disableSelection")}}),t.ui.focusable=function(i,s){var n,o,a,r,h,l=i.nodeName.toLowerCase();return"area"===l?(n=i.parentNode,o=n.name,i.href&&o&&"map"===n.nodeName.toLowerCase()?(a=t("img[usemap='#"+o+"']"),a.length>0&&a.is(":visible")):!1):(/^(input|select|textarea|button|object)$/.test(l)?(r=!i.disabled,r&&(h=t(i).closest("fieldset")[0],h&&(r=!h.disabled))):r="a"===l?i.href||s:s,r&&t(i).is(":visible")&&e(t(i)))},t.extend(t.expr[":"],{focusable:function(e){return t.ui.focusable(e,null!=t.attr(e,"tabindex"))}}),t.ui.focusable,t.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):t(this[0].form)},t.ui.formResetMixin={_formResetHandler:function(){var e=t(this);setTimeout(function(){var i=e.data("ui-form-reset-instances");t.each(i,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var t=this.form.data("ui-form-reset-instances")||[];t.length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t)}},_unbindFormResetHandler:function(){if(this.form.length){var e=this.form.data("ui-form-reset-instances");e.splice(t.inArray(this,e),1),e.length?this.form.data("ui-form-reset-instances",e):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}},"1.7"===t.fn.jquery.substring(0,3)&&(t.each(["Width","Height"],function(e,i){function s(e,i,s,o){return t.each(n,function(){i-=parseFloat(t.css(e,"padding"+this))||0,s&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),o&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var n="Width"===i?["Left","Right"]:["Top","Bottom"],o=i.toLowerCase(),a={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+i]=function(e){return void 0===e?a["inner"+i].call(this):this.each(function(){t(this).css(o,s(this,e)+"px")})},t.fn["outer"+i]=function(e,n){return"number"!=typeof e?a["outer"+i].call(this,e):this.each(function(){t(this).css(o,s(this,e,!0,n)+"px")})}}),t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.ui.escapeSelector=function(){var t=/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g;return function(e){return e.replace(t,"\\$1")}}(),t.fn.labels=function(){var e,i,s,n,o;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(n=this.eq(0).parents("label"),s=this.attr("id"),s&&(e=this.eq(0).parents().last(),o=e.add(e.length?e.siblings():this.siblings()),i="label[for='"+t.ui.escapeSelector(s)+"']",n=n.add(o.find(i).addBack(i))),this.pushStack(n))},t.fn.scrollParent=function(e){var i=this.css("position"),s="absolute"===i,n=e?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var e=t(this);return s&&"static"===e.css("position")?!1:n.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==i&&o.length?o:t(this[0].ownerDocument||document)},t.extend(t.expr[":"],{tabbable:function(e){var i=t.attr(e,"tabindex"),s=null!=i;return(!s||i>=0)&&t.ui.focusable(e,s)}}),t.fn.extend({uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var n=!1;t(document).on("mouseup",function(){n=!1}),t.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!n){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var i=this,s=1===e.which,o="string"==typeof this.options.cancel&&e.target.nodeName?t(e.target).closest(this.options.cancel).length:!1;return s&&!o&&this._mouseCapture(e)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(e)!==!1,!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),n=!0,!0)):!0}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,n=!1,e.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),t.ui.plugin={add:function(e,i,s){var n,o=t.ui[e].prototype;for(n in s)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([i,s[n]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;o.length>n;n++)t.options[o[n][0]]&&o[n][1].apply(t.element,i)}},t.widget("ui.resizable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",n=!1;return e[s]>0?!0:(e[s]=1,n=e[s]>0,e[s]=0,n)},_create:function(){var e,i=this.options,s=this;this._addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!i.aspectRatio,aspectRatio:i.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:i.helper||i.ghost||i.animate?i.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(t("
    ").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,e={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(e),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(e),this._proportionallyResize()),this._setupHandles(),i.autoHide&&t(this.element).on("mouseenter",function(){i.disabled||(s._removeClass("ui-resizable-autohide"),s._handles.show())}).on("mouseleave",function(){i.disabled||s.resizing||(s._addClass("ui-resizable-autohide"),s._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;default:}},_setupHandles:function(){var e,i,s,n,o,a=this.options,r=this;if(this.handles=a.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=t(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),s=this.handles.split(","),this.handles={},i=0;s.length>i;i++)e=t.trim(s[i]),n="ui-resizable-"+e,o=t("
    "),this._addClass(o,"ui-resizable-handle "+n),o.css({zIndex:a.zIndex}),this.handles[e]=".ui-resizable-"+e,this.element.append(o);this._renderAxis=function(e){var i,s,n,o;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=t(this.handles[i]),this._on(this.handles[i],{mousedown:r._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,o),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){r.resizing||(this.className&&(o=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),r.axis=o&&o[1]?o[1]:"se")}),a.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)s=t(this.handles[i])[0],(s===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(e){var i,s,n,o=this.options,a=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),s=this._num(this.helper.css("top")),o.containment&&(i+=t(o.containment).scrollLeft()||0,s+=t(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:s},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:a.width(),height:a.height()},this.originalSize=this._helper?{width:a.outerWidth(),height:a.outerHeight()}:{width:a.width(),height:a.height()},this.sizeDiff={width:a.outerWidth()-a.width(),height:a.outerHeight()-a.height()},this.originalPosition={left:i,top:s},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,n=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===n?this.axis+"-resize":n),this._addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var i,s,n=this.originalMousePosition,o=this.axis,a=e.pageX-n.left||0,r=e.pageY-n.top||0,h=this._change[o];return this._updatePrevProperties(),h?(i=h.apply(this,[e,a,r]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges()),!1):!1},_mouseStop:function(e){this.resizing=!1;var i,s,n,o,a,r,h,l=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&this._hasScroll(i[0],"left")?0:c.sizeDiff.height,o=s?0:c.sizeDiff.width,a={width:c.helper.width()-o,height:c.helper.height()-n},r=parseFloat(c.element.css("left"))+(c.position.left-c.originalPosition.left)||null,h=parseFloat(c.element.css("top"))+(c.position.top-c.originalPosition.top)||null,l.animate||this.element.css(t.extend(a,{top:h,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s,n,o,a=this.options;o={minWidth:this._isNumber(a.minWidth)?a.minWidth:0,maxWidth:this._isNumber(a.maxWidth)?a.maxWidth:1/0,minHeight:this._isNumber(a.minHeight)?a.minHeight:0,maxHeight:this._isNumber(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,s=o.minWidth/this.aspectRatio,i=o.maxHeight*this.aspectRatio,n=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),s>o.minHeight&&(o.minHeight=s),o.maxWidth>i&&(o.maxWidth=i),o.maxHeight>n&&(o.maxHeight=n)),this._vBoundaries=o},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidtht.width,a=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,r=this.originalPosition.left+this.originalSize.width,h=this.originalPosition.top+this.originalSize.height,l=/sw|nw|w/.test(i),c=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),a&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&l&&(t.left=r-e.minWidth),s&&l&&(t.left=r-e.maxWidth),a&&c&&(t.top=h-e.minHeight),n&&c&&(t.top=h-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];4>e;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;this._proportionallyResizeElements.length>e;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("
    "),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element +},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,s=this.originalPosition;return{left:s.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).resizable("instance"),s=i.options,n=i._proportionallyResizeElements,o=n.length&&/textarea/i.test(n[0].nodeName),a=o&&i._hasScroll(n[0],"left")?0:i.sizeDiff.height,r=o?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-a},l=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,c=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(h,c&&l?{top:c,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,i,s,n,o,a,r,h=t(this).resizable("instance"),l=h.options,c=h.element,u=l.containment,d=u instanceof t?u.get(0):/parent/.test(u)?c.parent().get(0):u;d&&(h.containerElement=t(d),/document/.test(u)||u===document?(h.containerOffset={left:0,top:0},h.containerPosition={left:0,top:0},h.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(d),i=[],t(["Top","Right","Left","Bottom"]).each(function(t,s){i[t]=h._num(e.css("padding"+s))}),h.containerOffset=e.offset(),h.containerPosition=e.position(),h.containerSize={height:e.innerHeight()-i[3],width:e.innerWidth()-i[1]},s=h.containerOffset,n=h.containerSize.height,o=h.containerSize.width,a=h._hasScroll(d,"left")?d.scrollWidth:o,r=h._hasScroll(d)?d.scrollHeight:n,h.parentData={element:d,left:s.left,top:s.top,width:a,height:r}))},resize:function(e){var i,s,n,o,a=t(this).resizable("instance"),r=a.options,h=a.containerOffset,l=a.position,c=a._aspectRatio||e.shiftKey,u={top:0,left:0},d=a.containerElement,p=!0;d[0]!==document&&/static/.test(d.css("position"))&&(u=h),l.left<(a._helper?h.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-h.left:a.position.left-u.left),c&&(a.size.height=a.size.width/a.aspectRatio,p=!1),a.position.left=r.helper?h.left:0),l.top<(a._helper?h.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-h.top:a.position.top),c&&(a.size.width=a.size.height*a.aspectRatio,p=!1),a.position.top=a._helper?h.top:0),n=a.containerElement.get(0)===a.element.parent().get(0),o=/relative|absolute/.test(a.containerElement.css("position")),n&&o?(a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.top+a.position.top):(a.offset.left=a.element.offset().left,a.offset.top=a.element.offset().top),i=Math.abs(a.sizeDiff.width+(a._helper?a.offset.left-u.left:a.offset.left-h.left)),s=Math.abs(a.sizeDiff.height+(a._helper?a.offset.top-u.top:a.offset.top-h.top)),i+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.width-i,c&&(a.size.height=a.size.width/a.aspectRatio,p=!1)),s+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-s,c&&(a.size.width=a.size.height*a.aspectRatio,p=!1)),p||(a.position.left=a.prevPosition.left,a.position.top=a.prevPosition.top,a.size.width=a.prevSize.width,a.size.height=a.prevSize.height)},stop:function(){var e=t(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.containerPosition,o=e.containerElement,a=t(e.helper),r=a.offset(),h=a.outerWidth()-e.sizeDiff.width,l=a.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).resizable("instance"),i=e.options;t(i.alsoResize).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseFloat(e.width()),height:parseFloat(e.height()),left:parseFloat(e.css("left")),top:parseFloat(e.css("top"))})})},resize:function(e,i){var s=t(this).resizable("instance"),n=s.options,o=s.originalSize,a=s.originalPosition,r={height:s.size.height-o.height||0,width:s.size.width-o.width||0,top:s.position.top-a.top||0,left:s.position.left-a.left||0};t(n.alsoResize).each(function(){var e=t(this),s=t(this).data("ui-resizable-alsoresize"),n={},o=e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,function(t,e){var i=(s[e]||0)+(r[e]||0);i&&i>=0&&(n[e]=i||null)}),e.css(n)})},stop:function(){t(this).removeData("ui-resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).resizable("instance"),i=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}),e._addClass(e.ghost,"ui-resizable-ghost"),t.uiBackCompat!==!1&&"string"==typeof e.options.ghost&&e.ghost.addClass(this.options.ghost),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e,i=t(this).resizable("instance"),s=i.options,n=i.size,o=i.originalSize,a=i.originalPosition,r=i.axis,h="number"==typeof s.grid?[s.grid,s.grid]:s.grid,l=h[0]||1,c=h[1]||1,u=Math.round((n.width-o.width)/l)*l,d=Math.round((n.height-o.height)/c)*c,p=o.width+u,f=o.height+d,m=s.maxWidth&&p>s.maxWidth,g=s.maxHeight&&f>s.maxHeight,_=s.minWidth&&s.minWidth>p,v=s.minHeight&&s.minHeight>f;s.grid=h,_&&(p+=l),v&&(f+=c),m&&(p-=l),g&&(f-=c),/^(se|s|e)$/.test(r)?(i.size.width=p,i.size.height=f):/^(ne)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.top=a.top-d):/^(sw)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.left=a.left-u):((0>=f-c||0>=p-l)&&(e=i._getPaddingPlusBorderDimensions(this)),f-c>0?(i.size.height=f,i.position.top=a.top-d):(f=c-e.height,i.size.height=f,i.position.top=a.top+o.height-f),p-l>0?(i.size.width=p,i.position.left=a.left-u):(p=l-e.width,i.size.width=p,i.position.left=a.left+o.width-p))}}),t.ui.resizable});/** + * Copyright (c) 2007 Ariel Flesler - aflesler ○ gmail • com | https://github.com/flesler + * Licensed under MIT + * @author Ariel Flesler + * @version 2.1.2 + */ +;(function(f){"use strict";"function"===typeof define&&define.amd?define(["jquery"],f):"undefined"!==typeof module&&module.exports?module.exports=f(require("jquery")):f(jQuery)})(function($){"use strict";function n(a){return!a.nodeName||-1!==$.inArray(a.nodeName.toLowerCase(),["iframe","#document","html","body"])}function h(a){return $.isFunction(a)||$.isPlainObject(a)?a:{top:a,left:a}}var p=$.scrollTo=function(a,d,b){return $(window).scrollTo(a,d,b)};p.defaults={axis:"xy",duration:0,limit:!0};$.fn.scrollTo=function(a,d,b){"object"=== typeof d&&(b=d,d=0);"function"===typeof b&&(b={onAfter:b});"max"===a&&(a=9E9);b=$.extend({},p.defaults,b);d=d||b.duration;var u=b.queue&&1=f[g]?0:Math.min(f[g],n));!a&&1)[^>]*$|#([\w\-]*)$)/,bM=/\S/,bI=/^\s+/,bE=/\s+$/,bA=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,bN=/^[\],:{}\s]*$/,bW=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,bP=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,bJ=/(?:^|:|,)(?:\s*\[)+/g,by=/(webkit)[ \/]([\w.]+)/,bR=/(opera)(?:.*version)?[ \/]([\w.]+)/,bQ=/(msie) ([\w.]+)/,bS=/(mozilla)(?:.*? rv:([\w.]+))?/,bB=/-([a-z]|[0-9])/ig,bZ=/^-ms-/,bT=function(b0,b1){return(b1+"").toUpperCase()},bX=bu.userAgent,bV,bC,e,bL=Object.prototype.toString,bG=Object.prototype.hasOwnProperty,bz=Array.prototype.push,bK=Array.prototype.slice,bO=String.prototype.trim,bv=Array.prototype.indexOf,bx={};bF.fn=bF.prototype={constructor:bF,init:function(b0,b4,b3){var b2,b5,b1,b6;if(!b0){return this}if(b0.nodeType){this.context=this[0]=b0;this.length=1;return this}if(b0==="body"&&!b4&&av.body){this.context=av;this[0]=av.body;this.selector=b0;this.length=1;return this}if(typeof b0==="string"){if(b0.charAt(0)==="<"&&b0.charAt(b0.length-1)===">"&&b0.length>=3){b2=[null,b0,null]}else{b2=bY.exec(b0)}if(b2&&(b2[1]||!b4)){if(b2[1]){b4=b4 instanceof bF?b4[0]:b4;b6=(b4?b4.ownerDocument||b4:av);b1=bA.exec(b0);if(b1){if(bF.isPlainObject(b4)){b0=[av.createElement(b1[1])];bF.fn.attr.call(b0,b4,true)}else{b0=[b6.createElement(b1[1])]}}else{b1=bF.buildFragment([b2[1]],[b6]);b0=(b1.cacheable?bF.clone(b1.fragment):b1.fragment).childNodes}return bF.merge(this,b0)}else{b5=av.getElementById(b2[2]);if(b5&&b5.parentNode){if(b5.id!==b2[2]){return b3.find(b0)}this.length=1;this[0]=b5}this.context=av;this.selector=b0;return this}}else{if(!b4||b4.jquery){return(b4||b3).find(b0)}else{return this.constructor(b4).find(b0)}}}else{if(bF.isFunction(b0)){return b3.ready(b0)}}if(b0.selector!==L){this.selector=b0.selector;this.context=b0.context}return bF.makeArray(b0,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return bK.call(this,0)},get:function(b0){return b0==null?this.toArray():(b0<0?this[this.length+b0]:this[b0])},pushStack:function(b1,b3,b0){var b2=this.constructor();if(bF.isArray(b1)){bz.apply(b2,b1)}else{bF.merge(b2,b1)}b2.prevObject=this;b2.context=this.context;if(b3==="find"){b2.selector=this.selector+(this.selector?" ":"")+b0}else{if(b3){b2.selector=this.selector+"."+b3+"("+b0+")"}}return b2},each:function(b1,b0){return bF.each(this,b1,b0)},ready:function(b0){bF.bindReady();bC.add(b0);return this},eq:function(b0){b0=+b0;return b0===-1?this.slice(b0):this.slice(b0,b0+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(bK.apply(this,arguments),"slice",bK.call(arguments).join(","))},map:function(b0){return this.pushStack(bF.map(this,function(b2,b1){return b0.call(b2,b1,b2)}))},end:function(){return this.prevObject||this.constructor(null)},push:bz,sort:[].sort,splice:[].splice};bF.fn.init.prototype=bF.fn;bF.extend=bF.fn.extend=function(){var b9,b2,b0,b1,b6,b7,b5=arguments[0]||{},b4=1,b3=arguments.length,b8=false;if(typeof b5==="boolean"){b8=b5;b5=arguments[1]||{};b4=2}if(typeof b5!=="object"&&!bF.isFunction(b5)){b5={}}if(b3===b4){b5=this;--b4}for(;b40){return}bC.fireWith(av,[bF]);if(bF.fn.trigger){bF(av).trigger("ready").off("ready")}}},bindReady:function(){if(bC){return}bC=bF.Callbacks("once memory");if(av.readyState==="complete"){return setTimeout(bF.ready,1)}if(av.addEventListener){av.addEventListener("DOMContentLoaded",e,false);bb.addEventListener("load",bF.ready,false)}else{if(av.attachEvent){av.attachEvent("onreadystatechange",e);bb.attachEvent("onload",bF.ready);var b0=false;try{b0=bb.frameElement==null}catch(b1){}if(av.documentElement.doScroll&&b0){bw()}}}},isFunction:function(b0){return bF.type(b0)==="function"},isArray:Array.isArray||function(b0){return bF.type(b0)==="array"},isWindow:function(b0){return b0&&typeof b0==="object"&&"setInterval" in b0},isNumeric:function(b0){return !isNaN(parseFloat(b0))&&isFinite(b0)},type:function(b0){return b0==null?String(b0):bx[bL.call(b0)]||"object"},isPlainObject:function(b2){if(!b2||bF.type(b2)!=="object"||b2.nodeType||bF.isWindow(b2)){return false}try{if(b2.constructor&&!bG.call(b2,"constructor")&&!bG.call(b2.constructor.prototype,"isPrototypeOf")){return false}}catch(b1){return false}var b0;for(b0 in b2){}return b0===L||bG.call(b2,b0)},isEmptyObject:function(b1){for(var b0 in b1){return false}return true},error:function(b0){throw new Error(b0)},parseJSON:function(b0){if(typeof b0!=="string"||!b0){return null}b0=bF.trim(b0);if(bb.JSON&&bb.JSON.parse){return bb.JSON.parse(b0)}if(bN.test(b0.replace(bW,"@").replace(bP,"]").replace(bJ,""))){return(new Function("return "+b0))()}bF.error("Invalid JSON: "+b0)},parseXML:function(b2){var b0,b1;try{if(bb.DOMParser){b1=new DOMParser();b0=b1.parseFromString(b2,"text/xml")}else{b0=new ActiveXObject("Microsoft.XMLDOM");b0.async="false";b0.loadXML(b2)}}catch(b3){b0=L}if(!b0||!b0.documentElement||b0.getElementsByTagName("parsererror").length){bF.error("Invalid XML: "+b2)}return b0},noop:function(){},globalEval:function(b0){if(b0&&bM.test(b0)){(bb.execScript||function(b1){bb["eval"].call(bb,b1)})(b0)}},camelCase:function(b0){return b0.replace(bZ,"ms-").replace(bB,bT)},nodeName:function(b1,b0){return b1.nodeName&&b1.nodeName.toUpperCase()===b0.toUpperCase()},each:function(b3,b6,b2){var b1,b4=0,b5=b3.length,b0=b5===L||bF.isFunction(b3);if(b2){if(b0){for(b1 in b3){if(b6.apply(b3[b1],b2)===false){break}}}else{for(;b40&&b0[0]&&b0[b1-1])||b1===0||bF.isArray(b0));if(b3){for(;b21?aJ.call(arguments,0):bG;if(!(--bw)){bC.resolveWith(bC,bx)}}}function bz(bF){return function(bG){bB[bF]=arguments.length>1?aJ.call(arguments,0):bG;bC.notifyWith(bE,bB)}}if(e>1){for(;bv
    a";bI=bv.getElementsByTagName("*");bF=bv.getElementsByTagName("a")[0];if(!bI||!bI.length||!bF){return{}}bG=av.createElement("select");bx=bG.appendChild(av.createElement("option"));bE=bv.getElementsByTagName("input")[0];bJ={leadingWhitespace:(bv.firstChild.nodeType===3),tbody:!bv.getElementsByTagName("tbody").length,htmlSerialize:!!bv.getElementsByTagName("link").length,style:/top/.test(bF.getAttribute("style")),hrefNormalized:(bF.getAttribute("href")==="/a"),opacity:/^0.55/.test(bF.style.opacity),cssFloat:!!bF.style.cssFloat,checkOn:(bE.value==="on"),optSelected:bx.selected,getSetAttribute:bv.className!=="t",enctype:!!av.createElement("form").enctype,html5Clone:av.createElement("nav").cloneNode(true).outerHTML!=="<:nav>",submitBubbles:true,changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true};bE.checked=true;bJ.noCloneChecked=bE.cloneNode(true).checked;bG.disabled=true;bJ.optDisabled=!bx.disabled;try{delete bv.test}catch(bC){bJ.deleteExpando=false}if(!bv.addEventListener&&bv.attachEvent&&bv.fireEvent){bv.attachEvent("onclick",function(){bJ.noCloneEvent=false});bv.cloneNode(true).fireEvent("onclick")}bE=av.createElement("input");bE.value="t";bE.setAttribute("type","radio");bJ.radioValue=bE.value==="t";bE.setAttribute("checked","checked");bv.appendChild(bE);bD=av.createDocumentFragment();bD.appendChild(bv.lastChild);bJ.checkClone=bD.cloneNode(true).cloneNode(true).lastChild.checked;bJ.appendChecked=bE.checked;bD.removeChild(bE);bD.appendChild(bv);bv.innerHTML="";if(bb.getComputedStyle){bA=av.createElement("div");bA.style.width="0";bA.style.marginRight="0";bv.style.width="2px";bv.appendChild(bA);bJ.reliableMarginRight=(parseInt((bb.getComputedStyle(bA,null)||{marginRight:0}).marginRight,10)||0)===0}if(bv.attachEvent){for(by in {submit:1,change:1,focusin:1}){bB="on"+by;bw=(bB in bv);if(!bw){bv.setAttribute(bB,"return;");bw=(typeof bv[bB]==="function")}bJ[by+"Bubbles"]=bw}}bD.removeChild(bv);bD=bG=bx=bA=bv=bE=null;b(function(){var bM,bU,bV,bT,bN,bO,bL,bS,bR,e,bP,bQ=av.getElementsByTagName("body")[0];if(!bQ){return}bL=1;bS="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;";bR="visibility:hidden;border:0;";e="style='"+bS+"border:5px solid #000;padding:0;'";bP="
    ";bM=av.createElement("div");bM.style.cssText=bR+"width:0;height:0;position:static;top:0;margin-top:"+bL+"px";bQ.insertBefore(bM,bQ.firstChild);bv=av.createElement("div");bM.appendChild(bv);bv.innerHTML="
    t
    ";bz=bv.getElementsByTagName("td");bw=(bz[0].offsetHeight===0);bz[0].style.display="";bz[1].style.display="none";bJ.reliableHiddenOffsets=bw&&(bz[0].offsetHeight===0);bv.innerHTML="";bv.style.width=bv.style.paddingLeft="1px";b.boxModel=bJ.boxModel=bv.offsetWidth===2;if(typeof bv.style.zoom!=="undefined"){bv.style.display="inline";bv.style.zoom=1;bJ.inlineBlockNeedsLayout=(bv.offsetWidth===2);bv.style.display="";bv.innerHTML="
    ";bJ.shrinkWrapBlocks=(bv.offsetWidth!==2)}bv.style.cssText=bS+bR;bv.innerHTML=bP;bU=bv.firstChild;bV=bU.firstChild;bN=bU.nextSibling.firstChild.firstChild;bO={doesNotAddBorder:(bV.offsetTop!==5),doesAddBorderForTableAndCells:(bN.offsetTop===5)};bV.style.position="fixed";bV.style.top="20px";bO.fixedPosition=(bV.offsetTop===20||bV.offsetTop===15);bV.style.position=bV.style.top="";bU.style.overflow="hidden";bU.style.position="relative";bO.subtractsBorderForOverflowNotVisible=(bV.offsetTop===-5);bO.doesNotIncludeMarginInBodyOffset=(bQ.offsetTop!==bL);bQ.removeChild(bM);bv=bM=null;b.extend(bJ,bO)});return bJ})();var aS=/^(?:\{.*\}|\[.*\])$/,aA=/([A-Z])/g;b.extend({cache:{},uuid:0,expando:"jQuery"+(b.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(e){e=e.nodeType?b.cache[e[b.expando]]:e[b.expando];return !!e&&!S(e)},data:function(bx,bv,bz,by){if(!b.acceptData(bx)){return}var bG,bA,bD,bE=b.expando,bC=typeof bv==="string",bF=bx.nodeType,e=bF?b.cache:bx,bw=bF?bx[bE]:bx[bE]&&bE,bB=bv==="events";if((!bw||!e[bw]||(!bB&&!by&&!e[bw].data))&&bC&&bz===L){return}if(!bw){if(bF){bx[bE]=bw=++b.uuid}else{bw=bE}}if(!e[bw]){e[bw]={};if(!bF){e[bw].toJSON=b.noop}}if(typeof bv==="object"||typeof bv==="function"){if(by){e[bw]=b.extend(e[bw],bv)}else{e[bw].data=b.extend(e[bw].data,bv)}}bG=bA=e[bw];if(!by){if(!bA.data){bA.data={}}bA=bA.data}if(bz!==L){bA[b.camelCase(bv)]=bz}if(bB&&!bA[bv]){return bG.events}if(bC){bD=bA[bv];if(bD==null){bD=bA[b.camelCase(bv)]}}else{bD=bA}return bD},removeData:function(bx,bv,by){if(!b.acceptData(bx)){return}var bB,bA,bz,bC=b.expando,bD=bx.nodeType,e=bD?b.cache:bx,bw=bD?bx[bC]:bC;if(!e[bw]){return}if(bv){bB=by?e[bw]:e[bw].data;if(bB){if(!b.isArray(bv)){if(bv in bB){bv=[bv]}else{bv=b.camelCase(bv);if(bv in bB){bv=[bv]}else{bv=bv.split(" ")}}}for(bA=0,bz=bv.length;bA-1){return true}}return false},val:function(bx){var e,bv,by,bw=this[0];if(!arguments.length){if(bw){e=b.valHooks[bw.nodeName.toLowerCase()]||b.valHooks[bw.type];if(e&&"get" in e&&(bv=e.get(bw,"value"))!==L){return bv}bv=bw.value;return typeof bv==="string"?bv.replace(aU,""):bv==null?"":bv}return}by=b.isFunction(bx);return this.each(function(bA){var bz=b(this),bB;if(this.nodeType!==1){return}if(by){bB=bx.call(this,bA,bz.val())}else{bB=bx}if(bB==null){bB=""}else{if(typeof bB==="number"){bB+=""}else{if(b.isArray(bB)){bB=b.map(bB,function(bC){return bC==null?"":bC+""})}}}e=b.valHooks[this.nodeName.toLowerCase()]||b.valHooks[this.type];if(!e||!("set" in e)||e.set(this,bB,"value")===L){this.value=bB}})}});b.extend({valHooks:{option:{get:function(e){var bv=e.attributes.value;return !bv||bv.specified?e.value:e.text}},select:{get:function(e){var bA,bv,bz,bx,by=e.selectedIndex,bB=[],bC=e.options,bw=e.type==="select-one";if(by<0){return null}bv=bw?by:0;bz=bw?by+1:bC.length;for(;bv=0});if(!e.length){bv.selectedIndex=-1}return e}}},attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(bA,bx,bB,bz){var bw,e,by,bv=bA.nodeType;if(!bA||bv===3||bv===8||bv===2){return}if(bz&&bx in b.attrFn){return b(bA)[bx](bB)}if(typeof bA.getAttribute==="undefined"){return b.prop(bA,bx,bB)}by=bv!==1||!b.isXMLDoc(bA);if(by){bx=bx.toLowerCase();e=b.attrHooks[bx]||(ao.test(bx)?aY:be)}if(bB!==L){if(bB===null){b.removeAttr(bA,bx);return}else{if(e&&"set" in e&&by&&(bw=e.set(bA,bB,bx))!==L){return bw}else{bA.setAttribute(bx,""+bB);return bB}}}else{if(e&&"get" in e&&by&&(bw=e.get(bA,bx))!==null){return bw}else{bw=bA.getAttribute(bx);return bw===null?L:bw}}},removeAttr:function(bx,bz){var by,bA,bv,e,bw=0;if(bz&&bx.nodeType===1){bA=bz.toLowerCase().split(af);e=bA.length;for(;bw=0)}}})});var bd=/^(?:textarea|input|select)$/i,n=/^([^\.]*)?(?:\.(.+))?$/,J=/\bhover(\.\S+)?\b/,aO=/^key/,bf=/^(?:mouse|contextmenu)|click/,T=/^(?:focusinfocus|focusoutblur)$/,U=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,Y=function(e){var bv=U.exec(e);if(bv){bv[1]=(bv[1]||"").toLowerCase();bv[3]=bv[3]&&new RegExp("(?:^|\\s)"+bv[3]+"(?:\\s|$)")}return bv},j=function(bw,e){var bv=bw.attributes||{};return((!e[1]||bw.nodeName.toLowerCase()===e[1])&&(!e[2]||(bv.id||{}).value===e[2])&&(!e[3]||e[3].test((bv["class"]||{}).value)))},bt=function(e){return b.event.special.hover?e:e.replace(J,"mouseenter$1 mouseleave$1")};b.event={add:function(bx,bC,bJ,bA,by){var bD,bB,bK,bI,bH,bF,e,bG,bv,bz,bw,bE;if(bx.nodeType===3||bx.nodeType===8||!bC||!bJ||!(bD=b._data(bx))){return}if(bJ.handler){bv=bJ;bJ=bv.handler}if(!bJ.guid){bJ.guid=b.guid++}bK=bD.events;if(!bK){bD.events=bK={}}bB=bD.handle;if(!bB){bD.handle=bB=function(bL){return typeof b!=="undefined"&&(!bL||b.event.triggered!==bL.type)?b.event.dispatch.apply(bB.elem,arguments):L};bB.elem=bx}bC=b.trim(bt(bC)).split(" ");for(bI=0;bI=0){bG=bG.slice(0,-1);bw=true}if(bG.indexOf(".")>=0){bx=bG.split(".");bG=bx.shift();bx.sort()}if((!bA||b.event.customEvent[bG])&&!b.event.global[bG]){return}bv=typeof bv==="object"?bv[b.expando]?bv:new b.Event(bG,bv):new b.Event(bG);bv.type=bG;bv.isTrigger=true;bv.exclusive=bw;bv.namespace=bx.join(".");bv.namespace_re=bv.namespace?new RegExp("(^|\\.)"+bx.join("\\.(?:.*\\.)?")+"(\\.|$)"):null;by=bG.indexOf(":")<0?"on"+bG:"";if(!bA){e=b.cache;for(bC in e){if(e[bC].events&&e[bC].events[bG]){b.event.trigger(bv,bD,e[bC].handle.elem,true)}}return}bv.result=L;if(!bv.target){bv.target=bA}bD=bD!=null?b.makeArray(bD):[];bD.unshift(bv);bF=b.event.special[bG]||{};if(bF.trigger&&bF.trigger.apply(bA,bD)===false){return}bB=[[bA,bF.bindType||bG]];if(!bJ&&!bF.noBubble&&!b.isWindow(bA)){bI=bF.delegateType||bG;bH=T.test(bI+bG)?bA:bA.parentNode;bz=null;for(;bH;bH=bH.parentNode){bB.push([bH,bI]);bz=bH}if(bz&&bz===bA.ownerDocument){bB.push([bz.defaultView||bz.parentWindow||bb,bI])}}for(bC=0;bCbA){bH.push({elem:this,matches:bz.slice(bA)})}for(bC=0;bC0?this.on(e,null,bx,bw):this.trigger(e)};if(b.attrFn){b.attrFn[e]=true}if(aO.test(e)){b.event.fixHooks[e]=b.event.keyHooks}if(bf.test(e)){b.event.fixHooks[e]=b.event.mouseHooks}}); -/*! - * Sizzle CSS Selector Engine - * Copyright 2011, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * More information: http://sizzlejs.com/ - */ -(function(){var bH=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,bC="sizcache"+(Math.random()+"").replace(".",""),bI=0,bL=Object.prototype.toString,bB=false,bA=true,bK=/\\/g,bO=/\r\n/g,bQ=/\W/;[0,0].sort(function(){bA=false;return 0});var by=function(bV,e,bY,bZ){bY=bY||[];e=e||av;var b1=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!bV||typeof bV!=="string"){return bY}var bS,b3,b6,bR,b2,b5,b4,bX,bU=true,bT=by.isXML(e),bW=[],b0=bV;do{bH.exec("");bS=bH.exec(b0);if(bS){b0=bS[3];bW.push(bS[1]);if(bS[2]){bR=bS[3];break}}}while(bS);if(bW.length>1&&bD.exec(bV)){if(bW.length===2&&bE.relative[bW[0]]){b3=bM(bW[0]+bW[1],e,bZ)}else{b3=bE.relative[bW[0]]?[e]:by(bW.shift(),e);while(bW.length){bV=bW.shift();if(bE.relative[bV]){bV+=bW.shift()}b3=bM(bV,b3,bZ)}}}else{if(!bZ&&bW.length>1&&e.nodeType===9&&!bT&&bE.match.ID.test(bW[0])&&!bE.match.ID.test(bW[bW.length-1])){b2=by.find(bW.shift(),e,bT);e=b2.expr?by.filter(b2.expr,b2.set)[0]:b2.set[0]}if(e){b2=bZ?{expr:bW.pop(),set:bF(bZ)}:by.find(bW.pop(),bW.length===1&&(bW[0]==="~"||bW[0]==="+")&&e.parentNode?e.parentNode:e,bT);b3=b2.expr?by.filter(b2.expr,b2.set):b2.set;if(bW.length>0){b6=bF(b3)}else{bU=false}while(bW.length){b5=bW.pop();b4=b5;if(!bE.relative[b5]){b5=""}else{b4=bW.pop()}if(b4==null){b4=e}bE.relative[b5](b6,b4,bT)}}else{b6=bW=[]}}if(!b6){b6=b3}if(!b6){by.error(b5||bV)}if(bL.call(b6)==="[object Array]"){if(!bU){bY.push.apply(bY,b6)}else{if(e&&e.nodeType===1){for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&(b6[bX]===true||b6[bX].nodeType===1&&by.contains(e,b6[bX]))){bY.push(b3[bX])}}}else{for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&b6[bX].nodeType===1){bY.push(b3[bX])}}}}}else{bF(b6,bY)}if(bR){by(bR,b1,bY,bZ);by.uniqueSort(bY)}return bY};by.uniqueSort=function(bR){if(bJ){bB=bA;bR.sort(bJ);if(bB){for(var e=1;e0};by.find=function(bX,e,bY){var bW,bS,bU,bT,bV,bR;if(!bX){return[]}for(bS=0,bU=bE.order.length;bS":function(bW,bR){var bV,bU=typeof bR==="string",bS=0,e=bW.length;if(bU&&!bQ.test(bR)){bR=bR.toLowerCase();for(;bS=0)){if(!bS){e.push(bV)}}else{if(bS){bR[bU]=false}}}}return false},ID:function(e){return e[1].replace(bK,"")},TAG:function(bR,e){return bR[1].replace(bK,"").toLowerCase()},CHILD:function(e){if(e[1]==="nth"){if(!e[2]){by.error(e[0])}e[2]=e[2].replace(/^\+|\s*/g,"");var bR=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(bR[1]+(bR[2]||1))-0;e[3]=bR[3]-0}else{if(e[2]){by.error(e[0])}}e[0]=bI++;return e},ATTR:function(bU,bR,bS,e,bV,bW){var bT=bU[1]=bU[1].replace(bK,"");if(!bW&&bE.attrMap[bT]){bU[1]=bE.attrMap[bT]}bU[4]=(bU[4]||bU[5]||"").replace(bK,"");if(bU[2]==="~="){bU[4]=" "+bU[4]+" "}return bU},PSEUDO:function(bU,bR,bS,e,bV){if(bU[1]==="not"){if((bH.exec(bU[3])||"").length>1||/^\w/.test(bU[3])){bU[3]=by(bU[3],null,null,bR)}else{var bT=by.filter(bU[3],bR,bS,true^bV);if(!bS){e.push.apply(e,bT)}return false}}else{if(bE.match.POS.test(bU[0])||bE.match.CHILD.test(bU[0])){return true}}return bU},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(bS,bR,e){return !!by(e[3],bS).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(bS){var e=bS.getAttribute("type"),bR=bS.type;return bS.nodeName.toLowerCase()==="input"&&"text"===bR&&(e===bR||e===null)},radio:function(e){return e.nodeName.toLowerCase()==="input"&&"radio"===e.type},checkbox:function(e){return e.nodeName.toLowerCase()==="input"&&"checkbox"===e.type},file:function(e){return e.nodeName.toLowerCase()==="input"&&"file"===e.type},password:function(e){return e.nodeName.toLowerCase()==="input"&&"password"===e.type},submit:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"submit"===bR.type},image:function(e){return e.nodeName.toLowerCase()==="input"&&"image"===e.type},reset:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"reset"===bR.type},button:function(bR){var e=bR.nodeName.toLowerCase();return e==="input"&&"button"===bR.type||e==="button"},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)},focus:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(bR,e){return e===0},last:function(bS,bR,e,bT){return bR===bT.length-1},even:function(bR,e){return e%2===0},odd:function(bR,e){return e%2===1},lt:function(bS,bR,e){return bRe[3]-0},nth:function(bS,bR,e){return e[3]-0===bR},eq:function(bS,bR,e){return e[3]-0===bR}},filter:{PSEUDO:function(bS,bX,bW,bY){var e=bX[1],bR=bE.filters[e];if(bR){return bR(bS,bW,bX,bY)}else{if(e==="contains"){return(bS.textContent||bS.innerText||bw([bS])||"").indexOf(bX[3])>=0}else{if(e==="not"){var bT=bX[3];for(var bV=0,bU=bT.length;bV=0)}}},ID:function(bR,e){return bR.nodeType===1&&bR.getAttribute("id")===e},TAG:function(bR,e){return(e==="*"&&bR.nodeType===1)||!!bR.nodeName&&bR.nodeName.toLowerCase()===e},CLASS:function(bR,e){return(" "+(bR.className||bR.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(bV,bT){var bS=bT[1],e=by.attr?by.attr(bV,bS):bE.attrHandle[bS]?bE.attrHandle[bS](bV):bV[bS]!=null?bV[bS]:bV.getAttribute(bS),bW=e+"",bU=bT[2],bR=bT[4];return e==null?bU==="!=":!bU&&by.attr?e!=null:bU==="="?bW===bR:bU==="*="?bW.indexOf(bR)>=0:bU==="~="?(" "+bW+" ").indexOf(bR)>=0:!bR?bW&&e!==false:bU==="!="?bW!==bR:bU==="^="?bW.indexOf(bR)===0:bU==="$="?bW.substr(bW.length-bR.length)===bR:bU==="|="?bW===bR||bW.substr(0,bR.length+1)===bR+"-":false},POS:function(bU,bR,bS,bV){var e=bR[2],bT=bE.setFilters[e];if(bT){return bT(bU,bS,bR,bV)}}}};var bD=bE.match.POS,bx=function(bR,e){return"\\"+(e-0+1)};for(var bz in bE.match){bE.match[bz]=new RegExp(bE.match[bz].source+(/(?![^\[]*\])(?![^\(]*\))/.source));bE.leftMatch[bz]=new RegExp(/(^(?:.|\r|\n)*?)/.source+bE.match[bz].source.replace(/\\(\d+)/g,bx))}var bF=function(bR,e){bR=Array.prototype.slice.call(bR,0);if(e){e.push.apply(e,bR);return e}return bR};try{Array.prototype.slice.call(av.documentElement.childNodes,0)[0].nodeType}catch(bP){bF=function(bU,bT){var bS=0,bR=bT||[];if(bL.call(bU)==="[object Array]"){Array.prototype.push.apply(bR,bU)}else{if(typeof bU.length==="number"){for(var e=bU.length;bS";e.insertBefore(bR,e.firstChild);if(av.getElementById(bS)){bE.find.ID=function(bU,bV,bW){if(typeof bV.getElementById!=="undefined"&&!bW){var bT=bV.getElementById(bU[1]);return bT?bT.id===bU[1]||typeof bT.getAttributeNode!=="undefined"&&bT.getAttributeNode("id").nodeValue===bU[1]?[bT]:L:[]}};bE.filter.ID=function(bV,bT){var bU=typeof bV.getAttributeNode!=="undefined"&&bV.getAttributeNode("id");return bV.nodeType===1&&bU&&bU.nodeValue===bT}}e.removeChild(bR);e=bR=null})();(function(){var e=av.createElement("div");e.appendChild(av.createComment(""));if(e.getElementsByTagName("*").length>0){bE.find.TAG=function(bR,bV){var bU=bV.getElementsByTagName(bR[1]);if(bR[1]==="*"){var bT=[];for(var bS=0;bU[bS];bS++){if(bU[bS].nodeType===1){bT.push(bU[bS])}}bU=bT}return bU}}e.innerHTML="";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){bE.attrHandle.href=function(bR){return bR.getAttribute("href",2)}}e=null})();if(av.querySelectorAll){(function(){var e=by,bT=av.createElement("div"),bS="__sizzle__";bT.innerHTML="

    ";if(bT.querySelectorAll&&bT.querySelectorAll(".TEST").length===0){return}by=function(b4,bV,bZ,b3){bV=bV||av;if(!b3&&!by.isXML(bV)){var b2=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b4);if(b2&&(bV.nodeType===1||bV.nodeType===9)){if(b2[1]){return bF(bV.getElementsByTagName(b4),bZ)}else{if(b2[2]&&bE.find.CLASS&&bV.getElementsByClassName){return bF(bV.getElementsByClassName(b2[2]),bZ)}}}if(bV.nodeType===9){if(b4==="body"&&bV.body){return bF([bV.body],bZ)}else{if(b2&&b2[3]){var bY=bV.getElementById(b2[3]);if(bY&&bY.parentNode){if(bY.id===b2[3]){return bF([bY],bZ)}}else{return bF([],bZ)}}}try{return bF(bV.querySelectorAll(b4),bZ)}catch(b0){}}else{if(bV.nodeType===1&&bV.nodeName.toLowerCase()!=="object"){var bW=bV,bX=bV.getAttribute("id"),bU=bX||bS,b6=bV.parentNode,b5=/^\s*[+~]/.test(b4);if(!bX){bV.setAttribute("id",bU)}else{bU=bU.replace(/'/g,"\\$&")}if(b5&&b6){bV=bV.parentNode}try{if(!b5||b6){return bF(bV.querySelectorAll("[id='"+bU+"'] "+b4),bZ)}}catch(b1){}finally{if(!bX){bW.removeAttribute("id")}}}}}return e(b4,bV,bZ,b3)};for(var bR in e){by[bR]=e[bR]}bT=null})()}(function(){var e=av.documentElement,bS=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(bS){var bU=!bS.call(av.createElement("div"),"div"),bR=false;try{bS.call(av.documentElement,"[test!='']:sizzle")}catch(bT){bR=true}by.matchesSelector=function(bW,bY){bY=bY.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!by.isXML(bW)){try{if(bR||!bE.match.PSEUDO.test(bY)&&!/!=/.test(bY)){var bV=bS.call(bW,bY);if(bV||!bU||bW.document&&bW.document.nodeType!==11){return bV}}}catch(bX){}}return by(bY,null,null,[bW]).length>0}}})();(function(){var e=av.createElement("div");e.innerHTML="
    ";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}bE.order.splice(1,0,"CLASS");bE.find.CLASS=function(bR,bS,bT){if(typeof bS.getElementsByClassName!=="undefined"&&!bT){return bS.getElementsByClassName(bR[1])}};e=null})();function bv(bR,bW,bV,bZ,bX,bY){for(var bT=0,bS=bZ.length;bT0){bU=e;break}}}e=e[bR]}bZ[bT]=bU}}}if(av.documentElement.contains){by.contains=function(bR,e){return bR!==e&&(bR.contains?bR.contains(e):true)}}else{if(av.documentElement.compareDocumentPosition){by.contains=function(bR,e){return !!(bR.compareDocumentPosition(e)&16)}}else{by.contains=function(){return false}}}by.isXML=function(e){var bR=(e?e.ownerDocument||e:0).documentElement;return bR?bR.nodeName!=="HTML":false};var bM=function(bS,e,bW){var bV,bX=[],bU="",bY=e.nodeType?[e]:e;while((bV=bE.match.PSEUDO.exec(bS))){bU+=bV[0];bS=bS.replace(bE.match.PSEUDO,"")}bS=bE.relative[bS]?bS+"*":bS;for(var bT=0,bR=bY.length;bT0){for(bB=bA;bB=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(by,bx){var bv=[],bw,e,bz=this[0];if(b.isArray(by)){var bB=1;while(bz&&bz.ownerDocument&&bz!==bx){for(bw=0;bw-1:b.find.matchesSelector(bz,by)){bv.push(bz);break}else{bz=bz.parentNode;if(!bz||!bz.ownerDocument||bz===bx||bz.nodeType===11){break}}}}bv=bv.length>1?b.unique(bv):bv;return this.pushStack(bv,"closest",by)},index:function(e){if(!e){return(this[0]&&this[0].parentNode)?this.prevAll().length:-1}if(typeof e==="string"){return b.inArray(this[0],b(e))}return b.inArray(e.jquery?e[0]:e,this)},add:function(e,bv){var bx=typeof e==="string"?b(e,bv):b.makeArray(e&&e.nodeType?[e]:e),bw=b.merge(this.get(),bx);return this.pushStack(C(bx[0])||C(bw[0])?bw:b.unique(bw))},andSelf:function(){return this.add(this.prevObject)}});function C(e){return !e||!e.parentNode||e.parentNode.nodeType===11}b.each({parent:function(bv){var e=bv.parentNode;return e&&e.nodeType!==11?e:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(bv,e,bw){return b.dir(bv,"parentNode",bw)},next:function(e){return b.nth(e,2,"nextSibling")},prev:function(e){return b.nth(e,2,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(bv,e,bw){return b.dir(bv,"nextSibling",bw)},prevUntil:function(bv,e,bw){return b.dir(bv,"previousSibling",bw)},siblings:function(e){return b.sibling(e.parentNode.firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.makeArray(e.childNodes)}},function(e,bv){b.fn[e]=function(by,bw){var bx=b.map(this,bv,by);if(!ab.test(e)){bw=by}if(bw&&typeof bw==="string"){bx=b.filter(bw,bx)}bx=this.length>1&&!ay[e]?b.unique(bx):bx;if((this.length>1||a9.test(bw))&&aq.test(e)){bx=bx.reverse()}return this.pushStack(bx,e,P.call(arguments).join(","))}});b.extend({filter:function(bw,e,bv){if(bv){bw=":not("+bw+")"}return e.length===1?b.find.matchesSelector(e[0],bw)?[e[0]]:[]:b.find.matches(bw,e)},dir:function(bw,bv,by){var e=[],bx=bw[bv];while(bx&&bx.nodeType!==9&&(by===L||bx.nodeType!==1||!b(bx).is(by))){if(bx.nodeType===1){e.push(bx)}bx=bx[bv]}return e},nth:function(by,e,bw,bx){e=e||1;var bv=0;for(;by;by=by[bw]){if(by.nodeType===1&&++bv===e){break}}return by},sibling:function(bw,bv){var e=[];for(;bw;bw=bw.nextSibling){if(bw.nodeType===1&&bw!==bv){e.push(bw)}}return e}});function aG(bx,bw,e){bw=bw||0;if(b.isFunction(bw)){return b.grep(bx,function(bz,by){var bA=!!bw.call(bz,by,bz);return bA===e})}else{if(bw.nodeType){return b.grep(bx,function(bz,by){return(bz===bw)===e})}else{if(typeof bw==="string"){var bv=b.grep(bx,function(by){return by.nodeType===1});if(bp.test(bw)){return b.filter(bw,bv,!e)}else{bw=b.filter(bw,bv)}}}}return b.grep(bx,function(bz,by){return(b.inArray(bz,bw)>=0)===e})}function a(e){var bw=aR.split("|"),bv=e.createDocumentFragment();if(bv.createElement){while(bw.length){bv.createElement(bw.pop())}}return bv}var aR="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ag=/ jQuery\d+="(?:\d+|null)"/g,ar=/^\s+/,R=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,d=/<([\w:]+)/,w=/",""],legend:[1,"
    ","
    "],thead:[1,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],col:[2,"","
    "],area:[1,"",""],_default:[0,"",""]},ac=a(av);ax.optgroup=ax.option;ax.tbody=ax.tfoot=ax.colgroup=ax.caption=ax.thead;ax.th=ax.td;if(!b.support.htmlSerialize){ax._default=[1,"div
    ","
    "]}b.fn.extend({text:function(e){if(b.isFunction(e)){return this.each(function(bw){var bv=b(this);bv.text(e.call(this,bw,bv.text()))})}if(typeof e!=="object"&&e!==L){return this.empty().append((this[0]&&this[0].ownerDocument||av).createTextNode(e))}return b.text(this)},wrapAll:function(e){if(b.isFunction(e)){return this.each(function(bw){b(this).wrapAll(e.call(this,bw))})}if(this[0]){var bv=b(e,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){bv.insertBefore(this[0])}bv.map(function(){var bw=this;while(bw.firstChild&&bw.firstChild.nodeType===1){bw=bw.firstChild}return bw}).append(this)}return this},wrapInner:function(e){if(b.isFunction(e)){return this.each(function(bv){b(this).wrapInner(e.call(this,bv))})}return this.each(function(){var bv=b(this),bw=bv.contents();if(bw.length){bw.wrapAll(e)}else{bv.append(e)}})},wrap:function(e){var bv=b.isFunction(e);return this.each(function(bw){b(this).wrapAll(bv?e.call(this,bw):e)})},unwrap:function(){return this.parent().each(function(){if(!b.nodeName(this,"body")){b(this).replaceWith(this.childNodes)}}).end()},append:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.appendChild(e)}})},prepend:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.insertBefore(e,this.firstChild)}})},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this)})}else{if(arguments.length){var e=b.clean(arguments);e.push.apply(e,this.toArray());return this.pushStack(e,"before",arguments)}}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this.nextSibling)})}else{if(arguments.length){var e=this.pushStack(this,"after",arguments);e.push.apply(e,b.clean(arguments));return e}}},remove:function(e,bx){for(var bv=0,bw;(bw=this[bv])!=null;bv++){if(!e||b.filter(e,[bw]).length){if(!bx&&bw.nodeType===1){b.cleanData(bw.getElementsByTagName("*"));b.cleanData([bw])}if(bw.parentNode){bw.parentNode.removeChild(bw)}}}return this},empty:function(){for(var e=0,bv;(bv=this[e])!=null;e++){if(bv.nodeType===1){b.cleanData(bv.getElementsByTagName("*"))}while(bv.firstChild){bv.removeChild(bv.firstChild)}}return this},clone:function(bv,e){bv=bv==null?false:bv;e=e==null?bv:e;return this.map(function(){return b.clone(this,bv,e)})},html:function(bx){if(bx===L){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(ag,""):null}else{if(typeof bx==="string"&&!ae.test(bx)&&(b.support.leadingWhitespace||!ar.test(bx))&&!ax[(d.exec(bx)||["",""])[1].toLowerCase()]){bx=bx.replace(R,"<$1>");try{for(var bw=0,bv=this.length;bw1&&bw0?this.clone(true):this).get();b(bC[bA])[bv](by);bz=bz.concat(by)}return this.pushStack(bz,e,bC.selector)}}});function bg(e){if(typeof e.getElementsByTagName!=="undefined"){return e.getElementsByTagName("*")}else{if(typeof e.querySelectorAll!=="undefined"){return e.querySelectorAll("*")}else{return[]}}}function az(e){if(e.type==="checkbox"||e.type==="radio"){e.defaultChecked=e.checked}}function E(e){var bv=(e.nodeName||"").toLowerCase();if(bv==="input"){az(e)}else{if(bv!=="script"&&typeof e.getElementsByTagName!=="undefined"){b.grep(e.getElementsByTagName("input"),az)}}}function al(e){var bv=av.createElement("div");ac.appendChild(bv);bv.innerHTML=e.outerHTML;return bv.firstChild}b.extend({clone:function(by,bA,bw){var e,bv,bx,bz=b.support.html5Clone||!ah.test("<"+by.nodeName)?by.cloneNode(true):al(by);if((!b.support.noCloneEvent||!b.support.noCloneChecked)&&(by.nodeType===1||by.nodeType===11)&&!b.isXMLDoc(by)){ai(by,bz);e=bg(by);bv=bg(bz);for(bx=0;e[bx];++bx){if(bv[bx]){ai(e[bx],bv[bx])}}}if(bA){t(by,bz);if(bw){e=bg(by);bv=bg(bz);for(bx=0;e[bx];++bx){t(e[bx],bv[bx])}}}e=bv=null;return bz},clean:function(bw,by,bH,bA){var bF;by=by||av;if(typeof by.createElement==="undefined"){by=by.ownerDocument||by[0]&&by[0].ownerDocument||av}var bI=[],bB;for(var bE=0,bz;(bz=bw[bE])!=null;bE++){if(typeof bz==="number"){bz+=""}if(!bz){continue}if(typeof bz==="string"){if(!W.test(bz)){bz=by.createTextNode(bz)}else{bz=bz.replace(R,"<$1>");var bK=(d.exec(bz)||["",""])[1].toLowerCase(),bx=ax[bK]||ax._default,bD=bx[0],bv=by.createElement("div");if(by===av){ac.appendChild(bv)}else{a(by).appendChild(bv)}bv.innerHTML=bx[1]+bz+bx[2];while(bD--){bv=bv.lastChild}if(!b.support.tbody){var e=w.test(bz),bC=bK==="table"&&!e?bv.firstChild&&bv.firstChild.childNodes:bx[1]===""&&!e?bv.childNodes:[];for(bB=bC.length-1;bB>=0;--bB){if(b.nodeName(bC[bB],"tbody")&&!bC[bB].childNodes.length){bC[bB].parentNode.removeChild(bC[bB])}}}if(!b.support.leadingWhitespace&&ar.test(bz)){bv.insertBefore(by.createTextNode(ar.exec(bz)[0]),bv.firstChild)}bz=bv.childNodes}}var bG;if(!b.support.appendChecked){if(bz[0]&&typeof(bG=bz.length)==="number"){for(bB=0;bB=0){return bx+"px"}}else{return bx}}}});if(!b.support.opacity){b.cssHooks.opacity={get:function(bv,e){return au.test((e&&bv.currentStyle?bv.currentStyle.filter:bv.style.filter)||"")?(parseFloat(RegExp.$1)/100)+"":e?"1":""},set:function(by,bz){var bx=by.style,bv=by.currentStyle,e=b.isNumeric(bz)?"alpha(opacity="+bz*100+")":"",bw=bv&&bv.filter||bx.filter||"";bx.zoom=1;if(bz>=1&&b.trim(bw.replace(ak,""))===""){bx.removeAttribute("filter");if(bv&&!bv.filter){return}}bx.filter=ak.test(bw)?bw.replace(ak,e):bw+" "+e}}}b(function(){if(!b.support.reliableMarginRight){b.cssHooks.marginRight={get:function(bw,bv){var e;b.swap(bw,{display:"inline-block"},function(){if(bv){e=Z(bw,"margin-right","marginRight")}else{e=bw.style.marginRight}});return e}}}});if(av.defaultView&&av.defaultView.getComputedStyle){aI=function(by,bw){var bv,bx,e;bw=bw.replace(z,"-$1").toLowerCase();if((bx=by.ownerDocument.defaultView)&&(e=bx.getComputedStyle(by,null))){bv=e.getPropertyValue(bw);if(bv===""&&!b.contains(by.ownerDocument.documentElement,by)){bv=b.style(by,bw)}}return bv}}if(av.documentElement.currentStyle){aX=function(bz,bw){var bA,e,by,bv=bz.currentStyle&&bz.currentStyle[bw],bx=bz.style;if(bv===null&&bx&&(by=bx[bw])){bv=by}if(!bc.test(bv)&&bn.test(bv)){bA=bx.left;e=bz.runtimeStyle&&bz.runtimeStyle.left;if(e){bz.runtimeStyle.left=bz.currentStyle.left}bx.left=bw==="fontSize"?"1em":(bv||0);bv=bx.pixelLeft+"px";bx.left=bA;if(e){bz.runtimeStyle.left=e}}return bv===""?"auto":bv}}Z=aI||aX;function p(by,bw,bv){var bA=bw==="width"?by.offsetWidth:by.offsetHeight,bz=bw==="width"?an:a1,bx=0,e=bz.length;if(bA>0){if(bv!=="border"){for(;bx)<[^<]*)*<\/script>/gi,q=/^(?:select|textarea)/i,h=/\s+/,br=/([?&])_=[^&]*/,K=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,A=b.fn.load,aa={},r={},aE,s,aV=["*/"]+["*"];try{aE=bl.href}catch(aw){aE=av.createElement("a");aE.href="";aE=aE.href}s=K.exec(aE.toLowerCase())||[];function f(e){return function(by,bA){if(typeof by!=="string"){bA=by;by="*"}if(b.isFunction(bA)){var bx=by.toLowerCase().split(h),bw=0,bz=bx.length,bv,bB,bC;for(;bw=0){var e=bw.slice(by,bw.length);bw=bw.slice(0,by)}var bx="GET";if(bz){if(b.isFunction(bz)){bA=bz;bz=L}else{if(typeof bz==="object"){bz=b.param(bz,b.ajaxSettings.traditional);bx="POST"}}}var bv=this;b.ajax({url:bw,type:bx,dataType:"html",data:bz,complete:function(bC,bB,bD){bD=bC.responseText;if(bC.isResolved()){bC.done(function(bE){bD=bE});bv.html(e?b("
    ").append(bD.replace(a6,"")).find(e):bD)}if(bA){bv.each(bA,[bD,bB,bC])}}});return this},serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?b.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||q.test(this.nodeName)||aZ.test(this.type))}).map(function(e,bv){var bw=b(this).val();return bw==null?null:b.isArray(bw)?b.map(bw,function(by,bx){return{name:bv.name,value:by.replace(bs,"\r\n")}}):{name:bv.name,value:bw.replace(bs,"\r\n")}}).get()}});b.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,bv){b.fn[bv]=function(bw){return this.on(bv,bw)}});b.each(["get","post"],function(e,bv){b[bv]=function(bw,by,bz,bx){if(b.isFunction(by)){bx=bx||bz;bz=by;by=L}return b.ajax({type:bv,url:bw,data:by,success:bz,dataType:bx})}});b.extend({getScript:function(e,bv){return b.get(e,L,bv,"script")},getJSON:function(e,bv,bw){return b.get(e,bv,bw,"json")},ajaxSetup:function(bv,e){if(e){am(bv,b.ajaxSettings)}else{e=bv;bv=b.ajaxSettings}am(bv,e);return bv},ajaxSettings:{url:aE,isLocal:aM.test(s[1]),global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":aV},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":bb.String,"text html":true,"text json":b.parseJSON,"text xml":b.parseXML},flatOptions:{context:true,url:true}},ajaxPrefilter:f(aa),ajaxTransport:f(r),ajax:function(bz,bx){if(typeof bz==="object"){bx=bz;bz=L}bx=bx||{};var bD=b.ajaxSetup({},bx),bS=bD.context||bD,bG=bS!==bD&&(bS.nodeType||bS instanceof b)?b(bS):b.event,bR=b.Deferred(),bN=b.Callbacks("once memory"),bB=bD.statusCode||{},bC,bH={},bO={},bQ,by,bL,bE,bI,bA=0,bw,bK,bJ={readyState:0,setRequestHeader:function(bT,bU){if(!bA){var e=bT.toLowerCase();bT=bO[e]=bO[e]||bT;bH[bT]=bU}return this},getAllResponseHeaders:function(){return bA===2?bQ:null},getResponseHeader:function(bT){var e;if(bA===2){if(!by){by={};while((e=aD.exec(bQ))){by[e[1].toLowerCase()]=e[2]}}e=by[bT.toLowerCase()]}return e===L?null:e},overrideMimeType:function(e){if(!bA){bD.mimeType=e}return this},abort:function(e){e=e||"abort";if(bL){bL.abort(e)}bF(0,e);return this}};function bF(bZ,bU,b0,bW){if(bA===2){return}bA=2;if(bE){clearTimeout(bE)}bL=L;bQ=bW||"";bJ.readyState=bZ>0?4:0;var bT,b4,b3,bX=bU,bY=b0?bj(bD,bJ,b0):L,bV,b2;if(bZ>=200&&bZ<300||bZ===304){if(bD.ifModified){if((bV=bJ.getResponseHeader("Last-Modified"))){b.lastModified[bC]=bV}if((b2=bJ.getResponseHeader("Etag"))){b.etag[bC]=b2}}if(bZ===304){bX="notmodified";bT=true}else{try{b4=G(bD,bY);bX="success";bT=true}catch(b1){bX="parsererror";b3=b1}}}else{b3=bX;if(!bX||bZ){bX="error";if(bZ<0){bZ=0}}}bJ.status=bZ;bJ.statusText=""+(bU||bX);if(bT){bR.resolveWith(bS,[b4,bX,bJ])}else{bR.rejectWith(bS,[bJ,bX,b3])}bJ.statusCode(bB);bB=L;if(bw){bG.trigger("ajax"+(bT?"Success":"Error"),[bJ,bD,bT?b4:b3])}bN.fireWith(bS,[bJ,bX]);if(bw){bG.trigger("ajaxComplete",[bJ,bD]);if(!(--b.active)){b.event.trigger("ajaxStop")}}}bR.promise(bJ);bJ.success=bJ.done;bJ.error=bJ.fail;bJ.complete=bN.add;bJ.statusCode=function(bT){if(bT){var e;if(bA<2){for(e in bT){bB[e]=[bB[e],bT[e]]}}else{e=bT[bJ.status];bJ.then(e,e)}}return this};bD.url=((bz||bD.url)+"").replace(bq,"").replace(c,s[1]+"//");bD.dataTypes=b.trim(bD.dataType||"*").toLowerCase().split(h);if(bD.crossDomain==null){bI=K.exec(bD.url.toLowerCase());bD.crossDomain=!!(bI&&(bI[1]!=s[1]||bI[2]!=s[2]||(bI[3]||(bI[1]==="http:"?80:443))!=(s[3]||(s[1]==="http:"?80:443))))}if(bD.data&&bD.processData&&typeof bD.data!=="string"){bD.data=b.param(bD.data,bD.traditional)}aW(aa,bD,bx,bJ);if(bA===2){return false}bw=bD.global;bD.type=bD.type.toUpperCase();bD.hasContent=!aQ.test(bD.type);if(bw&&b.active++===0){b.event.trigger("ajaxStart")}if(!bD.hasContent){if(bD.data){bD.url+=(M.test(bD.url)?"&":"?")+bD.data;delete bD.data}bC=bD.url;if(bD.cache===false){var bv=b.now(),bP=bD.url.replace(br,"$1_="+bv);bD.url=bP+((bP===bD.url)?(M.test(bD.url)?"&":"?")+"_="+bv:"")}}if(bD.data&&bD.hasContent&&bD.contentType!==false||bx.contentType){bJ.setRequestHeader("Content-Type",bD.contentType)}if(bD.ifModified){bC=bC||bD.url;if(b.lastModified[bC]){bJ.setRequestHeader("If-Modified-Since",b.lastModified[bC])}if(b.etag[bC]){bJ.setRequestHeader("If-None-Match",b.etag[bC])}}bJ.setRequestHeader("Accept",bD.dataTypes[0]&&bD.accepts[bD.dataTypes[0]]?bD.accepts[bD.dataTypes[0]]+(bD.dataTypes[0]!=="*"?", "+aV+"; q=0.01":""):bD.accepts["*"]);for(bK in bD.headers){bJ.setRequestHeader(bK,bD.headers[bK])}if(bD.beforeSend&&(bD.beforeSend.call(bS,bJ,bD)===false||bA===2)){bJ.abort();return false}for(bK in {success:1,error:1,complete:1}){bJ[bK](bD[bK])}bL=aW(r,bD,bx,bJ);if(!bL){bF(-1,"No Transport")}else{bJ.readyState=1;if(bw){bG.trigger("ajaxSend",[bJ,bD])}if(bD.async&&bD.timeout>0){bE=setTimeout(function(){bJ.abort("timeout")},bD.timeout)}try{bA=1;bL.send(bH,bF)}catch(bM){if(bA<2){bF(-1,bM)}else{throw bM}}}return bJ},param:function(e,bw){var bv=[],by=function(bz,bA){bA=b.isFunction(bA)?bA():bA;bv[bv.length]=encodeURIComponent(bz)+"="+encodeURIComponent(bA)};if(bw===L){bw=b.ajaxSettings.traditional}if(b.isArray(e)||(e.jquery&&!b.isPlainObject(e))){b.each(e,function(){by(this.name,this.value)})}else{for(var bx in e){v(bx,e[bx],bw,by)}}return bv.join("&").replace(k,"+")}});function v(bw,by,bv,bx){if(b.isArray(by)){b.each(by,function(bA,bz){if(bv||ap.test(bw)){bx(bw,bz)}else{v(bw+"["+(typeof bz==="object"||b.isArray(bz)?bA:"")+"]",bz,bv,bx)}})}else{if(!bv&&by!=null&&typeof by==="object"){for(var e in by){v(bw+"["+e+"]",by[e],bv,bx)}}else{bx(bw,by)}}}b.extend({active:0,lastModified:{},etag:{}});function bj(bD,bC,bz){var bv=bD.contents,bB=bD.dataTypes,bw=bD.responseFields,by,bA,bx,e;for(bA in bw){if(bA in bz){bC[bw[bA]]=bz[bA]}}while(bB[0]==="*"){bB.shift();if(by===L){by=bD.mimeType||bC.getResponseHeader("content-type")}}if(by){for(bA in bv){if(bv[bA]&&bv[bA].test(by)){bB.unshift(bA);break}}}if(bB[0] in bz){bx=bB[0]}else{for(bA in bz){if(!bB[0]||bD.converters[bA+" "+bB[0]]){bx=bA;break}if(!e){e=bA}}bx=bx||e}if(bx){if(bx!==bB[0]){bB.unshift(bx)}return bz[bx]}}function G(bH,bz){if(bH.dataFilter){bz=bH.dataFilter(bz,bH.dataType)}var bD=bH.dataTypes,bG={},bA,bE,bw=bD.length,bB,bC=bD[0],bx,by,bF,bv,e;for(bA=1;bA=bw.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();bw.animatedProperties[this.prop]=true;for(bA in bw.animatedProperties){if(bw.animatedProperties[bA]!==true){e=false}}if(e){if(bw.overflow!=null&&!b.support.shrinkWrapBlocks){b.each(["","X","Y"],function(bC,bD){bz.style["overflow"+bD]=bw.overflow[bC]})}if(bw.hide){b(bz).hide()}if(bw.hide||bw.show){for(bA in bw.animatedProperties){b.style(bz,bA,bw.orig[bA]);b.removeData(bz,"fxshow"+bA,true);b.removeData(bz,"toggle"+bA,true)}}bv=bw.complete;if(bv){bw.complete=false;bv.call(bz)}}return false}else{if(bw.duration==Infinity){this.now=bx}else{bB=bx-this.startTime;this.state=bB/bw.duration;this.pos=b.easing[bw.animatedProperties[this.prop]](this.state,bB,0,1,bw.duration);this.now=this.start+((this.end-this.start)*this.pos)}this.update()}return true}};b.extend(b.fx,{tick:function(){var bw,bv=b.timers,e=0;for(;e").appendTo(e),bw=bv.css("display");bv.remove();if(bw==="none"||bw===""){if(!a8){a8=av.createElement("iframe");a8.frameBorder=a8.width=a8.height=0}e.appendChild(a8);if(!m||!a8.createElement){m=(a8.contentWindow||a8.contentDocument).document;m.write((av.compatMode==="CSS1Compat"?"":"")+"");m.close()}bv=m.createElement(bx);m.body.appendChild(bv);bw=b.css(bv,"display");e.removeChild(a8)}Q[bx]=bw}return Q[bx]}var V=/^t(?:able|d|h)$/i,ad=/^(?:body|html)$/i;if("getBoundingClientRect" in av.documentElement){b.fn.offset=function(bI){var by=this[0],bB;if(bI){return this.each(function(e){b.offset.setOffset(this,bI,e)})}if(!by||!by.ownerDocument){return null}if(by===by.ownerDocument.body){return b.offset.bodyOffset(by)}try{bB=by.getBoundingClientRect()}catch(bF){}var bH=by.ownerDocument,bw=bH.documentElement;if(!bB||!b.contains(bw,by)){return bB?{top:bB.top,left:bB.left}:{top:0,left:0}}var bC=bH.body,bD=aK(bH),bA=bw.clientTop||bC.clientTop||0,bE=bw.clientLeft||bC.clientLeft||0,bv=bD.pageYOffset||b.support.boxModel&&bw.scrollTop||bC.scrollTop,bz=bD.pageXOffset||b.support.boxModel&&bw.scrollLeft||bC.scrollLeft,bG=bB.top+bv-bA,bx=bB.left+bz-bE;return{top:bG,left:bx}}}else{b.fn.offset=function(bF){var bz=this[0];if(bF){return this.each(function(bG){b.offset.setOffset(this,bF,bG)})}if(!bz||!bz.ownerDocument){return null}if(bz===bz.ownerDocument.body){return b.offset.bodyOffset(bz)}var bC,bw=bz.offsetParent,bv=bz,bE=bz.ownerDocument,bx=bE.documentElement,bA=bE.body,bB=bE.defaultView,e=bB?bB.getComputedStyle(bz,null):bz.currentStyle,bD=bz.offsetTop,by=bz.offsetLeft;while((bz=bz.parentNode)&&bz!==bA&&bz!==bx){if(b.support.fixedPosition&&e.position==="fixed"){break}bC=bB?bB.getComputedStyle(bz,null):bz.currentStyle;bD-=bz.scrollTop;by-=bz.scrollLeft;if(bz===bw){bD+=bz.offsetTop;by+=bz.offsetLeft;if(b.support.doesNotAddBorder&&!(b.support.doesAddBorderForTableAndCells&&V.test(bz.nodeName))){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}bv=bw;bw=bz.offsetParent}if(b.support.subtractsBorderForOverflowNotVisible&&bC.overflow!=="visible"){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}e=bC}if(e.position==="relative"||e.position==="static"){bD+=bA.offsetTop;by+=bA.offsetLeft}if(b.support.fixedPosition&&e.position==="fixed"){bD+=Math.max(bx.scrollTop,bA.scrollTop);by+=Math.max(bx.scrollLeft,bA.scrollLeft)}return{top:bD,left:by}}}b.offset={bodyOffset:function(e){var bw=e.offsetTop,bv=e.offsetLeft;if(b.support.doesNotIncludeMarginInBodyOffset){bw+=parseFloat(b.css(e,"marginTop"))||0;bv+=parseFloat(b.css(e,"marginLeft"))||0}return{top:bw,left:bv}},setOffset:function(bx,bG,bA){var bB=b.css(bx,"position");if(bB==="static"){bx.style.position="relative"}var bz=b(bx),bv=bz.offset(),e=b.css(bx,"top"),bE=b.css(bx,"left"),bF=(bB==="absolute"||bB==="fixed")&&b.inArray("auto",[e,bE])>-1,bD={},bC={},bw,by;if(bF){bC=bz.position();bw=bC.top;by=bC.left}else{bw=parseFloat(e)||0;by=parseFloat(bE)||0}if(b.isFunction(bG)){bG=bG.call(bx,bA,bv)}if(bG.top!=null){bD.top=(bG.top-bv.top)+bw}if(bG.left!=null){bD.left=(bG.left-bv.left)+by}if("using" in bG){bG.using.call(bx,bD)}else{bz.css(bD)}}};b.fn.extend({position:function(){if(!this[0]){return null}var bw=this[0],bv=this.offsetParent(),bx=this.offset(),e=ad.test(bv[0].nodeName)?{top:0,left:0}:bv.offset();bx.top-=parseFloat(b.css(bw,"marginTop"))||0;bx.left-=parseFloat(b.css(bw,"marginLeft"))||0;e.top+=parseFloat(b.css(bv[0],"borderTopWidth"))||0;e.left+=parseFloat(b.css(bv[0],"borderLeftWidth"))||0;return{top:bx.top-e.top,left:bx.left-e.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||av.body;while(e&&(!ad.test(e.nodeName)&&b.css(e,"position")==="static")){e=e.offsetParent}return e})}});b.each(["Left","Top"],function(bv,e){var bw="scroll"+e;b.fn[bw]=function(bz){var bx,by;if(bz===L){bx=this[0];if(!bx){return null}by=aK(bx);return by?("pageXOffset" in by)?by[bv?"pageYOffset":"pageXOffset"]:b.support.boxModel&&by.document.documentElement[bw]||by.document.body[bw]:bx[bw]}return this.each(function(){by=aK(this);if(by){by.scrollTo(!bv?bz:b(by).scrollLeft(),bv?bz:b(by).scrollTop())}else{this[bw]=bz}})}});function aK(e){return b.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:false}b.each(["Height","Width"],function(bv,e){var bw=e.toLowerCase();b.fn["inner"+e]=function(){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,"padding")):this[bw]():null};b.fn["outer"+e]=function(by){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,by?"margin":"border")):this[bw]():null};b.fn[bw]=function(bz){var bA=this[0];if(!bA){return bz==null?null:this}if(b.isFunction(bz)){return this.each(function(bE){var bD=b(this);bD[bw](bz.call(this,bE,bD[bw]()))})}if(b.isWindow(bA)){var bB=bA.document.documentElement["client"+e],bx=bA.document.body;return bA.document.compatMode==="CSS1Compat"&&bB||bx&&bx["client"+e]||bB}else{if(bA.nodeType===9){return Math.max(bA.documentElement["client"+e],bA.body["scroll"+e],bA.documentElement["scroll"+e],bA.body["offset"+e],bA.documentElement["offset"+e])}else{if(bz===L){var bC=b.css(bA,bw),by=parseFloat(bC);return b.isNumeric(by)?by:bC}else{return this.css(bw,typeof bz==="string"?bz:bz+"px")}}}}});bb.jQuery=bb.$=b;if(typeof define==="function"&&define.amd&&define.amd.jQuery){define("jquery",[],function(){return b})}})(window);/*! - * jQuery UI 1.8.18 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI - */ -(function(a,d){a.ui=a.ui||{};if(a.ui.version){return}a.extend(a.ui,{version:"1.8.18",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});a.fn.extend({propAttr:a.fn.prop||a.fn.attr,_focus:a.fn.focus,focus:function(e,f){return typeof e==="number"?this.each(function(){var g=this;setTimeout(function(){a(g).focus();if(f){f.call(g)}},e)}):this._focus.apply(this,arguments)},scrollParent:function(){var e;if((a.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){e=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(a.curCSS(this,"position",1))&&(/(auto|scroll)/).test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0)}else{e=this.parents().filter(function(){return(/(auto|scroll)/).test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!e.length?a(document):e},zIndex:function(h){if(h!==d){return this.css("zIndex",h)}if(this.length){var f=a(this[0]),e,g;while(f.length&&f[0]!==document){e=f.css("position");if(e==="absolute"||e==="relative"||e==="fixed"){g=parseInt(f.css("zIndex"),10);if(!isNaN(g)&&g!==0){return g}}f=f.parent()}}return 0},disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});a.each(["Width","Height"],function(g,e){var f=e==="Width"?["Left","Right"]:["Top","Bottom"],h=e.toLowerCase(),k={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};function j(m,l,i,n){a.each(f,function(){l-=parseFloat(a.curCSS(m,"padding"+this,true))||0;if(i){l-=parseFloat(a.curCSS(m,"border"+this+"Width",true))||0}if(n){l-=parseFloat(a.curCSS(m,"margin"+this,true))||0}});return l}a.fn["inner"+e]=function(i){if(i===d){return k["inner"+e].call(this)}return this.each(function(){a(this).css(h,j(this,i)+"px")})};a.fn["outer"+e]=function(i,l){if(typeof i!=="number"){return k["outer"+e].call(this,i)}return this.each(function(){a(this).css(h,j(this,i,true,l)+"px")})}});function c(g,e){var j=g.nodeName.toLowerCase();if("area"===j){var i=g.parentNode,h=i.name,f;if(!g.href||!h||i.nodeName.toLowerCase()!=="map"){return false}f=a("img[usemap=#"+h+"]")[0];return !!f&&b(f)}return(/input|select|textarea|button|object/.test(j)?!g.disabled:"a"==j?g.href||e:e)&&b(g)}function b(e){return !a(e).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}a.extend(a.expr[":"],{data:function(g,f,e){return !!a.data(g,e[3])},focusable:function(e){return c(e,!isNaN(a.attr(e,"tabindex")))},tabbable:function(g){var e=a.attr(g,"tabindex"),f=isNaN(e);return(f||e>=0)&&c(g,!f)}});a(function(){var e=document.body,f=e.appendChild(f=document.createElement("div"));f.offsetHeight;a.extend(f.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});a.support.minHeight=f.offsetHeight===100;a.support.selectstart="onselectstart" in f;e.removeChild(f).style.display="none"});a.extend(a.ui,{plugin:{add:function(f,g,j){var h=a.ui[f].prototype;for(var e in j){h.plugins[e]=h.plugins[e]||[];h.plugins[e].push([g,j[e]])}},call:function(e,g,f){var j=e.plugins[g];if(!j||!e.element[0].parentNode){return}for(var h=0;h0){return true}h[e]=1;g=(h[e]>0);h[e]=0;return g},isOverAxis:function(f,e,g){return(f>e)&&(f<(e+g))},isOver:function(j,f,i,h,e,g){return a.ui.isOverAxis(j,i,e)&&a.ui.isOverAxis(f,h,g)}})})(jQuery);/*! - * jQuery UI Widget 1.8.18 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Widget - */ -(function(b,d){if(b.cleanData){var c=b.cleanData;b.cleanData=function(f){for(var g=0,h;(h=f[g])!=null;g++){try{b(h).triggerHandler("remove")}catch(j){}}c(f)}}else{var a=b.fn.remove;b.fn.remove=function(e,f){return this.each(function(){if(!f){if(!e||b.filter(e,[this]).length){b("*",this).add([this]).each(function(){try{b(this).triggerHandler("remove")}catch(g){}})}}return a.call(b(this),e,f)})}}b.widget=function(f,h,e){var g=f.split(".")[0],j;f=f.split(".")[1];j=g+"-"+f;if(!e){e=h;h=b.Widget}b.expr[":"][j]=function(k){return !!b.data(k,f)};b[g]=b[g]||{};b[g][f]=function(k,l){if(arguments.length){this._createWidget(k,l)}};var i=new h();i.options=b.extend(true,{},i.options);b[g][f].prototype=b.extend(true,i,{namespace:g,widgetName:f,widgetEventPrefix:b[g][f].prototype.widgetEventPrefix||f,widgetBaseClass:j},e);b.widget.bridge(f,b[g][f])};b.widget.bridge=function(f,e){b.fn[f]=function(i){var g=typeof i==="string",h=Array.prototype.slice.call(arguments,1),j=this;i=!g&&h.length?b.extend.apply(null,[true,i].concat(h)):i;if(g&&i.charAt(0)==="_"){return j}if(g){this.each(function(){var k=b.data(this,f),l=k&&b.isFunction(k[i])?k[i].apply(k,h):k;if(l!==k&&l!==d){j=l;return false}})}else{this.each(function(){var k=b.data(this,f);if(k){k.option(i||{})._init()}else{b.data(this,f,new e(i,this))}})}return j}};b.Widget=function(e,f){if(arguments.length){this._createWidget(e,f)}};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(f,g){b.data(g,this.widgetName,this);this.element=b(g);this.options=b.extend(true,{},this.options,this._getCreateOptions(),f);var e=this;this.element.bind("remove."+this.widgetName,function(){e.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(f,g){var e=f;if(arguments.length===0){return b.extend({},this.options)}if(typeof f==="string"){if(g===d){return this.options[f]}e={};e[f]=g}this._setOptions(e);return this},_setOptions:function(f){var e=this;b.each(f,function(g,h){e._setOption(g,h)});return this},_setOption:function(e,f){this.options[e]=f;if(e==="disabled"){this.widget()[f?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",f)}return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(e,f,g){var j,i,h=this.options[e];g=g||{};f=b.Event(f);f.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase();f.target=this.element[0];i=f.originalEvent;if(i){for(j in i){if(!(j in f)){f[j]=i[j]}}}this.element.trigger(f,g);return !(b.isFunction(h)&&h.call(this.element[0],f,g)===false||f.isDefaultPrevented())}}})(jQuery);/*! - * jQuery UI Mouse 1.8.18 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Mouse - * - * Depends: - * jquery.ui.widget.js - */ -(function(b,c){var a=false;b(document).mouseup(function(d){a=false});b.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var d=this;this.element.bind("mousedown."+this.widgetName,function(e){return d._mouseDown(e)}).bind("click."+this.widgetName,function(e){if(true===b.data(e.target,d.widgetName+".preventClickEvent")){b.removeData(e.target,d.widgetName+".preventClickEvent");e.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(f){if(a){return}(this._mouseStarted&&this._mouseUp(f));this._mouseDownEvent=f;var e=this,g=(f.which==1),d=(typeof this.options.cancel=="string"&&f.target.nodeName?b(f.target).closest(this.options.cancel).length:false);if(!g||d||!this._mouseCapture(f)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(f)&&this._mouseDelayMet(f)){this._mouseStarted=(this._mouseStart(f)!==false);if(!this._mouseStarted){f.preventDefault();return true}}if(true===b.data(f.target,this.widgetName+".preventClickEvent")){b.removeData(f.target,this.widgetName+".preventClickEvent")}this._mouseMoveDelegate=function(h){return e._mouseMove(h)};this._mouseUpDelegate=function(h){return e._mouseUp(h)};b(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);f.preventDefault();a=true;return true},_mouseMove:function(d){if(b.browser.msie&&!(document.documentMode>=9)&&!d.button){return this._mouseUp(d)}if(this._mouseStarted){this._mouseDrag(d);return d.preventDefault()}if(this._mouseDistanceMet(d)&&this._mouseDelayMet(d)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,d)!==false);(this._mouseStarted?this._mouseDrag(d):this._mouseUp(d))}return !this._mouseStarted},_mouseUp:function(d){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;if(d.target==this._mouseDownEvent.target){b.data(d.target,this.widgetName+".preventClickEvent",true)}this._mouseStop(d)}return false},_mouseDistanceMet:function(d){return(Math.max(Math.abs(this._mouseDownEvent.pageX-d.pageX),Math.abs(this._mouseDownEvent.pageY-d.pageY))>=this.options.distance)},_mouseDelayMet:function(d){return this.mouseDelayMet},_mouseStart:function(d){},_mouseDrag:function(d){},_mouseStop:function(d){},_mouseCapture:function(d){return true}})})(jQuery);(function(c,d){c.widget("ui.resizable",c.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000},_create:function(){var f=this,k=this.options;this.element.addClass("ui-resizable");c.extend(this,{_aspectRatio:!!(k.aspectRatio),aspectRatio:k.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:k.helper||k.ghost||k.animate?k.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){this.element.wrap(c('
    ').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=k.handles||(!c(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var l=this.handles.split(",");this.handles={};for(var g=0;g
    ');if(/sw|se|ne|nw/.test(j)){h.css({zIndex:++k.zIndex})}if("se"==j){h.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[j]=".ui-resizable-"+j;this.element.append(h)}}this._renderAxis=function(q){q=q||this.element;for(var n in this.handles){if(this.handles[n].constructor==String){this.handles[n]=c(this.handles[n],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var o=c(this.handles[n],this.element),p=0;p=/sw|ne|nw|se|n|s/.test(n)?o.outerHeight():o.outerWidth();var m=["padding",/ne|nw|n/.test(n)?"Top":/se|sw|s/.test(n)?"Bottom":/^e$/.test(n)?"Right":"Left"].join("");q.css(m,p);this._proportionallyResize()}if(!c(this.handles[n]).length){continue}}};this._renderAxis(this.element);this._handles=c(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!f.resizing){if(this.className){var i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}f.axis=i&&i[1]?i[1]:"se"}});if(k.autoHide){this._handles.hide();c(this.element).addClass("ui-resizable-autohide").hover(function(){if(k.disabled){return}c(this).removeClass("ui-resizable-autohide");f._handles.show()},function(){if(k.disabled){return}if(!f.resizing){c(this).addClass("ui-resizable-autohide");f._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var e=function(g){c(g).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){e(this.element);var f=this.element;f.after(this.originalElement.css({position:f.css("position"),width:f.outerWidth(),height:f.outerHeight(),top:f.css("top"),left:f.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);e(this.originalElement);return this},_mouseCapture:function(f){var g=false;for(var e in this.handles){if(c(this.handles[e])[0]==f.target){g=true}}return !this.options.disabled&&g},_mouseStart:function(g){var j=this.options,f=this.element.position(),e=this.element;this.resizing=true;this.documentScroll={top:c(document).scrollTop(),left:c(document).scrollLeft()};if(e.is(".ui-draggable")||(/absolute/).test(e.css("position"))){e.css({position:"absolute",top:f.top,left:f.left})}this._renderProxy();var k=b(this.helper.css("left")),h=b(this.helper.css("top"));if(j.containment){k+=c(j.containment).scrollLeft()||0;h+=c(j.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:k,top:h};this.size=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalSize=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalPosition={left:k,top:h};this.sizeDiff={width:e.outerWidth()-e.width(),height:e.outerHeight()-e.height()};this.originalMousePosition={left:g.pageX,top:g.pageY};this.aspectRatio=(typeof j.aspectRatio=="number")?j.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var i=c(".ui-resizable-"+this.axis).css("cursor");c("body").css("cursor",i=="auto"?this.axis+"-resize":i);e.addClass("ui-resizable-resizing");this._propagate("start",g);return true},_mouseDrag:function(e){var h=this.helper,g=this.options,m={},q=this,j=this.originalMousePosition,n=this.axis;var r=(e.pageX-j.left)||0,p=(e.pageY-j.top)||0;var i=this._change[n];if(!i){return false}var l=i.apply(this,[e,r,p]),k=c.browser.msie&&c.browser.version<7,f=this.sizeDiff;this._updateVirtualBoundaries(e.shiftKey);if(this._aspectRatio||e.shiftKey){l=this._updateRatio(l,e)}l=this._respectSize(l,e);this._propagate("resize",e);h.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(l);this._trigger("resize",e,this.ui());return false},_mouseStop:function(h){this.resizing=false;var i=this.options,m=this;if(this._helper){var g=this._proportionallyResizeElements,e=g.length&&(/textarea/i).test(g[0].nodeName),f=e&&c.ui.hasScroll(g[0],"left")?0:m.sizeDiff.height,k=e?0:m.sizeDiff.width;var n={width:(m.helper.width()-k),height:(m.helper.height()-f)},j=(parseInt(m.element.css("left"),10)+(m.position.left-m.originalPosition.left))||null,l=(parseInt(m.element.css("top"),10)+(m.position.top-m.originalPosition.top))||null;if(!i.animate){this.element.css(c.extend(n,{top:l,left:j}))}m.helper.height(m.size.height);m.helper.width(m.size.width);if(this._helper&&!i.animate){this._proportionallyResize()}}c("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",h);if(this._helper){this.helper.remove()}return false},_updateVirtualBoundaries:function(g){var j=this.options,i,h,f,k,e;e={minWidth:a(j.minWidth)?j.minWidth:0,maxWidth:a(j.maxWidth)?j.maxWidth:Infinity,minHeight:a(j.minHeight)?j.minHeight:0,maxHeight:a(j.maxHeight)?j.maxHeight:Infinity};if(this._aspectRatio||g){i=e.minHeight*this.aspectRatio;f=e.minWidth/this.aspectRatio;h=e.maxHeight*this.aspectRatio;k=e.maxWidth/this.aspectRatio;if(i>e.minWidth){e.minWidth=i}if(f>e.minHeight){e.minHeight=f}if(hl.width),s=a(l.height)&&i.minHeight&&(i.minHeight>l.height);if(h){l.width=i.minWidth}if(s){l.height=i.minHeight}if(t){l.width=i.maxWidth}if(m){l.height=i.maxHeight}var f=this.originalPosition.left+this.originalSize.width,p=this.position.top+this.size.height;var k=/sw|nw|w/.test(q),e=/nw|ne|n/.test(q);if(h&&k){l.left=f-i.minWidth}if(t&&k){l.left=f-i.maxWidth}if(s&&e){l.top=p-i.minHeight}if(m&&e){l.top=p-i.maxHeight}var n=!l.width&&!l.height;if(n&&!l.left&&l.top){l.top=null}else{if(n&&!l.top&&l.left){l.left=null}}return l},_proportionallyResize:function(){var k=this.options;if(!this._proportionallyResizeElements.length){return}var g=this.helper||this.element;for(var f=0;f');var e=c.browser.msie&&c.browser.version<7,g=(e?1:0),h=(e?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+h,height:this.element.outerHeight()+h,position:"absolute",left:this.elementOffset.left-g+"px",top:this.elementOffset.top-g+"px",zIndex:++i.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(g,f,e){return{width:this.originalSize.width+f}},w:function(h,f,e){var j=this.options,g=this.originalSize,i=this.originalPosition;return{left:i.left+f,width:g.width-f}},n:function(h,f,e){var j=this.options,g=this.originalSize,i=this.originalPosition;return{top:i.top+e,height:g.height-e}},s:function(g,f,e){return{height:this.originalSize.height+e}},se:function(g,f,e){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[g,f,e]))},sw:function(g,f,e){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[g,f,e]))},ne:function(g,f,e){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[g,f,e]))},nw:function(g,f,e){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[g,f,e]))}},_propagate:function(f,e){c.ui.plugin.call(this,f,[e,this.ui()]);(f!="resize"&&this._trigger(f,e,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});c.extend(c.ui.resizable,{version:"1.8.18"});c.ui.plugin.add("resizable","alsoResize",{start:function(f,g){var e=c(this).data("resizable"),i=e.options;var h=function(j){c(j).each(function(){var k=c(this);k.data("resizable-alsoresize",{width:parseInt(k.width(),10),height:parseInt(k.height(),10),left:parseInt(k.css("left"),10),top:parseInt(k.css("top"),10)})})};if(typeof(i.alsoResize)=="object"&&!i.alsoResize.parentNode){if(i.alsoResize.length){i.alsoResize=i.alsoResize[0];h(i.alsoResize)}else{c.each(i.alsoResize,function(j){h(j)})}}else{h(i.alsoResize)}},resize:function(g,i){var f=c(this).data("resizable"),j=f.options,h=f.originalSize,l=f.originalPosition;var k={height:(f.size.height-h.height)||0,width:(f.size.width-h.width)||0,top:(f.position.top-l.top)||0,left:(f.position.left-l.left)||0},e=function(m,n){c(m).each(function(){var q=c(this),r=c(this).data("resizable-alsoresize"),p={},o=n&&n.length?n:q.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];c.each(o,function(s,u){var t=(r[u]||0)+(k[u]||0);if(t&&t>=0){p[u]=t||null}});q.css(p)})};if(typeof(j.alsoResize)=="object"&&!j.alsoResize.nodeType){c.each(j.alsoResize,function(m,n){e(m,n)})}else{e(j.alsoResize)}},stop:function(e,f){c(this).removeData("resizable-alsoresize")}});c.ui.plugin.add("resizable","animate",{stop:function(i,n){var p=c(this).data("resizable"),j=p.options;var h=p._proportionallyResizeElements,e=h.length&&(/textarea/i).test(h[0].nodeName),f=e&&c.ui.hasScroll(h[0],"left")?0:p.sizeDiff.height,l=e?0:p.sizeDiff.width;var g={width:(p.size.width-l),height:(p.size.height-f)},k=(parseInt(p.element.css("left"),10)+(p.position.left-p.originalPosition.left))||null,m=(parseInt(p.element.css("top"),10)+(p.position.top-p.originalPosition.top))||null;p.element.animate(c.extend(g,m&&k?{top:m,left:k}:{}),{duration:j.animateDuration,easing:j.animateEasing,step:function(){var o={width:parseInt(p.element.css("width"),10),height:parseInt(p.element.css("height"),10),top:parseInt(p.element.css("top"),10),left:parseInt(p.element.css("left"),10)};if(h&&h.length){c(h[0]).css({width:o.width,height:o.height})}p._updateCache(o);p._propagate("resize",i)}})}});c.ui.plugin.add("resizable","containment",{start:function(f,r){var t=c(this).data("resizable"),j=t.options,l=t.element;var g=j.containment,k=(g instanceof c)?g.get(0):(/parent/.test(g))?l.parent().get(0):g;if(!k){return}t.containerElement=c(k);if(/document/.test(g)||g==document){t.containerOffset={left:0,top:0};t.containerPosition={left:0,top:0};t.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}}else{var n=c(k),i=[];c(["Top","Right","Left","Bottom"]).each(function(p,o){i[p]=b(n.css("padding"+o))});t.containerOffset=n.offset();t.containerPosition=n.position();t.containerSize={height:(n.innerHeight()-i[3]),width:(n.innerWidth()-i[1])};var q=t.containerOffset,e=t.containerSize.height,m=t.containerSize.width,h=(c.ui.hasScroll(k,"left")?k.scrollWidth:m),s=(c.ui.hasScroll(k)?k.scrollHeight:e);t.parentData={element:k,left:q.left,top:q.top,width:h,height:s}}},resize:function(g,q){var t=c(this).data("resizable"),i=t.options,f=t.containerSize,p=t.containerOffset,m=t.size,n=t.position,r=t._aspectRatio||g.shiftKey,e={top:0,left:0},h=t.containerElement;if(h[0]!=document&&(/static/).test(h.css("position"))){e=p}if(n.left<(t._helper?p.left:0)){t.size.width=t.size.width+(t._helper?(t.position.left-p.left):(t.position.left-e.left));if(r){t.size.height=t.size.width/i.aspectRatio}t.position.left=i.helper?p.left:0}if(n.top<(t._helper?p.top:0)){t.size.height=t.size.height+(t._helper?(t.position.top-p.top):t.position.top);if(r){t.size.width=t.size.height*i.aspectRatio}t.position.top=t._helper?p.top:0}t.offset.left=t.parentData.left+t.position.left;t.offset.top=t.parentData.top+t.position.top;var l=Math.abs((t._helper?t.offset.left-e.left:(t.offset.left-e.left))+t.sizeDiff.width),s=Math.abs((t._helper?t.offset.top-e.top:(t.offset.top-p.top))+t.sizeDiff.height);var k=t.containerElement.get(0)==t.element.parent().get(0),j=/relative|absolute/.test(t.containerElement.css("position"));if(k&&j){l-=t.parentData.left}if(l+t.size.width>=t.parentData.width){t.size.width=t.parentData.width-l;if(r){t.size.height=t.size.width/t.aspectRatio}}if(s+t.size.height>=t.parentData.height){t.size.height=t.parentData.height-s;if(r){t.size.width=t.size.height*t.aspectRatio}}},stop:function(f,n){var q=c(this).data("resizable"),g=q.options,l=q.position,m=q.containerOffset,e=q.containerPosition,i=q.containerElement;var j=c(q.helper),r=j.offset(),p=j.outerWidth()-q.sizeDiff.width,k=j.outerHeight()-q.sizeDiff.height;if(q._helper&&!g.animate&&(/relative/).test(i.css("position"))){c(this).css({left:r.left-e.left-m.left,width:p,height:k})}if(q._helper&&!g.animate&&(/static/).test(i.css("position"))){c(this).css({left:r.left-e.left-m.left,width:p,height:k})}}});c.ui.plugin.add("resizable","ghost",{start:function(g,h){var e=c(this).data("resizable"),i=e.options,f=e.size;e.ghost=e.originalElement.clone();e.ghost.css({opacity:0.25,display:"block",position:"relative",height:f.height,width:f.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof i.ghost=="string"?i.ghost:"");e.ghost.appendTo(e.helper)},resize:function(f,g){var e=c(this).data("resizable"),h=e.options;if(e.ghost){e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})}},stop:function(f,g){var e=c(this).data("resizable"),h=e.options;if(e.ghost&&e.helper){e.helper.get(0).removeChild(e.ghost.get(0))}}});c.ui.plugin.add("resizable","grid",{resize:function(e,m){var p=c(this).data("resizable"),h=p.options,k=p.size,i=p.originalSize,j=p.originalPosition,n=p.axis,l=h._aspectRatio||e.shiftKey;h.grid=typeof h.grid=="number"?[h.grid,h.grid]:h.grid;var g=Math.round((k.width-i.width)/(h.grid[0]||1))*(h.grid[0]||1),f=Math.round((k.height-i.height)/(h.grid[1]||1))*(h.grid[1]||1);if(/^(se|s|e)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f}else{if(/^(ne)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f;p.position.top=j.top-f}else{if(/^(sw)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f;p.position.left=j.left-g}else{p.size.width=i.width+g;p.size.height=i.height+f;p.position.top=j.top-f;p.position.left=j.left-g}}}}});var b=function(e){return parseInt(e,10)||0};var a=function(e){return !isNaN(parseInt(e,10))}})(jQuery);/*! - * jQuery hashchange event - v1.3 - 7/21/2010 - * http://benalman.com/projects/jquery-hashchange-plugin/ - * - * Copyright (c) 2010 "Cowboy" Ben Alman - * Dual licensed under the MIT and GPL licenses. - * http://benalman.com/about/license/ - */ -(function($,e,b){var c="hashchange",h=document,f,g=$.event.special,i=h.documentMode,d="on"+c in e&&(i===b||i>7);function a(j){j=j||location.href;return"#"+j.replace(/^[^#]*#?(.*)$/,"$1")}$.fn[c]=function(j){return j?this.bind(c,j):this.trigger(c)};$.fn[c].delay=50;g[c]=$.extend(g[c],{setup:function(){if(d){return false}$(f.start)},teardown:function(){if(d){return false}$(f.stop)}});f=(function(){var j={},p,m=a(),k=function(q){return q},l=k,o=k;j.start=function(){p||n()};j.stop=function(){p&&clearTimeout(p);p=b};function n(){var r=a(),q=o(m);if(r!==m){l(m=r,q);$(e).trigger(c)}else{if(q!==m){location.href=location.href.replace(/#.*/,"")+q}}p=setTimeout(n,$.fn[c].delay)}$.browser.msie&&!d&&(function(){var q,r;j.start=function(){if(!q){r=$.fn[c].src;r=r&&r+a();q=$(' -
    +
    Todo List
    -
    Member MQTTClient::publish (const char *topic, const char *message)
    -
    implement QoS > 0 and PUBACK response checking
    -
    Member Si443x::getPacketLength (bool update=true) override
    -
    variable length mode
    -
    Member Si443x::setDataShaping (uint8_t sh) override
    -
    implement fiter configuration - docs claim this should be possible, but seems undocumented
    -
    Member Si443x::setEncoding (uint8_t encoding) override
    -
    - add inverted Manchester?
    -
    Member Si443x::setRxBandwidth (float rxBw)
    -
    float tolerance equality as macro?
    -
    Member Si443x::startTransmit (uint8_t *data, size_t len, uint8_t addr=0) override
    -

    variable packet length

    -

    use header as address field?

    +
    Member MQTTClient::publish (const char *topic, const char *message)
    +
    implement QoS > 0 and PUBACK response checking
    +
    Member Si443x::getPacketLength (bool update=true) override
    +
    variable length mode
    +
    Member Si443x::setDataShaping (uint8_t sh) override
    +
    implement fiter configuration - docs claim this should be possible, but seems undocumented
    +
    Member Si443x::setEncoding (uint8_t encoding) override
    +
    - add inverted Manchester?
    +
    Member Si443x::setRxBandwidth (float rxBw)
    +
    float tolerance equality as macro?
    +
    Member Si443x::startTransmit (uint8_t *data, size_t len, uint8_t addr=0) override
    +

    variable packet length

    +

    use header as address field?

    -
    Member Si443x::transmitDirect (uint32_t frf=0) override
    -
    integers only
    -
    Member SX1261::setOutputPower (int8_t power)
    -
    power ramp time configuration
    -
    Member SX1262::setOutputPower (int8_t power)
    -
    power ramp time configuration
    -
    Member SX1268::setFrequency (float freq, bool calibrate=true)
    -
    integers only (all modules - frequency, data rate, bandwidth etc.)
    -
    Member SX1268::setOutputPower (int8_t power)
    -
    power ramp time configuration
    -
    Member SX127x::setBitRate (float br)
    -
    fractional part of bit rate setting (not in OOK)
    -
    Member SX1282::SX1282 (Module *mod)
    -
    implement advanced ranging
    -
    Member SX128x::getTimeOnAir (size_t len)
    -
    implement this mess - SX1280 datasheet v3.0 section 7.4.4.2
    -
    Member SX128x::setSyncWord (uint8_t *syncWord, uint8_t len)
    -
    add support for multiple sync words
    +
    Member Si443x::transmitDirect (uint32_t frf=0) override
    +
    integers only
    +
    Member SX1261::setOutputPower (int8_t power)
    +
    power ramp time configuration
    +
    Member SX1262::setOutputPower (int8_t power)
    +
    power ramp time configuration
    +
    Member SX1268::setFrequency (float freq, bool calibrate=true)
    +
    integers only (all modules - frequency, data rate, bandwidth etc.)
    +
    Member SX1268::setOutputPower (int8_t power)
    +
    power ramp time configuration
    +
    Member SX127x::setBitRate (float br)
    +
    fractional part of bit rate setting (not in OOK)
    +
    Member SX1282::SX1282 (Module *mod)
    +
    implement advanced ranging
    +
    Member SX128x::getTimeOnAir (size_t len)
    +
    implement this mess - SX1280 datasheet v3.0 section 7.4.4.2
    +
    Member SX128x::setSyncWord (uint8_t *syncWord, uint8_t len)
    +
    add support for multiple sync words
    +