root / proj / libs / timer / include / timer.h @ 346
History | View | Annotate | Download (942 Bytes)
1 |
#ifndef TIMER_H_INCLUDED
|
---|---|
2 |
#define TIMER_H_INCLUDED
|
3 |
|
4 |
/**
|
5 |
* @defgroup timer timer
|
6 |
* @brief Timer module.
|
7 |
*
|
8 |
* @{
|
9 |
*/
|
10 |
|
11 |
/** @brief Timer 0 IRQ line */
|
12 |
#define TIMER0_IRQ 0 |
13 |
|
14 |
/**
|
15 |
* @brief Subscribes Timer Interrupts and disables Minix Default IH.
|
16 |
* @param interrupt_bit Bit of Interrupt Vector that will be set when Timer Interrupt is pending
|
17 |
* @param interrupt_id Timer Interrupt ID to specify the Timer Interrupt in other calls
|
18 |
* @return ERROR_CODE code representing the result of the operation, SUCCESS code is returned if everything is OK
|
19 |
* @see {_ERRORS_H_::errors}
|
20 |
*/
|
21 |
int (subscribe_timer_interrupt)(uint8_t interrupt_bit, int *interrupt_id); |
22 |
|
23 |
/**
|
24 |
* @brief Timer interrupt handler. Increases interrupt counter.
|
25 |
*/
|
26 |
void (timer_int_handler)(void); |
27 |
|
28 |
/**
|
29 |
* @brief Get number of timer interrupts.
|
30 |
* @return Number of timer interrupts.
|
31 |
*/
|
32 |
uint32_t (timer_get_no_interrupts)(void);
|
33 |
|
34 |
/**
|
35 |
* @}
|
36 |
*/
|
37 |
|
38 |
#endif //TIMER_H_INCLUDED |