NRF52 hal_watchdog_init() doesn't fulfil interface
- Dominant language
- C
- Stars
- 891
- Forks
- 381
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 14
Description
Watchdog HAL [documentation, function *hal_watchdog_init()*](https://mynewt.apache.org/latest/os/modules/hal/hal_watchdog/hal_watchdog.html#c.hal_watchdog_init) says it **returns expiration time as positive value**.
However, [nrf52 implementation](https://github.com/apache/mynewt-core/blob/master/hw/mcu/nordic/nrf52xxx/src/hal_watchdog.c#L44) returns always 0.
Is the documentation wrong? the implementation?
// test assertion
assert(hal_watchdog_init(1000) > 0);
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the linked Watchdog HAL documentation and hw/mcu/nordic/nrf52xxx/src/hal_watchdog.c, then compare the documented return contract with the implementation and the assert(hal_watchdog_init(1000) > 0) example. Determine which behavior is intended and make the implementation and documentation agree, with the assertion serving as the completion check.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100