Kengo Kinoshita
|
May I ask interrupt handling sequence.
|
Kengo Kinoshita
08/18/2010 12:19 PM
post63427
|
May I ask interrupt handling sequence.
May I ask interrupt handling sequence.
Could I use only variables flag when interrupt handling sequence.
Now I planning the following style of interrupt handling,
Is it possible ?, or Not.
It is challenging style of Interrupt handling.
Usually use event or signal for notify when interrupts happen.
But it exist little bit overhead that processing notification.
And I try to cut out the time of notification.
Is it able to realize?
Regards,
Kengo Kinoshita
Main() <= main thread
ThreadCtl( _NTO_TCTL_IO, 0 );
interruptID1 = InterruptAttach (
irq_TIM0,
isr_handler1,
NULL,
0,
0);
while(1){
InterruptWait(NULL, NULL);
switch( event_.sigev_code ){
case cPulseCodeTM0:
// interrupt handling procedure
event_.sigev_code=0;
}
}
}
const struct sigevent *isr_handler1( void *arg, int id)
{
InterruptMask( irq_TIM0 , id);
event_.sigev_code = cPulseCodeTM0;
return( 0 or & event_ );
// procmgr_event_notify()
}
|
|
|