Lines Matching refs:_num
307 #define TIMER(_num) DT_INST_PARENT(_num) argument
310 #define COUNTER_MAX32_DEFINE(_num) \ argument
311 static struct max32_tmr_ch_data counter##_num##_ch_data[MAX32_TIMER_CH]; \
312 static void max32_tmr_irq_init_##_num(const struct device *dev) \
314 IRQ_CONNECT(DT_IRQN(TIMER(_num)), DT_IRQ(TIMER(_num), priority), \
315 counter_max32_isr, DEVICE_DT_INST_GET(_num), 0); \
316 irq_enable(DT_IRQN(TIMER(_num))); \
318 static const struct max32_tmr_config max32_tmr_config_##_num = { \
321 .max_top_value = WRAP_MXC_IS_32B_TIMER(MAX32_TIM(_num)) \
325 DT_PROP(TIMER(_num), clock_source)) / \
326 DT_PROP(TIMER(_num), prescaler), \
330 .regs = (mxc_tmr_regs_t *)DT_REG_ADDR(TIMER(_num)), \
331 .clock = DEVICE_DT_GET(DT_CLOCKS_CTLR(TIMER(_num))), \
332 .perclk.bus = DT_CLOCKS_CELL(TIMER(_num), offset), \
333 .perclk.bit = DT_CLOCKS_CELL(TIMER(_num), bit), \
334 .clock_source = DT_PROP(TIMER(_num), clock_source), \
335 .prescaler = DT_PROP(TIMER(_num), prescaler), \
336 .irq_func = max32_tmr_irq_init_##_num, \
337 .ch_data = counter##_num##_ch_data, \
338 .wakeup_source = DT_PROP(TIMER(_num), wakeup_source), \
340 static struct max32_tmr_data max32_tmr_data##_num; \
341 DEVICE_DT_INST_DEFINE(_num, &max32_counter_init, NULL, &max32_tmr_data##_num, \
342 &max32_tmr_config_##_num, PRE_KERNEL_1, \