@@ -33,7 +33,7 @@ use cortex_m::peripheral::{DCB, DWT};
33
33
use crate :: rcc:: Clocks ;
34
34
35
35
/// Bits per second
36
- #[ derive( Clone , Copy , PartialEq , Debug ) ]
36
+ #[ derive( Clone , Copy , PartialEq , PartialOrd , Debug ) ]
37
37
pub struct Bps ( pub u32 ) ;
38
38
39
39
/// Hertz
@@ -52,7 +52,7 @@ pub struct Bps(pub u32);
52
52
///
53
53
/// let freq = 60.hz();
54
54
/// ```
55
- #[ derive( Clone , Copy , PartialEq , Debug ) ]
55
+ #[ derive( Clone , Copy , PartialEq , PartialOrd , Debug ) ]
56
56
pub struct Hertz ( pub u32 ) ;
57
57
58
58
/// Kilohertz
@@ -74,7 +74,7 @@ pub struct Hertz(pub u32);
74
74
///
75
75
/// let freq = 100.khz();
76
76
/// ```
77
- #[ derive( Clone , Copy , PartialEq , Debug ) ]
77
+ #[ derive( Clone , Copy , PartialEq , PartialOrd , Debug ) ]
78
78
pub struct KiloHertz ( pub u32 ) ;
79
79
80
80
/// Megahertz
@@ -95,7 +95,7 @@ pub struct KiloHertz(pub u32);
95
95
///
96
96
/// let freq = 8.mhz();
97
97
/// ```
98
- #[ derive( Clone , Copy , PartialEq , Debug ) ]
98
+ #[ derive( Clone , Copy , PartialEq , PartialOrd , Debug ) ]
99
99
pub struct MegaHertz ( pub u32 ) ;
100
100
101
101
/// Time unit
0 commit comments