コード例 #1
0
ファイル: events.c プロジェクト: Inspirati/MatrixPilot
void __attribute__((__interrupt__, __no_auto_psv__)) _EVENTM_INTERUPT(void)
{
	_EVENTM_TRIGGERIF = 0;      // clear the interrupt
	indicate_loading_inter;
	set_ipl_on_output_pin;
	interrupt_save_set_corcon;

	int16_t eventIndex;
	EVENT* pEvent;

	if (event_init_done)
	{
		for (eventIndex = 0; eventIndex < MAX_EVENTS; eventIndex++)
		{
			pEvent = &events[eventIndex];
			if ((pEvent->eventPending == true) && (pEvent->priority == EVENT_PRIORITY_MEDIUM))
			{
				pEvent->eventPending = false;
				if (pEvent->event_callback != NULL)
				{
					pEvent->event_callback();
				}
			}
		}
	}
	interrupt_restore_corcon;
	unset_ipl_on_output_pin;
}
コード例 #2
0
ファイル: events.c プロジェクト: trigrass2/lino-udb4
//  process EVENT TRIGGER interrupt = software interrupt
void __attribute__((__interrupt__,__no_auto_psv__)) _C2Interrupt(void) 
{
	indicate_loading_inter ;
	interrupt_save_set_corcon ;

	int eventIndex;
	EVENT* pEvent;

	_EVENT_TRIGGERIF = 0 ;			// clear the interrupt

	if(event_init_done)
	{
		for(eventIndex = 0; eventIndex < MAX_EVENTS; eventIndex++)
		{
			pEvent = &events[eventIndex];
			if(pEvent->eventPending == true)
			{
				pEvent->eventPending = false;
				if(pEvent->event_callback != NULL)
				{
					pEvent->event_callback();
				}
			}
		}
	}

	interrupt_restore_corcon ;
	return ;
}