1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
//! # API related to LR-FHSS operations
//!
//! This module provides an API for configuring and operating the LR1120 chip for LR-FHSS (Long Range Frequency Hopping Spread Spectrum) modulation.
//! LR-FHSS is a modulation scheme designed for long-range, low-power communication with high interference resistance through frequency hopping.
//! It is particularly useful for regulatory compliance (e.g., FCC) and applications requiring robust communication in noisy environments.
//!
//! ## Quick Start
//!
//! Here's a typical sequence to initialize the chip for LR-FHSS operations:
//!
//! ```rust,no_run
//! use lr1120::radio::PacketType;
//! use lr1120::lrfhss::{LrfhssCr, Grid, Hopping, LrfhssBw};
//!
//! // Set packet type to LR-FHSS
//! lr1120.set_packet_type(PacketType::LrFhss).await.expect("Setting packet type");
//!
//! // Configure syncword (default is 0x2C0F7995)
//! lr1120.set_lrfhss_syncword(0x2C0F7995).await.expect("Setting syncword");
//!
//! // Build LR-FHSS packet with payload
//! let payload = b"Hello, LR-FHSS!";
//! lr1120.lrfhss_build_packet(
//! 1, // Sync header count
//! LrfhssCr::Cr5p6, // Coding rate: 5/6
//! Grid::Grid25, // Frequency grid: 25.39kHz
//! Hopping::HoppingEnabled, // Enable intra-packet hopping
//! LrfhssBw::Bw1523p4, // Bandwidth: 1523.4kHz (FCC use case)
//! 0, // Hop sequence
//! 0, // Device Frequency offset
//! pld // Payload
//! ).await.expect("Building LR-FHSS packet");
//!
//! // Transmit the packet
//! lr1120.set_tx(0).await.expect("Starting transmission");
//! ```
//!
//! ## Available Methods
//!
//! ### Core Configuration
//! - [`lrfhss_build_packet`](Lr1120::lrfhss_build_packet) - Encode payload and configure internal hopping table for LR-FHSS transmission
//! - [`set_lrfhss_syncword`](Lr1120::set_lrfhss_syncword) - Configure LR-FHSS syncword (4 bytes, default: 0x2C0F7995)
use OutputPin;
use SpiBus;
pub use *;
use ;