1/**
2 * \file
3 * \brief x86 legacy timer driver (PIT).
4 */
5
6/*
7 * Copyright (c) 2007, 2008, 2009, 2010, ETH Zurich.
8 * All rights reserved.
9 *
10 * This file is distributed under the terms in the attached LICENSE file.
11 * If you do not find this file, copies can be found by writing to:
12 * ETH Zurich D-INFK, Universitaetstrasse 6, CH-8092 Zurich. Attn: Systems Group.
13 */
14
15#ifndef PIT_H
16#define PIT_H
17
18/// Period of LPC timer 0 counter, in nanoseconds
19#define PIT_TIMER0_PERIOD_NS    838
20#define PIT_TIMER0_FREQUENCY    1193182
21
22void pit_init(void);
23void pit_timer0_set(uint16_t count, bool periodic, bool only_lsb);
24uint16_t pit_timer0_read(void);
25uint8_t pit_timer0_read_lsb(void);
26
27#endif
28