Skip to content

Commit 887cd4e

Browse files
James Munnsjonas-schievink
andauthored
Add suggested inlines
Co-authored-by: Jonas Schievink <[email protected]>
1 parent 4424115 commit 887cd4e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

nrf-hal-common/src/wdt.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ impl Watchdog<Inactive> {
7272
/// the `Watchdog::try_recover()` method.
7373
///
7474
/// If the watchdog has already started, configuration is no longer possible.
75+
#[inline]
7576
pub fn try_new(wdt: WDT) -> Result<Watchdog<Inactive>, WDT> {
7677
let watchdog = Watchdog {
7778
wdt,
@@ -88,6 +89,7 @@ impl Watchdog<Inactive> {
8889
/// Release the peripheral
8990
///
9091
/// Note: The peripheral cannot be released after activation
92+
#[inline]
9193
pub fn release(self) -> WDT {
9294
self.wdt
9395
}
@@ -145,13 +147,15 @@ impl Watchdog<Inactive> {
145147
/// Should the watchdog continue to count during sleep modes?
146148
///
147149
/// This value defaults to ENABLED on reset.
150+
#[inline]
148151
pub fn run_during_sleep(&self, setting: bool) {
149152
self.wdt.config.modify(|_r, w| w.sleep().bit(setting));
150153
}
151154

152155
/// Should the watchdog continue to count when the CPU is halted for debug?
153156
///
154157
/// This value defaults to DISABLED on reset.
158+
#[inline]
155159
pub fn run_during_debug_halt(&self, setting: bool) {
156160
self.wdt.config.modify(|_r, w| w.halt().bit(setting));
157161
}

0 commit comments

Comments
 (0)