This will become a hardware abstraction layer for my mbed projects. It will make it easier to port sketches from Arduino to mbed

Dependents:   Potentiometer

Committer:
rbohne
Date:
Sat Jun 04 20:01:33 2011 +0000
Revision:
2:7e1ff33bc76a
added some basic wiring functions

Who changed what in which revision?

UserRevisionLine numberNew contents of line
rbohne 2:7e1ff33bc76a 1 /*
rbohne 2:7e1ff33bc76a 2 wiring_pulse.c - pulseIn() function
rbohne 2:7e1ff33bc76a 3 Part of Arduino - http://www.arduino.cc/
rbohne 2:7e1ff33bc76a 4
rbohne 2:7e1ff33bc76a 5 Copyright (c) 2005-2006 David A. Mellis
rbohne 2:7e1ff33bc76a 6
rbohne 2:7e1ff33bc76a 7 This library is free software; you can redistribute it and/or
rbohne 2:7e1ff33bc76a 8 modify it under the terms of the GNU Lesser General Public
rbohne 2:7e1ff33bc76a 9 License as published by the Free Software Foundation; either
rbohne 2:7e1ff33bc76a 10 version 2.1 of the License, or (at your option) any later version.
rbohne 2:7e1ff33bc76a 11
rbohne 2:7e1ff33bc76a 12 This library is distributed in the hope that it will be useful,
rbohne 2:7e1ff33bc76a 13 but WITHOUT ANY WARRANTY; without even the implied warranty of
rbohne 2:7e1ff33bc76a 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
rbohne 2:7e1ff33bc76a 15 Lesser General Public License for more details.
rbohne 2:7e1ff33bc76a 16
rbohne 2:7e1ff33bc76a 17 You should have received a copy of the GNU Lesser General
rbohne 2:7e1ff33bc76a 18 Public License along with this library; if not, write to the
rbohne 2:7e1ff33bc76a 19 Free Software Foundation, Inc., 59 Temple Place, Suite 330,
rbohne 2:7e1ff33bc76a 20 Boston, MA 02111-1307 USA
rbohne 2:7e1ff33bc76a 21
rbohne 2:7e1ff33bc76a 22 $Id: wiring.c 248 2007-02-03 15:36:30Z mellis $
rbohne 2:7e1ff33bc76a 23 */
rbohne 2:7e1ff33bc76a 24
rbohne 2:7e1ff33bc76a 25 #include "wiring_private.h"
rbohne 2:7e1ff33bc76a 26
rbohne 2:7e1ff33bc76a 27 /* Measures the length (in microseconds) of a pulse on the pin; state is HIGH
rbohne 2:7e1ff33bc76a 28 * or LOW, the type of pulse to measure. Works on pulses from 2-3 microseconds
rbohne 2:7e1ff33bc76a 29 * to 3 minutes in length, but must be called at least a few dozen microseconds
rbohne 2:7e1ff33bc76a 30 * before the start of the pulse. */
rbohne 2:7e1ff33bc76a 31 unsigned long pulseIn(uint8_t pin, uint8_t state, unsigned long timeout)
rbohne 2:7e1ff33bc76a 32 {
rbohne 2:7e1ff33bc76a 33 //not implemented
rbohne 2:7e1ff33bc76a 34 return 0;
rbohne 2:7e1ff33bc76a 35 }