Lines Matching refs:_num
424 #define MAX32_UART_INIT(_num) \ argument
425 PINCTRL_DT_INST_DEFINE(_num); \
427 (static void uart_max32_irq_init_##_num(const struct device *dev) \
429 IRQ_CONNECT(DT_INST_IRQN(_num), DT_INST_IRQ(_num, priority), \
430 uart_max32_isr, DEVICE_DT_INST_GET(_num), 0); \
431 irq_enable(DT_INST_IRQN(_num)); \
433 static const struct max32_uart_config max32_uart_config_##_num = { \
434 .regs = (mxc_uart_regs_t *)DT_INST_REG_ADDR(_num), \
435 .pctrl = PINCTRL_DT_INST_DEV_CONFIG_GET(_num), \
436 .clock = DEVICE_DT_GET(DT_INST_CLOCKS_CTLR(_num)), \
437 .perclk.bus = DT_INST_CLOCKS_CELL(_num, offset), \
438 .perclk.bit = DT_INST_CLOCKS_CELL(_num, bit), \
440 DT_INST_PROP_OR(_num, clock_source, ADI_MAX32_PRPH_CLK_SRC_PCLK), \
441 .uart_conf.baudrate = DT_INST_PROP_OR(_num, current_speed, 115200), \
442 .uart_conf.parity = DT_INST_ENUM_IDX_OR(_num, parity, UART_CFG_PARITY_NONE), \
443 .uart_conf.data_bits = DT_INST_ENUM_IDX_OR(_num, data_bits, UART_CFG_DATA_BITS_8), \
444 .uart_conf.stop_bits = DT_INST_ENUM_IDX_OR(_num, stop_bits, UART_CFG_STOP_BITS_1), \
446 DT_INST_PROP_OR(_num, hw_flow_control, UART_CFG_FLOW_CTRL_NONE), \
448 (.irq_config_func = uart_max32_irq_init_##_num,))}; \
449 static struct max32_uart_data max32_uart_data##_num = { \
451 DEVICE_DT_INST_DEFINE(_num, uart_max32_init, NULL, &max32_uart_data##_num, \
452 &max32_uart_config_##_num, PRE_KERNEL_1, \