Skip to content

Commit

Permalink
Merge pull request RT-Thread#801 from gbcwbz/stm32_test
Browse files Browse the repository at this point in the history
[bsp] fix CAN IRQ for stm32 none connectivity line devices
  • Loading branch information
BernardXiong authored Aug 16, 2017
2 parents de81a97 + b60712c commit a0ec48d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bsp/stm32f10x/drivers/bxcan.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@
#define CAN_TXMAILBOX_1 ((uint8_t)0x01)
#define CAN_TXMAILBOX_2 ((uint8_t)0x02)



#define CAN_MODE_MASK ((uint32_t) 0x00000003)

void CAN1_RX0_IRQHandler(void);
void CAN1_TX_IRQHandler(void);

#endif /*BXCAN_H_*/
19 changes: 19 additions & 0 deletions bsp/stm32f10x/drivers/stm32f10x_it.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "stm32f10x_it.h"
#include <board.h>
#include <rtthread.h>
#include "bxcan.h"

/** @addtogroup Template_Project
* @{
Expand Down Expand Up @@ -144,6 +145,24 @@ void EXTI4_IRQHandler(void)
}
#endif /* RT_USING_LWIP */

#ifndef STM32F10X_CL
/* CAN and USB IRQ for stm32 none connectivity line devices
*/
void USB_LP_CAN1_RX0_IRQHandler(void)
{
#ifdef RT_USING_CAN
CAN1_RX0_IRQHandler();
#endif
}
void USB_HP_CAN1_TX_IRQHandler(void)
{
#ifdef RT_USING_CAN
CAN1_TX_IRQHandler();
#endif
}
#endif


/**
* @}
*/
Expand Down

0 comments on commit a0ec48d

Please sign in to comment.