Skip to content

Commit ab9b9ca

Browse files
authored
subghz: Allow custom lora sync word (#383)
* subghz: allow custom lora sync word * LoRaSyncWord: fix linting
1 parent 854fb3b commit ab9b9ca

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

hal/src/subghz/lora_sync_word.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,16 @@ pub enum LoRaSyncWord {
88
Private,
99
/// LoRa public network.
1010
Public,
11+
/// Custom sync word
12+
Custom([u8; 2]),
1113
}
1214

1315
impl LoRaSyncWord {
1416
pub(crate) const fn bytes(self) -> [u8; 2] {
1517
match self {
1618
LoRaSyncWord::Private => [0x14, 0x24],
1719
LoRaSyncWord::Public => [0x34, 0x44],
20+
LoRaSyncWord::Custom(buf) => buf,
1821
}
1922
}
2023
}

0 commit comments

Comments
 (0)