Project

General

Profile

Statistics
| Revision:

root / proj / src / libs / timer / include / timer.h @ 382

History | View | Annotate | Download (959 Bytes)

1 334 up20180642
#ifndef TIMER_H_INCLUDED
2
#define TIMER_H_INCLUDED
3
4 146 up20180655
/**
5 334 up20180642
 * @defgroup    timer   timer
6 351 up20180642
 * @ingroup libs
7 334 up20180642
 * @brief   Timer module.
8
 *
9
 * @{
10 146 up20180655
 */
11
12 334 up20180642
/** @brief Timer 0 IRQ line */
13
#define TIMER0_IRQ     0
14 146 up20180655
15 339 up20180642
/**
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 146 up20180655
int (subscribe_timer_interrupt)(uint8_t interrupt_bit, int *interrupt_id);
23
24 339 up20180642
/**
25
 * @brief Timer interrupt handler. Increases interrupt counter.
26
 */
27 323 up20180642
void (timer_int_handler)(void);
28
29 339 up20180642
/**
30
 * @brief Get number of timer interrupts.
31
 * @return  Number of timer interrupts.
32
 */
33 321 up20180642
uint32_t (timer_get_no_interrupts)(void);
34 146 up20180655
35 334 up20180642
/**
36
 * @}
37
 */
38
39 146 up20180655
#endif //TIMER_H_INCLUDED