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

Commit

Permalink
Update README references.
Browse files Browse the repository at this point in the history
  • Loading branch information
ceekdee committed Apr 26, 2023
1 parent c41c37d commit ff0a260
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 21 deletions.
11 changes: 11 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
// List of extensions which should be recommended for users of this workspace.
"recommendations": [
"rust-lang.rust-analyzer",
"tamasfe.even-better-toml",
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": []
}
11 changes: 11 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"editor.formatOnSave": true,
"[toml]": {
"editor.formatOnSave": false
},
"rust-analyzer.check.allTargets": false,
"rust-analyzer.cargo.noDefaultFeatures": true,
"rust-analyzer.cargo.target": "thumbv7em-none-eabi",
"rust-analyzer.showUnlinkedFileNotification": false,
"rust-analyzer.check.command": "clippy"
}
27 changes: 23 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,30 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## v1.0.1 - 2023-04-21
## [Unreleased]

## [v1.0.2] - 2023-mm-dd

### Added
- .vscode settings.

### Changed
- README to reflect merges into the base rust-lorawan and embassy repositories.
- formatting.


## [v1.0.1] - 2023-04-21

### Changed
- Updated the `embedded-hal-async` version.
- `embedded-hal-async` version.
- formatting.

## [v1.0.0] - 2023-04-14

- first release to crates.io.

## v1.0.0 - 2023-04-14

- First release to crates.io
[Unreleased]: https://github.com/embassy-rs/lora-phy/compare/v1.0.2...HEAD
[v1.0.2]: https://github.com/embassy-rs/lora-phy/compare/v1.0.1...v1.0.2
[v1.0.1]: https://github.com/embassy-rs/lora-phy/compare/v1.0.0...v1.0.1
[v1.0.0]: https://github.com/embassy-rs/lora-phy/tree/v1.0.0
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "lora-phy"
version = "1.0.1"
version = "1.0.2"
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/embassy-rs/lora-phy"
Expand Down
18 changes: 8 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@

## Wheretofore?

- while the current examples use the Embassy embedded framework, nrf52840, stm32wl, and stm32l0 MCUs, and Sx127x/Sx126x chips, this crate provides a path forward for other embedded frameworks, MCU types, and LoRa chips in a Rust development environment;
- some links below refer to a fork of Embassy in the <a href="https://github.com/ceekdee">ceekdee GitHub repository</a>; however, the intent is to update Embassy to support this lora-phy crate;
- in order to demonstrate a LoRaWAN capability using the lora-phy crate, one must currently clone the ceekdee versions of rust-lorawan and embassy so that they are all under the same projects folder (that is, relative paths are used in Embassy Cargo.toml files to link to rust-lorawan). This restriction will be removed once the lora-phy crate is more fully tested.
- the original LoRa implementations in Embassy remain available after the update to support this lora-phy crate.
- while the current examples use the Embassy embedded framework, nrf52840, rp pico, stm32l0, and stm32wl MCUs, and Sx127x/Sx126x chips, this crate provides a path forward for other embedded frameworks, MCU types, and LoRa chips in a Rust development environment.

## LoRa physical layer API

Expand All @@ -30,11 +27,12 @@ For users wishing to implement a LoRaWAN or P2P solution, the following implemen

Examples of API usage:

- <a href="https://github.com/ceekdee/embassy/blob/master/examples/stm32wl/src/bin/lora_p2p_send.rs">stm32wl P2P send and sleep</a>;
- <a href="https://github.com/ceekdee/embassy/blob/master/examples/stm32wl/src/bin/lora_lorawan.rs">stm32wl LoRaWAN using rust-lorawan</a>;
- <a href="https://github.com/ceekdee/embassy/blob/master/examples/stm32l0/src/bin/lora_p2p_receive.rs">stm32l0 P2P receive continuous</a>;
- <a href="https://github.com/ceekdee/embassy/blob/master/examples/nrf52840/src/bin/lora_p2p_receive_duty_cycle.rs">nrf52840 duty cycle receive</a>;
- <a href="https://github.com/ceekdee/embassy/blob/master/examples/nrf52840/src/bin/lora_cad.rs">nrf52840 channel activity detection</a>.
- <a href="https://github.com/embassy-rs/embassy/blob/master/examples/stm32wl/src/bin/lora_p2p_send.rs">stm32wl P2P send and sleep</a>;
- <a href="https://github.com/embassy-rs/embassy/blob/master/examples/stm32wl/src/bin/lora_lorawan.rs">stm32wl LoRaWAN using rust-lorawan</a>;
- <a href="https://github.com/embassy-rs/embassy/blob/master/examples/stm32l0/src/bin/lora_p2p_receive.rs">stm32l0 P2P receive continuous</a>;
- <a href="https://github.com/embassy-rs/embassy/blob/master/examples/nrf52840/src/bin/lora_p2p_receive_duty_cycle.rs">nrf52840 duty cycle receive</a>;
- <a href="https://github.com/embassy-rs/embassy/blob/master/examples/nrf52840/src/bin/lora_cad.rs">nrf52840 channel activity detection</a>;
- <a href="https://github.com/embassy-rs/embassy/blob/master/examples/rp/src/bin/lora_p2p_send_multicore.rs">rp pico P2P send and sleep using the second core</a>.

## Embedded framework/MCU support

Expand All @@ -44,7 +42,7 @@ For embedded framework developers wishing to add LoRa support as a feature for o

Example InterfaceVariant implementations:

- <a href="https://github.com/ceekdee/embassy/blob/master/embassy-lora/src/iv.rs">Embassy stm32wl/Sx1262, stm32l0/Sx1276, and nrf52840/Sx1262</a>
- <a href="https://github.com/embassy-rs/embassy/blob/master/embassy-lora/src/iv.rs">Embassy stm32wl/Sx1262, stm32l0/Sx1276, and nrf52840/Sx1262</a>

## LoRa chip support

Expand Down
4 changes: 1 addition & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,7 @@ where
.process_irq(self.radio_mode, self.rx_continuous, None)
.await
{
Ok(()) => {
Ok(())
}
Ok(()) => Ok(()),
Err(err) => {
self.radio_kind.ensure_ready(self.radio_mode).await?;
self.radio_kind.set_standby().await?;
Expand Down
8 changes: 5 additions & 3 deletions src/sx1276_7_8_9/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,8 @@ where
symbol_timeout: u16,
_rx_timeout_in_ms: u32,
) -> Result<(), RadioError> {
if let Some(&_duty_cycle)= duty_cycle_params {
return Err(RadioError::DutyCycleUnsupported)
if let Some(&_duty_cycle) = duty_cycle_params {
return Err(RadioError::DutyCycleUnsupported);
}

self.intf.iv.enable_rf_switch_rx().await?;
Expand Down Expand Up @@ -574,7 +574,9 @@ where
debug!("RxTimeout in radio mode {}", radio_mode);
return Err(RadioError::ReceiveTimeout);
}
} else if radio_mode == RadioMode::ChannelActivityDetection && (irq_flags & IrqMask::CADDone.value()) == IrqMask::CADDone.value() {
} else if radio_mode == RadioMode::ChannelActivityDetection
&& (irq_flags & IrqMask::CADDone.value()) == IrqMask::CADDone.value()
{
debug!("CADDone in radio mode {}", radio_mode);
if cad_activity_detected.is_some() {
*(cad_activity_detected.unwrap()) =
Expand Down

0 comments on commit ff0a260

Please sign in to comment.