feat(llcc68): make payload limit configurable

Add CONFIG_LLCC68_MAX_PAYLOAD_LENGTH with a default of 128 bytes and a hardware-bounded range of 1..255.

Wire both the C++ and raw C LLCC68 payload buffer constants to the Kconfig value so application builds can tune radio buffer RAM without editing headers.

Rename the fixed-length 100k preset from GMSK to GFSK and expose rx_bandwidth_hz() next to the GfskRxBandwidth enum so applications can report configured bandwidth without carrying driver-specific lookup tables.
This commit is contained in:
2026-05-20 11:57:37 +08:00
parent f8836dd1b1
commit ce56757dac
4 changed files with 63 additions and 3 deletions
+1 -1
View File
@@ -11,7 +11,7 @@
#include <zephyr/drivers/gpio.h>
namespace app::driver::llcc68 {
constexpr size_t MAX_BUFFER_PAYLOAD = 128;
constexpr size_t MAX_BUFFER_PAYLOAD = CONFIG_LLCC68_MAX_PAYLOAD_LENGTH;
constexpr uint32_t TIMEOUT_NONE = 0;
constexpr uint32_t TIMEOUT_INF = 0xffffffff;
+50 -1
View File
@@ -376,6 +376,55 @@ enum class GfskRxBandwidth : uint8_t {
Bw467000 = 0x09,
};
inline uint32_t rx_bandwidth_hz(GfskRxBandwidth bandwidth) {
using enum GfskRxBandwidth;
switch (bandwidth) {
case Bw4800:
return 4800;
case Bw5800:
return 5800;
case Bw7300:
return 7300;
case Bw9700:
return 9700;
case Bw11700:
return 11700;
case Bw14600:
return 14600;
case Bw19500:
return 19500;
case Bw23400:
return 23400;
case Bw29300:
return 29300;
case Bw39000:
return 39000;
case Bw46900:
return 46900;
case Bw58600:
return 58600;
case Bw78200:
return 78200;
case Bw93800:
return 93800;
case Bw117300:
return 117300;
case Bw156200:
return 156200;
case Bw187200:
return 187200;
case Bw234300:
return 234300;
case Bw312000:
return 312000;
case Bw373600:
return 373600;
case Bw467000:
return 467000;
}
return 0;
}
enum class GfskPreambleDetector : uint8_t {
Off = 0x00,
Bits8 = 0x04,
@@ -478,7 +527,7 @@ struct gfsk_parameters_t {
}
static constexpr gfsk_parameters_t
Gmsk100kFixed6(freq_t frequency_mhz = 434.18,
Gfsk100kFixed6(freq_t frequency_mhz = 434.18,
tx_params_t tx_params = tx_params_t::Default()) {
return {
.mod_params =
+1 -1
View File
@@ -6,7 +6,7 @@
#include <zephyr/types.h>
#include <stddef.h>
#define LLCC68_MAX_BUFFER_PAYLOAD 128
#define LLCC68_MAX_BUFFER_PAYLOAD CONFIG_LLCC68_MAX_PAYLOAD_LENGTH
#ifdef __cplusplus
extern "C" {