Watchdog: Fix timeout constraints

Update the start method to check 0 < timeout <= max_timeout.
pull/10857/head
Filip Jagodzinski 2019-06-30 12:30:37 +02:00 committed by Martin Kojtal
parent a5ad5e04ca
commit a810ef807f
1 changed files with 2 additions and 1 deletions

View File

@ -30,7 +30,8 @@ Watchdog::~Watchdog()
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();
if (_running) {