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

Allow custom board implementations for sx1261/2 and sx1276/7/8/9 #16

Merged
merged 3 commits into from
Jun 1, 2023

Conversation

ceekdee
Copy link
Collaborator

@ceekdee ceekdee commented May 25, 2023

Add custom board and chip types to allow users to implement external RadioKind and InterfaceVariant traits for a custom (perhaps proprietary) sx1261/2-based or sx1276/7/8/9-based LoRa board. Use those implementations underneath the standard LoRa API. For example:

  • let iv = ExternalInterfaceVariantImpl::new(...params...)
  • LoRa::new(ExternalRadioKindImpl::new(BoardType::CustomSx1261_2, spi, iv), ...other_params...)

This PR partially addresses Issue #13.

Complete freedom to use a LoRa chip unknown to lora-phy will require a new major release, since the implementations of modulation and packet parameter creation contain logic specific to the radio kind, but is not currently implemented within the RadioKind trait. An update to the RadioKind trait will necessitate a new major release.

@ceekdee ceekdee requested a review from jbeaurivage May 25, 2023 02:48
@ceekdee ceekdee added the ?.x.? release Non-breaking enhancement release label May 25, 2023
@ceekdee ceekdee self-assigned this May 25, 2023
@ceekdee
Copy link
Collaborator Author

ceekdee commented May 25, 2023

Please let me merge this PR myself, once we agree on the solution. I need to consider the order of releases to crates.io.

@ceekdee ceekdee mentioned this pull request Jun 1, 2023
@ceekdee ceekdee removed the request for review from jbeaurivage June 1, 2023 14:25
@ceekdee ceekdee merged commit e15d28f into embassy-rs:main Jun 1, 2023
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
?.x.? release Non-breaking enhancement release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant