Project

General

Profile

Statistics
| Revision:

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

History | View | Annotate | Download (942 Bytes)

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