paparazzi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[paparazzi-commits] [5052] Initial commit for lisa CAN bus support.


From: Piotr Esden-Tempski
Subject: [paparazzi-commits] [5052] Initial commit for lisa CAN bus support.
Date: Thu, 15 Jul 2010 17:22:33 +0000

Revision: 5052
          http://svn.sv.gnu.org/viewvc/?view=rev&root=paparazzi&revision=5052
Author:   esden
Date:     2010-07-15 17:22:32 +0000 (Thu, 15 Jul 2010)
Log Message:
-----------
Initial commit for lisa CAN bus support.

Modified Paths:
--------------
    paparazzi3/trunk/conf/autopilot/lisa_test_progs.makefile
    paparazzi3/trunk/sw/airborne/stm32/stm32_vector_table.c

Added Paths:
-----------
    paparazzi3/trunk/sw/airborne/can.c
    paparazzi3/trunk/sw/airborne/can.h
    paparazzi3/trunk/sw/airborne/lisa/test_csc_servo.c
    paparazzi3/trunk/sw/airborne/stm32/can_hw.c
    paparazzi3/trunk/sw/airborne/stm32/can_hw.c.bak
    paparazzi3/trunk/sw/airborne/stm32/can_hw.h

Modified: paparazzi3/trunk/conf/autopilot/lisa_test_progs.makefile
===================================================================
--- paparazzi3/trunk/conf/autopilot/lisa_test_progs.makefile    2010-07-15 
04:30:48 UTC (rev 5051)
+++ paparazzi3/trunk/conf/autopilot/lisa_test_progs.makefile    2010-07-15 
17:22:32 UTC (rev 5052)
@@ -841,3 +841,23 @@
 ptw.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
 ptw.CFLAGS += -DACTUATORS_MKK_DEVICE=i2c1  -DUSE_TIM2_IRQ
 ptw.CFLAGS += -DUSE_I2C1
+
+#
+# test csc servo
+#
+test_csc_servo.ARCHDIR = $(ARCHI)
+test_csc_servo.TARGET = test_csc_servo
+test_csc_servo.TARGETDIR = test_csc_servo
+test_csc_servo.CFLAGS = -I$(SRC_LISA) -I$(ARCHI) -DPERIPHERALS_AUTO_INIT
+test_csc_servo.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
+test_csc_servo.srcs = $(SRC_LISA)/test_csc_servo.c      \
+               $(SRC_ARCH)/stm32_exceptions.c   \
+               $(SRC_ARCH)/stm32_vector_table.c
+test_csc_servo.CFLAGS += -DUSE_LED
+test_csc_servo.srcs += $(SRC_ARCH)/led_hw.c
+test_csc_servo.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=1
+#test_csc_servo.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)'
+test_csc_servo.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./10.)'
+test_csc_servo.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
+test_csc_servo.CFLAGS += -DUSE_CAN1
+test_csc_servo.srcs += can.c $(SRC_ARCH)/can_hw.c

Added: paparazzi3/trunk/sw/airborne/can.c
===================================================================
--- paparazzi3/trunk/sw/airborne/can.c                          (rev 0)
+++ paparazzi3/trunk/sw/airborne/can.c  2010-07-15 17:22:32 UTC (rev 5052)
@@ -0,0 +1,44 @@
+/*
+ * $Id:$
+ *
+ * Copyright (C) 2010 Piotr Esden-Tempski <address@hidden>
+ *
+ * This file is part of paparazzi.
+ *
+ * paparazzi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * paparazzi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with paparazzi; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+
+#include <stdint.h>
+
+#include "can.h"
+#include "can_hw.h"
+
+void can_init(void)
+{
+       can_hw_init();
+}
+
+static inline uint16_t can_id(uint8_t client_id, uint8_t msg_id)
+{
+       return ((client_id & 0xF) << 7) | (msg_id & 0x7F);
+}
+
+int can_transmit(uint8_t client_id, uint8_t msg_id, const uint8_t *buf, 
uint8_t len)
+{
+       uint16_t id = can_id(client_id, msg_id);
+       return can_hw_transmit(id, buf, len);
+}

Added: paparazzi3/trunk/sw/airborne/can.h
===================================================================
--- paparazzi3/trunk/sw/airborne/can.h                          (rev 0)
+++ paparazzi3/trunk/sw/airborne/can.h  2010-07-15 17:22:32 UTC (rev 5052)
@@ -0,0 +1,31 @@
+/*
+ * $Id:$
+ *
+ * Copyright (C) 2010 Piotr Esden-Tempski <address@hidden>
+ *
+ * This file is part of paparazzi.
+ *
+ * paparazzi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * paparazzi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with paparazzi; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+
+#ifndef CAN_H
+#define CAN_H
+
+void can_init(void);
+int can_transmit(uint8_t client_id, uint8_t msg_id, const uint8_t *buf, 
uint8_t len);
+
+#endif /* CAN_H */

Added: paparazzi3/trunk/sw/airborne/lisa/test_csc_servo.c
===================================================================
--- paparazzi3/trunk/sw/airborne/lisa/test_csc_servo.c                          
(rev 0)
+++ paparazzi3/trunk/sw/airborne/lisa/test_csc_servo.c  2010-07-15 17:22:32 UTC 
(rev 5052)
@@ -0,0 +1,66 @@
+/*
+ * $Id:$
+ *
+ * Copyright (C) 2010 Piotr Esden-Tempski <address@hidden>
+ *
+ * This file is part of paparazzi.
+ *
+ * paparazzi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * paparazzi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with paparazzi; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+
+#include "init_hw.h"
+#include "sys_time.h"
+#include "can.h"
+
+static inline void main_init( void );
+static inline void main_periodic_task( void );
+static inline void main_event_task( void );
+
+uint16_t servos[4];
+
+int main(void) {
+  main_init();
+
+  while(1) {
+         if (sys_time_periodic())
+                 main_periodic_task();
+         main_event_task();
+  }
+
+  return 0;
+}
+
+static inline void main_init( void ) {
+       hw_init();
+       sys_time_init();
+       can_init();
+}
+
+static inline void main_periodic_task( void ) {
+
+       can_transmit(1, 0, (uint8_t *)servos, 1);
+
+       LED_TOGGLE(2);
+
+       LED_PERIODIC();
+}
+
+
+
+static inline void main_event_task( void ) {
+
+}

Added: paparazzi3/trunk/sw/airborne/stm32/can_hw.c
===================================================================
--- paparazzi3/trunk/sw/airborne/stm32/can_hw.c                         (rev 0)
+++ paparazzi3/trunk/sw/airborne/stm32/can_hw.c 2010-07-15 17:22:32 UTC (rev 
5052)
@@ -0,0 +1,149 @@
+/*
+ * $Id:$
+ *
+ * Copyright (C) 2010 Piotr Esden-Tempski <address@hidden>
+ *
+ * This file is part of paparazzi.
+ *
+ * paparazzi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * paparazzi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with paparazzi; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+
+#include <stdint.h>
+#include <string.h>
+
+#include "can_hw.h"
+
+#include <stm32/rcc.h>
+#include <stm32/gpio.h>
+#include <stm32/flash.h>
+#include <stm32/misc.h>
+#include <stm32/can.h>
+
+#include "led.h"
+
+#define RCC_APB2Periph_GPIO_CAN RCC_APB2Periph_GPIOA
+#define GPIO_CAN GPIOA
+#define GPIO_Pin_CAN_RX GPIO_Pin_11
+#define GPIO_Pin_CAN_TX GPIO_Pin_12
+
+CanTxMsg can_tx_msg;
+RCC_ClocksTypeDef rcc_clocks;
+
+void can_hw_init(void)
+{
+       GPIO_InitTypeDef gpio;
+       NVIC_InitTypeDef nvic;
+       CAN_InitTypeDef can;
+       CAN_FilterInitTypeDef can_filter;
+
+       /* Enable peripheral clocks */
+       RCC_APB2PeriphClockCmd(RCC_APB2Periph_AFIO |
+                              RCC_APB2Periph_GPIOA, ENABLE);
+       RCC_APB1PeriphClockCmd(RCC_APB1Periph_CAN1, ENABLE);
+       //RCC_APB2PeriphClockCmd(RCC_APB2Periph_AFIO |
+       //                     RCC_APB2Periph_GPIO_CAN, ENABLE);
+       //RCC_APB1PeriphClockCmd(RCC_APB1Periph_CAN1, ENABLE);
+
+       /* Configure CAN pin: RX */
+       gpio.GPIO_Pin = GPIO_Pin_11;
+       gpio.GPIO_Mode = GPIO_Mode_IPU;
+       GPIO_Init(GPIOA, &gpio);
+
+       /* Configure CAN pin: TX */
+       gpio.GPIO_Pin = GPIO_Pin_12;
+       gpio.GPIO_Mode = GPIO_Mode_AF_PP;
+       gpio.GPIO_Speed = GPIO_Speed_50MHz;
+       GPIO_Init(GPIOA, &gpio);
+
+       /* NVIC configuration */
+       NVIC_PriorityGroupConfig(NVIC_PriorityGroup_0);
+
+       nvic.NVIC_IRQChannel = USB_LP_CAN1_RX0_IRQn;
+       nvic.NVIC_IRQChannelPreemptionPriority = 0x00;
+       nvic.NVIC_IRQChannelSubPriority = 0x00;
+       nvic.NVIC_IRQChannelCmd = ENABLE;
+       NVIC_Init(&nvic);
+
+       /* get rcc clocks */
+       RCC_GetClocksFreq(&rcc_clocks);
+
+       /* CAN register init */
+       CAN_DeInit(CAN1);
+       CAN_StructInit(&can);
+
+       /* CAN cell init */
+       can.CAN_TTCM = DISABLE;
+       can.CAN_ABOM = DISABLE;
+       can.CAN_AWUM = DISABLE;
+       can.CAN_NART = DISABLE;
+       can.CAN_RFLM = DISABLE;
+       can.CAN_TXFP = DISABLE;
+       can.CAN_Mode = CAN_Mode_Normal;
+       can.CAN_SJW = CAN_SJW_1tq;
+       can.CAN_BS1 = CAN_BS1_3tq;
+       can.CAN_BS2 = CAN_BS2_5tq;
+       can.CAN_Prescaler = 4;
+       CAN_Init(CAN1, &can);
+
+       /* CAN filter init */
+       can_filter.CAN_FilterNumber = 0;
+       can_filter.CAN_FilterMode = CAN_FilterMode_IdMask;
+       can_filter.CAN_FilterScale = CAN_FilterScale_32bit;
+       can_filter.CAN_FilterIdHigh = 0x0000;
+       can_filter.CAN_FilterIdLow = 0x0000;
+       can_filter.CAN_FilterMaskIdHigh = 0x0000;
+       can_filter.CAN_FilterMaskIdLow = 0x0000;
+       can_filter.CAN_FilterFIFOAssignment = 0;
+       can_filter.CAN_FilterActivation = ENABLE;
+       CAN_FilterInit(&can_filter);
+
+       /* transmit struct init */
+       can_tx_msg.StdId = 0x321;
+       can_tx_msg.ExtId = 0x01;
+       can_tx_msg.RTR = CAN_RTR_DATA;
+       can_tx_msg.IDE = CAN_ID_STD;
+       can_tx_msg.DLC = 1;
+
+       CAN_ITConfig(CAN1, CAN_IT_FMP0, ENABLE);
+
+       can_tx_msg.Data[0] = 0x55;
+
+       CAN_Transmit(CAN1, &can_tx_msg);
+}
+
+int can_hw_transmit(uint16_t id, const uint8_t *buf, uint8_t len)
+{
+       if(len > 8){
+               return -1;
+       }
+
+//     can_tx_msg.StdId = id >> 8;
+//     can_tx_msg.ExtId = id & 0xFF;
+//     can_tx_msg.DLC = len;
+//     memcpy(&can_tx_msg.Data, buf, len);
+//
+//     CAN_Transmit(CAN1, &can_tx_msg);
+
+       //can_tx_msg.StdId = 0;
+       //can_tx_msg.ExtId = 0x1234;
+       //can_tx_msg.DLC = 1;
+       //can_tx_msg.Data[0] = 0x55;
+
+       CAN_Transmit(CAN1, &can_tx_msg);
+
+       return 0;
+}

Added: paparazzi3/trunk/sw/airborne/stm32/can_hw.c.bak
===================================================================
--- paparazzi3/trunk/sw/airborne/stm32/can_hw.c.bak                             
(rev 0)
+++ paparazzi3/trunk/sw/airborne/stm32/can_hw.c.bak     2010-07-15 17:22:32 UTC 
(rev 5052)
@@ -0,0 +1,143 @@
+/*
+ * $Id:$
+ *
+ * Copyright (C) 2010 Piotr Esden-Tempski <address@hidden>
+ *
+ * This file is part of paparazzi.
+ *
+ * paparazzi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * paparazzi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with paparazzi; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+
+#include <stdint.h>
+#include <string.h>
+
+#include "can_hw.h"
+
+#include <stm32/rcc.h>
+#include <stm32/gpio.h>
+#include <stm32/flash.h>
+#include <stm32/misc.h>
+#include <stm32/can.h>
+
+#include "led.h"
+
+#define RCC_APB2Periph_GPIO_CAN RCC_APB2Periph_GPIOA
+#define GPIO_CAN GPIOA
+#define GPIO_Pin_CAN_RX GPIO_Pin_11
+#define GPIO_Pin_CAN_TX GPIO_Pin_12
+
+CanTxMsg can_tx_msg;
+
+void can_hw_init(void)
+{
+       GPIO_InitTypeDef gpio;
+       NVIC_InitTypeDef nvic;
+       CAN_InitTypeDef can;
+       CAN_FilterInitTypeDef can_filter;
+
+       /* Enable peripheral clocks */
+       RCC_APB2PeriphClockCmd(RCC_APB2Periph_AFIO |
+                              RCC_APB2Periph_GPIO_CAN, ENABLE);
+       RCC_APB1PeriphClockCmd(RCC_APB1Periph_CAN1, ENABLE);
+
+       /* Configure CAN pin: RX */
+       gpio.GPIO_Pin = GPIO_Pin_CAN_RX;
+       gpio.GPIO_Mode = GPIO_Mode_IPU;
+       gpio.GPIO_Speed = GPIO_Speed_50MHz;
+       GPIO_Init(GPIO_CAN, &gpio);
+
+       /* Configure CAN pin: TX */
+       gpio.GPIO_Pin = GPIO_Pin_CAN_TX;
+       gpio.GPIO_Mode = GPIO_Mode_AF_PP;
+       gpio.GPIO_Speed = GPIO_Speed_50MHz;
+       GPIO_Init(GPIO_CAN, &gpio);
+
+       /* NVIC configuration */
+       NVIC_PriorityGroupConfig(NVIC_PriorityGroup_0);
+
+       nvic.NVIC_IRQChannel = USB_LP_CAN1_RX0_IRQn;
+       nvic.NVIC_IRQChannelPreemptionPriority = 0x00;
+       nvic.NVIC_IRQChannelSubPriority = 0x00;
+       nvic.NVIC_IRQChannelCmd = ENABLE;
+       NVIC_Init(&nvic);
+
+       /* CAN register init */
+       CAN_DeInit(CAN1);
+       CAN_StructInit(&can);
+
+       /* CAN cell init */
+       can.CAN_TTCM = DISABLE;
+       can.CAN_ABOM = DISABLE;
+       can.CAN_AWUM = DISABLE;
+       can.CAN_NART = DISABLE;
+       can.CAN_RFLM = DISABLE;
+       can.CAN_TXFP = DISABLE;
+       can.CAN_Mode = CAN_Mode_Normal;
+       can.CAN_SJW = CAN_SJW_1tq;
+       can.CAN_BS1 = CAN_BS1_3tq;
+       can.CAN_BS2 = CAN_BS2_5tq;
+       can.CAN_Prescaler = 4;
+       CAN_Init(CAN1, &can);
+
+       /* CAN filter init */
+       can_filter.CAN_FilterNumber = 0;
+       can_filter.CAN_FilterMode = CAN_FilterMode_IdMask;
+       can_filter.CAN_FilterScale = CAN_FilterScale_32bit;
+       can_filter.CAN_FilterIdHigh = 0x0000;
+       can_filter.CAN_FilterIdLow = 0x0000;
+       can_filter.CAN_FilterMaskIdHigh = 0x0000;
+       can_filter.CAN_FilterMaskIdLow = 0x0000;
+       can_filter.CAN_FilterFIFOAssignment = 0;
+       can_filter.CAN_FilterActivation = ENABLE;
+       CAN_FilterInit(&can_filter);
+
+       /* transmit struct init */
+       can_tx_msg.StdId = 0x321;
+       can_tx_msg.ExtId = 0x00;
+       can_tx_msg.RTR = CAN_RTR_DATA;
+       can_tx_msg.IDE = CAN_ID_STD;
+       can_tx_msg.DLC = 1;
+
+       CAN_ITConfig(CAN1, CAN_IT_FMP0, ENABLE);
+
+       can_tx_msg.Data[0] = 0x55;
+
+       CAN_Transmit(CAN1, &can_tx_msg);
+}
+
+int can_hw_transmit(uint16_t id, const uint8_t *buf, uint8_t len)
+{
+       if(len > 8){
+               return -1;
+       }
+
+//     can_tx_msg.StdId = id >> 8;
+//     can_tx_msg.ExtId = id & 0xFF;
+//     can_tx_msg.DLC = len;
+//     memcpy(&can_tx_msg.Data, buf, len);
+//
+//     CAN_Transmit(CAN1, &can_tx_msg);
+
+       //can_tx_msg.StdId = 0;
+       //can_tx_msg.ExtId = 0x1234;
+       //can_tx_msg.DLC = 1;
+       //can_tx_msg.Data[0] = 0x55;
+
+       //CAN_Transmit(CAN1, &can_tx_msg);
+
+       return 0;
+}

Added: paparazzi3/trunk/sw/airborne/stm32/can_hw.h
===================================================================
--- paparazzi3/trunk/sw/airborne/stm32/can_hw.h                         (rev 0)
+++ paparazzi3/trunk/sw/airborne/stm32/can_hw.h 2010-07-15 17:22:32 UTC (rev 
5052)
@@ -0,0 +1,31 @@
+/*
+ * $Id:$
+ *
+ * Copyright (C) 2010 Piotr Esden-Tempski <address@hidden>
+ *
+ * This file is part of paparazzi.
+ *
+ * paparazzi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * paparazzi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with paparazzi; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+
+#ifndef CAN_HW_H
+#define CAN_HW_H
+
+void can_hw_init(void);
+int can_hw_transmit(uint16_t id, const uint8_t *buf, uint8_t len);
+
+#endif /* CAN_HW_H */

Modified: paparazzi3/trunk/sw/airborne/stm32/stm32_vector_table.c
===================================================================
--- paparazzi3/trunk/sw/airborne/stm32/stm32_vector_table.c     2010-07-15 
04:30:48 UTC (rev 5051)
+++ paparazzi3/trunk/sw/airborne/stm32/stm32_vector_table.c     2010-07-15 
17:22:32 UTC (rev 5052)
@@ -122,7 +122,20 @@
 #define TIM2_IRQ_HANDLER null_handler
 #endif
 
+#ifdef USE_USB_HP_CAN1_TX_IRQ
+extern void usb_hp_can1_tx_irq_handler(void);
+#define USB_HP_CAN1_TX_IRQ_HANDLER usb_hp_can1_tx_irq_handler
+#else
+#define USB_HP_CAN1_TX_IRQ_HANDLER null_handler
+#endif
 
+#ifdef USE_USB_LP_CAN1_RX0_IRQ
+extern void usb_lp_can1_rx0_irq_handler(void);
+#define USB_LP_CAN1_RX0_IRQ_HANDLER usb_lp_can_rx0_irq_handler
+#else
+#define USB_LP_CAN1_RX0_IRQ_HANDLER null_handler
+#endif
+
 /* addresses defined in the linker script */
 extern unsigned long _etext;  /* end addr of .text section     */
 extern unsigned long _sidata; /* init values for .data section */
@@ -171,8 +184,8 @@
     null_handler,             /* dma1_channel6_irq_handler */
     null_handler,             /* dma1_channel7_irq_handler */
     null_handler,             /* adc1_2_irq_handler */
-    null_handler,             /* usb_hp_can_tx_irq_handler */
-    null_handler,             /* usb_lp_can_rx0_irq_handler */
+    USB_HP_CAN1_TX_IRQ_HANDLER, /* usb_hp_can_tx_irq_handler */
+    USB_LP_CAN1_RX0_IRQ_HANDLER, /* usb_lp_can_rx0_irq_handler */
     null_handler,             /* can_rx1_irq_handler */
     null_handler,             /* can_sce_irq_handler */
     null_handler,             /* exti9_5_irq_handler */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]