Skip to content

Commit f0827c4

Browse files
committed
Add 'static lifetime bound to dma buffers
1 parent 22910ee commit f0827c4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

nrf-hal-common/src/i2s.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ impl I2S {
267267
pub fn rx<W, B>(mut self, mut buffer: B) -> Result<Transfer<B>, Error>
268268
where
269269
W: SupportedWordSize,
270-
B: WriteBuffer<Word = W>,
270+
B: WriteBuffer<Word = W> + 'static,
271271
{
272272
let (ptr, len) = unsafe { buffer.write_buffer() };
273273
if ptr as u32 % 4 != 0 {
@@ -300,8 +300,8 @@ impl I2S {
300300
) -> Result<TransferFullDuplex<TxB, RxB>, Error>
301301
where
302302
W: SupportedWordSize,
303-
TxB: ReadBuffer<Word = W>,
304-
RxB: WriteBuffer<Word = W>,
303+
TxB: ReadBuffer<Word = W> + 'static,
304+
RxB: WriteBuffer<Word = W> + 'static,
305305
{
306306
let (rx_ptr, rx_len) = unsafe { rx_buffer.write_buffer() };
307307
let (tx_ptr, tx_len) = unsafe { tx_buffer.read_buffer() };
@@ -345,7 +345,7 @@ impl I2S {
345345
pub fn tx<W, B>(mut self, buffer: B) -> Result<Transfer<B>, Error>
346346
where
347347
W: SupportedWordSize,
348-
B: ReadBuffer<Word = W>,
348+
B: ReadBuffer<Word = W> + 'static,
349349
{
350350
let (ptr, len) = unsafe { buffer.read_buffer() };
351351
if ptr as u32 % 4 != 0 {

0 commit comments

Comments
 (0)