Пример #1
0
                break;

            case EXT_INT4:
                IEC0bits.INT4IE	=	0;
                clearIntVector(_EXTERNAL_4_VECTOR);
               break;
        }

        intFunc[interruptNum]	=	0;
    }
}

//************************************************************************
// INT0 ISR
#if defined(__PIC32MZXX__)
void __attribute__((nomips16,at_vector(_EXTERNAL_0_VECTOR),interrupt(IPL4SRS))) ExtInt0Handler(void)
#else
void __attribute__((interrupt(),nomips16)) ExtInt0Handler(void)
#endif
{

	if (intFunc[EXT_INT0] != 0)
	{
		(*intFunc[EXT_INT0])();
	}
	IFS0bits.INT0IF	=	0;
}

//************************************************************************
// INT1 ISR
#if defined(__PIC32MZXX__)
Пример #2
0
**		none
**
**	Return Value:
**		none
**
**	Errors:
**		none
**
**	Description:
**		Interrupt service routine for the UART being used by
**		serial port 0.
*/
#if defined(_SER0_VECTOR)

#if defined(__PIC32MZXX__)
void __attribute__((nomips16,at_vector(_SER0_VECTOR),interrupt(_SER0_IPL_ISR))) IntSer0Handler(void)
#else
void __attribute__((interrupt(), nomips16)) IntSer0Handler(void)
#endif
{
#if defined(_USB) && defined(_USE_USB_FOR_SERIAL_)
	Serial0.doSerialInt();
#else
	Serial.doSerialInt();
#endif
}
#endif

/* ------------------------------------------------------------ */
/***	IntSer1Handler
**
Пример #3
0
    MRF24WG external interrupt handler

  Description:
    This interrupt handler should:
        1) ensure the interrupt is disabled upon exit (Universal Driver will reenable it)
        1) clear the interrupt
        2) call WFEintHandler()

 Parameters:
    None

  Returns:
    None

  Remarks:
    None
*****************************************************************************/
#if defined(__PIC32MZXX__)
void __attribute((interrupt(WF_IPL_ISR), at_vector(WF_INT_VEC), nomips16)) _WFInterrupt(void)
#else
void __attribute((interrupt(WF_IPL_ISR), vector(WF_INT_VEC), nomips16)) _WFInterrupt(void)
#endif
{
    // clear EINT
    WIFI_IFSxCLR = WIFI_INT_MASK;        // clear the interrupt
    WIFI_IECxCLR = WIFI_INT_MASK;        // disable external interrupt
    WF_EintHandler();           // call Univeral Driver handler function
}


Пример #4
0
**		none
**
**	Return Value:
**		none
**
**	Errors:
**		none
**
**	Description:
**		Interrupt service routine the SPI controller being used
**		logical SPI port DSPI0
*/
#if defined(_DSPI0_VECTOR)

#if defined(__PIC32MZXX__)
void __attribute__((nomips16,at_vector(_DSPI0_VECTOR),interrupt(_DSPI0_IPL_ISR))) IntDspi0Handler(void)
#else
void __attribute__((interrupt(), nomips16)) IntDspi0Handler(void)
#endif
{
	if (pdspi0 != 0) {
		pdspi0->doDspiInterrupt();
	}
}
#endif

/* ------------------------------------------------------------ */
/***	IntDspi1Handler
**
**	Parameters:
**		none
Пример #5
0
	if (_pin == tone_pin)
	{
		digitalWrite(_pin, 0);
		disableTimer(_timer);
	}
}

//*******************************************************************************************
//*	we need the extern C so that the interrupt handler names dont get mangled by C++
extern "C"
{

//*	not done yet
//************************************************************************
#if defined(__PIC32MZXX__)
void __attribute__((nomips16,at_vector(_TIMER_1_VECTOR),interrupt(IPL3SRS))) Timer1Handler(void)
#else
void __attribute__((interrupt(),nomips16)) Timer1Handler(void)
#endif
{

	if (timer1_toggle_count != 0)
	{
		// toggle the pin
		// The PORTxINV register is at offset +3 from the PORTx register
		//*(tone_pin_port+3)	=	tone_pin_mask;
		tone_pin_port->lat.inv = tone_pin_mask;

		if (timer1_toggle_count > 0)
		{
			timer1_toggle_count--;