summaryrefslogtreecommitdiff
path: root/n/es-2006/src/sensor_rvb.h
diff options
context:
space:
mode:
Diffstat (limited to 'n/es-2006/src/sensor_rvb.h')
-rw-r--r--n/es-2006/src/sensor_rvb.h42
1 files changed, 24 insertions, 18 deletions
diff --git a/n/es-2006/src/sensor_rvb.h b/n/es-2006/src/sensor_rvb.h
index c060f68..d138311 100644
--- a/n/es-2006/src/sensor_rvb.h
+++ b/n/es-2006/src/sensor_rvb.h
@@ -29,28 +29,33 @@
#include "io.h"
/** Manage all the RVB sensors.
-Connectors :
- ENARVB7 PORTC7
- ENARVB6 PORTC6
- ENARVB5 PORTC5
- ENARVB4 PORTC4
- ENARVB3 PORTC3
- ENARVB2 PORTC2
- ENARVB1 PORTC1
- ENANB1 PORTD6
- ENANB2 PORTC0
- OUTRVB PORTD7/PORTD4(IC1)
- S0RVB PORTF6
- S1RVB PORTF7
+ * Connectors used :
+ ENARVB7 PORTC7
+ ENARVB6 PORTC6
+ ENARVB5 PORTC5
+ ENARVB4 PORTC4
+ ENARVB3 PORTC3
+ ENARVB2 PORTC2
+ ENARVB1 PORTC1
+ ENANB1 PORTD6
+ ENANB2 PORTC0
+ OUTRVB PORTD7/PORTD4(IC1)
+ S0RVB PORTF6
+ S1RVB PORTF7
- Sensor actualy send us a frequency for a specific color. We have pins for
- selecting.
+ Sensors actualy send us a frequency for a specific color. We have pins
+ (ENA*) for selecting the sensor we want to use, some (S[01]RVB) for the
+ color we want to watch and one (OUTRVB) for the output frequency.
+ It uses the Input Capture and the Overflow interrupts.
*/
-/** Define of the TOP of the timer 1. */
-#define TC1_TOP 0x03FF
/** Maximum number of sensors we manage. */
#define RVB_MAX_SENSOR 9
+/** Define the colors indexes. */
+#define RVB_INDEX_RED 0
+#define RVB_INDEX_BLUE 1
+#define RVB_INDEX_CLEAR 2
+#define RVB_INDEX_GREEN 3
/** Results table for 9 RVB sensors (RVCB) :
* Values are in the folowing order : Red, Blue, Clear, Green. */
@@ -64,7 +69,8 @@ void sensor_rvb_init (void);
/** Start a capture RVBC values for sensors if we are not already doing one. */
void sensor_rvb_start_capture (void);
-/** Watch only one sensor. Usefull for debugging. */
+/** Watch only one sensor. Usefull for debugging.
+ * Does not work ! XXX */
void sensor_rvb_watch (uint8_t sensor_num, uint8_t color_num);
#endif // sensor_rvb_h