@@ -83,6 +83,7 @@ impl NVIC {
83
83
/// `set_pending`.
84
84
///
85
85
/// This method is not available on ARMv6-M chips.
86
+ #[ inline]
86
87
pub fn request < I > ( & mut self , interrupt : I )
87
88
where
88
89
I : Nr ,
@@ -96,6 +97,7 @@ impl NVIC {
96
97
97
98
/// Clears `interrupt`'s pending state
98
99
#[ deprecated( since = "0.5.8" , note = "Use `NVIC::unpend`" ) ]
100
+ #[ inline]
99
101
pub fn clear_pending < I > ( & mut self , interrupt : I )
100
102
where
101
103
I : Nr ,
@@ -104,6 +106,7 @@ impl NVIC {
104
106
}
105
107
106
108
/// Disables `interrupt`
109
+ #[ inline]
107
110
pub fn mask < I > ( interrupt : I )
108
111
where
109
112
I : Nr ,
@@ -116,6 +119,7 @@ impl NVIC {
116
119
/// Enables `interrupt`
117
120
///
118
121
/// This function is `unsafe` because it can break mask-based critical sections
122
+ #[ inline]
119
123
pub unsafe fn unmask < I > ( interrupt : I )
120
124
where
121
125
I : Nr ,
@@ -127,6 +131,7 @@ impl NVIC {
127
131
128
132
/// Disables `interrupt`
129
133
#[ deprecated( since = "0.6.1" , note = "Use `NVIC::mask`" ) ]
134
+ #[ inline]
130
135
pub fn disable < I > ( & mut self , interrupt : I )
131
136
where
132
137
I : Nr ,
@@ -137,6 +142,7 @@ impl NVIC {
137
142
/// **WARNING** This method is a soundness hole in the API; it should actually be an `unsafe`
138
143
/// function. Use `NVIC::unmask` which has the right unsafety.
139
144
#[ deprecated( since = "0.6.1" , note = "Use `NVIC::unmask`" ) ]
145
+ #[ inline]
140
146
pub fn enable < I > ( & mut self , interrupt : I )
141
147
where
142
148
I : Nr ,
@@ -149,6 +155,7 @@ impl NVIC {
149
155
/// *NOTE* NVIC encodes priority in the highest bits of a byte so values like `1` and `2` map
150
156
/// to the same priority. Also for NVIC priorities, a lower value (e.g. `16`) has higher
151
157
/// priority (urgency) than a larger value (e.g. `32`).
158
+ #[ inline]
152
159
pub fn get_priority < I > ( interrupt : I ) -> u8
153
160
where
154
161
I : Nr ,
@@ -171,6 +178,7 @@ impl NVIC {
171
178
172
179
/// Is `interrupt` active or pre-empted and stacked
173
180
#[ cfg( not( armv6m) ) ]
181
+ #[ inline]
174
182
pub fn is_active < I > ( interrupt : I ) -> bool
175
183
where
176
184
I : Nr ,
@@ -183,6 +191,7 @@ impl NVIC {
183
191
}
184
192
185
193
/// Checks if `interrupt` is enabled
194
+ #[ inline]
186
195
pub fn is_enabled < I > ( interrupt : I ) -> bool
187
196
where
188
197
I : Nr ,
@@ -195,6 +204,7 @@ impl NVIC {
195
204
}
196
205
197
206
/// Checks if `interrupt` is pending
207
+ #[ inline]
198
208
pub fn is_pending < I > ( interrupt : I ) -> bool
199
209
where
200
210
I : Nr ,
@@ -207,6 +217,7 @@ impl NVIC {
207
217
}
208
218
209
219
/// Forces `interrupt` into pending state
220
+ #[ inline]
210
221
pub fn pend < I > ( interrupt : I )
211
222
where
212
223
I : Nr ,
@@ -219,6 +230,7 @@ impl NVIC {
219
230
220
231
/// Forces `interrupt` into pending state
221
232
#[ deprecated( since = "0.5.8" , note = "Use `NVIC::pend`" ) ]
233
+ #[ inline]
222
234
pub fn set_pending < I > ( & mut self , interrupt : I )
223
235
where
224
236
I : Nr ,
@@ -238,6 +250,7 @@ impl NVIC {
238
250
///
239
251
/// Changing priority levels can break priority-based critical sections (see
240
252
/// [`register::basepri`](../register/basepri/index.html)) and compromise memory safety.
253
+ #[ inline]
241
254
pub unsafe fn set_priority < I > ( & mut self , interrupt : I , prio : u8 )
242
255
where
243
256
I : Nr ,
@@ -260,6 +273,7 @@ impl NVIC {
260
273
}
261
274
262
275
/// Clears `interrupt`'s pending state
276
+ #[ inline]
263
277
pub fn unpend < I > ( interrupt : I )
264
278
where
265
279
I : Nr ,
@@ -271,6 +285,7 @@ impl NVIC {
271
285
}
272
286
273
287
#[ cfg( armv6m) ]
288
+ #[ inline]
274
289
fn ipr_index < I > ( interrupt : & I ) -> usize
275
290
where
276
291
I : Nr ,
@@ -279,6 +294,7 @@ impl NVIC {
279
294
}
280
295
281
296
#[ cfg( armv6m) ]
297
+ #[ inline]
282
298
fn ipr_shift < I > ( interrupt : & I ) -> usize
283
299
where
284
300
I : Nr ,
0 commit comments