Skip to content

I2S interface #203

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
maxekman opened this issue Apr 16, 2020 · 4 comments
Open

I2S interface #203

maxekman opened this issue Apr 16, 2020 · 4 comments

Comments

@maxekman
Copy link

First some background: I'm planning to use embedded Rust in a sound-oriented project and am currently experimenting with the STM32 F4 Discovery which has an onboard DAC with amp and headphone jack. The DAC connects to the MCU with I2C for control commands (volume etc) and I2S for the audio data. Currently I have just started to implement a embedded-hal driver for the DAC, a Cirrus Logic CS43L22, beginning with setting up the device and I2C control channel. In the end I will use a more capable DAC with 4-8 channels, but it will still use I2S for audio data.

Is there a plan to add a I2S interface in the embedde-hal project yet? If not, how would I go about contributing that to embedded-hal? I have read some guidelines where it says to create a new interface in an external crate before it's stable, any example of that process so far?

The I2S standard uses mostly the same internal components and control registers as a SPI interface, but with a bit more complex clock setup to my understanding.

@ryankurte
Copy link
Contributor

hi, sounds like an interesting project!

Is there a plan to add a I2S interface in the embedded-hal project yet?

As far as I know there is not yet.

I have read some guidelines where it says to create a new interface in an external crate before it's stable, any example of that process so far?

You can either create a new crate with new traits, or fork embedded-hal and add traits (and use cargo patches to test), we've just switched to this approach so don't have a great example of the former yet, though #191 shows the latter.

@eldruin eldruin mentioned this issue Apr 17, 2020
11 tasks
@eldruin
Copy link
Member

eldruin commented Apr 17, 2020

Interesting project. I also have several I2S devices (including a CS4344 :) I could write a driver for but I always focused on other projects.
To start the discussion I have created a PR at #204.

@maxekman
Copy link
Author

Thanks for all the input! I’m fairly new to Rust and will follow along the proposal and contribute what I can to the process.

@eldruin
Copy link
Member

eldruin commented Nov 11, 2022

I published I2S traits in a separate embedded-i2s crate.
I would encourage anybody to continue the discussion over there.
A discussion about integration into embedded-hal would come much later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants