508 |
kaklik |
1 |
/*
|
|
|
2 |
* Copyright (C) 2004 Darren Hutchinson (dbh@gbdt.com.au)
|
|
|
3 |
*
|
|
|
4 |
* This program is free software; you can redistribute it and/or modify
|
|
|
5 |
* it under the terms of the GNU Library General Public License as published by
|
|
|
6 |
* the Free Software Foundation; either version 2 of the License, or (at your
|
|
|
7 |
* option) any later version.
|
|
|
8 |
*
|
|
|
9 |
* This program is distributed in the hope that it will be useful, but
|
|
|
10 |
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
|
11 |
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
|
|
|
12 |
* License for more details.
|
|
|
13 |
*
|
|
|
14 |
* You should have received a copy of the GNU Library General Public License
|
|
|
15 |
* along with this software; see the file COPYING. If not, write to
|
|
|
16 |
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
|
|
17 |
* MA 02111-1307, USA.
|
|
|
18 |
*
|
|
|
19 |
* $Id: pguide.h,v 1.1.1.1 2004/02/22 08:12:42 dbh Exp $
|
|
|
20 |
*/
|
|
|
21 |
#ifndef _PGUIDE_H_
|
|
|
22 |
#define _PGUIDE_H_
|
|
|
23 |
|
|
|
24 |
/* This file has the definitions used to poll the parallel guiding input
|
|
|
25 |
* pins.
|
|
|
26 |
*
|
|
|
27 |
* These pins are pulled high by the internal CPU pullups and should be
|
|
|
28 |
* driven low by the guiding input
|
|
|
29 |
*/
|
|
|
30 |
#define GUIDE_PORT PORTD
|
|
|
31 |
#define GUIDE_PIN PIND
|
|
|
32 |
#define GUIDE_DDR DDRD
|
|
|
33 |
|
|
|
34 |
#define G_UP PD4
|
|
|
35 |
#define G_DN PD5
|
|
|
36 |
#define G_RT PD6
|
|
|
37 |
#define G_LT PD7
|
|
|
38 |
|
|
|
39 |
/* Define the polling rate (in HZ). For the current software the
|
|
|
40 |
* range is 30Hz to 7800Hz @ 8 MHz, and 60Hz to 15KHz @ 16MHz.
|
|
|
41 |
*
|
|
|
42 |
* A good value would be about 200 Hz (ie. 5ms debounce time)
|
|
|
43 |
*/
|
|
|
44 |
#define GUIDE_RATE 200
|
|
|
45 |
|
|
|
46 |
/* Prototypes */
|
|
|
47 |
void pguideInit(void);
|
|
|
48 |
|
|
|
49 |
#endif /* _PGUIDE_H_ */
|