Lines Matching refs:id

72 #define FLEXCAN_ID_TO_ZCAN_ID_STD(id) \  argument
73 ((uint32_t)((((uint32_t)(id)) & CAN_ID_STD_MASK) >> CAN_ID_STD_SHIFT))
74 #define FLEXCAN_ID_TO_ZCAN_ID_EXT(id) \ argument
75 ((uint32_t)((((uint32_t)(id)) & (CAN_ID_STD_MASK | CAN_ID_EXT_MASK)) \
207 dest->id = FLEXCAN_ID_STD(src->id); in mcux_flexcan_copy_zframe_to_frame()
210 dest->id = FLEXCAN_ID_EXT(src->id); in mcux_flexcan_copy_zframe_to_frame()
229 dest->id = FLEXCAN_ID_TO_ZCAN_ID_STD(src->id); in mcux_flexcan_copy_frame_to_zframe()
232 dest->id = FLEXCAN_ID_TO_ZCAN_ID_EXT(src->id); in mcux_flexcan_copy_frame_to_zframe()
255 dest->id = FLEXCAN_ID_STD(src->id); in mcux_flexcan_copy_zfilter_to_mbconfig()
259 dest->id = FLEXCAN_ID_EXT(src->id); in mcux_flexcan_copy_zfilter_to_mbconfig()
774 #define FLEXCAN_IRQ_CODE(id, name) \ argument
776 IRQ_CONNECT(DT_INST_IRQ_BY_NAME(id, name, irq), \
777 DT_INST_IRQ_BY_NAME(id, name, priority), \
779 DEVICE_DT_INST_GET(id), 0); \
780 irq_enable(DT_INST_IRQ_BY_NAME(id, name, irq)); \
783 #define FLEXCAN_IRQ(id, name) \ argument
784 COND_CODE_1(DT_INST_IRQ_HAS_NAME(id, name), \
785 (FLEXCAN_IRQ_CODE(id, name)), ())
787 #define FLEXCAN_DEVICE_INIT_MCUX(id) \ argument
788 static void mcux_flexcan_irq_config_##id(const struct device *dev); \
790 static const struct mcux_flexcan_config mcux_flexcan_config_##id = { \
791 .base = (CAN_Type *)DT_INST_REG_ADDR(id), \
792 .clock_dev = DEVICE_DT_GET(DT_INST_CLOCKS_CTLR(id)), \
794 DT_INST_CLOCKS_CELL(id, name), \
795 .clk_source = DT_INST_PROP(id, clk_source), \
796 .bitrate = DT_INST_PROP(id, bus_speed), \
797 .sjw = DT_INST_PROP(id, sjw), \
798 .prop_seg = DT_INST_PROP_OR(id, prop_seg, 0), \
799 .phase_seg1 = DT_INST_PROP_OR(id, phase_seg1, 0), \
800 .phase_seg2 = DT_INST_PROP_OR(id, phase_seg2, 0), \
801 .sample_point = DT_INST_PROP_OR(id, sample_point, 0), \
802 .irq_config_func = mcux_flexcan_irq_config_##id, \
805 static struct mcux_flexcan_data mcux_flexcan_data_##id; \
807 DEVICE_DT_INST_DEFINE(id, &mcux_flexcan_init, \
808 NULL, &mcux_flexcan_data_##id, \
809 &mcux_flexcan_config_##id, POST_KERNEL, \
813 static void mcux_flexcan_irq_config_##id(const struct device *dev) \
815 FLEXCAN_IRQ(id, rx_warning); \
816 FLEXCAN_IRQ(id, tx_warning); \
817 FLEXCAN_IRQ(id, bus_off); \
818 FLEXCAN_IRQ(id, warning); \
819 FLEXCAN_IRQ(id, error); \
820 FLEXCAN_IRQ(id, wake_up); \
821 FLEXCAN_IRQ(id, mb_0_15); \
822 FLEXCAN_IRQ(id, common); \
829 #define FLEXCAN_DEVICE_SOCKET_CAN(id) \ argument
830 static struct socket_can_context socket_can_context_##id; \
831 static int socket_can_init_##id(const struct device *dev) \
833 const struct device *can_dev = DEVICE_DT_INST_GET(id); \
848 NET_DEVICE_INIT(socket_can_flexcan_##id, SOCKET_CAN_NAME_##id, \
849 socket_can_init_##id, NULL, \
850 &socket_can_context_##id, NULL, \