aboutsummaryrefslogtreecommitdiff
path: root/include/arch/timer.h
blob: a94fda48f52b186748a8b3c22b96842ca2017f89 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef APOS_ARCH_TIMER_H
#define APOS_ARCH_TIMER_H

/**
 * @file timer.h
 * Arch-specific timer handling, generally implemented in
 * arch/whatever/timer.c
 */

#include <apos/timer.h>

#if defined(riscv64)
#include "../../arch/riscv64/include/timer.h"
#elif defined(riscv32)
#include "../../arch/riscv32/include/timer.h"
#endif

/* return hardware timer frequency */
ticks_t stat_timer();

/* set up timer interrupt for absolute ticks */
void set_timer(ticks_t ticks);

/* current ticks */
ticks_t current_ticks();

#endif /* APOS_ARCH_TIMER_H */