Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
vl6180x_high_level_api.h
00001 /******************************************************************************* 00002 ################################################################################ 00003 # (C) STMicroelectronics 2014 00004 # 00005 # This program is free software; you can redistribute it and/or modify it under 00006 # the terms of the GNU General Public License version 2 and only version 2 as 00007 # published by the Free Software Foundation. 00008 # 00009 # This program is distributed in the hope that it will be useful, but WITHOUT 00010 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 00011 # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 00012 # details. 00013 # 00014 # You should have received a copy of the GNU General Public License along with 00015 # this program; if not, write to the Free Software Foundation, Inc., 00016 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00017 # 00018 #------------------------------------------------------------------------------ 00019 # Imaging Division 00020 ################################################################################ 00021 ********************************************************************************/ 00022 00023 /** 00024 * @file vl6180x_high_level_api.h 00025 * 00026 * @brief High level interface for the device, providing methods for basic 00027 * ranging and ambient light sensor measurement. 00028 * 00029 */ 00030 00031 #ifndef VL6180X_HL_API 00032 #define VL6180X_HL_API 00033 00034 #include "definitions.h" 00035 #include "als_driver.h" 00036 #include "ranging_driver.h" 00037 00038 00039 #ifdef __cplusplus 00040 extern "C" 00041 { 00042 #endif 00043 00044 00045 /** 00046 * @brief Function to report the Vendor ID as a string. 00047 */ 00048 sensor_error get_vendor(uint8_t *pVendorStr); 00049 00050 /** 00051 * @brief Function to report the Device Version as a string. 00052 * id : device identifier. 0, if only one device. \n 00053 * Returns -1 to report error. 00054 */ 00055 sensor_error get_version(int32_t id, uint8_t *pVersionStr); 00056 00057 00058 /** 00059 * @brief Function to return the Maximum range reported by the 00060 * sensor. 00061 */ 00062 uint32_t get_max_range(); 00063 00064 /** 00065 * @brief Function to return the Minimum range reported by the 00066 * sensor. 00067 */ 00068 uint32_t get_min_range(); 00069 00070 /** 00071 * @brief Function to perform device initialisation. \n 00072 * Returns -1 to report error. 00073 */ 00074 sensor_error initialise(uint8_t device_base_address); 00075 00076 /** 00077 * @brief Function to configure the device for single shot 00078 * ranging. \n 00079 * Returns -1 to report error. 00080 */ 00081 sensor_error start_ranging(int32_t id); 00082 00083 /** 00084 * @brief Function to configure the device for single shot 00085 * extended ranging. \n 00086 * Returns -1 to report error. 00087 */ 00088 sensor_error start_extended_ranging(int32_t id); 00089 00090 /** 00091 * @brief Function to perform a single shot range measurement 00092 * and reports the results to the given argument. \n 00093 * Pre-Requisite : Requires startRanging() to be called 00094 * beforehand. \n 00095 * Returns -1 to report error. 00096 */ 00097 sensor_error get_range_measurement(int32_t id, sensor_RangeData *pRangeData); 00098 00099 /** 00100 * @brief Function to configure the device for single shot 00101 * ALS measurements. \n 00102 * Returns -1 to report error. 00103 */ 00104 sensor_error start_als(int32_t id); 00105 00106 /** 00107 * @brief Function to perform a single shot ALS measurement 00108 * and reports the results to the given argument. \n 00109 * Pre-Requisite : Requires startAls() to be called beforehand. \n 00110 * Returns -1 to report error. 00111 */ 00112 sensor_error get_als_measurement(int32_t id, sensor_AlsData *pAlsData); 00113 00114 /** 00115 * @brief TBC 00116 */ 00117 sensor_error get_minimum_delay(); 00118 00119 #ifdef __cplusplus 00120 } 00121 #endif 00122 00123 #endif /* VL6180X_HL_API */ 00124 00125
Generated on Tue Jul 12 2022 22:19:50 by
1.7.2