Commit graph

62 commits

Author SHA1 Message Date
jgromes
2fd2926c9f [PHY] Make frequency step and max packet length public variables 2025-02-15 14:47:45 +01:00
Jan Gromeš
2550fae4cb
[PHY] Staged modes (#1414)
* [PHY] Add PHY support for staged modes

* [SX126x] Add support for staged Rx/Tx

* [PHY] Add missing virtual specifiers

* [SX126x] Add missing overrides

* [LoRaWAN] Use new stageMode and launchMode, reduce scanGuard

* [LoRaWAN] A-synchronize transmissions (#1410)

* [PHY] Pass mode config by reference

* [PHY] Add default implementation of start transmit/receive

* [SX126x] Implement staged modes

* [SX128x] Implement staged modes

* [SX127x] Implement staged modes

* [LR11x0] Implement staged modes

* [SX127x] Remove unused method from header

* [SX126x] Make array const

* Add new methods to keywords

---------

Co-authored-by: StevenCellist <steven@boonstoppel.nu>
2025-02-05 20:41:43 +01:00
jgromes
4564d87721 [PHY] Use less generic modem names (#1294) 2024-10-29 17:14:04 +00:00
StevenCellist
6a5dcc6a6a [PHY] Revert LR-FHSS bw back to uint8_t 2024-10-28 14:26:48 +01:00
StevenCellist
9f04da29af [PHY] Bump LR-FHSS bw member to float 2024-10-28 14:20:09 +01:00
Jan Gromeš
e44e9b4bce
[PHY] Get/Set modem (#1294)
* [PHY] Added set modem method

* Added new keyword

* [SX126x] Added setModem implementation

* [LoRaWAN] Use setModem

* [PHY] Added getModem

* [LoRaWAN] Use getModem instead of caching modulation

* [SX126x] Implement getModem

* Added new keywords

* [LR11x0] Added get/set modem

* [LLCC68] Added get/set modem

* [SX126x] Added missing default branch

* [SX127x] Added get/set modem

* [SX128x] Added get/set modem

* [CI] Drop Hellschreiber from AVR builds

* [CI] Drop Arduino Uno from CI
2024-10-26 17:49:35 +02:00
jgromes
1f11cd1dd5 [LR1110] Added configurable LR-FHSS grid spacing 2024-10-06 10:13:56 +02:00
jgromes
aadfd0c48c [PHY] Added LR-FHSS DataRate_t 2024-09-10 19:19:22 +02:00
jgromes
c4a129ed74 [PHY] Pass scan config by reference 2024-09-10 19:18:56 +02:00
GUVWAF
eda4ec22ae
[SX126x][SX128x][LR11x0] Don't report CRC mismatch if valid header received (#1203)
* Enable `HEADER_VALID` IRQ flags by default for receiving

* [SX126x] Don't report CRC mismatch if valid header received

* [SX128x] Don't report CRC mismatch if valid header received

* [LR11x0] Don't report CRC mismatch if valid header received
2024-09-01 20:48:17 +02:00
Jan Gromeš
bc801c7004
[PHY] Channel scan configuration (#1190)
* [PHY] Added channel scan configuration

* [LR11x0] Added channel scan configuration

* [SX126x] Added channel scan configuration

* [SX128x] Added channel scan configuration

* Use microsecond timeout

* [PHY] Added generalized IRQ handling via PHY

* [LR11x0] Added generalized IRQ handling via PHY

* [SX126x] Added generalized IRQ handling via PHY

* [SX127x] Added generalized IRQ handling via PHY

* [SX128x] Added generalized IRQ handling via PHY

* Added missing typedef

* [PHY] Fix IRQ method argument type

* [SX128x] Fix non-trivial initializer usage

* [LR11x0] Added missing override specifiers

* [SX126x] Added missing override specifiers

* [SX127x] Added missing override specifiers

* [SX128x] Added missing override specifiers

* [PHY] Added missing IRQ map initializer

* [CI] Drop APRS builds on AVR

* [CI] Drop Morse builds for AVR

* [PHY] Rework generic IRQ to allow multiple flags

* [LR11x0] Rework generic IRQ to allow multiple flags

* [SX126x] Rework generic IRQ to allow multiple flags

* [SX127x] Rework generic IRQ to allow multiple flags

* [SX128x] Rework generic IRQ to allow multiple flags

* [LoRaWAN] Use generic IRQ

* Add missing typedef

* [SX127x] Make Rx mode implicit based on timeout

* [SX127x] Fixed shadowed variable

* [LR11x0] Fix missing initializers

* [SX127x] Added default startReceive arguments

* [LR11x0] Pass scan config by const reference

* [SX126x] Pass scan config by const reference

* [SX128x] Pass scan config by const reference

* [PHY] Pass scan config by const reference

* [SX127x] Add missing IRQ conversion

* [SX126x] Fixed default CAD scan config IRQ

* [LR11x0] Fixed default CAD scan config IRQ

* [LR11x0] Fix comments referencing DIO1
2024-09-01 18:19:07 +02:00
StevenCellist
0bc0e3d9c8 [PHY, modules, LoRaWAN] Integrate feedback 2024-08-17 22:03:48 +02:00
StevenCellist
19ec9da281 [PHY] Generalize IRQ checks 2024-08-16 00:03:55 +02:00
jgromes
fffb1fae9f [PHY] Make transmit data const (#1156) 2024-07-13 16:42:46 +01:00
jgromes
99bb025173 [PHY] Added missing zero inits 2024-05-26 09:07:07 +02:00
jgromes
90eca88859 [LoRaWAN] Use 32-bit IRQ flags 2024-05-08 14:51:43 +02:00
StevenCellist
1b2b8bd67b
[LoRaWAN] Improve PHY behaviour, update beginABP, bugfixes (#1080)
* [LoRaWAN] Add getter for ToA, prevent MAC queue overflow

* [LoRaWAN] Permute arguments to beginABP

* Implement & split off checkOutputPower

* [LoRaWAN] Configure physical layer on each up/downlink

* [LoRaWAN] Remove unnecessary dynamic array

* [LoRaWAN] Improve downlink handling

* Resolve return-warnings in checkOutputPower()

* [LoRaWAN] Improve buffer definition

* [LoRaWAN] Prevent requesting repeated MAC commands

* Update keywords.txt

* [CC1101] Resolve unused variable warning

* [CC1101] Update checkOutputPower

* [SX1278] Fix variable assignment

* Update keywords.txt

* [CC1101] Added checkOutputPower override for PHY compatibility

* [LR11x0] Added checkOutputPower override for PHY compatibility

* [SX127x] Added checkOutputPower override for PHY compatibility

---------

Co-authored-by: jgromes <jan.gromes@gmail.com>
2024-05-01 13:35:22 +02:00
Elizabeth Myers
205031550b
Use RadioLibTime_t (aka unsigned long) when dealing with millis() and micros() (#1075)
* Use unsigned long when dealing with millis() and micros().

Although sizeof(uint32_t) == sizeof(unsigned long) on Arduino, this is
not the case on 64-bit Linux, where sizeof(unsigned long) ==
sizeof(uint64_t).

Most timestamp arithmetic and comparisons have been left alone, to
reduce code churn. This is fine, as uint32_t is perfectly wide to store
most timestamp deltas this library will deal with, and C will promote
the integer rather than do a narrowing conversion. The real problem
arises with narrowing conversions being done by assuming timestamps are
32-bit.

No functional changes intended for platforms where sizeof(uint32_t) ==
sizeof(unsigned long) (so most 8/16/32-bit platforms).

Signed-off-by: Elizabeth Myers <elizabeth.jennifer.myers@gmail.com>

* Change most timestamps to use RadioLibTime_t.

This makes it obvious what is and isn't a timestamp.

Not everything has been converted; anything dealing with protocol and
chip-level timestamps has been left alone on purpose, to make it clear
that these functions do require 32-bit timestamps.

No functional changes intended on platforms where sizeof(uint32_t) ==
sizeof(unsigned long).

Signed-off-by: Elizabeth Myers <elizabeth.jennifer.myers@gmail.com>

* Use uint32_t internally in getTimeOnAir.

We need to not overflow the integers with the shifts and
multiplications, so this is correct behaviour.

Signed-off-by: Elizabeth Myers <elizabeth.jennifer.myers@gmail.com>

---------

Signed-off-by: Elizabeth Myers <elizabeth.jennifer.myers@gmail.com>
2024-04-25 21:50:58 +02:00
Jan Gromeš
e57c9b08ea
[Doxygen] Warnings fixes (#1046)
* [APRS] Fix Doxygen warnings

* [Print] Fix Doxygen warnings

* [CC1101] Fixed doxygen warnings

* [nRF24] Fixed doxygen warnings

* [RF69] Fixed doxygen warnings

* [SX126x] Fixed doxygen warnings

* [SX127x] Fixed doxygen warnings

* [AFSK] Fixed doxygen warnings

* [APRS] Fixed doxygen warnings

* [Bell] Fixed doxygen warnings

* [Ext] Fixed doxygen warnings

* [LoRaWAN] Fixed doxygen warnings

* [PHY] Fixed doxygen warnings

* [Print] Fixed doxygen warnings

* [Mod] Fixed doxygen warnings
2024-04-01 11:11:24 +02:00
jgromes
bce14023f9 [PHY] Fixed godmode not exposing private member (#950) 2024-02-02 16:36:50 +01:00
jgromes
b734e23460 [PHY] Added data rate check method 2024-01-27 18:23:52 +01:00
jgromes
395101ec20 [PHY] Reworked macro configuration system 2023-11-27 21:17:58 +01:00
StevenCellist
82258105b7
[LoRaWAN] Rework bands, official Rx windows, support ADR, confirm frames, improve EEPROM handling, support clock drift (#867)
* [LoRaWAN] rework bands, add ADR, partial MAC support

Known problem: terribly bad at receiving downlinks
Mask-list bands (e.g. US915) untested, likely a few bugs

* [LoRaWAN] Change Rx windows from CAD to RxSingle

* [LoRaWAN] improve persistence, better Rx windows, wear leveling, confirmed frames

* [LoRaWAN] Module-independent (OTAA) Rx windows, fix confirming downlinks

* [LoRaWAN] Implement SX127x support, fix MAC uplinking, support clock drift

* [ArduinoHal] fix clock drift calculation

* [LoRaWAN] Improve band & ADR logic, allow setting ADR, DR, subband, update examples

* [LoRaWAN] Fix EU868 coding rate, improve example

* [LoRaWAN] fix unused channel index

* [LoRaWAN] fix merge issue (deleted line)

* [LoRaWAN] fix CSMA calling now incorrect function

* [LoRaWAN] fix include logic

* [LoRaWAN] fix warnings, remove duplicate function

* [LoRaWAN] improve examples, add unified sendReceive, bugfixes, add FSK

* [LoRaWAN] improve examples

* [LoRaWAN] add new keywords, add debug guard

* [SX127x] Updated startReceive interface to be more in line with SX126x

* [SX127x] Added public method to convert from bytes to symbols

* [LoRaWAN] Update start receive for SX127x

* Added note about LoRaWAN beta

* [SX127x] Fixed potential float overflow

---------

Co-authored-by: jgromes <jan.gromes@gmail.com>
2023-11-12 14:02:39 +01:00
jgromes
7dec9477ae [PHY] Added coding rate to data rate struct 2023-09-12 19:06:30 +02:00
jgromes
58da2a28ac [PHY] Added channel scan methods to common interface 2023-08-12 18:42:37 +02:00
jgromes
532caaa089 [PHY] Added virtual channel scan method 2023-08-06 16:02:24 +02:00
jgromes
8fd0a67a78 Typo fixes 2023-07-15 19:13:16 +02:00
jgromes
91787eb269 [PHY] Implemented more common methods 2023-07-06 11:10:20 +02:00
jgromes
be7dc572a6 [PHY] Added generic actions 2023-06-21 22:02:40 +02:00
jgromes
f513226376 [PHY] Added default start receive 2023-05-28 22:22:00 +02:00
jgromes
f1a8333591 [Bell] Added Bell-compatible modem 2023-04-29 23:01:23 +02:00
jgromes
78a576df12 [PHY] Use compact Doxygen and stop using reserved format 2023-04-23 09:12:47 +02:00
jgromes
8722231ace [PHY] Use compact Doxygen 2023-04-22 19:35:00 +02:00
Mestery
9a68a3c901 use uint32 instead of uint8 for pin type 2023-04-16 21:39:00 +02:00
Mestery
ec3d4eaf20 Improve hardware abstraction layer 2023-04-12 23:16:18 +02:00
Mestery
7b6fd24c8e
fix non arduino build 2023-04-10 09:13:57 +00:00
jgromes
0c15424419 [PHY] Fixed startReceive compatibility (#700) 2023-03-26 22:17:19 +02:00
Davide Lasagna
9c94111e73 add functions to PhysicalLayer interface 2023-03-16 19:35:27 +00:00
jgromes
5ca2c8533c [PHY] Added standby types abstraction 2023-01-14 23:13:27 +01:00
jgromes
02de83f941 [PHY] Made virtual overloads non-pure 2023-01-08 15:10:48 +01:00
jgromes
5327952af5 Added links to interrupt-based wiki page 2022-11-18 17:06:38 +01:00
jgromes
c3d6700e76 [PHY] Added support for interrupt-based timing 2022-11-18 17:04:52 +01:00
jgromes
88f528a789 [PHY] Added method to manually drop synchronization in direct mode 2022-10-19 18:10:45 +02:00
jgromes
972e651f4f [SX126x] Added missing setFrequency implementation for PhysicalLayer 2022-10-01 15:06:09 +02:00
jgromes
1f75ee0cc1 [Pager] Implemented POCSAG (#7) 2022-10-01 14:56:37 +02:00
jgromes
9db64292c4 [PHY] Added finishTransmit 2022-09-18 16:10:54 +02:00
jgromes
da0993a6ed Added RADIOLIB_EXCLUDE_DIRECT_RECEIVE exclusion macro (#557) 2022-08-15 19:19:59 +02:00
obones
e421ab4272 Introduce setDIOMapping on the PhysicalLayer class which, by default, returns "not implemented" 2022-07-07 15:36:25 +02:00
jgromes
907de02a79 [PHY] getMod moved to private and only acessible to friend classes 2022-07-04 15:28:26 +02:00
jgromes
77689e81e0 [PHY] Fixed known binary receive length 2021-11-21 21:16:23 +01:00