Skip to content

Commit

Permalink
Merge pull request tock#4047 from tyler-potyondy/dev/15.4-ack
Browse files Browse the repository at this point in the history
nrf52840: IEEE802154 TX Buf Length Fix
  • Loading branch information
alevy authored Jun 28, 2024
2 parents f31fba2 + 352e43b commit ab884ba
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion chips/nrf52840/src/ieee802154_radio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,13 @@ pub const IEEE802154_ACK_TIME: usize = 512; //microseconds = 32 symbols
pub const IEEE802154_MAX_POLLING_ATTEMPTS: u8 = 4;
pub const IEEE802154_MIN_BE: u8 = 3;
pub const IEEE802154_MAX_BE: u8 = 5;
pub const ACK_BUF_SIZE: usize = 6;

// ACK Requires MHR and MFR fields. More explicitly this is composed of:
// | Frame Control (2 bytes) | Sequence Number (1 byte) | MFR (2 bytes) |.
// In total the ACK frame is 5 bytes long + 2 PSDU bytes (7 bytes total).
const SEQ_NUM_LEN: usize = 1;
pub const ACK_BUF_SIZE: usize =
radio::SPI_HEADER_SIZE + radio::PHR_SIZE + radio::MHR_FC_SIZE + SEQ_NUM_LEN + radio::MFR_SIZE;

/// Where the 15.4 packet from the radio is stored in the buffer. The HIL
/// reserves one byte at the beginning of the buffer for use by the
Expand Down

0 comments on commit ab884ba

Please sign in to comment.