diff options
| author | xoviat <[email protected]> | 2023-07-16 18:07:05 -0500 |
|---|---|---|
| committer | xoviat <[email protected]> | 2023-07-16 18:07:05 -0500 |
| commit | fe1e7c4d7660163457226316ffbf30f6f3c8ddc5 (patch) | |
| tree | 018e91349e8eaa28205f0cade4873ef5a5dd23d3 | |
| parent | 34217ea797c6bbea6219bb2bc2b611a99212e14b (diff) | |
wpan: fix datarequest
| -rw-r--r-- | embassy-stm32-wpan/src/mac/commands.rs | 2 | ||||
| -rw-r--r-- | embassy-stm32-wpan/src/mac/indications.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/embassy-stm32-wpan/src/mac/commands.rs b/embassy-stm32-wpan/src/mac/commands.rs index 8acae24bb..8f6dcbbbc 100644 --- a/embassy-stm32-wpan/src/mac/commands.rs +++ b/embassy-stm32-wpan/src/mac/commands.rs | |||
| @@ -370,7 +370,7 @@ pub struct DataRequest { | |||
| 370 | 370 | ||
| 371 | impl DataRequest { | 371 | impl DataRequest { |
| 372 | pub fn set_buffer<'a>(&'a mut self, buf: &'a [u8]) -> &mut Self { | 372 | pub fn set_buffer<'a>(&'a mut self, buf: &'a [u8]) -> &mut Self { |
| 373 | self.msdu_ptr = &buf as *const _ as *const u8; | 373 | self.msdu_ptr = buf as *const _ as *const u8; |
| 374 | self.msdu_length = buf.len() as u8; | 374 | self.msdu_length = buf.len() as u8; |
| 375 | 375 | ||
| 376 | self | 376 | self |
diff --git a/embassy-stm32-wpan/src/mac/indications.rs b/embassy-stm32-wpan/src/mac/indications.rs index cf795dfa0..98826e662 100644 --- a/embassy-stm32-wpan/src/mac/indications.rs +++ b/embassy-stm32-wpan/src/mac/indications.rs | |||
| @@ -237,7 +237,7 @@ impl ParseableMacEvent for DataIndication {} | |||
| 237 | 237 | ||
| 238 | impl DataIndication { | 238 | impl DataIndication { |
| 239 | pub fn payload<'a>(&'a self) -> &'a [u8] { | 239 | pub fn payload<'a>(&'a self) -> &'a [u8] { |
| 240 | unsafe { slice::from_raw_parts(self.msdu_ptr as *const _ as *const u8, self.msdu_length as usize) } | 240 | unsafe { slice::from_raw_parts(self.msdu_ptr, self.msdu_length as usize) } |
| 241 | } | 241 | } |
| 242 | } | 242 | } |
| 243 | 243 | ||
