Statistics
| Branch: | Revision:

scoutos / scout_avr / src / range.h @ fd73d758

History | View | Annotate | Download (404 Bytes)

1
#ifndef _RANGE_H_
2
#define _RANGE_H_
3

    
4
#define RANGE_ERR 0xFFFF
5

    
6
#define PIN_SONAR_PWM PIND
7
#define P_SONAR_PWM1 PD2
8
#define P_SONAR_PWM0 PD3
9

    
10
#define PORT_SONAR_TX PORTG
11
#define P_SONAR_TX PG1
12

    
13
// initializes timer 5, also used by bom
14
void range_init();
15

    
16
// blocks during measurement (up to 37.5ms for each)
17
// writes values into array of 2 unsigned ints
18
void range_measure(unsigned int *values);
19

    
20
#endif