Skip to content
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

Add I2S module #201

Merged
merged 17 commits into from
Aug 28, 2020
Merged

Add I2S module #201

merged 17 commits into from
Aug 28, 2020

Conversation

kalkyl
Copy link
Contributor

@kalkyl kalkyl commented Aug 17, 2020

Added a HAL module for the I2S peripheral

Audio (Morse code) demo for I2S in "controller mode" (formerly referred to as "I2S master"),
transmitting audio signals to a DAC:
https://github.com/kalkyl/nrf-hal/blob/i2s/examples/i2s-controller-demo/src/main.rs
Tested on nRF52840-DK with a UDA1334a DAC

...or connect it to the...

"Peripheral mode" (formerly referred to as "I2S slave") demo,
using an RGB LED (APA102) to display the RMS level of the received I2S audio signal:
https://github.com/kalkyl/nrf-hal/blob/i2s/examples/i2s-peripheral-demo/src/main.rs
Tested on ItsyBitsy nRF52840 with its onboard RGB LED

@eldruin
Copy link

eldruin commented Aug 18, 2020

Cool stuff!
Have you seen the I2S traits proposal at rust-embedded/embedded-hal#204?
It would be interesting to see how they fit for these MCUs.

@kalkyl
Copy link
Contributor Author

kalkyl commented Aug 18, 2020

Cool stuff!
Have you seen the I2S traits proposal at rust-embedded/embedded-hal#204?
It would be interesting to see how they fit for these MCUs.

Nice, i'll have a look!

Copy link
Contributor

@jonas-schievink jonas-schievink left a comment

Choose a reason for hiding this comment

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

Did an initial pass, looks pretty good!

nrf-hal-common/src/i2s.rs Outdated Show resolved Hide resolved
nrf-hal-common/src/i2s.rs Outdated Show resolved Hide resolved
nrf-hal-common/src/i2s.rs Outdated Show resolved Hide resolved
nrf-hal-common/src/i2s.rs Show resolved Hide resolved
nrf-hal-common/src/i2s.rs Outdated Show resolved Hide resolved
nrf-hal-common/src/i2s.rs Outdated Show resolved Hide resolved
nrf-hal-common/src/i2s.rs Outdated Show resolved Hide resolved
nrf-hal-common/src/i2s.rs Outdated Show resolved Hide resolved
@jonas-schievink jonas-schievink merged commit 88bc4ca into nrf-rs:master Aug 28, 2020
@jonas-schievink
Copy link
Contributor

Ah, dang, looks like the i2s-peripheral-demo doesn't build anymore

@kalkyl
Copy link
Contributor Author

kalkyl commented Aug 29, 2020

Ahh, so it doesn’t see it’s ’static...

@kalkyl kalkyl deleted the i2s branch September 4, 2020 13:37
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.

3 participants