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 TWIS module #196

Merged
merged 6 commits into from
Aug 25, 2020
Merged

Add TWIS module #196

merged 6 commits into from
Aug 25, 2020

Conversation

kalkyl
Copy link
Contributor

@kalkyl kalkyl commented Aug 3, 2020

Added a HAL module for TWIS (I2C compatible two-wire interface peripheral, formerly referred to as an "I2C slave")

Here's a demo showing read and write operations using interrupts and multiple I2C addresses (ItsyBitsy nRF52840):
https://github.com/kalkyl/nrf-hal/blob/twis/examples/twis-demo/src/main.rs

Also added a TWIM demo that can also be used together with the above TWIS demo, to show the corresponding controller code (nRF52840-DK):
https://github.com/kalkyl/nrf-hal/blob/twis/examples/twim-demo/src/main.rs

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.

Nice!

Maybe we should rename read and write to tx and rx, to clarify the data direction and distinguish them from the TWIM operations?

examples/twis-demo/src/main.rs Outdated Show resolved Hide resolved
nrf-hal-common/src/twis.rs Outdated Show resolved Hide resolved
nrf-hal-common/src/twis.rs Outdated Show resolved Hide resolved
kalkyl and others added 3 commits August 12, 2020 23:02
examples/twim-demo/src/main.rs Outdated Show resolved Hide resolved
examples/twim-demo/src/main.rs Outdated Show resolved Hide resolved
examples/twim-demo/src/main.rs Outdated Show resolved Hide resolved
@jonas-schievink jonas-schievink merged commit 5e98514 into nrf-rs:master Aug 25, 2020
@kalkyl kalkyl deleted the twis branch September 4, 2020 13:38
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.

None yet

3 participants