Re: Why ISR contains no arguments and return type is void

From: Bruce (tech_at_rentron.com)
Date: 08/24/04


Date: Tue, 24 Aug 2004 11:02:30 -0600


> Can any one clear me why cant we pass the arguments to an
> ISR and also why the ISR returns nothing.
>
> With Regards,
> Sudheervemana.

The ISR can't return a value because technically there is no "caller" to the
ISR, so it's declared as type void.

For this same reason no arguments can be passed to the ISR since there is
no caller, no telling where program flow is at the time of the interrupt, etc,,.

-Bruce
http://www.rentron.com



Relevant Pages