Skip to content
Commit b1e863e3 authored by Ioannis Karachalios's avatar Ioannis Karachalios Committed by Benjamin Cabé
Browse files

tests: pwm_loopback: Capture disable omission issue



As per the PWM API definition, -EBUSY should be returned
when pwm_enable_capture is called and capturing
is already enabled. This commit deals with adding
a ztest_suite_before_t function that should disable
capturing at the end of a single test. Some tests, though,
such as test_pulse_capture, execute two sub-tests
and so, capturing is disabled in between. In fact, the omission
of pwm_disable_capture should not only result in aborting
a single test, but it can also raise system exception
due to invalid context. This is the case for
z_impl_pwm_capture_cycles where z_pwm_capture_cycles_callback
can be fired whilst the routine has already aborted and so
struct z_pwm_capture_cb_data data, defined within function
declaration, should not longer be valid.

Signed-off-by: default avatarIoannis Karachalios <ioannis.karachalios.px@renesas.com>
parent 007350a9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment