testsuite: busy_sim: Add alarm cancelation to stop function

Without cancelation next start may return error.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
Krzysztof Chruściński 2024-05-25 09:27:20 +02:00 committed by Anas Nashif
commit 5bd6050241

View file

@ -166,6 +166,9 @@ void busy_sim_stop(void)
k_work_cancel(&sim_work); k_work_cancel(&sim_work);
} }
err = counter_cancel_channel_alarm(config->counter, 0);
__ASSERT_NO_MSG(err == 0);
err = counter_stop(config->counter); err = counter_stop(config->counter);
__ASSERT_NO_MSG(err == 0); __ASSERT_NO_MSG(err == 0);
} }