2010-09-27 09:28:45 +02:00
|
|
|
/******************** (C) COPYRIGHT 2010 STMicroelectronics ********************
|
|
|
|
* File Name : usb_istr.c
|
|
|
|
* Author : MCD Application Team
|
|
|
|
* Version : V3.2.1
|
|
|
|
* Date : 07/05/2010
|
|
|
|
* Description : ISTR events interrupt service routines
|
|
|
|
********************************************************************************
|
|
|
|
* THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
|
|
|
|
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
|
|
|
|
* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
|
|
|
|
* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
|
|
|
|
* CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
|
|
|
|
* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
|
|
|
|
*******************************************************************************/
|
|
|
|
|
|
|
|
/* Includes ------------------------------------------------------------------*/
|
|
|
|
#include "pios.h"
|
2013-03-16 23:38:11 +01:00
|
|
|
|
|
|
|
#ifdef PIOS_INCLUDE_USB
|
|
|
|
|
2013-03-15 19:25:30 +01:00
|
|
|
#include "usb_lib.h"
|
2010-09-27 09:28:45 +02:00
|
|
|
#include "pios_usb_hid_pwr.h"
|
|
|
|
#include "pios_usb_hid_istr.h"
|
|
|
|
#include "pios_usb_hid.h"
|
|
|
|
|
|
|
|
/* Private typedef -----------------------------------------------------------*/
|
|
|
|
/* Private define ------------------------------------------------------------*/
|
|
|
|
/* Private macro -------------------------------------------------------------*/
|
|
|
|
/* Private variables ---------------------------------------------------------*/
|
2013-05-19 16:37:30 +02:00
|
|
|
__IO uint16_t wIstr; /* ISTR register last read value */
|
|
|
|
__IO uint8_t bIntPackSOF = 0; /* SOFs received between 2 consecutive packets */
|
2010-09-27 09:28:45 +02:00
|
|
|
|
|
|
|
/* Extern variables ----------------------------------------------------------*/
|
|
|
|
/* Private function prototypes -----------------------------------------------*/
|
|
|
|
/* Private functions ---------------------------------------------------------*/
|
|
|
|
/* function pointers to non-control endpoints service routines */
|
2013-05-19 16:37:30 +02:00
|
|
|
void(*pEpInt_IN[7]) (void) = {
|
|
|
|
EP1_IN_Callback, EP2_IN_Callback, EP3_IN_Callback, EP4_IN_Callback, EP5_IN_Callback, EP6_IN_Callback, EP7_IN_Callback,
|
|
|
|
};
|
2010-09-27 09:28:45 +02:00
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
void(*pEpInt_OUT[7]) (void) = {
|
|
|
|
EP1_OUT_Callback, EP2_OUT_Callback, EP3_OUT_Callback, EP4_OUT_Callback, EP5_OUT_Callback, EP6_OUT_Callback, EP7_OUT_Callback,
|
|
|
|
};
|
2010-09-27 09:28:45 +02:00
|
|
|
|
|
|
|
#ifndef STM32F10X_CL
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
* Function Name : USB_Istr
|
|
|
|
* Description : STR events interrupt service routine
|
|
|
|
* Input :
|
|
|
|
* Output :
|
|
|
|
* Return :
|
|
|
|
*******************************************************************************/
|
2013-05-19 16:37:30 +02:00
|
|
|
void USB_LP_CAN1_RX0_IRQHandler(void) // USB_Istr(void)
|
2010-09-27 09:28:45 +02:00
|
|
|
{
|
2013-05-19 16:37:30 +02:00
|
|
|
wIstr = _GetISTR();
|
2010-09-27 09:28:45 +02:00
|
|
|
|
|
|
|
#if (IMR_MSK & ISTR_CTR)
|
2013-05-19 16:37:30 +02:00
|
|
|
if (wIstr & ISTR_CTR & wInterrupt_Mask) {
|
|
|
|
/* servicing of the endpoint correct transfer interrupt */
|
|
|
|
/* clear of the CTR flag into the sub */
|
|
|
|
CTR_LP();
|
2010-09-27 09:28:45 +02:00
|
|
|
#ifdef CTR_CALLBACK
|
2013-05-19 16:37:30 +02:00
|
|
|
CTR_Callback();
|
2010-09-27 09:28:45 +02:00
|
|
|
#endif
|
2013-05-19 16:37:30 +02:00
|
|
|
}
|
2010-09-27 09:28:45 +02:00
|
|
|
#endif
|
2013-05-19 16:37:30 +02:00
|
|
|
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
2010-09-27 09:28:45 +02:00
|
|
|
#if (IMR_MSK & ISTR_RESET)
|
2013-05-19 16:37:30 +02:00
|
|
|
if (wIstr & ISTR_RESET & wInterrupt_Mask) {
|
|
|
|
_SetISTR((uint16_t)CLR_RESET);
|
|
|
|
Device_Property.Reset();
|
2010-09-27 09:28:45 +02:00
|
|
|
#ifdef RESET_CALLBACK
|
2013-05-19 16:37:30 +02:00
|
|
|
RESET_Callback();
|
2010-09-27 09:28:45 +02:00
|
|
|
#endif
|
2013-05-19 16:37:30 +02:00
|
|
|
}
|
2010-09-27 09:28:45 +02:00
|
|
|
#endif
|
2013-05-19 16:37:30 +02:00
|
|
|
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
2010-09-27 09:28:45 +02:00
|
|
|
#if (IMR_MSK & ISTR_DOVR)
|
2013-05-19 16:37:30 +02:00
|
|
|
if (wIstr & ISTR_DOVR & wInterrupt_Mask) {
|
|
|
|
_SetISTR((uint16_t)CLR_DOVR);
|
2010-09-27 09:28:45 +02:00
|
|
|
#ifdef DOVR_CALLBACK
|
2013-05-19 16:37:30 +02:00
|
|
|
DOVR_Callback();
|
2010-09-27 09:28:45 +02:00
|
|
|
#endif
|
2013-05-19 16:37:30 +02:00
|
|
|
}
|
2010-09-27 09:28:45 +02:00
|
|
|
#endif
|
2013-05-19 16:37:30 +02:00
|
|
|
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
2010-09-27 09:28:45 +02:00
|
|
|
#if (IMR_MSK & ISTR_ERR)
|
2013-05-19 16:37:30 +02:00
|
|
|
if (wIstr & ISTR_ERR & wInterrupt_Mask) {
|
|
|
|
_SetISTR((uint16_t)CLR_ERR);
|
2010-09-27 09:28:45 +02:00
|
|
|
#ifdef ERR_CALLBACK
|
2013-05-19 16:37:30 +02:00
|
|
|
ERR_Callback();
|
2010-09-27 09:28:45 +02:00
|
|
|
#endif
|
2013-05-19 16:37:30 +02:00
|
|
|
}
|
2010-09-27 09:28:45 +02:00
|
|
|
#endif
|
2013-05-19 16:37:30 +02:00
|
|
|
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
2010-09-27 09:28:45 +02:00
|
|
|
#if (IMR_MSK & ISTR_WKUP)
|
2013-05-19 16:37:30 +02:00
|
|
|
if (wIstr & ISTR_WKUP & wInterrupt_Mask) {
|
|
|
|
_SetISTR((uint16_t)CLR_WKUP);
|
|
|
|
Resume(RESUME_EXTERNAL);
|
2010-09-27 09:28:45 +02:00
|
|
|
#ifdef WKUP_CALLBACK
|
2013-05-19 16:37:30 +02:00
|
|
|
WKUP_Callback();
|
2010-09-27 09:28:45 +02:00
|
|
|
#endif
|
2013-05-19 16:37:30 +02:00
|
|
|
}
|
2010-09-27 09:28:45 +02:00
|
|
|
#endif
|
2013-05-19 16:37:30 +02:00
|
|
|
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
2010-09-27 09:28:45 +02:00
|
|
|
#if (IMR_MSK & ISTR_SUSP)
|
2013-05-19 16:37:30 +02:00
|
|
|
if (wIstr & ISTR_SUSP & wInterrupt_Mask) {
|
|
|
|
/* check if SUSPEND is possible */
|
|
|
|
if (fSuspendEnabled) {
|
|
|
|
Suspend();
|
|
|
|
} else {
|
|
|
|
/* if not possible then resume after xx ms */
|
|
|
|
Resume(RESUME_LATER);
|
|
|
|
}
|
|
|
|
/* clear of the ISTR bit must be done after setting of CNTR_FSUSP */
|
|
|
|
_SetISTR((uint16_t)CLR_SUSP);
|
2010-09-27 09:28:45 +02:00
|
|
|
#ifdef SUSP_CALLBACK
|
2013-05-19 16:37:30 +02:00
|
|
|
SUSP_Callback();
|
2010-09-27 09:28:45 +02:00
|
|
|
#endif
|
2013-05-19 16:37:30 +02:00
|
|
|
}
|
2010-09-27 09:28:45 +02:00
|
|
|
#endif
|
2013-05-19 16:37:30 +02:00
|
|
|
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
2010-09-27 09:28:45 +02:00
|
|
|
#if (IMR_MSK & ISTR_SOF)
|
2013-05-19 16:37:30 +02:00
|
|
|
if (wIstr & ISTR_SOF & wInterrupt_Mask) {
|
|
|
|
_SetISTR((uint16_t)CLR_SOF);
|
|
|
|
bIntPackSOF++;
|
2010-09-27 09:28:45 +02:00
|
|
|
|
|
|
|
#ifdef SOF_CALLBACK
|
2013-05-19 16:37:30 +02:00
|
|
|
SOF_Callback();
|
2010-09-27 09:28:45 +02:00
|
|
|
#endif
|
2013-05-19 16:37:30 +02:00
|
|
|
}
|
2010-09-27 09:28:45 +02:00
|
|
|
#endif
|
2013-05-19 16:37:30 +02:00
|
|
|
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
2010-09-27 09:28:45 +02:00
|
|
|
#if (IMR_MSK & ISTR_ESOF)
|
2013-05-19 16:37:30 +02:00
|
|
|
if (wIstr & ISTR_ESOF & wInterrupt_Mask) {
|
|
|
|
_SetISTR((uint16_t)CLR_ESOF);
|
|
|
|
/* resume handling timing is made with ESOFs */
|
|
|
|
Resume(RESUME_ESOF); /* request without change of the machine state */
|
2010-09-27 09:28:45 +02:00
|
|
|
|
|
|
|
#ifdef ESOF_CALLBACK
|
2013-05-19 16:37:30 +02:00
|
|
|
ESOF_Callback();
|
2010-09-27 09:28:45 +02:00
|
|
|
#endif
|
2013-05-19 16:37:30 +02:00
|
|
|
}
|
2010-09-27 09:28:45 +02:00
|
|
|
#endif
|
2013-05-19 16:37:30 +02:00
|
|
|
} /* USB_Istr */
|
2010-09-27 09:28:45 +02:00
|
|
|
|
|
|
|
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
|
|
|
#else /* STM32F10X_CL */
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
* Function Name : STM32_PCD_OTG_ISR_Handler
|
|
|
|
* Description : Handles all USB Device Interrupts
|
|
|
|
* Input : None
|
|
|
|
* Output : None
|
|
|
|
* Return : status
|
|
|
|
*******************************************************************************/
|
|
|
|
u32 STM32_PCD_OTG_ISR_Handler(void)
|
|
|
|
{
|
2013-05-19 16:37:30 +02:00
|
|
|
USB_OTG_GINTSTS_TypeDef gintr_status;
|
|
|
|
u32 retval = 0;
|
2010-09-27 09:28:45 +02:00
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
if (USBD_FS_IsDeviceMode()) { /* ensure that we are in device mode */
|
|
|
|
gintr_status.d32 = OTGD_FS_ReadCoreItr();
|
2010-09-27 09:28:45 +02:00
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
2010-09-27 09:28:45 +02:00
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
/* If there is no interrupt pending exit the interrupt routine */
|
|
|
|
if (!gintr_status.d32) {
|
|
|
|
return 0;
|
|
|
|
}
|
2010-09-27 09:28:45 +02:00
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
|
|
|
/* Early Suspend interrupt */
|
2010-09-27 09:28:45 +02:00
|
|
|
#ifdef INTR_ERLYSUSPEND
|
2013-05-19 16:37:30 +02:00
|
|
|
if (gintr_status.b.erlysuspend) {
|
|
|
|
retval |= OTGD_FS_Handle_EarlySuspend_ISR();
|
|
|
|
}
|
2010-09-27 09:28:45 +02:00
|
|
|
#endif /* INTR_ERLYSUSPEND */
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
|
|
|
/* End of Periodic Frame interrupt */
|
2010-09-27 09:28:45 +02:00
|
|
|
#ifdef INTR_EOPFRAME
|
2013-05-19 16:37:30 +02:00
|
|
|
if (gintr_status.b.eopframe) {
|
|
|
|
retval |= OTGD_FS_Handle_EOPF_ISR();
|
|
|
|
}
|
2010-09-27 09:28:45 +02:00
|
|
|
#endif /* INTR_EOPFRAME */
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
|
|
|
/* Non Periodic Tx FIFO Emty interrupt */
|
2010-09-27 09:28:45 +02:00
|
|
|
#ifdef INTR_NPTXFEMPTY
|
2013-05-19 16:37:30 +02:00
|
|
|
if (gintr_status.b.nptxfempty) {
|
|
|
|
retval |= OTGD_FS_Handle_NPTxFE_ISR();
|
|
|
|
}
|
2010-09-27 09:28:45 +02:00
|
|
|
#endif /* INTR_NPTXFEMPTY */
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
|
|
|
/* Wakeup or RemoteWakeup interrupt */
|
2010-09-27 09:28:45 +02:00
|
|
|
#ifdef INTR_WKUPINTR
|
2013-05-19 16:37:30 +02:00
|
|
|
if (gintr_status.b.wkupintr) {
|
|
|
|
retval |= OTGD_FS_Handle_Wakeup_ISR();
|
|
|
|
}
|
2010-09-27 09:28:45 +02:00
|
|
|
#endif /* INTR_WKUPINTR */
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
|
|
|
/* Suspend interrupt */
|
2010-09-27 09:28:45 +02:00
|
|
|
#ifdef INTR_USBSUSPEND
|
2013-05-19 16:37:30 +02:00
|
|
|
if (gintr_status.b.usbsuspend) {
|
|
|
|
/* check if SUSPEND is possible */
|
|
|
|
if (fSuspendEnabled) {
|
|
|
|
Suspend();
|
|
|
|
} else {
|
|
|
|
/* if not possible then resume after xx ms */
|
|
|
|
Resume(RESUME_LATER); /* This case shouldn't happen in OTG Device mode because
|
|
|
|
there's no ESOF interrupt to increment the ResumeS.bESOFcnt in the Resume state machine */
|
|
|
|
}
|
|
|
|
|
|
|
|
retval |= OTGD_FS_Handle_USBSuspend_ISR();
|
|
|
|
}
|
2010-09-27 09:28:45 +02:00
|
|
|
#endif /* INTR_USBSUSPEND */
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
|
|
|
/* Start of Frame interrupt */
|
2010-09-27 09:28:45 +02:00
|
|
|
#ifdef INTR_SOFINTR
|
2013-05-19 16:37:30 +02:00
|
|
|
if (gintr_status.b.sofintr) {
|
|
|
|
/* Update the frame number variable */
|
|
|
|
bIntPackSOF++;
|
2010-09-27 09:28:45 +02:00
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
retval |= OTGD_FS_Handle_Sof_ISR();
|
|
|
|
}
|
2010-09-27 09:28:45 +02:00
|
|
|
#endif /* INTR_SOFINTR */
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
|
|
|
/* Receive FIFO Queue Status Level interrupt */
|
2010-09-27 09:28:45 +02:00
|
|
|
#ifdef INTR_RXSTSQLVL
|
2013-05-19 16:37:30 +02:00
|
|
|
if (gintr_status.b.rxstsqlvl) {
|
|
|
|
retval |= OTGD_FS_Handle_RxStatusQueueLevel_ISR();
|
|
|
|
}
|
2010-09-27 09:28:45 +02:00
|
|
|
#endif /* INTR_RXSTSQLVL */
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
|
|
|
/* Enumeration Done interrupt */
|
2010-09-27 09:28:45 +02:00
|
|
|
#ifdef INTR_ENUMDONE
|
2013-05-19 16:37:30 +02:00
|
|
|
if (gintr_status.b.enumdone) {
|
|
|
|
retval |= OTGD_FS_Handle_EnumDone_ISR();
|
|
|
|
}
|
2010-09-27 09:28:45 +02:00
|
|
|
#endif /* INTR_ENUMDONE */
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
|
|
|
/* Reset interrutp */
|
2010-09-27 09:28:45 +02:00
|
|
|
#ifdef INTR_USBRESET
|
2013-05-19 16:37:30 +02:00
|
|
|
if (gintr_status.b.usbreset) {
|
|
|
|
retval |= OTGD_FS_Handle_UsbReset_ISR();
|
|
|
|
}
|
2010-09-27 09:28:45 +02:00
|
|
|
#endif /* INTR_USBRESET */
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
|
|
|
/* IN Endpoint interrupt */
|
2010-09-27 09:28:45 +02:00
|
|
|
#ifdef INTR_INEPINTR
|
2013-05-19 16:37:30 +02:00
|
|
|
if (gintr_status.b.inepint) {
|
|
|
|
retval |= OTGD_FS_Handle_InEP_ISR();
|
|
|
|
}
|
2010-09-27 09:28:45 +02:00
|
|
|
#endif /* INTR_INEPINTR */
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
|
|
|
/* OUT Endpoint interrupt */
|
2010-09-27 09:28:45 +02:00
|
|
|
#ifdef INTR_OUTEPINTR
|
2013-05-19 16:37:30 +02:00
|
|
|
if (gintr_status.b.outepintr) {
|
|
|
|
retval |= OTGD_FS_Handle_OutEP_ISR();
|
|
|
|
}
|
2010-09-27 09:28:45 +02:00
|
|
|
#endif /* INTR_OUTEPINTR */
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
|
|
|
/* Mode Mismatch interrupt */
|
2010-09-27 09:28:45 +02:00
|
|
|
#ifdef INTR_MODEMISMATCH
|
2013-05-19 16:37:30 +02:00
|
|
|
if (gintr_status.b.modemismatch) {
|
|
|
|
retval |= OTGD_FS_Handle_ModeMismatch_ISR();
|
|
|
|
}
|
2010-09-27 09:28:45 +02:00
|
|
|
#endif /* INTR_MODEMISMATCH */
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
|
|
|
/* Global IN Endpoints NAK Effective interrupt */
|
2010-09-27 09:28:45 +02:00
|
|
|
#ifdef INTR_GINNAKEFF
|
2013-05-19 16:37:30 +02:00
|
|
|
if (gintr_status.b.ginnakeff) {
|
|
|
|
retval |= OTGD_FS_Handle_GInNakEff_ISR();
|
|
|
|
}
|
2010-09-27 09:28:45 +02:00
|
|
|
#endif /* INTR_GINNAKEFF */
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
|
|
|
/* Global OUT Endpoints NAK effective interrupt */
|
2010-09-27 09:28:45 +02:00
|
|
|
#ifdef INTR_GOUTNAKEFF
|
2013-05-19 16:37:30 +02:00
|
|
|
if (gintr_status.b.goutnakeff) {
|
|
|
|
retval |= OTGD_FS_Handle_GOutNakEff_ISR();
|
|
|
|
}
|
2010-09-27 09:28:45 +02:00
|
|
|
#endif /* INTR_GOUTNAKEFF */
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
|
|
|
/* Isochrounous Out packet Dropped interrupt */
|
2010-09-27 09:28:45 +02:00
|
|
|
#ifdef INTR_ISOOUTDROP
|
2013-05-19 16:37:30 +02:00
|
|
|
if (gintr_status.b.isooutdrop) {
|
|
|
|
retval |= OTGD_FS_Handle_IsoOutDrop_ISR();
|
|
|
|
}
|
2010-09-27 09:28:45 +02:00
|
|
|
#endif /* INTR_ISOOUTDROP */
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
|
|
|
/* Endpoint Mismatch error interrupt */
|
2010-09-27 09:28:45 +02:00
|
|
|
#ifdef INTR_EPMISMATCH
|
2013-05-19 16:37:30 +02:00
|
|
|
if (gintr_status.b.epmismatch) {
|
|
|
|
retval |= OTGD_FS_Handle_EPMismatch_ISR();
|
|
|
|
}
|
2010-09-27 09:28:45 +02:00
|
|
|
#endif /* INTR_EPMISMATCH */
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
|
|
|
/* Incomplete Isochrous IN tranfer error interrupt */
|
2010-09-27 09:28:45 +02:00
|
|
|
#ifdef INTR_INCOMPLISOIN
|
2013-05-19 16:37:30 +02:00
|
|
|
if (gintr_status.b.incomplisoin) {
|
|
|
|
retval |= OTGD_FS_Handle_IncomplIsoIn_ISR();
|
|
|
|
}
|
2010-09-27 09:28:45 +02:00
|
|
|
#endif /* INTR_INCOMPLISOIN */
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
|
|
|
/* Incomplete Isochrous OUT tranfer error interrupt */
|
2010-09-27 09:28:45 +02:00
|
|
|
#ifdef INTR_INCOMPLISOOUT
|
2013-05-19 16:37:30 +02:00
|
|
|
if (gintr_status.b.outepintr) {
|
|
|
|
retval |= OTGD_FS_Handle_IncomplIsoOut_ISR();
|
|
|
|
}
|
2010-09-27 09:28:45 +02:00
|
|
|
#endif /* INTR_INCOMPLISOOUT */
|
2013-05-19 16:37:30 +02:00
|
|
|
}
|
|
|
|
return retval;
|
2010-09-27 09:28:45 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* STM32F10X_CL */
|
|
|
|
|
|
|
|
/******************* (C) COPYRIGHT 2010 STMicroelectronics *****END OF FILE****/
|
2013-03-16 23:38:11 +01:00
|
|
|
|
|
|
|
#endif /* PIOS_INCLUDE_USB */
|