Skip to content

Commit 0d609fb

Browse files
committed
Mark set_buffersize as unsafe
1 parent ed40e41 commit 0d609fb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nrf-hal-common/src/i2s.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,11 +313,11 @@ impl I2S {
313313

314314
/// Sets the size (in 32bit words) of the receive and transmit buffers.
315315
#[inline(always)]
316-
pub fn set_buffersize(&self, n_32bit: u32) -> Result<(), Error> {
316+
pub unsafe fn set_buffersize(&self, n_32bit: u32) -> Result<(), Error> {
317317
if n_32bit > MAX_DMA_MAXCNT {
318318
return Err(Error::BufferTooLong);
319319
}
320-
self.i2s.rxtxd.maxcnt.write(|w| unsafe { w.bits(n_32bit) });
320+
self.i2s.rxtxd.maxcnt.write(|w| w.bits(n_32bit));
321321
Ok(())
322322
}
323323

0 commit comments

Comments
 (0)