Skip to content

Commit d410b2c

Browse files
AlessandroLuokartben
authored andcommitted
samples: counter: alarm: undef redefined TIMER for ambiq
There's duplicated TIMER defined in ambiq hal, need to undef the old one in alarm sample. Signed-off-by: Hao Luo <hluo@ambiq.com>
1 parent d5931ba commit d410b2c

File tree

1 file changed

+3
-0
lines changed
  • samples/drivers/counter/alarm/src

1 file changed

+3
-0
lines changed

samples/drivers/counter/alarm/src/main.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ struct counter_alarm_cfg alarm_cfg;
5050
#elif defined(CONFIG_COUNTER_INFINEON_CAT1)
5151
#define TIMER DT_NODELABEL(counter0_0)
5252
#elif defined(CONFIG_COUNTER_AMBIQ)
53+
#ifdef TIMER
54+
#undef TIMER
55+
#endif
5356
#define TIMER DT_NODELABEL(counter0)
5457
#elif defined(CONFIG_COUNTER_SNPS_DW)
5558
#define TIMER DT_NODELABEL(timer0)

0 commit comments

Comments
 (0)