@@ -56,14 +56,14 @@ bitfield! {
56
56
#[ repr( C ) ]
57
57
#[ derive( Copy , Clone ) ]
58
58
pub struct Ctrl ( u32 ) ;
59
- get_cyccntena , set_cyccntena: 0 ;
60
- get_pcsamplena , set_pcsamplena: 12 ;
61
- get_exctrcena , set_exctrcena: 16 ;
62
- get_noprfcnt , _: 24 ;
63
- get_nocyccnt , _: 25 ;
64
- get_noexttrig , _: 26 ;
65
- get_notrcpkt , _: 27 ;
66
- u8 , get_numcomp , _: 31 , 28 ;
59
+ cyccntena , set_cyccntena: 0 ;
60
+ pcsamplena , set_pcsamplena: 12 ;
61
+ exctrcena , set_exctrcena: 16 ;
62
+ noprfcnt , _: 24 ;
63
+ nocyccnt , _: 25 ;
64
+ noexttrig , _: 26 ;
65
+ notrcpkt , _: 27 ;
66
+ u8 , numcomp , _: 31 , 28 ;
67
67
}
68
68
69
69
/// Comparator
@@ -83,11 +83,11 @@ bitfield! {
83
83
#[ derive( Copy , Clone ) ]
84
84
/// Comparator FUNCTIONn register.
85
85
pub struct Function ( u32 ) ;
86
- u8 , get_function , set_function: 3 , 0 ;
87
- get_emitrange , set_emitrange: 5 ;
88
- get_cycmatch , set_cycmatch: 7 ;
89
- get_datavmatch , set_datavmatch: 8 ;
90
- get_matched , _: 24 ;
86
+ u8 , function , set_function: 3 , 0 ;
87
+ emitrange , set_emitrange: 5 ;
88
+ cycmatch , set_cycmatch: 7 ;
89
+ datavmatch , set_datavmatch: 8 ;
90
+ matched , _: 24 ;
91
91
}
92
92
93
93
impl DWT {
@@ -96,35 +96,35 @@ impl DWT {
96
96
/// A value of zero indicates no comparator support.
97
97
#[ inline]
98
98
pub fn num_comp ( & self ) -> u8 {
99
- self . ctrl . read ( ) . get_numcomp ( )
99
+ self . ctrl . read ( ) . numcomp ( )
100
100
}
101
101
102
102
/// Returns `true` if the the implementation supports sampling and exception tracing
103
103
#[ cfg( not( armv6m) ) ]
104
104
#[ inline]
105
105
pub fn has_exception_trace ( & self ) -> bool {
106
- self . ctrl . read ( ) . get_notrcpkt ( ) == false
106
+ self . ctrl . read ( ) . notrcpkt ( ) == false
107
107
}
108
108
109
109
/// Returns `true` if the implementation includes external match signals
110
110
#[ cfg( not( armv6m) ) ]
111
111
#[ inline]
112
112
pub fn has_external_match ( & self ) -> bool {
113
- self . ctrl . read ( ) . get_noexttrig ( ) == false
113
+ self . ctrl . read ( ) . noexttrig ( ) == false
114
114
}
115
115
116
116
/// Returns `true` if the implementation supports a cycle counter
117
117
#[ cfg( not( armv6m) ) ]
118
118
#[ inline]
119
119
pub fn has_cycle_counter ( & self ) -> bool {
120
- self . ctrl . read ( ) . get_nocyccnt ( ) == false
120
+ self . ctrl . read ( ) . nocyccnt ( ) == false
121
121
}
122
122
123
123
/// Returns `true` if the implementation the profiling counters
124
124
#[ cfg( not( armv6m) ) ]
125
125
#[ inline]
126
126
pub fn has_profiling_counter ( & self ) -> bool {
127
- self . ctrl . read ( ) . get_noprfcnt ( ) == false
127
+ self . ctrl . read ( ) . noprfcnt ( ) == false
128
128
}
129
129
130
130
/// Enables the cycle counter
@@ -150,7 +150,7 @@ impl DWT {
150
150
#[ cfg( not( armv6m) ) ]
151
151
#[ inline]
152
152
pub fn cycle_counter_enabled ( & self ) -> bool {
153
- self . ctrl . read ( ) . get_cyccntena ( )
153
+ self . ctrl . read ( ) . cyccntena ( )
154
154
}
155
155
156
156
/// Whether to enable exception tracing
0 commit comments