Creating a project about VL6180XA1 for TT_Mxx

Committer:
ThunderSoft
Date:
Fri Apr 26 09:34:53 2019 +0000
Revision:
3:7a97a01bad5e
Parent:
0:293917667c17
"update the mbed-os code to support TT_M4G9"

Who changed what in which revision?

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