summaryrefslogtreecommitdiff
path: root/digital/beacon/src/sensors.c
diff options
context:
space:
mode:
Diffstat (limited to 'digital/beacon/src/sensors.c')
-rw-r--r--digital/beacon/src/sensors.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/digital/beacon/src/sensors.c b/digital/beacon/src/sensors.c
index be7f6ea0..d1418440 100644
--- a/digital/beacon/src/sensors.c
+++ b/digital/beacon/src/sensors.c
@@ -33,8 +33,11 @@
/* This function initializes the laser pin input and associated interrupt */
void sensors_laser_init(void)
-{
- HAL_RegisterIrq(IRQ_7,IRQ_RISING_EDGE,sensors_laser_irq_vector);
+{
+ /* Configure Input compare interrupts for Laser Interrupt*/
+ TCCR3B |= (1<<ICNC3)|(1<<ICES3);
+ TIMSK3 |= (1<<ICIE3);
+ sei();
}
@@ -55,6 +58,7 @@ void sensors_codewheel_init(void)
sei();
}
+
/* This function returns the wheel position */
uint16_t sensors_codewheel_get_value(void)
{
@@ -72,3 +76,9 @@ ISR(TIMER3_COMPA_vect)
{
//Top tour ++
}
+
+/* IRQ vector for Laser Interrupt */
+ISR(TIMER3_CAPT_vect)
+{
+ // LASER
+}