You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Was trying to implement the infrared crate's MultiReceiver (https://docs.rs/infrared/0.13.0/infrared/receiver/struct.MultiReceiver.html) which requires the frequency of the monotonic timer you're using with it. Except there's no way to tell the tick rate/frequency when using rp2040-monotonic: It doesn't provide any constants or functions that would provide that info.
It was suggested by some guy 😁 in the RTIC Matrix chat that the monotonic timer implementation could provide this sort of info:
korken89
You do however have access to the monotonic's type, so if the monotonic implements it you can do MyMono::TICK_RATE
The text was updated successfully, but these errors were encountered:
I think having a little helper function inside impl Rp2040Monotonic that returns the tick rate would be totally fine. Put const TICK_RATE: usize = 1_000_000; at the top of lib.rs and then add something like:
pubfntick_rate() -> usize{TICK_RATE}
...just below new() in impl Rp2040Monotonic. Or alternatively, just put pub const TICK_RATE: usize = 1_000_000; at the top of lib.rs (and use it inside impl Monotonic for Rp2040Monotonic):
Yes if you want to fix it specifically for this monotonic, however what I'm gesturing at is that it is not a portable solution. :)
For it to be portable, either across RTIC's monotonics or fugit, the fix should be there.
Was trying to implement the
infrared
crate's MultiReceiver (https://docs.rs/infrared/0.13.0/infrared/receiver/struct.MultiReceiver.html) which requires the frequency of the monotonic timer you're using with it. Except there's no way to tell the tick rate/frequency when usingrp2040-monotonic
: It doesn't provide any constants or functions that would provide that info.It was suggested by some guy 😁 in the RTIC Matrix chat that the monotonic timer implementation could provide this sort of info:
The text was updated successfully, but these errors were encountered: