root / trunk / code / projects / diagnostic_station / station / hardware_ibom.h @ 1286
History | View | Annotate | Download (709 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.
|
9 |
*/
|
10 |
// FIXME do it right
|
11 |
#define IBOM_SENSOR_LEFT AN6
|
12 |
#define IBOM_SENSOR_RIGHT AN4
|
13 |
#define IBOM_SENSOR_TOP AN5
|
14 |
//#define IBOM_SENSOR_ AN6
|
15 |
|
16 |
#define IBOM_EMITTER_PIN _PIN_F3 /* Connected to A5 on the board */ |
17 |
|
18 |
/* Delay in milliseconds for lookup table to update all entries */
|
19 |
#define IBOM_ANALOG_CYCLE_TIME 10 /* Measured time was 2.4 ms */ |
20 |
|
21 |
void ibom_init (void); |
22 |
|
23 |
void ibom_set (bool on); |
24 |
void ibom_read (uint16_t *top, uint16_t *left, uint16_t *right);
|
25 |
void ibom_update (void); |
26 |
void ibom_debug (void); |
27 |
|
28 |
#endif
|