Use &mut self for start methods
This commit is contained in:
parent
15a93246d6
commit
6b8ab32536
1 changed files with 6 additions and 3 deletions
|
@ -645,7 +645,8 @@ pub struct OutputStream<'d, T: Instance> {
|
||||||
|
|
||||||
impl<'d, T: Instance> OutputStream<'d, T> {
|
impl<'d, T: Instance> OutputStream<'d, T> {
|
||||||
/// Prepare the initial buffer and start the I2S transfer.
|
/// Prepare the initial buffer and start the I2S transfer.
|
||||||
pub async fn start<S>(&self, buffer: &[S]) -> Result<(), Error>
|
#[allow(unused_mut)]
|
||||||
|
pub async fn start<S>(&mut self, buffer: &[S]) -> Result<(), Error>
|
||||||
where
|
where
|
||||||
S: Sample,
|
S: Sample,
|
||||||
{
|
{
|
||||||
|
@ -694,7 +695,8 @@ pub struct InputStream<'d, T: Instance> {
|
||||||
|
|
||||||
impl<'d, T: Instance> InputStream<'d, T> {
|
impl<'d, T: Instance> InputStream<'d, T> {
|
||||||
/// Prepare the initial buffer and start the I2S transfer.
|
/// Prepare the initial buffer and start the I2S transfer.
|
||||||
pub async fn start<S>(&self, buffer: &mut [S]) -> Result<(), Error>
|
#[allow(unused_mut)]
|
||||||
|
pub async fn start<S>(&mut self, buffer: &mut [S]) -> Result<(), Error>
|
||||||
where
|
where
|
||||||
S: Sample,
|
S: Sample,
|
||||||
{
|
{
|
||||||
|
@ -743,7 +745,8 @@ pub struct FullDuplexStream<'d, T: Instance> {
|
||||||
|
|
||||||
impl<'d, T: Instance> FullDuplexStream<'d, T> {
|
impl<'d, T: Instance> FullDuplexStream<'d, T> {
|
||||||
/// Prepare the initial buffers and start the I2S transfer.
|
/// Prepare the initial buffers and start the I2S transfer.
|
||||||
pub async fn start<S>(&self, buffer_out: &[S], buffer_in: &mut [S]) -> Result<(), Error>
|
#[allow(unused_mut)]
|
||||||
|
pub async fn start<S>(&mut self, buffer_out: &[S], buffer_in: &mut [S]) -> Result<(), Error>
|
||||||
where
|
where
|
||||||
S: Sample,
|
S: Sample,
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue