Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

Define GenerixSx1272 and GenericSx1276 board types #36

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/mod_params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ pub struct PacketStatus {
pub enum BoardType {
CustomBoard,
GenericSx1261, // placeholder for Sx1261-specific features
GenericSx1272,
GenericSx1276,
HeltecWifiLoraV31262,
RpPicoWaveshareSx1262,
Rak4631Sx1262,
Expand All @@ -78,6 +80,7 @@ pub enum ChipType {
CustomChip,
Sx1261,
Sx1262,
Sx1272,
Sx1276,
Sx1277,
Sx1278,
Expand All @@ -89,6 +92,8 @@ impl From<BoardType> for ChipType {
match board_type {
BoardType::CustomBoard => ChipType::CustomChip,
BoardType::GenericSx1261 => ChipType::Sx1261,
BoardType::GenericSx1272 => ChipType::Sx1272,
BoardType::GenericSx1276 => ChipType::Sx1276,
BoardType::HeltecWifiLoraV31262 => ChipType::Sx1262,
BoardType::RpPicoWaveshareSx1262 => ChipType::Sx1262,
BoardType::Rak4631Sx1262 => ChipType::Sx1262,
Expand Down
2 changes: 1 addition & 1 deletion src/sx1261_2/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ where
async fn set_oscillator(&mut self) -> Result<(), RadioError> {
// voltage used to control the TCXO on/off from DIO3
let voltage = match self.board_type {
BoardType::CustomBoard | BoardType::Stm32l0Sx1276 => {
BoardType::CustomBoard | BoardType::GenericSx1272 | BoardType::GenericSx1276 | BoardType::Stm32l0Sx1276 => {
return Err(RadioError::BoardTypeUnsupportedForRadioKind);
}
BoardType::Rak3172Sx1262 => {
Expand Down