Monday, August 13, 2007

Interrupt Service Routine (ISR)

* ISR Issues
Find out what is wrong in the following ISR:
__interrupt double compute_area(double radius)
{
     double area = PI * radius * radius;
     printf("\n area = %f\n", area);
     return area;
}
ISR is supposed to be
- No input parameters
- No returns
- Be compact and simple. Note: float point arithmetic operations and printf are complex and not re-entrant.

No comments: