Skip to content

Commit 4d49de4

Browse files
committed
Add inline
1 parent 65e399f commit 4d49de4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

nrf-hal-common/src/timer.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,37 +148,43 @@ where
148148

149149
/// Returns reference to the `START` task endpoint for PPI.
150150
/// Starts timer.
151+
#[inline(always)]
151152
pub fn task_start(&self) -> &Reg<u32, _TASKS_START> {
152153
&self.0.as_timer0().tasks_start
153154
}
154155

155156
/// Returns reference to the `STOP` task endpoint for PPI.
156157
/// Stops timer.
158+
#[inline(always)]
157159
pub fn task_stop(&self) -> &Reg<u32, _TASKS_STOP> {
158160
&self.0.as_timer0().tasks_stop
159161
}
160162

161163
/// Returns reference to the `COUNT` task endpoint for PPI.
162164
/// Increments timer (counter mode only).
165+
#[inline(always)]
163166
pub fn task_count(&self) -> &Reg<u32, _TASKS_COUNT> {
164167
&self.0.as_timer0().tasks_count
165168
}
166169

167170
/// Returns reference to the `CLEAR` task endpoint for PPI.
168171
/// Clears timer.
172+
#[inline(always)]
169173
pub fn task_clear(&self) -> &Reg<u32, _TASKS_CLEAR> {
170174
&self.0.as_timer0().tasks_clear
171175
}
172176

173177
/// Returns reference to the `CAPTURE` task endpoint for PPI.
174178
/// Captures timer value to the given CC register.
179+
#[inline(always)]
175180
pub fn task_capture(&self, cc: CC) -> &Reg<u32, _TASKS_CAPTURE> {
176181
&self.0.as_timer0().tasks_capture[cc as usize]
177182
}
178183

179184
/// Returns reference to `COMPARE` event endpoint for PPI.
180185
/// Generated when the counter is incremented and then matches the value
181186
/// specified in the given CC register
187+
#[inline(always)]
182188
pub fn event_compare(&self, cc: CC) -> &Reg<u32, _EVENTS_COMPARE> {
183189
&self.0.as_timer0().events_compare[cc as usize]
184190
}

0 commit comments

Comments
 (0)