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

Commit

Permalink
Clean up readme and drop unneeded BoardTypeUnsupportedForRadioKind error
Browse files Browse the repository at this point in the history
  • Loading branch information
plaes committed Oct 20, 2023
1 parent eb06171 commit 84ea8d0
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
8 changes: 1 addition & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,7 @@ Example RadioKind implementations and ancillary information:

## LoRa board-specific support

LoRa boards use LoRa chip features differently. To suppport these variations within a radio kind implementation, BoardType and ChipType are available:

- <a href="https://github.com/embassy-rs/lora-phy/blob/main/src/mod_params.rs">scroll to BoardType and ChipType</a>.

One can add a LoRa board (the board name includes the chip type in case the board may include a range of chip types) and the ChipType, then modify the radio kind processing to support board-specific features. The ChipType is used for generic checks, alleviating the need to add a new board type check in places where a generic check will do. BoardType checks only need to be implemented where the specificity is board-related. There are examples of each type of check here:

- <a href="https://github.com/embassy-rs/lora-phy/blob/main/src/sx1261_2/mod.rs">search for BoardType and ChipType</a>.
Board-specific configuration can be handled via the chip driver specific Config struct.

## Chat

Expand Down
3 changes: 1 addition & 2 deletions src/mod_params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pub use lora_modulation::{Bandwidth, CodingRate, SpreadingFactor};
/// Errors types reported during LoRa physical layer processing
#[allow(clippy::upper_case_acronyms)]
#[derive(Debug, defmt::Format, PartialEq)]
#[allow(dead_code, missing_docs)]
#[allow(missing_docs)]
pub enum RadioError {
SPI,
NSS,
Expand Down Expand Up @@ -42,7 +42,6 @@ pub enum RadioError {
DutyCycleRxContinuousUnsupported,
CADUnexpected,
RngUnsupported,
BoardTypeUnsupportedForRadioKind,
}

/// Status for a received packet
Expand Down
1 change: 0 additions & 1 deletion src/sx1261_2/radio_kind_params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,6 @@ impl CalibrationParams {
}

#[derive(Clone, Copy)]
#[allow(dead_code)]
pub enum TcxoCtrlVoltage {
Ctrl1V6 = 0x00,
Ctrl1V7 = 0x01,
Expand Down

0 comments on commit 84ea8d0

Please sign in to comment.