Project

General

Profile

Statistics
| Branch: | Revision:

root / scout_avr / src / cliffSensor.h @ 4bdd00ba

History | View | Annotate | Download (439 Bytes)

1 ac53b84f Anson Wang
#ifndef _CLIFFSENSOR_H_
2
#define _CLIFFSENSOR_H_
3
4
#include <avr/io.h>
5
#include <avr/interrupt.h>
6
7
void cliffSensor_init(void);
8
bool read_cliffSensor_front(void);
9
bool read_cliffSensor_left(void);
10
bool read_cliffSensor_right(void);
11
12 18db4dfa AnsonLinux
/* The returned result is in the form of left_front_right; 
13
 * For example, if both left and front sensors detect a cliff, 
14
 * the returned value is 0b110 */
15 ac53b84f Anson Wang
unsigned char read_cliffSensor_all(void);
16
17 60800b68 AnsonLinux
#endif