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
Reexport aliases #3
Comments
Good catch, missed that! |
On the other hand, does it make sense? Usually What are your thoughts? @andresv |
Maybe something like this makes more sense? /// Alias for instants that come from timers with a specific frequency
pub type TimerInstant<T, const FREQ_HZ: u32> = Instant<T, 1, FREQ_HZ>;
/// Alias for instants that come from timers with a specific frequency (`u32` backing storage)
pub type TimerInstantU32<const FREQ_HZ: u32> = Instant<u32, 1, FREQ_HZ>;
/// Alias for instants that come from timers with a specific frequency (`u64` backing storage)
pub type TimerInstantU64<const FREQ_HZ: u32> = Instant<u64, 1, FREQ_HZ>; |
const TIMER_FREQ_HZ: u32 = 1000;
// looking this first time might take some time to figure out what is going on here
Instant::<u32, 1, 1_000>
// I think this is more clear for a reader
TimerInstant::<u32, TIMER_FREQ_HZ> Of course users can defines these aliases by themselves. Maybe there should be just an example in doc that shows it where it makes sense to define your own aliases. |
Seems to be fixed now. |
Currently I have something like this:
I would prefer:
Actually maybe it makes sense to create aliases also for Instants?
The text was updated successfully, but these errors were encountered: