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

Which branch of the library to release #35

Open
lord-ne opened this issue Jun 19, 2022 · 2 comments
Open

Which branch of the library to release #35

lord-ne opened this issue Jun 19, 2022 · 2 comments

Comments

@lord-ne
Copy link

lord-ne commented Jun 19, 2022

Currently, there are three different versions of the delay code in this repository: The version in master (from the karabut branch), the version in rerewrite (my rewrite), and the version in cyacc (the cycle-accurate version by @bombela).

Before we potentially release this crate on crates.io, we need to decide which one of these versions we are going to release, and merge that version into master.

@lord-ne
Copy link
Author

lord-ne commented Jun 19, 2022

My personal opinion is we should release the cyacc implementation, since it guarantees that the delays are known at compile time, which is an important property for ensuring correctness.

I'm a little concerned about the syntax (do we really want the only way to delay on AVR in Rust to involve syntax like delay_ms::<{delay_time}>()?), which is why I introduced the macros PR, but even if that PR isn't accepted I still think it's the best version of the code.

@bombela
Copy link

bombela commented Jun 19, 2022

Example with a number and an expression for the cycle accurate API as is:

delay_ms::<42>();
delay_cycles::<{42 * (CPU_FREQ_HZ as u64) / 1000}>();

The same example wrapped by the macros proposed by @lord-ne:

delay_ms!(42);
delay_cycles!(42 * (CPU_FREQ_HZ as u64) / 1000);

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

2 participants