Subversion Repositories Code-Repo

Rev

Rev 237 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 237 Rev 264
Line 42... Line 42...
42
    T4CONCLR = 0x8000; // Stop timer
42
    T4CONCLR = 0x8000; // Stop timer
43
}
43
}
44
 
44
 
45
void __ISR(_TIMER_4_VECTOR, ipl4) __TIMER_4_Interrupt_Handler(void) {
45
void __ISR(_TIMER_4_VECTOR, ipl4) __TIMER_4_Interrupt_Handler(void) {
46
    // Call the saved callback function
46
    // Call the saved callback function
-
 
47
    if (timer_data_ptr->callback_function_1 != NULL)
47
    (*timer_data_ptr->callback_function_1)();
48
        (*timer_data_ptr->callback_function_1)();
48
 
49
 
49
    if (timer_data_ptr->divider != 0 && timer_data_ptr->callback_function_2 != NULL) {
50
    if (timer_data_ptr->divider != 0 && timer_data_ptr->callback_function_2 != NULL) {
50
        if (timer_data_ptr->count == timer_data_ptr->divider) {
51
        if (timer_data_ptr->count == timer_data_ptr->divider) {
51
            (*timer_data_ptr->callback_function_2)();
52
            (*timer_data_ptr->callback_function_2)();
52
            timer_data_ptr->count = 0;
53
            timer_data_ptr->count = 0;