Commit 31d5caa0 authored by Kumar Gala's avatar Kumar Gala Committed by Ioannis Glaropoulos
Browse files

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: default avatarKumar Gala <kumar.gala@linaro.org>
parent 30f3121c
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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,