1: #include 2: #include "tempo.h" 3: unsigned int tempo0_cpt; 4: unsigned char tempo0_state; 5: void init_tempo0(void) 6: { 7: tempo0_state = TEMPO_STOP ; 8: } 9: 10: void start_tempo0(unsigned int ms) 11: { 12: tempo0_state = TEMPO_STOP ; 13: tempo0_cpt=ms/MS_PER_TICKS ; 14: tempo0_state = TEMPO_PENDING ; 15: } 16: unsigned char tempo0_done(void) 17: { 18: if ( tempo0_state == TEMPO_DONE ) 19: { 20: return 1 ; 21: } 22: else 23: { 24: return 0 ; 25: } 26: }