Skip to content

Commit b23f8a0

Browse files
[nrf fromlist] drivers: watchdog: wdt_nrfx: use symbol for maximum reload
Replaced magic number with defined symbol for maximum reload value in milliseconds Upstream PR #: 96776 Signed-off-by: Michał Stasiak <[email protected]>
1 parent 5910638 commit b23f8a0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/watchdog/wdt_nrfx.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,10 @@ static int wdt_nrf_install_timeout(const struct device *dev,
121121
* in all nRF chips can use reload values (determining
122122
* the timeout) from range 0xF-0xFFFFFFFF given in 32768 Hz
123123
* clock ticks. This makes the allowed range of 0x1-0x07CFFFFF
124-
* in milliseconds. Check if the provided value is within
125-
* this range.
124+
* in milliseconds, defined using NRF_WDT_RR_VALUE_MS symbol.
125+
* Check if the provided value is within this range.
126126
*/
127-
if ((cfg->window.max == 0U) || (cfg->window.max > 0x07CFFFFF)) {
127+
if ((cfg->window.max == 0U) || (cfg->window.max > NRF_WDT_RR_VALUE_MS)) {
128128
return -EINVAL;
129129
}
130130

0 commit comments

Comments
 (0)