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

Feature i2 slave r2 #3196

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Conversation

smeenka
Copy link
Contributor

@smeenka smeenka commented Jul 18, 2024

Hereby a proposal for a i2c slave for the stm32.

Goal is to support a slave module with 2 addresses (module address and generic address), which can handle a (limited) burst of transactions from the master (in arbitrary order) in real time.
One can prepare 2 read transactions in embassy context (non real time). The transactions are handled in interrupt context (real-time), and the results are collected in a channel. The transactions can be one by one handled in embassy context, and new transactions can be prepared.
I did choose to make the buffer size NOT generic. Using generics (like generic_array) for the buffer size makes the code (and error messages) extreme complex.

Functionality is tested with tests i2c_master and i2c_slave in the examples/stm32g0 directory.

Note that this branch is a follow up of branch feature-i2c-slave.

# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
@smeenka
Copy link
Contributor Author

smeenka commented Jul 20, 2024

I need some advice how to fix the 3 failing tests..

@smeenka
Copy link
Contributor Author

smeenka commented Aug 6, 2024

Need some help for solving the stm32_metapac::i2c issues. Locally the code does build for stable and nightly. So why not on the build server? Is it possible to remove the $HOME/.cargo/bin/git/checkout/* directory on the build server, then try again?

@okhsunrog okhsunrog mentioned this pull request Aug 7, 2024
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