Add files via upload

This commit is contained in:
Phonog 2016-10-31 23:05:27 +01:00 committed by GitHub
parent 9765b9b368
commit 9e5911b98f
1 changed files with 15 additions and 0 deletions

View File

@ -183,10 +183,25 @@ static void usb_resume(RESUME_STATE eResumeSetVal) {
}
}
// JMD : default ISRs of CAN, to be overridden if HardwareCAN library is used in sketch
void __attribute__((weak)) USB_HP_CAN_TX_IRQHandler(void)
{ ; } // Dummy ISR
void __irq_usb_hp_can_tx(void)
{
USB_HP_CAN_TX_IRQHandler () ;
}
uint8 __attribute__((weak)) CAN_RX0_IRQ_Handler(void)
{ return 0 ; } // Dummy ISR
#define SUSPEND_ENABLED 1
void __irq_usb_lp_can_rx0(void) {
uint16 istr = USB_BASE->ISTR;
if (CAN_RX0_IRQ_Handler()) //! JMD : Call to CAN ISR, returns 1 CAN is active
return; //! JMD
/* Use USB_ISR_MSK to only include code for bits we care about. */
#if (USB_ISR_MSK & USB_ISTR_RESET)