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

Make sure all embedded-hal interfaces can implicitly copy #150

Open
jamesmunns opened this issue May 25, 2020 · 5 comments
Open

Make sure all embedded-hal interfaces can implicitly copy #150

jamesmunns opened this issue May 25, 2020 · 5 comments
Assignees

Comments

@jamesmunns
Copy link
Member

For compat reasons, we should support implicit copy (if the user passes in a slice from .text) of chunks on all interfaces. We currently do this for UARTE, but not for SPIM/TWIM.

@jamesmunns jamesmunns self-assigned this May 25, 2020
@kalkyl
Copy link
Contributor

kalkyl commented Jun 23, 2020

Instead of returning Error::DMABufferNotInDataMemory?

@Yatekii
Copy link
Contributor

Yatekii commented Jun 23, 2020

I think the majority vote was in favor of returning an Error on the main interface but providing a call which does implicit copy if you ask it to.
But the interfaces should all have the same behavior/look :)

@jamesmunns
Copy link
Member Author

The goal was:

  1. When using embedded-hal traits, implicitly copy if necessary (when we would otherwise return DMABufferNotInDataMemory)
  2. When using nrf-hal direct interfaces, do not implicitly copy, instead return the error

This is because some (non nrf specific) drivers send constant strings, which will end up in .text.

@kalkyl
Copy link
Contributor

kalkyl commented Jun 24, 2020

Oups, i messed up my first PR and accidently pushed the wrong branch, still getting used to the workflow of contributing, haha! Anyways, i now submitted the one i was supposted to (PR #164) for spim transfer :)

@kalkyl
Copy link
Contributor

kalkyl commented Jun 24, 2020

Added Twim write/write_read aswell and made a new PR #165 with both Spim and Twim instead, sorry for the PR mess, i'm new here... :)

(Not sure why the githud build failed (##[error]Process completed with exit code 1), is that a common issue or is it me? It builds just fine on my machine...)

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

No branches or pull requests

3 participants