mirror of
https://github.com/embassy-rs/embassy.git
synced 2025-09-28 04:40:39 +00:00
fix: unneeded mutability
This commit is contained in:
parent
a901fe2f02
commit
d672dc8626
@ -458,7 +458,7 @@ impl<'d, W: Word> I2S<'d, W> {
|
|||||||
|
|
||||||
/// Write data directly to the raw I2S ringbuffer.
|
/// Write data directly to the raw I2S ringbuffer.
|
||||||
/// This can be used to fill the buffer before starting the DMA transfer.
|
/// This can be used to fill the buffer before starting the DMA transfer.
|
||||||
pub async fn write_immediate(&mut self, data: &mut [W]) -> Result<(usize, usize), Error> {
|
pub async fn write_immediate(&mut self, data: &[W]) -> Result<(usize, usize), Error> {
|
||||||
match &mut self.tx_ring_buffer {
|
match &mut self.tx_ring_buffer {
|
||||||
Some(ring) => Ok(ring.write_immediate(data)?),
|
Some(ring) => Ok(ring.write_immediate(data)?),
|
||||||
_ => return Err(Error::NotATransmitter),
|
_ => return Err(Error::NotATransmitter),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user