Lines Matching refs:_num
308 #define MAX32_ADC_INIT(_num) \ argument
309 PINCTRL_DT_INST_DEFINE(_num); \
310 static void max32_adc_irq_init_##_num(void) \
312 IRQ_CONNECT(DT_INST_IRQN(_num), DT_INST_IRQ(_num, priority), adc_max32_isr, \
313 DEVICE_DT_INST_GET(_num), 0); \
314 irq_enable(DT_INST_IRQN(_num)); \
316 static const struct max32_adc_config max32_adc_config_##_num = { \
317 .channel_count = DT_INST_PROP(_num, channel_count), \
318 .regs = (mxc_adc_regs_t *)DT_INST_REG_ADDR(_num), \
319 .pctrl = PINCTRL_DT_INST_DEV_CONFIG_GET(_num), \
320 .clock = DEVICE_DT_GET(DT_INST_CLOCKS_CTLR(_num)), \
321 .clock_divider = DT_INST_PROP_OR(_num, clock_divider, 1), \
322 .track_count = DT_INST_PROP_OR(_num, track_count, 0), \
323 .idle_count = DT_INST_PROP_OR(_num, idle_count, 0), \
324 .perclk.bus = DT_INST_CLOCKS_CELL(_num, offset), \
325 .perclk.bit = DT_INST_CLOCKS_CELL(_num, bit), \
327 DT_INST_PROP_OR(_num, clock_source, ADI_MAX32_PRPH_CLK_SRC_PCLK), \
328 .irq_func = max32_adc_irq_init_##_num, \
330 static struct max32_adc_data max32_adc_data_##_num = { \
331 ADC_CONTEXT_INIT_TIMER(max32_adc_data_##_num, ctx), \
332 ADC_CONTEXT_INIT_LOCK(max32_adc_data_##_num, ctx), \
333 ADC_CONTEXT_INIT_SYNC(max32_adc_data_##_num, ctx), \
334 .resolution = DT_INST_PROP(_num, resolution), \
336 DEVICE_DT_INST_DEFINE(_num, &adc_max32_init, NULL, &max32_adc_data_##_num, \
337 &max32_adc_config_##_num, POST_KERNEL, CONFIG_ADC_INIT_PRIORITY, \