Project

General

Profile

Statistics
| Revision:

root / trunk / code / projects / diagnostic_station / station / hardware_ibom.h @ 1305

History | View | Annotate | Download (738 Bytes)

1
#ifndef _hardware_ibom_h
2
#define _hardware_ibom_h
3

    
4
#include <dragonfly_lib.h>
5
#include "global.h"
6

    
7
/* 
8
 * Inverse BOM sensor macros for left, right, and top positions. "Left" and "right" is as seen from the station, looking
9
 * towards the robot.
10
 */
11
#define IBOM_SENSOR_LEFT AN6
12
#define IBOM_SENSOR_RIGHT AN4
13
#define IBOM_SENSOR_TOP AN5
14

    
15
#define IBOM_EMITTER_PIN _PIN_F3        /* Connected to A5 on the board */
16

    
17
/* Delay in milliseconds for lookup table to update all entries */
18
#define IBOM_ANALOG_CYCLE_TIME 10        /* Measured time was 2.4 ms */
19

    
20
void ibom_init (void);
21

    
22
void ibom_set (bool on);
23
void ibom_read (uint16_t *top, uint16_t *left, uint16_t *right);
24
void ibom_update (void);
25
void ibom_debug (void);
26

    
27
#endif