From 90527d1cf27582b1e7bb8588afbed8989453f606 Mon Sep 17 00:00:00 2001 From: Florent Duchon Date: Sat, 21 Apr 2012 16:42:16 +0200 Subject: digital/beacon: split sensors.* into codewheel.* & laser.* and modify dedicated calls --- digital/beacon/src/laser.c | 121 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 digital/beacon/src/laser.c (limited to 'digital/beacon/src/laser.c') diff --git a/digital/beacon/src/laser.c b/digital/beacon/src/laser.c new file mode 100644 index 00000000..9d9d1fe0 --- /dev/null +++ b/digital/beacon/src/laser.c @@ -0,0 +1,121 @@ +/* laser.c */ +/* laser sensor management. {{{ + * + * Copyright (C) 2012 Florent Duchon + * + * APBTeam: + * Web: http://apbteam.org/ + * Email: team AT apbteam DOT org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * }}} */ + +#include +#include +#include "debug.h" +#include "laser.h" + + +/* This function initializes the laser pin input and associated interrupt */ +void laser_init(void) +{ + /* Configure Input compare interrupts for Laser Interrupt*/ + TCCR3B |= (1<