Skip to content

Commit 7d09c83

Browse files
AlessandroLuokartben
authored andcommitted
drivers: timer: fix ambiq stimer MIN_DELAY incorrect define
Change to use HAL macro instead of magic number. Signed-off-by: Hao Luo <[email protected]>
1 parent b48cdc4 commit 7d09c83

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/timer/ambiq_stimer.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
#define CYC_PER_TICK (sys_clock_hw_cycles_per_sec() / CONFIG_SYS_CLOCK_TICKS_PER_SEC)
2929
#define MAX_TICKS ((k_ticks_t)(COUNTER_MAX / CYC_PER_TICK) - 1)
3030
#define MAX_CYCLES (MAX_TICKS * CYC_PER_TICK)
31-
#if defined(CONFIG_SOC_SERIES_APOLLO3X) || defined(CONFIG_SOC_SERIES_APOLLO5X)
32-
#define MIN_DELAY 1
31+
#if defined(AM_HAL_STIMER_MIN_DELTA)
32+
#define MIN_DELAY AM_HAL_STIMER_MIN_DELTA
3333
#else
34-
#define MIN_DELAY 4
34+
#define MIN_DELAY 1
3535
#endif
3636

3737
#if defined(CONFIG_SOC_SERIES_APOLLO5X)

0 commit comments

Comments
 (0)