Project

General

Profile

Statistics
| Revision:

root / proj / libs / timer / include / timer.h @ 362

History | View | Annotate | Download (959 Bytes)

1
#ifndef TIMER_H_INCLUDED
2
#define TIMER_H_INCLUDED
3

    
4
/**
5
 * @defgroup    timer   timer
6
 * @ingroup libs
7
 * @brief   Timer module.
8
 *
9
 * @{
10
 */
11

    
12
/** @brief Timer 0 IRQ line */
13
#define TIMER0_IRQ     0
14

    
15
/**
16
 * @brief Subscribes Timer Interrupts and disables Minix Default IH.
17
 * @param interrupt_bit Bit of Interrupt Vector that will be set when Timer Interrupt is pending
18
 * @param interrupt_id Timer Interrupt ID to specify the Timer Interrupt in other calls
19
 * @return ERROR_CODE code representing the result of the operation, SUCCESS code is returned if everything is OK
20
 * @see {_ERRORS_H_::errors}
21
 */
22
int (subscribe_timer_interrupt)(uint8_t interrupt_bit, int *interrupt_id);
23

    
24
/**
25
 * @brief Timer interrupt handler. Increases interrupt counter.
26
 */
27
void (timer_int_handler)(void);
28

    
29
/**
30
 * @brief Get number of timer interrupts.
31
 * @return  Number of timer interrupts.
32
 */
33
uint32_t (timer_get_no_interrupts)(void);
34

    
35
/**
36
 * @}
37
 */
38

    
39
#endif //TIMER_H_INCLUDED