ST Expansion SW Team / Vl6180

Dependencies:   VL6180_Board

Dependents:   X_NUCLEO_6180

Committer:
charlesmn
Date:
Tue Nov 10 16:09:01 2020 +0000
Revision:
3:b01812cb5250
Used the correct version of RangeSensor.h which allows the program to build.

Who changed what in which revision?

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