File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
tests/drivers/counter/counter_basic_api/src Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -819,6 +819,9 @@ static void test_late_alarm_instance(const struct device *dev)
819
819
.user_data = NULL
820
820
};
821
821
822
+ /* for timers with very short ticks, counter_ticks_to_us() returns 0 */
823
+ tick_us = MAX (tick_us , 1 );
824
+
822
825
err = counter_set_guard_period (dev , guard ,
823
826
COUNTER_GUARD_PERIOD_LATE_TO_SET );
824
827
zassert_equal (0 , err , "%s: Unexpected error" , dev -> name );
@@ -870,6 +873,9 @@ static void test_late_alarm_error_instance(const struct device *dev)
870
873
.user_data = NULL
871
874
};
872
875
876
+ /* for timers with very short ticks, counter_ticks_to_us() returns 0 */
877
+ tick_us = MAX (tick_us , 1 );
878
+
873
879
err = counter_set_guard_period (dev , guard ,
874
880
COUNTER_GUARD_PERIOD_LATE_TO_SET );
875
881
zassert_equal (0 , err , "%s: Unexpected error" , dev -> name );
You can’t perform that action at this time.
0 commit comments