mirror of https://github.com/ARMmbed/mbed-os.git
Watchdog: Fix timeout constraints
Update the start method to check 0 < timeout <= max_timeout.pull/10857/head
parent
a5ad5e04ca
commit
a810ef807f
|
@ -30,7 +30,8 @@ Watchdog::~Watchdog()
|
||||||
|
|
||||||
bool Watchdog::start(uint32_t timeout)
|
bool Watchdog::start(uint32_t timeout)
|
||||||
{
|
{
|
||||||
MBED_ASSERT(timeout < get_max_timeout());
|
MBED_ASSERT(timeout <= get_max_timeout());
|
||||||
|
MBED_ASSERT(timeout > 0);
|
||||||
|
|
||||||
core_util_critical_section_enter();
|
core_util_critical_section_enter();
|
||||||
if (_running) {
|
if (_running) {
|
||||||
|
|
Loading…
Reference in New Issue