dirpd.h
Go to the documentation of this file.
1 
9 /*
10  * The contents of this file are subject to the Mozilla Public License
11  * Version 1.0 (the "License"); you may not use this file except in
12  * compliance with the License. You may obtain a copy of the License
13  * at http://www.mozilla.org/MPL/
14  *
15  * Software distributed under the License is distributed on an "AS IS"
16  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
17  * the License for the specific language governing rights and
18  * limitations under the License.
19  *
20  * Contributor(s): Mark Falco (falcom@onebox.com)
21  */
22 
23 #ifndef DIRPD_H
24 #define DIRPD_H
25 
26 //0xdec0 - sampled value for object to left
27 #define DIRPD_LEFT_S 0xd000
28 #define DIRPD_LEFT_E 0xe000
29 
30 //0xb700 - sampled value for object to right
31 #define DIRPD_RIGHT_S 0xb000
32 #define DIRPD_RIGHT_E 0xbfff
33 
34 //0xffc0 - sampled value for object to center
35 #define DIRPD_CENTER_S 0xf000
36 #define DIRPD_CENTER_E 0xffff
37 
38 //0x8d40 - sampled value for no object
39 #define DIRPD_NONE_S 0x8000
40 #define DIRPD_NONE_E 0x8fff
41 
42 
43 //pass in a value obtained from an active sensor
44 
45 #define DIRPD_LEFT(araw) (araw >= DIRPD_LEFT_S && araw <= DIRPD_LEFT_E)
46 #define DIRPD_RIGHT(araw) (araw >= DIRPD_RIGHT_S && araw <= DIRPD_RIGHT_E)
47 #define DIRPD_CENTER(araw) (araw >= DIRPD_CENTER_S && araw <= DIRPD_CENTER_E)
48 #define DIRPD_NONE(araw) (araw >= DIRPD_NONE_S && araw <= DIRPD_NONE_E)
49 
50 
51 #endif //DIRPD_H

brickOS is released under the Mozilla Public License.
Original code copyright 1998-2005 by the authors.

Generated on Sun Jun 29 2014 23:26:59 for brickOS Kernel Developer by doxygen 1.8.7