Commit graph

1922 commits

Author SHA1 Message Date
jgromes
e920e1bf07 [MOD] Fixed some signed comparison warnings 2023-03-05 19:14:14 +01:00
jgromes
6677b15d93 Bump version to 5.7.0 2023-03-05 18:24:14 +01:00
jgromes
c761e1e7ca Added Platformio badge 2023-03-05 18:20:07 +01:00
jgromes
d1ab3cd9b0 [CI] Removed uncrustify action until dubious ownership error is fixed 2023-03-05 18:16:16 +01:00
jgromes
8392cea011 [SX126x] Added more LBT/scan registers (CI_FORCE_UNCRUST) 2023-03-05 18:08:14 +01:00
jgromes
0c84726f5e Added Platformio library JSON (#690) 2023-03-05 17:52:49 +01:00
jgromes
007d9ac2cb [SX126x] Set SX1262 to accept SX1261 device string (#683) 2023-03-05 16:42:48 +01:00
jgromes
7a8cadc639 [SX126x] Added more verbose calibration result check (#689) 2023-03-05 16:40:45 +01:00
jgromes
721962cacd [SX126x] Fixed bug in getDeviceErrors 2023-03-05 16:39:50 +01:00
jgromes
8bf15941c7 [SX126x] Added option to control XTAL/TCXO via member variable 2023-03-05 16:38:28 +01:00
Jan Gromeš
8174c58250
Merge pull request #684 from GUVWAF/irqFlagsMask
[SX126x/SX128x] Add user-configurable IRQ flags and mask to receive methods
2023-03-05 15:08:13 +01:00
jgromes
25a5f7443c [SX127x] Fixed invalid sync word value in example 2023-03-05 14:57:20 +01:00
Jan Gromeš
50574d6676
Merge pull request #688 from brghena/fix-SX12xx-settings-examples
Fix args to begin() in SX12xx settings examples
2023-03-05 14:56:21 +01:00
jgromes
59b7d7df92 [CI] Workaround for dubious ownership error 2023-03-05 14:44:53 +01:00
jgromes
1b039e501d [CI] Disable uncrustify action 2023-03-04 23:42:11 +01:00
Branden Ghena
7c083e0796 Fix args to begin() in SX12xx settings examples 2023-03-02 22:28:40 -06:00
jgromes
40450e699c Fixed typo 2023-03-02 21:34:36 +01:00
jgromes
3c92219488 [MOD] Fixed print format (#685) 2023-03-01 21:50:40 +01:00
GUVWAF
edc8877adb [SX128x] Add irqFlags and irqMask to startReceive 2023-02-26 13:34:22 +01:00
GUVWAF
f59bf4750c [SX126x] Add irqFlags and irqMask parameters to receive methods 2023-02-26 13:33:30 +01:00
jgromes
00998b5185 [MOD] Fixed incorrect default TCXO voltage 2023-02-25 13:47:54 +01:00
jgromes
32a42ee2c6 [MOD] Fixed format type 2023-02-25 13:28:52 +01:00
jgromes
3596f0f55b [SX126x] Removed WIP FHSS method 2023-02-25 13:25:16 +01:00
jgromes
b014a1f748 [MOD] Improved regdump and hexdump 2023-02-25 13:20:30 +01:00
jgromes
bd258380c8 [SX126x] Implemeted device type string check 2023-02-25 13:16:21 +01:00
jgromes
547a522826 [SX126x] Added undocumented registers 2023-02-25 13:14:11 +01:00
jgromes
2b2dc2925f [PHY] Fixed unused variable warning 2023-02-19 17:14:31 +01:00
jgromes
d8c50ae8ad [MOD] Remove default arguments from implementations 2023-02-19 17:12:05 +01:00
jgromes
02d6062f09 [SX126x] Fixed forgotten SPI write command 2023-02-19 17:11:36 +01:00
jgromes
60bd3d6440 [SX128x] Use Module stream read/write 2023-02-19 17:07:00 +01:00
jgromes
95083e32b1 [SX126x] Use module stream read/write 2023-02-19 17:02:51 +01:00
jgromes
6bf9cebc43 [MOD] Added SPI stream read/write 2023-02-19 16:59:03 +01:00
jgromes
7d286e32bc [SX128x] Use Module SPI stream 2023-02-19 16:23:08 +01:00
jgromes
299e5de3c4 [SX126x] Use Module SPI tream 2023-02-19 16:16:16 +01:00
jgromes
a8d35f7881 [MOD] Use SPI stream for register read/write 2023-02-19 14:22:30 +01:00
jgromes
308ad87320 [MOD] Port 16-bit address from ax5x43 dev 2023-02-19 12:41:49 +01:00
jgromes
e07d1d9dc1 [MOD] Added stream SPI transfer 2023-02-19 12:32:17 +01:00
jgromes
455ce12eed [AFSK] Added SX126x to examples 2023-02-11 14:12:55 +01:00
jgromes
dc050df8d9 [SX126x] Added support for AFSK transmission 2023-02-11 14:11:44 +01:00
Jan Gromeš
526adc7431
Merge pull request #678 from matthijskooijman/remove-constexpr
[MOD] Remove constexpr usage
2023-02-04 15:49:21 +01:00
Matthijs Kooijman
4c712c1f2c [MOD] Remove constexpr usage
This was introduced when STM32WL support was added. Using constexpr for
the END_OF_MODE_TABLE constant allows it to be initialized in the class
declaration, but this needs C++11. This moves the initialization out of
the class declaration to the .cpp file, which does not need constexpr.
It also lets STM32WLx::END_OF_MODE_TABLE define its value directly
(instead of aliasing Module::END_OF_MODE_TABLE) to prevent reduce
runtime overhead (see below).

The downside of this change is that the value of the END_OF_MODE_TABLE
is no longer visible in other compilation units and thus cannot be
inlined into the rfswitch_table (if used).

For example, on STM32, this means that instead of having a pre-cooked
rfswitch_table that lives in the .rodata section (so can be read
directly from flash), the table lives in RAM and is initialized at
runtime (the actual modes and pins are copied from flash to RAM by the
standard startup loop that copies all of the .data section, and the
END_OF_MODE_TABLE value is copied by a bit of new generated code). This
means a little more runtime overhead, but the cost is mostly in RAM size
(80 bytes for the SMT32WL sketches, 16 per mode plus 16 for the
END_OF_MODE_TABLE).

In a first attempt at this commit, STM32WLx::END_OF_MODE_TABLE was still
initialized using the Module::END_OF_MODE_TABLE value, but since the
latter is also not available at compiletime, this meant initialization
of the former also needed to happen at runtime, adding even more code
overhead (and possibly leading to ordering issues as well). To avoid
this, the STM32WLx::END_OF_MODE_TABLE initialization now just duplicates
that of Module::END_OF_MODE_TABLE.

On AVR, the impact is not so much: Since AVR cannot address flash
directly, the table was already copied from flash to RAM at startup, so
the extra RAM usage is just 4 bytes because END_OF_MODE_TABLE is now
also present in RAM, to be copied into rfswitch_table at startup.

Options for avoiding this overhead (not implemented in this commit)
could be (in no particular order):

1. Use a macro instead of a constant. Downside is that these cannot be
   scoped inside the Module/STM32WLx classes like now, so this requires
   changes to sketches that use a rfswitch_table (and reduced scoping
   and using macros adds more opportunity for conflicts and weird
   errors).
2. Apply the change in this commit only when C++11 is not available.
   Downside is that the initialization value of these constants must be
   duplicated in the .h and .cpp file for C++ and older versions
   respectively.
3. Let sketches just use `{Module::MODE_END_OF_TABLE, {}}` explicitly
   instead of `Module::END_OF_MODE_TABLE`. Downside of this is that this
   requires sketches to be modified and that it lets the sketch encode
   more of the table structure, potentially making future API changes
   harder (but it probably does not really matter in practice).
4. Turn END_OF_MODE_TABLE into a static method, which *can* then be
   defined in the class declaration and inlined. The method can then be
   conditionally marked as constexpr, which allows C++11 compilers to
   completely resolve the rfswitch_table value at compiletime, producing
   a binary identical to before this commit. When constexpr is omitted
   (e.g. on older compilers), some runtime overhead is added (pretty
   much the same as the result from this commit).  Downside is that
   sketches must be modified, and the `END_OF_MODE_TABLE` "constant"
   must now be called, e.g.  `END_OF_MODE_TABLE()` which might be a bit
   unexpected syntax.
2023-02-03 12:42:49 +01:00
jgromes
1afa947030 [CI] Temporarily disable uncrustify action 2023-01-29 18:31:01 +01:00
jgromes
773b3e10aa [CI] Another attempt at dubious ownership fix (CI_FORCE_UNCRUST) 2023-01-29 18:28:01 +01:00
jgromes
0c2d40fda7 [CI] Fix dubious ownership error 2023-01-29 18:23:46 +01:00
Jan Gromeš
929b7d7179
Merge pull request #676 from jgromes/uncrustify
Added Uncrustify
2023-01-29 18:12:02 +01:00
Jan Gromeš
1a0daa6eb5
Go back to the original action 2023-01-29 17:37:11 +01:00
Jan Gromeš
ef85c5f476
Merge pull request #674 from andrew-moroz/sx126x-rx-gain-persist
sx126x-rx-gain-persist: add ability to persist Rx gain setting when calling SX126x::setRxBoostedGainMode
2023-01-29 16:53:55 +01:00
Andrew Moroz
5f3fb5fa0d sx126x-rx-gain-persist: add ability to persist Rx gain setting when calling SX126x::setRxBoostedGainMode 2023-01-28 18:09:39 -05:00
jgromes
dc3fb2d303 [CI] Use patched action 2023-01-22 19:55:59 +01:00
jgromes
ec2da7dc3e [CI] Added option to force check CI_FORCE_UNCRUST 2023-01-22 19:45:51 +01:00