root / trunk / code / projects / colonet / utilities / dragonfly_wireless_relay / bom.h @ 13
History | View | Annotate | Download (980 Bytes)
1 |
|
---|---|
2 |
#ifndef _BOM_H
|
3 |
#define _BOM_H
|
4 |
|
5 |
|
6 |
/*
|
7 |
|
8 |
|
9 |
Bk R Y (Analog)
|
10 |
---------
|
11 |
Green
|
12 |
Blue
|
13 |
White
|
14 |
---------
|
15 |
Blue
|
16 |
White
|
17 |
|
18 |
*/
|
19 |
|
20 |
|
21 |
/*
|
22 |
the analog pin definitions from dio.h DO NOT work here,
|
23 |
so we must use PF0 from avrgcc (as opposed to _PIN_F0).
|
24 |
BUT the dio pin definitions from dio.h must be used (no PE...).
|
25 |
|
26 |
also, _PIN_E2 is initialized to high for some reason,
|
27 |
which turns the BOM on when the robot is turned on.
|
28 |
WORK-AROUND: call digital_output(_PIN_E2,0) at some point.
|
29 |
|
30 |
*/
|
31 |
|
32 |
#define MONKI PF0 //analog (yellow) |
33 |
//------------------------//
|
34 |
#define MONKL _PIN_E2 //green |
35 |
#define MONK1 _PIN_E3 //blue |
36 |
#define MONK0 _PIN_E4 //white |
37 |
//------------------------//
|
38 |
#define MONK3 _PIN_E6 //blue |
39 |
#define MONK2 _PIN_E7 //white |
40 |
|
41 |
|
42 |
int getMaxBom( void ); |
43 |
|
44 |
int printAllBoms(void); |
45 |
char bytetosymb(unsigned int c); |
46 |
|
47 |
void bom_on(void); |
48 |
void bom_off(void); |
49 |
|
50 |
void output_high(int which); |
51 |
void output_low(int which); |
52 |
|
53 |
|
54 |
#endif
|
55 |
|