change Monotonic::ratio return type to Fraction

This commit is contained in:
Jorge Aparicio 2019-07-11 13:28:25 +02:00
parent 6a8404ac92
commit a87cb2486f
5 changed files with 41 additions and 17 deletions

View file

@ -8,7 +8,7 @@ use core::{
};
use bare_metal::Nr;
use rtfm::{Monotonic, MultiCore};
use rtfm::{Fraction, Monotonic, MultiCore};
// both cores have the exact same interrupts
pub use Interrupt_0 as Interrupt_1;
@ -24,8 +24,11 @@ pub struct MT;
impl Monotonic for MT {
type Instant = Instant;
fn ratio() -> u32 {
1
fn ratio() -> Fraction {
Fraction {
numerator: 1,
denominator: 1,
}
}
unsafe fn reset() {