Ejemplo n.º 1
0
//tests all of the timers
uint32_t intervalTimer_testAll()//used to test all of the timers
{
    for (int i=0; i<=2; i++)
    {
        intervalTimer_runTest(i);//tests each timer using a for loop
    }
}
uint32_t intervalTimer_testAll() {

	// Returns 1 if timer0 and timer1 and timer2 pass test.  Returns 0 if one fails test
	if(intervalTimer_runTest(INTERVALTIMER_0_ID) == INTERVALTIMER_VALID_TIMER_FALSE) {
		printf("timer_0 failed");
		return INTERVALTIMER_VALID_TIMER_FALSE;
	}
	if(intervalTimer_runTest(INTERVALTIMER_1_ID) == INTERVALTIMER_VALID_TIMER_FALSE) {
		printf("timer_1 failed");
			return INTERVALTIMER_VALID_TIMER_FALSE;
		}
	if(intervalTimer_runTest(INTERVALTIMER_2_ID) == INTERVALTIMER_VALID_TIMER_FALSE) {
		printf("timer_2 failed");
			return INTERVALTIMER_VALID_TIMER_FALSE;
		}
	return INTERVALTIMER_VALID_TIMER_TRUE;
}