Skip to content

[embassy-net-nrf91] patch greater rx_data_len size #4098

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
11 changes: 6 additions & 5 deletions embassy-net-nrf91/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ repository = "https://github.com/embassy-rs/embassy"
documentation = "https://docs.embassy.dev/embassy-net-nrf91"

[features]
defmt = [ "dep:defmt", "heapless/defmt-03" ]
log = [ "dep:log" ]
defmt = ["dep:defmt", "heapless/defmt-03"]
log = ["dep:log"]
nrf9151 = []

[dependencies]
defmt = { version = "0.3", optional = true }
Expand All @@ -21,9 +22,9 @@ nrf-pac = "0.1.0"
cortex-m = "0.7.7"

embassy-time = { version = "0.4.0", path = "../embassy-time" }
embassy-sync = { version = "0.6.2", path = "../embassy-sync"}
embassy-futures = { version = "0.1.0", path = "../embassy-futures"}
embassy-net-driver-channel = { version = "0.3.0", path = "../embassy-net-driver-channel"}
embassy-sync = { version = "0.6.2", path = "../embassy-sync" }
embassy-futures = { version = "0.1.0", path = "../embassy-futures" }
embassy-net-driver-channel = { version = "0.3.0", path = "../embassy-net-driver-channel" }

heapless = "0.8"
embedded-io = "0.6.1"
Expand Down
4 changes: 4 additions & 0 deletions embassy-net-nrf91/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ See the [`examples`](https://github.com/embassy-rs/embassy/tree/main/examples/nr
## Interoperability

This crate can run on any executor.

## Features

By default the nrf91 crate supports NRF9160 and similar. With newer generation of chips use feature `nrf9151` to support the new data sizes.
7 changes: 5 additions & 2 deletions embassy-net-nrf91/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,11 @@ impl StateInner {
self.rx_data_list = desc.data_list_ptr;
let rx_control_len = unsafe { addr_of!((*self.rx_control_list).len).read_volatile() };
let rx_data_len = unsafe { addr_of!((*self.rx_data_list).len).read_volatile() };
assert_eq!(rx_control_len, LIST_LEN);
assert_eq!(rx_data_len, LIST_LEN);
assert_eq!(rx_control_len, LIST_LEN, "control list length mismatch");
#[cfg(feature = "defmt")]
assert_eq!(rx_data_len, 32, "data list length mismatch");
#[cfg(not(feature = "defmt"))]
assert_eq!(rx_data_len, LIST_LEN, "data list length mismatch");
self.init = true;

debug!("IPC initialized OK!");
Expand Down