RTEMS 6.1-rc1
timerRegs.h
1/* Blackfin General Purpose Timer Registers
2 *
3 * Copyright (c) 2008 Kallisti Labs, Los Gatos, CA, USA
4 * written by Allan Hessenflow <allanh@kallisti.com>
5 *
6 * The license and distribution terms for this file may be
7 * found in the file LICENSE in this distribution or at
8 * http://www.rtems.org/license/LICENSE.
9 */
10
11#ifndef _timerRegs_h_
12#define _timerRegs_h_
13
14
15/* register addresses */
16
17#define TIMER_CONFIG_OFFSET 0x00
18#define TIMER_WIDTH_OFFSET 0x04
19#define TIMER_PERIOD_OFFSET 0x08
20#define TIMER_COUNTER_OFFSET 0x0c
21
22
23/* register fields */
24
25#define TIMER_CONFIG_ERR_TYP_MASK 0xc000
26#define TIMER_CONFIG_ERR_TYP_NONE 0x0000
27#define TIMER_CONFIG_ERR_TYP_OVERFLOW 0x4000
28#define TIMER_CONFIG_ERR_TYP_PERIOD 0x8000
29#define TIMER_CONFIG_ERR_TYP_WIDTH 0xc000
30#define TIMER_CONFIG_EMU_RUN 0x0200
31#define TIMER_CONFIG_TOGGLE_HI 0x0100
32#define TIMER_CONFIG_CLK_SEL 0x0080
33#define TIMER_CONFIG_OUT_DIS 0x0040
34#define TIMER_CONFIG_TIN_SEL 0x0020
35#define TIMER_CONFIG_IRQ_ENA 0x0010
36#define TIMER_CONFIG_PERIOD_CNT 0x0008
37#define TIMER_CONFIG_PULSE_HI 0x0004
38#define TIMER_CONFIG_TMODE_MASK 0x0003
39#define TIMER_CONFIG_TMODE_RESET 0x0000
40#define TIMER_CONFIG_TMODE_PWM_OUT 0x0001
41#define TIMER_CONFIG_TMODE_WDTH_CAP 0x0002
42#define TIMER_CONFIG_TMODE_EXT_CLK 0x0003
43
44
45#endif /* _timerRegs_h_ */