Skip to content

Add i2s usage for writing to the dma buffer. - #6289

Open
DivineGod wants to merge 2 commits into
esp-rs:mainfrom
DivineGod:i2s-write-doc
Open

DivineGod wants to merge 2 commits into
esp-rs:mainfrom
DivineGod:i2s-write-doc

Conversation

@DivineGod

Copy link
Copy Markdown

Thank you for your contribution!

We appreciate the time and effort you've put into this pull request.
To help us review it efficiently, please ensure you've gone through the following checklist:

Submission Checklist 📝

  • I have updated existing examples or added new ones (if applicable).
  • I have used cargo xtask fmt command to ensure that all changed code is formatted correctly.
  • I have added changelog entries and/or migration guide notes in the sections below, or I will ask a maintainer to add the skip-changelog or manual-changelog label as appropriate.
  • My changes are in accordance to the esp-rs developer guidelines

Extra:

Pull Request Details 📖

Description

This is in response to having issues upgrading from 1.1.0 to 1.2.0 #6275 I have added a section to the I2S module level documentation about writing to the I2S DMA Buffer.

Testing

I tested the changes to the documentation by creating a reproduction repository.

There's a branch for esp-hal 1.1.0, esp-hal 1.2.0, and for async esp-hal 1.2.0. All tested on an esp32c6 device.


Changelog

esp-hal

  • Added: Module level documentation for I2S write.

Comment thread esp-hal/src/i2s/master/mod.rs Outdated
//! let mut written = 0;
//! let audio_sample_len = audio_sample.iter().len();
//! while written < audio_sample_len {
//! let out_written = transfer.push_with(|out| {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to have this usage example aligned with the RX example (and show more of the API surface) it would be better to check available_bytes like the RX example does

@DivineGod
DivineGod force-pushed the i2s-write-doc branch 2 times, most recently from 576ce4a to 75350d2 Compare September 15, 2026 00:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants