]> rtime.felk.cvut.cz Git - eurobot/public.git/blob - src/eb_lift_09/irc.h
robofsm: Map 2012
[eurobot/public.git] / src / eb_lift_09 / irc.h
1 #include <lpc21xx.h>
2 #include <types.h>
3
4 #define IRC1PIN     IO0PIN
5 #define IRC1DIR     IO0DIR
6 #define IRC1BIT     15
7 #define IRC1PINSEL  PINSEL0
8 #define IRC1PINBIT  (2*IRC1BIT)
9
10 #define IRC2PIN     IO0PIN
11 #define IRC2DIR     IO0DIR
12 #define IRC2BIT     18
13 #define IRC2PINSEL  PINSEL1
14 #define IRC2PINBIT  (2*2)                       // FIXME possible error
15
16 /* IRC number counts, incremented on falling edges */
17  volatile int32_t irc1_count, irc2_count;
18
19 void irc_init();
20 int irc_read();