An118 – Cirrus Logic AN118 User Manual

Page 26

Advertising
background image

AN118

26

AN118REV2

/* Test Mode 7: This test mode tests the operation of
the LEDS’s by turning all of them on and off. */
case 0x07:

toggle_all_leds();
break;

} /* END switch */

} /* End test_mode */

/**************************************************************/
/* Routine - toggle_all_leds

*/

/* Input - none

*/

/* Output - none

*/

/* Description - This routine is used toggle all four LED

*/

/**************************************************************/
void toggle_all_leds(){

while(1){

P2 = 0x00;

/*Toggle all LED’s for Start Up Sequence indicator test*/

Delay();
P2 = 0xFF;
Delay();

}

}

/**************************************************************/
/* Routine - toggle_two_leds

*/

/* Input - none

*/

/* Output - none

*/

/* Description - This routine is used toggle two LEDS

*/

/**************************************************************/
void toggle_two_leds(){

while(1){

RESET = 0x00;
COMM = 0x00;

Delay();

RESET = 0x01;
COMM = 0x01;
Delay();

}

}

Advertising