Now you can use NC as InterruptIn

Dependencies:   X_NUCLEO_COMMON

Fork of X_NUCLEO_6180XA1 by ST

Committer:
fabiombed
Date:
Fri Mar 11 09:47:43 2016 +0000
Revision:
42:692c6223dc24
Parent:
38:18abb7f7dcb2
Now you can use NC as InterruptIn

Who changed what in which revision?

UserRevisionLine numberNew contents of line
gallonm 1:1de1ea2994d9 1 /**
gallonm 1:1de1ea2994d9 2 ******************************************************************************
gallonm 3:454541a079f4 3 * @file RangeSensor.h
gallonm 1:1de1ea2994d9 4 * @author AST / EST
gallonm 1:1de1ea2994d9 5 * @version V0.0.1
gallonm 1:1de1ea2994d9 6 * @date 13-April-2015
gallonm 1:1de1ea2994d9 7 * @brief This file contains the abstract class describing in general
gallonm 3:454541a079f4 8 * the interfaces of a range sensor
gallonm 1:1de1ea2994d9 9 ******************************************************************************
gallonm 1:1de1ea2994d9 10 * @attention
gallonm 1:1de1ea2994d9 11 *
gallonm 1:1de1ea2994d9 12 * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
gallonm 1:1de1ea2994d9 13 *
gallonm 1:1de1ea2994d9 14 * Redistribution and use in source and binary forms, with or without modification,
gallonm 1:1de1ea2994d9 15 * are permitted provided that the following conditions are met:
gallonm 1:1de1ea2994d9 16 * 1. Redistributions of source code must retain the above copyright notice,
gallonm 1:1de1ea2994d9 17 * this list of conditions and the following disclaimer.
gallonm 1:1de1ea2994d9 18 * 2. Redistributions in binary form must reproduce the above copyright notice,
gallonm 1:1de1ea2994d9 19 * this list of conditions and the following disclaimer in the documentation
gallonm 1:1de1ea2994d9 20 * and/or other materials provided with the distribution.
gallonm 1:1de1ea2994d9 21 * 3. Neither the name of STMicroelectronics nor the names of its contributors
gallonm 1:1de1ea2994d9 22 * may be used to endorse or promote products derived from this software
gallonm 1:1de1ea2994d9 23 * without specific prior written permission.
gallonm 1:1de1ea2994d9 24 *
gallonm 1:1de1ea2994d9 25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
gallonm 1:1de1ea2994d9 26 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
gallonm 1:1de1ea2994d9 27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
gallonm 1:1de1ea2994d9 28 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
gallonm 1:1de1ea2994d9 29 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
gallonm 1:1de1ea2994d9 30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
gallonm 1:1de1ea2994d9 31 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
gallonm 1:1de1ea2994d9 32 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
gallonm 1:1de1ea2994d9 33 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
gallonm 1:1de1ea2994d9 34 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
gallonm 1:1de1ea2994d9 35 *
gallonm 1:1de1ea2994d9 36 ******************************************************************************
gallonm 1:1de1ea2994d9 37 */
gallonm 1:1de1ea2994d9 38
gallonm 1:1de1ea2994d9 39 /* Define to prevent from recursive inclusion --------------------------------*/
gallonm 3:454541a079f4 40 #ifndef __RANGE_SENSOR_CLASS_H
gallonm 3:454541a079f4 41 #define __RANGE_SENSOR_CLASS_H
gallonm 1:1de1ea2994d9 42
gallonm 1:1de1ea2994d9 43 /* Includes ------------------------------------------------------------------*/
mapellil 38:18abb7f7dcb2 44 #include "GenericSensor.h"
gallonm 1:1de1ea2994d9 45
gallonm 1:1de1ea2994d9 46 /* Classes ------------------------------------------------------------------*/
gallonm 3:454541a079f4 47 /** An abstract class for range sensors
gallonm 1:1de1ea2994d9 48 */
gallonm 3:454541a079f4 49 class RangeSensor : public GenericSensor
gallonm 1:1de1ea2994d9 50 {
gallonm 1:1de1ea2994d9 51 public:
gallonm 1:1de1ea2994d9 52 /**
gallonm 3:454541a079f4 53 * @brief Get current range [mm]
gallonm 3:454541a079f4 54 * @param[out] piData Pointer to where to store range to
gallonm 1:1de1ea2994d9 55 * @return 0 in case of success, an error code otherwise
gallonm 1:1de1ea2994d9 56 */
gallonm 12:71d589e6fd2c 57 virtual int GetRange(int32_t *piData) = 0;
gallonm 1:1de1ea2994d9 58 };
gallonm 1:1de1ea2994d9 59
gallonm 4:a5abf7757947 60 #endif /* __RANGE_SENSOR_CLASS_H */