Beispiel #1
0
void CAN2_RX1_IRQHandler(void) {
    IRQ_ENTER(CAN2_RX1_IRQn);
    can_rx_irq_handler(PYB_CAN_2, CAN_FIFO1);
    IRQ_EXIT(CAN2_RX1_IRQn);
}
Beispiel #2
0
void CAN1_RX0_IRQHandler(void) {
    IRQ_ENTER(CAN1_RX0_IRQn);
    can_rx_irq_handler(PYB_CAN_1, CAN_FIFO0);
    IRQ_EXIT(CAN1_RX0_IRQn);
}
Beispiel #3
0
void CAN2_RX1_IRQHandler(void) {
    can_rx_irq_handler(PYB_CAN_2, CAN_FIFO1);
}
Beispiel #4
0
void __irq_usb_lp_can_rx0(void) {
  if (CAN1->enabled) {
    can_rx_irq_handler();
    return;
  }
  uint16 istr = USB_BASE->ISTR;

  /* Use USB_ISR_MSK to only include code for bits we care about. */

#if (USB_ISR_MSK & USB_ISTR_RESET)
  if (istr & USB_ISTR_RESET & USBLIB->irq_mask) {
    USB_BASE->ISTR = ~USB_ISTR_RESET;
    pProperty->Reset();
  }
#endif

#if (USB_ISR_MSK & USB_ISTR_PMAOVR)
  if (istr & ISTR_PMAOVR & USBLIB->irq_mask) {
    USB_BASE->ISTR = ~USB_ISTR_PMAOVR;
  }
#endif

#if (USB_ISR_MSK & USB_ISTR_ERR)
  if (istr & USB_ISTR_ERR & USBLIB->irq_mask) {
    USB_BASE->ISTR = ~USB_ISTR_ERR;
  }
#endif

#if (USB_ISR_MSK & USB_ISTR_WKUP)
  if (istr & USB_ISTR_WKUP & USBLIB->irq_mask) {
    USB_BASE->ISTR = ~USB_ISTR_WKUP;
    usb_resume(RESUME_EXTERNAL);
  }
#endif

#if (USB_ISR_MSK & USB_ISTR_SUSP)
  if (istr & USB_ISTR_SUSP & USBLIB->irq_mask) {
    /* check if SUSPEND is possible */
    if (SUSPEND_ENABLED) {
        usb_suspend();
    } else {
        /* if not possible then resume after xx ms */
        usb_resume(RESUME_LATER);
    }
    /* clear of the ISTR bit must be done after setting of CNTR_FSUSP */
    USB_BASE->ISTR = ~USB_ISTR_SUSP;
}
#endif

#if (USB_ISR_MSK & USB_ISTR_SOF)
  if (istr & USB_ISTR_SOF & USBLIB->irq_mask) {
    USB_BASE->ISTR = ~USB_ISTR_SOF;
  }
#endif

#if (USB_ISR_MSK & USB_ISTR_ESOF)
  if (istr & USB_ISTR_ESOF & USBLIB->irq_mask) {
    USB_BASE->ISTR = ~USB_ISTR_ESOF;
    /* resume handling timing is made with ESOFs */
    usb_resume(RESUME_ESOF); /* request without change of the machine state */
  }
#endif

  /*
   * Service the correct transfer interrupt.
   */

#if (USB_ISR_MSK & USB_ISTR_CTR)
  if (istr & USB_ISTR_CTR & USBLIB->irq_mask) {
    dispatch_ctr_lp();
  }
#endif
}
Beispiel #5
0
void CAN1_RX0_IRQHandler(void) {
    can_rx_irq_handler(PYB_CAN_1, CAN_FIFO0);
}