Skip to content
Permalink
Browse files

drivers: can: mcux_flexcan: Add support for MK64

Add support for Kinetis MK64 series.
Interrupts are adapted because MK64 has other interrupts than KEx1F.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
  • Loading branch information...
alexanderwachter authored and MaureenHelm committed Jun 25, 2019
1 parent b7b9458 commit f5b227641cf12c5685689564ca99ec8c7f6f029c
Showing with 20 additions and 1 deletion.
  1. +20 −1 drivers/can/can_mcux_flexcan.c
@@ -530,11 +530,30 @@ DEVICE_AND_API_INIT(can_mcux_flexcan_0, DT_INST_0_NXP_KINETIS_FLEXCAN_LABEL,

static void mcux_flexcan_config_func_0(struct device *dev)
{
#ifdef DT_INST_0_NXP_KINETIS_FLEXCAN_IRQ_RX_WARNING
IRQ_CONNECT(DT_INST_0_NXP_KINETIS_FLEXCAN_IRQ_RX_WARNING,
DT_INST_0_NXP_KINETIS_FLEXCAN_IRQ_RX_WARNING_PRIORITY,
mcux_flexcan_isr, DEVICE_GET(can_mcux_flexcan_0), 0);
irq_enable(DT_INST_0_NXP_KINETIS_FLEXCAN_IRQ_RX_WARNING);
#endif
#ifdef DT_INST_0_NXP_KINETIS_FLEXCAN_IRQ_TX_WARNING
IRQ_CONNECT(DT_INST_0_NXP_KINETIS_FLEXCAN_IRQ_TX_WARNING,
DT_INST_0_NXP_KINETIS_FLEXCAN_IRQ_TX_WARNING_PRIORITY,
mcux_flexcan_isr, DEVICE_GET(can_mcux_flexcan_0), 0);
irq_enable(DT_INST_0_NXP_KINETIS_FLEXCAN_IRQ_TX_WARNING);
#endif
#ifdef DT_INST_0_NXP_KINETIS_FLEXCAN_IRQ_BUS_OFF
IRQ_CONNECT(DT_INST_0_NXP_KINETIS_FLEXCAN_IRQ_BUS_OFF,
DT_INST_0_NXP_KINETIS_FLEXCAN_IRQ_BUS_OFF_PRIORITY,
mcux_flexcan_isr, DEVICE_GET(can_mcux_flexcan_0), 0);
irq_enable(DT_INST_0_NXP_KINETIS_FLEXCAN_IRQ_BUS_OFF);
#endif
#ifdef DT_INST_0_NXP_KINETIS_FLEXCAN_IRQ_WARNING
IRQ_CONNECT(DT_INST_0_NXP_KINETIS_FLEXCAN_IRQ_WARNING,
DT_INST_0_NXP_KINETIS_FLEXCAN_IRQ_WARNING_PRIORITY,
mcux_flexcan_isr, DEVICE_GET(can_mcux_flexcan_0), 0);
irq_enable(DT_INST_0_NXP_KINETIS_FLEXCAN_IRQ_WARNING);

#endif
IRQ_CONNECT(DT_INST_0_NXP_KINETIS_FLEXCAN_IRQ_ERROR,
DT_INST_0_NXP_KINETIS_FLEXCAN_IRQ_ERROR_PRIORITY,
mcux_flexcan_isr, DEVICE_GET(can_mcux_flexcan_0), 0);

0 comments on commit f5b2276

Please sign in to comment.
You can’t perform that action at this time.