Commit graph

122 commits

Author SHA1 Message Date
Matthijs Kooijman
cd138dd6c7 [STM32WLx] Apply PA clamp workaround for HP only
This modifies SX1262::begin and beginFSK to call setOutputPower after
applying the workaround, so that can undo the workaround if needed.
2023-01-10 18:09:55 +01:00
Matthijs Kooijman
9252cf53d3 [STM32WLx] Implement setDio1Action / interrupts
Because this interrupt is not connected to a GPIO or even the EXTI unit,
but directly to the MCU NVIC, the regular attachInterrupt flow cannot be
used.

Instead, this lets STM32WLx override the setDio1Action() and
clearDio1Action() methods to register the radio IRQ directly. Note that
it would have been nicer to implement this by overriding attachInterrupt
in STM32WLx_Module, but that is never called for virtual pins (because
the STM32Duino digitalPinToInterrupt() macro does not work for virtual
pins).

In addition, because the NVIC is level-sensitive and the code expects
edge-sensitive interrupts (for GPIO, the EXTI module in front of the
NVIC makes the interrupts edge-sensitive), this adds some additional
handling around the user-registered interrupt callback. To prevent the
ISR from triggering over and over again (and also to not require SPI
transactions in the ISR to clear the IRQ flags inside the radio), the
interrupt is disabled in the NVIC whenever it is trigered. Then,
whenever the IRQ flags *are* cleared in the radio, the IRQ is enabled in
the NVIC again. This requires making the SX126x::clearIrqStatus() method
virtual so STM32WLx can override it.
2023-01-10 18:09:55 +01:00
Matthijs Kooijman
da6c3f6a6b [SX126x] Allow subclasses to change the TX mode used
This prepares for adding a STM32WLx subclass later.
2023-01-09 10:26:28 +01:00
Matthijs Kooijman
3779faf600 Add setRfSwitchTable() wrapper methods
This gives all radios that use an rfswitch (i.e. have
a setRfSwitchPins() wrapper already) a wrapper method for
setRfSwitchTable() too. This wrapper just calls the same method on
Module, to make it easier for sketches to use it.
2023-01-09 10:26:27 +01:00
Matthijs Kooijman
90b28d7722 Remove duplicated setRfSwitchPins documentation
All radios that support RfSwitch define this method that simply forwards
to the `Module::setRfSwitchPins()` method. Previously, all these methods
duplicated the documentation as well, but this uses the doxygen \copydoc
to remove this duplication.
2023-01-09 09:46:31 +01:00
jgromes
0cd9dd2983 [SX126x] Added note about allowed OCP range (#654) 2023-01-04 10:22:06 +01:00
jgromes
3a34594b5b [SX126x] Fixed incorrect OCP step in documentation (#654) 2023-01-03 20:20:58 +01:00
Matthijs Kooijman
47163f4398 [SX126x] Make begin parameter docs consistent
This:
 - Updates syncWord comments after changing it from uint16_t to uint8_t
   in commit 55aff74a ([SX126x] Changed pin mapping, added reset,
   changed LoRa sync word to 1B).
 - Adds missing useRegulatorLDO comments forgoten in commit ea85a663
   ([SX126x] Pass useRegulatorLDO to SX1262/SX1261/SX1268).
 - Makes useRegulatorLDO comments the same in all places (using the more
   explicit version).
 - Fixes a typo in the doxygen \parma -> \param command.
2022-12-20 23:33:02 +01:00
jgromes
f942ccaec7 [SX126x] Added option to specify custom CAD parameters 2022-11-18 13:39:51 +01:00
jgromes
170ce9752b [SX126x] Skip SPI verification during block calibration (#583) 2022-10-04 18:19:54 +02:00
jgromes
3bdc8963a4 [SX126x] Added post-transaction error checking (#575) 2022-10-01 22:46:17 +02:00
jgromes
0ae6eae4d9 [SX126x] Added finishTransmit 2022-09-18 16:12:53 +02:00
jgromes
da0993a6ed Added RADIOLIB_EXCLUDE_DIRECT_RECEIVE exclusion macro (#557) 2022-08-15 19:19:59 +02:00
jgromes
05a4cf1ef1 [SX126x] Added LR-FHSS registers 2022-06-05 11:15:54 +02:00
jgromes
7f09fc430a [SX126x] Enable timeout to generate IRQ event 2022-04-09 19:58:29 +02:00
Nathan Seidle
bad3029f4f Update SX126x.h 2022-01-28 15:54:44 -07:00
Nathan Seidle
b5e5e079c8 Correct typos in explicit/implicitHeader functions. Add a few missing keywords. 2022-01-25 12:17:01 -07:00
jgromes
cc9d7b7220 [SX126x] Moved SF and BW out of common part 2021-12-20 18:11:52 +01:00
jgromes
f3de4602e6 [SX126x] Fixed known binary receive length 2021-11-21 21:16:58 +01:00
jgromes
6f744a8f13 [SX126x] Update to 5.0.0 2021-11-14 11:41:53 +01:00
jgromes
3a8360c361 [SX126x] Added interrupt-driven CAD 2021-10-28 15:44:44 +02:00
jgromes
caf34534d3 [SX126x] Renamed TRNG method 2021-07-18 10:18:18 +02:00
jgromes
8e340dfc94 [SX126x] Added direct reception dummies 2021-06-14 21:15:06 +02:00
jgromes
4342be8386 [SX126x] Added low-level access macro 2021-03-13 19:57:38 +01:00
Kihun Song
07cc802f9b
Convert arbitrary unit to dBm 2021-02-04 17:02:52 +09:00
Kihun Song
318ac691d0 comments 2021-02-04 14:59:32 +09:00
Kihun Song
0b835f9fcf Added getRSSIInst command for SX126x 2021-02-04 14:27:23 +09:00
jgromes
bb1bb59aff [SX126x] Added option to disable TCXO using SX126x::setTCXO(0) (#99) 2020-09-22 07:49:27 +02:00
jgromes
b40ad5c2f7 [SX126x] Added TRNG support 2020-09-13 17:53:23 +02:00
jgromes
96405b938d [SX126x] Added methods to manually set LoRa LDRO 2020-07-08 18:52:08 +02:00
jgromes
b21f93342e [SX126x] Synced parameters of all LoRa modules 2020-07-06 11:48:25 +02:00
jgromes
c8f4698a26 [SX126x] Synced parameters of all FSK modules 2020-07-06 11:13:37 +02:00
jgromes
5aff492323 [SX126x] Changed shaping datatype to uint8_t 2020-07-06 08:52:48 +02:00
jgromes
b1fa564cd3 [SX126x] Fixed exclusion macros 2020-07-04 21:17:54 +02:00
jgromes
95e7bdb7c6 [SX126x] Added missing override 2020-07-04 14:48:51 +02:00
jgromes
fed86b0742 [SX126x] Fixes from cppcheck scan 2020-07-04 14:32:29 +02:00
jgromes
58ddfb8b51 [SX126x] Reworked driver exclusion 2020-06-30 10:43:41 +02:00
jgromes
d710a85985 [SX126x] Implemented RF switch control (#153) 2020-06-18 16:38:30 +02:00
jgromes
cc90345342 [SX126x] Minor formatting fixes 2020-04-07 13:27:55 +02:00
jgromes
898696fb52 [SX126x] Set default whitener initial value to 0x1FF for SX127x FSK 2020-03-14 13:34:31 +01:00
jgromes
4fa214a0fd [SX126x] Added data encoding method 2020-02-11 14:29:19 +01:00
jgromes
318de480ab Reworked PhysicalLayer to accept frequency step directly 2020-02-07 18:31:51 +01:00
Callan Bryant
81fe2d09f8
[SX126x] Parameter to use LDO in begin()
See 4231edee70
for context.
2020-01-28 14:13:20 +00:00
jgromes
ff97f3957b [SX126x] Added method to get currently configured OCP 2020-01-27 09:30:44 +01:00
jgromes
f316920bab [SX126x] Removed setOptimalHiPowerPaConfig 2020-01-26 15:19:08 +01:00
jgromes
2ef331ed9c [SX126x] Added public methods to set regulator mode 2020-01-26 15:11:41 +01:00
jgromes
d892320637 [SX126x] Added option to set LoRa sync word control bits 2020-01-14 18:08:45 +01:00
Callan Bryant
17e3f47c2f
correct return types 2020-01-13 12:15:58 +00:00
Callan Bryant
e441e101ff
check modem type when header type set 2020-01-13 12:10:04 +00:00
Callan Bryant
c331abb7a9
remove outdated comment 2020-01-10 15:34:33 +00:00