-
Notifications
You must be signed in to change notification settings - Fork 211
Draft: I2S HAL implementation (for embedded-hal v1.x) #145
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
Conversation
4bc2048
to
b9ec85e
Compare
13add4e
to
832d610
Compare
I written a message here ? where is it ? i was saying i'm interested by your i2s work. why it doesn't progress anymore ? because the i2s clock abstraction is near impossible to design ? |
@YruamaLairba Not sure where your other messages are, but I did see the email notification a while back. I have unfortunately not had time to work on this lately. I agree that the clock interface is tricky (or near impossible) but have not yet given it much thought. I have only worked on the actual HAL implementation, not the setup code. |
265: Add I2S communication using SPI peripherals r=therealprof a=samcrow # Introduction Welcome to my first large pull request, which adds support for I2S audio communication using supported SPI peripherals. Like the way we support CAN with the bxcan library, I am proposing to support I2S using my [stm32_i2s_v12x](https://crates.io/crates/stm32_i2s_v12x) library. Although stm32_i2s_v12x is in a separate repository, we can also talk about it here. # Notes * The I2S module is available if the `i2s` feature is enabled, in order to not increase compile time for applications that don't use I2S. * All four modes are supported: master transmit, master receive, slave transmit, and slave receive. * Basic support for DMA, interrupts, and error detection is provided. * All STM32F4 models are supported. * I added two examples that run on the STM32F411E-DISCO board and send audio to the on-board DAC. One of them uses DMA. These changes are not perfect, so criticism and suggestions are welcome. # Limitations * No support for full-duplex communication * I have tested master transmit mode fairly thoroughly, but have not tested the other modes. * No support for embedded-hal I2S traits * [The I2S pull request](rust-embedded/embedded-hal#204) is still under review. The proposed traits look compatible with this driver code. Until that pull request gets merged and released, people can still use this driver code directly. # Related work * SAI driver pull request in this repository: #248 * Another, less complete, pull request for I2S in this repository: #212 * also #145 * embedded-hal pull request for I2S traits: rust-embedded/embedded-hal#204 Co-authored-by: Sam Crow <[email protected]> Co-authored-by: Sam Crow <[email protected]>
I'll close this as @samcrow has merged I2S support. Thanks for finishing it! |
This is a WIP and possible reference implementation for the embedded-hal proposal for a I2S interface: rust-embedded/embedded-hal#204
Not ready for review, left here in the open for comments and opinions.
Builds on #144 to be compatible with the HAL proposal https://github.com/eldruin/embedded-hal/tree/i2s, which is based on the master branch of embedded-hal.