English
Language : 

TL32 Datasheet, PDF (11/31 Pages) List of Unclassifed Manufacturers – Real Time System Testing MIT 16.070 Lecture 32
Some Exception Handling Methods
With exception handling:
# include <stdio.h>
int y, error;
int get_sensor_data(int* x)
void light_LED();
while (1)
{
error = get_sensor_data(&y);
/* pass the function the address of y, return error */
if (!error)
{
if (y >100) light_LED();
/* turn on LEDs */
}
else printf("Error in data coming from sensor = %d", error);
}
/* end infinite loop */
hperry
5/4/01