Commit graph

77 commits

Author SHA1 Message Date
jgromes
c420d69193 [Si443x] Use public frequency step and max packet length variables 2025-02-15 14:48:45 +01:00
jgromes
e087449c0b Use configurable line feed for debug output (#1398) 2025-02-11 14:28:31 +01:00
jgromes
8126e6f508 Suppress double promotion warning for debug 2025-01-19 18:29:56 +01:00
jgromes
aaa48ba4d8 [Si443x] Cppcheck fixes 2025-01-18 17:47:54 +01:00
Matej Frančeškin
f3276c2e66 fix implicit conversion from float to double warnings 2025-01-15 16:06:47 +01:00
Pavlo Manovi
6847fcda5c Reconcile implicit double / float promotion with math functions and passed function value types. Also suppress incorrect unused variable warnings when variables are used in logging macros. 2024-08-29 09:30:31 -04:00
jgromes
fffb1fae9f [PHY] Make transmit data const (#1156) 2024-07-13 16:42:46 +01:00
jgromes
2f867153f9 [Si443x] Fixed issues found by cppcheck 2024-05-11 17:15:25 +01:00
jgromes
df9e9ee68c [Si443x] Use 32-bit IRQ flags 2024-05-08 14:52:51 +02:00
jgromes
6fe581aea7 Fix minor format warnings 2024-05-03 20:54:18 +01: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
jgromes
eba32d7dcd [Si443x] Use millis for timeouts 2024-03-29 08:35:08 +01:00
jgromes
4ee17cc168 Debugging rework 2024-03-10 11:07:23 +01:00
jgromes
935c316f7c [Si443x] cleanup 2024-01-12 20:14:18 +01:00
jgromes
d31b4836e1 [Si443x] Cleanup private/protected members 2024-01-12 20:12:45 +01:00
jgromes
77c9b2875d [Si443x] Reworked macro configuration system 2023-11-27 19:40:57 +01:00
jgromes
96f90c8ee0 [Si443x] Fixed debug float print 2023-10-14 10:27:53 +02:00
jgromes
d1e3691c32 Added notes about getPacketLength (#214) 2023-07-15 19:40:07 +02:00
jgromes
8fd0a67a78 Typo fixes 2023-07-15 19:13:16 +02:00
jgromes
46e1af764e [Si443x] Implemented generic IRQ actions 2023-06-21 22:17:48 +02:00
jgromes
bb17b3dff2 [Si443x] Fixed long prints 2023-05-21 18:25:07 +02:00
jgromes
674c37d00b [Si443x] General reformatting 2023-04-23 21:14:01 +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
220b4dad7f
use printf in both build 2023-04-10 09:13:58 +00:00
Mestery
2a45f71384
fix undef digitalread 2023-04-10 09:13:57 +00:00
jgromes
1d92f1d786 [Si443x] Added PHY startReceive (#700) 2023-03-26 22:18:28 +02:00
jgromes
a4df77b76e [Si443x] Added missing standby overload 2023-03-12 15:02:23 +01:00
Matthijs Kooijman
52ec165643 Update radios to use new setRfSwitchState
This removes the compatibility wrapper and applies the following
replacements:

    sed -i 's/setRfSwitchState(LOW, LOW)/setRfSwitchState(Module::MODE_IDLE)/' src/modules/*/*.cpp
    sed -i 's/setRfSwitchState(HIGH, LOW)/setRfSwitchState(Module::MODE_RX)/' src/modules/*/*.cpp
    sed -i 's/setRfSwitchState(LOW, HIGH)/setRfSwitchState(Module::MODE_TX)/' src/modules/*/*.cpp
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
aa8330cf57 [Si443x] Added GFSK with BT 0.5 (#625) 2022-12-04 10:19:42 +01:00
jgromes
733835e9ba [Si443x] Added finishTransmit 2022-09-18 16:14:04 +02:00
jgromes
da0993a6ed Added RADIOLIB_EXCLUDE_DIRECT_RECEIVE exclusion macro (#557) 2022-08-15 19:19:59 +02:00
Arthur B. Grossi
2538af82a9 [Si443x] Fixes getPacketLength
Fixes getPacketLength function to read the correct register when
on fixed packet length mode.
2022-01-31 18:10:41 -03:00
jgromes
19109bc7d8 [Si443x] Added fixed packet length mode 2022-01-23 17:05:58 +01:00
jgromes
1240659d0c [Si443x] Set default FSK bitrate to 4k8 2021-11-27 18:13:35 +01:00
jgromes
c99e79073f [Si443x] Fixed known binary receive length 2021-11-21 21:16:37 +01:00
jgromes
eb9903f183 [Si443x] Update to 5.0.0 2021-11-14 11:42:52 +01:00
jgromes
0e5e4f1673 [Si443x] Fixed rxosr calculation (#199) 2021-07-25 20:50:42 +02:00
jgromes
1e987f8da4 [Si443x] Added antenna switching on GPIO0/1 2021-07-25 20:50:23 +02:00
jgromes
a556024a56 [Si443x] Fixed preamble configuration (#199) 2021-07-25 20:49:47 +02:00
jgromes
33508e4fa7 [Si443x] Added software reset 2021-07-25 20:49:07 +02:00
jgromes
7cabd4cf8a [Si443x] Renamed TRNG method 2021-07-18 10:17:55 +02:00
jgromes
fdfd12fb55 [Si443x] Fixed direct mode modulation (#319) 2021-06-22 20:45:39 +02:00
jgromes
6f44452b62 [Si443x] Added direct mode GPIO config 2021-06-22 18:30:05 +02:00
jgromes
c29e4dbf2b [Si443x] Fixed interrupt config in receive 2021-06-20 13:41:53 +02:00
jgromes
4980846421 [Si443x] Fixed modulation config (#313) 2021-06-20 13:41:36 +02:00
jgromes
0b97620785 [Si443x] Added missing AGC limiter 2021-06-20 13:41:06 +02:00
jgromes
a531c2ed80 [Si443x] Fixed standby (#313) 2021-06-18 22:46:31 +02:00