async fn read_data( src_buf: AsyncCaptureBuffer<'_>, writer: Option<&mut Writer>, period_bytes: usize, ) -> Result<u32, Error>