Project

General

Profile

Revision 22

restored timer_unsubscribe_int to original prototype

View differences:

timer.c
48 48
    return 0;
49 49
}
50 50

  
51
int hook_id = 2;
52

  
51 53
int (timer_subscribe_int)(uint8_t *bit_no) {
52
    int hook_id = 2;
53 54
    if(sys_irqsetpolicy(TIMER0_IRQ, IRQ_REENABLE, &hook_id)) return 1;
54 55
    *bit_no = hook_id;
55 56
    return 0;
56 57
}
57 58

  
58
int (timer_unsubscribe_int)(uint8_t *bit_no) {
59
    int hook_id = *bit_no;
59
int (timer_unsubscribe_int)() {
60 60
    if(sys_irqrmpolicy(&hook_id)) return 1;
61
    *bit_no = hook_id;
62 61
    return 0;
63 62
}
64 63

  

Also available in: Unified diff