Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | pj | 1 | /***************************************************************************** |
2 | * Filename: Timer.h * |
||
3 | * Author: Ziglioli Marco (Doctor Stein) * |
||
4 | * Date: 23/03/2001 * |
||
5 | * Last update: * |
||
6 | * Description: Header file for routines used to configure and manage General * |
||
7 | * Purpouse Timer Conter on PCI6025E board * |
||
8 | *----------------------------------------------------------------------------* |
||
9 | * Notes: I only need time measurament, other features like events * |
||
10 | * count position sensing or signal generation are not * |
||
11 | * implemented yet * |
||
12 | *****************************************************************************/ |
||
13 | |||
14 | /* This file is part of the S.Ha.R.K. Project - http://shark.sssup.it |
||
15 | * |
||
16 | * Copyright (C) 2001 Marco Ziglioli |
||
17 | * |
||
18 | * This program is free software; you can redistribute it and/or modify |
||
19 | * it under the terms of the GNU General Public License as published by |
||
20 | * the Free Software Foundation; either version 2 of the License, or |
||
21 | * (at your option) any later version. |
||
22 | * |
||
23 | * This program is distributed in the hope that it will be useful, |
||
24 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
25 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
26 | * GNU General Public License for more details. |
||
27 | * |
||
28 | * You should have received a copy of the GNU General Public License |
||
29 | * along with this program; if not, write to the Free Software |
||
30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
||
31 | * |
||
32 | */ |
||
33 | |||
34 | |||
35 | #ifndef _PCI6025_TIMER_H_ |
||
36 | #define _PCI6025_TIMER_H_ |
||
37 | |||
38 | #include <drivers/pci6025e/pci6025e.h> |
||
39 | #include <drivers/pci6025e/regconst.h> |
||
40 | |||
41 | #define C0 0 |
||
42 | #define C1 1 |
||
43 | |||
44 | WORD g0_command, g0_mode, g0_input_select, g0_autoincrement, |
||
45 | g1_command, g1_mode, g1_input_select, g1_autoincrement; |
||
46 | |||
47 | void reset_counter_0(void); |
||
48 | void reset_counter_1(void); |
||
49 | void arm_counter_0(void); |
||
50 | void arm_counter_1(void); |
||
51 | void disarm_counter_0(void); |
||
52 | void disarm_counter_1(void); |
||
53 | |||
54 | void TIM_reset(BYTE); |
||
55 | void TIM_arm(BYTE); |
||
56 | void TIM_disarm(BYTE); |
||
57 | |||
58 | DWORD TIM_readCounter(BYTE); |
||
59 | DWORD TIM_readHWSaveReg(BYTE); |
||
60 | |||
61 | void TIM_eventCounting(BYTE, BYTE, BYTE, BYTE, DWORD); |
||
62 | void TIM_bufferedEventCounting(BYTE, BYTE, BYTE, BYTE, DWORD); |
||
63 | void TIM_timeMeasurement(BYTE, BYTE, BYTE, BYTE, BYTE, DWORD); |
||
64 | void TIM_bufferedTimeMeasurement(BYTE, BYTE, BYTE, BYTE, DWORD); |
||
65 | #endif |
||
66 | /*--------------------------------------------------------------------------*/ |