samples: counter: alarm: Convert to use new dts macros
Convert DT_RTC_0_NAME to DT_LABEL() references based on which driver is enabled for the platforms the test is supported on (NRF & STM32). Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
parent
30f3121c55
commit
31d5caa0a8
1 changed files with 4 additions and 2 deletions
|
@ -17,8 +17,10 @@ struct counter_alarm_cfg alarm_cfg;
|
|||
|
||||
#if defined(CONFIG_BOARD_ATSAMD20_XPRO)
|
||||
#define TIMER DT_LABEL(DT_NODELABEL(tc4))
|
||||
#else
|
||||
#define TIMER DT_RTC_0_NAME
|
||||
#elif defined(CONFIG_COUNTER_RTC0)
|
||||
#define TIMER DT_LABEL(DT_NODELABEL(rtc0))
|
||||
#elif defined(CONFIG_COUNTER_RTC_STM32)
|
||||
#define TIMER DT_LABEL(DT_INST(0, st_stm32_rtc))
|
||||
#endif
|
||||
|
||||
static void test_counter_interrupt_fn(struct device *counter_dev,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue