A mbed library for the VL53L0X proximity sensor. This is a wrapper, so beware of big file sizes.
Dependents: BigBot_v1 PololuDistanceSensorTest Lidar Ares test ... more
core/inc/vl53l0x_api.h@1:ccc67c76fecb, 2019-07-30 (annotated)
- Committer:
- joelvonrotz
- Date:
- Tue Jul 30 13:56:11 2019 +0000
- Revision:
- 1:ccc67c76fecb
- Parent:
- 0:11ad6aaed10a
updated to mbed doc-format
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
joelvonrotz | 0:11ad6aaed10a | 1 | /******************************************************************************* |
joelvonrotz | 0:11ad6aaed10a | 2 | Copyright © 2016, STMicroelectronics International N.V. |
joelvonrotz | 0:11ad6aaed10a | 3 | All rights reserved. |
joelvonrotz | 0:11ad6aaed10a | 4 | |
joelvonrotz | 0:11ad6aaed10a | 5 | Redistribution and use in source and binary forms, with or without |
joelvonrotz | 0:11ad6aaed10a | 6 | modification, are permitted provided that the following conditions are met: |
joelvonrotz | 0:11ad6aaed10a | 7 | * Redistributions of source code must retain the above copyright |
joelvonrotz | 0:11ad6aaed10a | 8 | notice, this list of conditions and the following disclaimer. |
joelvonrotz | 0:11ad6aaed10a | 9 | * Redistributions in binary form must reproduce the above copyright |
joelvonrotz | 0:11ad6aaed10a | 10 | notice, this list of conditions and the following disclaimer in the |
joelvonrotz | 0:11ad6aaed10a | 11 | documentation and/or other materials provided with the distribution. |
joelvonrotz | 0:11ad6aaed10a | 12 | * Neither the name of STMicroelectronics nor the |
joelvonrotz | 0:11ad6aaed10a | 13 | names of its contributors may be used to endorse or promote products |
joelvonrotz | 0:11ad6aaed10a | 14 | derived from this software without specific prior written permission. |
joelvonrotz | 0:11ad6aaed10a | 15 | |
joelvonrotz | 0:11ad6aaed10a | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
joelvonrotz | 0:11ad6aaed10a | 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
joelvonrotz | 0:11ad6aaed10a | 18 | WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND |
joelvonrotz | 0:11ad6aaed10a | 19 | NON-INFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS ARE DISCLAIMED. |
joelvonrotz | 0:11ad6aaed10a | 20 | IN NO EVENT SHALL STMICROELECTRONICS INTERNATIONAL N.V. BE LIABLE FOR ANY |
joelvonrotz | 0:11ad6aaed10a | 21 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
joelvonrotz | 0:11ad6aaed10a | 22 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
joelvonrotz | 0:11ad6aaed10a | 23 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
joelvonrotz | 0:11ad6aaed10a | 24 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
joelvonrotz | 0:11ad6aaed10a | 25 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
joelvonrotz | 0:11ad6aaed10a | 26 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
joelvonrotz | 0:11ad6aaed10a | 27 | *****************************************************************************/ |
joelvonrotz | 0:11ad6aaed10a | 28 | |
joelvonrotz | 0:11ad6aaed10a | 29 | #ifndef _VL53L0X_API_H_ |
joelvonrotz | 0:11ad6aaed10a | 30 | #define _VL53L0X_API_H_ |
joelvonrotz | 0:11ad6aaed10a | 31 | |
joelvonrotz | 0:11ad6aaed10a | 32 | #include "vl53l0x_api_strings.h" |
joelvonrotz | 0:11ad6aaed10a | 33 | #include "vl53l0x_def.h" |
joelvonrotz | 0:11ad6aaed10a | 34 | #include "vl53l0x_platform.h" |
joelvonrotz | 0:11ad6aaed10a | 35 | |
joelvonrotz | 0:11ad6aaed10a | 36 | #ifdef __cplusplus |
joelvonrotz | 0:11ad6aaed10a | 37 | extern "C" |
joelvonrotz | 0:11ad6aaed10a | 38 | { |
joelvonrotz | 0:11ad6aaed10a | 39 | #endif |
joelvonrotz | 0:11ad6aaed10a | 40 | |
joelvonrotz | 0:11ad6aaed10a | 41 | #ifdef _MSC_VER |
joelvonrotz | 0:11ad6aaed10a | 42 | # ifdef VL53L0X_API_EXPORTS |
joelvonrotz | 0:11ad6aaed10a | 43 | # define VL53L0X_API __declspec(dllexport) |
joelvonrotz | 0:11ad6aaed10a | 44 | # else |
joelvonrotz | 0:11ad6aaed10a | 45 | # define VL53L0X_API |
joelvonrotz | 0:11ad6aaed10a | 46 | # endif |
joelvonrotz | 0:11ad6aaed10a | 47 | #else |
joelvonrotz | 0:11ad6aaed10a | 48 | # define VL53L0X_API |
joelvonrotz | 0:11ad6aaed10a | 49 | #endif |
joelvonrotz | 0:11ad6aaed10a | 50 | |
joelvonrotz | 0:11ad6aaed10a | 51 | /** @defgroup VL53L0X_cut11_group VL53L0X cut1.1 Function Definition |
joelvonrotz | 0:11ad6aaed10a | 52 | * @brief VL53L0X cut1.1 Function Definition |
joelvonrotz | 0:11ad6aaed10a | 53 | * @{ |
joelvonrotz | 0:11ad6aaed10a | 54 | */ |
joelvonrotz | 0:11ad6aaed10a | 55 | |
joelvonrotz | 0:11ad6aaed10a | 56 | /** @defgroup VL53L0X_general_group VL53L0X General Functions |
joelvonrotz | 0:11ad6aaed10a | 57 | * @brief General functions and definitions |
joelvonrotz | 0:11ad6aaed10a | 58 | * @{ |
joelvonrotz | 0:11ad6aaed10a | 59 | */ |
joelvonrotz | 0:11ad6aaed10a | 60 | |
joelvonrotz | 0:11ad6aaed10a | 61 | /** |
joelvonrotz | 0:11ad6aaed10a | 62 | * @brief Return the VL53L0X PAL Implementation Version |
joelvonrotz | 0:11ad6aaed10a | 63 | * |
joelvonrotz | 0:11ad6aaed10a | 64 | * @note This function doesn't access to the device |
joelvonrotz | 0:11ad6aaed10a | 65 | * |
joelvonrotz | 0:11ad6aaed10a | 66 | * @param pVersion Pointer to current PAL Implementation Version |
joelvonrotz | 0:11ad6aaed10a | 67 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 68 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 69 | */ |
joelvonrotz | 0:11ad6aaed10a | 70 | VL53L0X_API VL53L0X_Error VL53L0X_GetVersion(VL53L0X_Version_t *pVersion); |
joelvonrotz | 0:11ad6aaed10a | 71 | |
joelvonrotz | 0:11ad6aaed10a | 72 | /** |
joelvonrotz | 0:11ad6aaed10a | 73 | * @brief Return the PAL Specification Version used for the current |
joelvonrotz | 0:11ad6aaed10a | 74 | * implementation. |
joelvonrotz | 0:11ad6aaed10a | 75 | * |
joelvonrotz | 0:11ad6aaed10a | 76 | * @note This function doesn't access to the device |
joelvonrotz | 0:11ad6aaed10a | 77 | * |
joelvonrotz | 0:11ad6aaed10a | 78 | * @param pPalSpecVersion Pointer to current PAL Specification Version |
joelvonrotz | 0:11ad6aaed10a | 79 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 80 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 81 | */ |
joelvonrotz | 0:11ad6aaed10a | 82 | VL53L0X_API VL53L0X_Error VL53L0X_GetPalSpecVersion( |
joelvonrotz | 0:11ad6aaed10a | 83 | VL53L0X_Version_t *pPalSpecVersion); |
joelvonrotz | 0:11ad6aaed10a | 84 | |
joelvonrotz | 0:11ad6aaed10a | 85 | /** |
joelvonrotz | 0:11ad6aaed10a | 86 | * @brief Reads the Product Revision for a for given Device |
joelvonrotz | 0:11ad6aaed10a | 87 | * This function can be used to distinguish cut1.0 from cut1.1. |
joelvonrotz | 0:11ad6aaed10a | 88 | * |
joelvonrotz | 0:11ad6aaed10a | 89 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 90 | * |
joelvonrotz | 0:11ad6aaed10a | 91 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 92 | * @param pProductRevisionMajor Pointer to Product Revision Major |
joelvonrotz | 0:11ad6aaed10a | 93 | * for a given Device |
joelvonrotz | 0:11ad6aaed10a | 94 | * @param pProductRevisionMinor Pointer to Product Revision Minor |
joelvonrotz | 0:11ad6aaed10a | 95 | * for a given Device |
joelvonrotz | 0:11ad6aaed10a | 96 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 97 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 98 | */ |
joelvonrotz | 0:11ad6aaed10a | 99 | VL53L0X_API VL53L0X_Error VL53L0X_GetProductRevision(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 100 | uint8_t *pProductRevisionMajor, uint8_t *pProductRevisionMinor); |
joelvonrotz | 0:11ad6aaed10a | 101 | |
joelvonrotz | 0:11ad6aaed10a | 102 | /** |
joelvonrotz | 0:11ad6aaed10a | 103 | * @brief Reads the Device information for given Device |
joelvonrotz | 0:11ad6aaed10a | 104 | * |
joelvonrotz | 0:11ad6aaed10a | 105 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 106 | * |
joelvonrotz | 0:11ad6aaed10a | 107 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 108 | * @param pVL53L0X_DeviceInfo Pointer to current device info for a given |
joelvonrotz | 0:11ad6aaed10a | 109 | * Device |
joelvonrotz | 0:11ad6aaed10a | 110 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 111 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 112 | */ |
joelvonrotz | 0:11ad6aaed10a | 113 | VL53L0X_API VL53L0X_Error VL53L0X_GetDeviceInfo(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 114 | VL53L0X_DeviceInfo_t *pVL53L0X_DeviceInfo); |
joelvonrotz | 0:11ad6aaed10a | 115 | |
joelvonrotz | 0:11ad6aaed10a | 116 | /** |
joelvonrotz | 0:11ad6aaed10a | 117 | * @brief Read current status of the error register for the selected device |
joelvonrotz | 0:11ad6aaed10a | 118 | * |
joelvonrotz | 0:11ad6aaed10a | 119 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 120 | * |
joelvonrotz | 0:11ad6aaed10a | 121 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 122 | * @param pDeviceErrorStatus Pointer to current error code of the device |
joelvonrotz | 0:11ad6aaed10a | 123 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 124 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 125 | */ |
joelvonrotz | 0:11ad6aaed10a | 126 | VL53L0X_API VL53L0X_Error VL53L0X_GetDeviceErrorStatus(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 127 | VL53L0X_DeviceError *pDeviceErrorStatus); |
joelvonrotz | 0:11ad6aaed10a | 128 | |
joelvonrotz | 0:11ad6aaed10a | 129 | /** |
joelvonrotz | 0:11ad6aaed10a | 130 | * @brief Human readable Range Status string for a given RangeStatus |
joelvonrotz | 0:11ad6aaed10a | 131 | * |
joelvonrotz | 0:11ad6aaed10a | 132 | * @note This function doesn't access to the device |
joelvonrotz | 0:11ad6aaed10a | 133 | * |
joelvonrotz | 0:11ad6aaed10a | 134 | * @param RangeStatus The RangeStatus code as stored on |
joelvonrotz | 0:11ad6aaed10a | 135 | * @a VL53L0X_RangingMeasurementData_t |
joelvonrotz | 0:11ad6aaed10a | 136 | * @param pRangeStatusString The returned RangeStatus string. |
joelvonrotz | 0:11ad6aaed10a | 137 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 138 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 139 | */ |
joelvonrotz | 0:11ad6aaed10a | 140 | VL53L0X_API VL53L0X_Error VL53L0X_GetRangeStatusString(uint8_t RangeStatus, |
joelvonrotz | 0:11ad6aaed10a | 141 | char *pRangeStatusString); |
joelvonrotz | 0:11ad6aaed10a | 142 | |
joelvonrotz | 0:11ad6aaed10a | 143 | /** |
joelvonrotz | 0:11ad6aaed10a | 144 | * @brief Human readable error string for a given Error Code |
joelvonrotz | 0:11ad6aaed10a | 145 | * |
joelvonrotz | 0:11ad6aaed10a | 146 | * @note This function doesn't access to the device |
joelvonrotz | 0:11ad6aaed10a | 147 | * |
joelvonrotz | 0:11ad6aaed10a | 148 | * @param ErrorCode The error code as stored on ::VL53L0X_DeviceError |
joelvonrotz | 0:11ad6aaed10a | 149 | * @param pDeviceErrorString The error string corresponding to the ErrorCode |
joelvonrotz | 0:11ad6aaed10a | 150 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 151 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 152 | */ |
joelvonrotz | 0:11ad6aaed10a | 153 | VL53L0X_API VL53L0X_Error VL53L0X_GetDeviceErrorString( |
joelvonrotz | 0:11ad6aaed10a | 154 | VL53L0X_DeviceError ErrorCode, char *pDeviceErrorString); |
joelvonrotz | 0:11ad6aaed10a | 155 | |
joelvonrotz | 0:11ad6aaed10a | 156 | /** |
joelvonrotz | 0:11ad6aaed10a | 157 | * @brief Human readable error string for current PAL error status |
joelvonrotz | 0:11ad6aaed10a | 158 | * |
joelvonrotz | 0:11ad6aaed10a | 159 | * @note This function doesn't access to the device |
joelvonrotz | 0:11ad6aaed10a | 160 | * |
joelvonrotz | 0:11ad6aaed10a | 161 | * @param PalErrorCode The error code as stored on @a VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 162 | * @param pPalErrorString The error string corresponding to the |
joelvonrotz | 0:11ad6aaed10a | 163 | * PalErrorCode |
joelvonrotz | 0:11ad6aaed10a | 164 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 165 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 166 | */ |
joelvonrotz | 0:11ad6aaed10a | 167 | VL53L0X_API VL53L0X_Error VL53L0X_GetPalErrorString(VL53L0X_Error PalErrorCode, |
joelvonrotz | 0:11ad6aaed10a | 168 | char *pPalErrorString); |
joelvonrotz | 0:11ad6aaed10a | 169 | |
joelvonrotz | 0:11ad6aaed10a | 170 | /** |
joelvonrotz | 0:11ad6aaed10a | 171 | * @brief Human readable PAL State string |
joelvonrotz | 0:11ad6aaed10a | 172 | * |
joelvonrotz | 0:11ad6aaed10a | 173 | * @note This function doesn't access to the device |
joelvonrotz | 0:11ad6aaed10a | 174 | * |
joelvonrotz | 0:11ad6aaed10a | 175 | * @param PalStateCode The State code as stored on @a VL53L0X_State |
joelvonrotz | 0:11ad6aaed10a | 176 | * @param pPalStateString The State string corresponding to the |
joelvonrotz | 0:11ad6aaed10a | 177 | * PalStateCode |
joelvonrotz | 0:11ad6aaed10a | 178 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 179 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 180 | */ |
joelvonrotz | 0:11ad6aaed10a | 181 | VL53L0X_API VL53L0X_Error VL53L0X_GetPalStateString(VL53L0X_State PalStateCode, |
joelvonrotz | 0:11ad6aaed10a | 182 | char *pPalStateString); |
joelvonrotz | 0:11ad6aaed10a | 183 | |
joelvonrotz | 0:11ad6aaed10a | 184 | /** |
joelvonrotz | 0:11ad6aaed10a | 185 | * @brief Reads the internal state of the PAL for a given Device |
joelvonrotz | 0:11ad6aaed10a | 186 | * |
joelvonrotz | 0:11ad6aaed10a | 187 | * @note This function doesn't access to the device |
joelvonrotz | 0:11ad6aaed10a | 188 | * |
joelvonrotz | 0:11ad6aaed10a | 189 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 190 | * @param pPalState Pointer to current state of the PAL for a |
joelvonrotz | 0:11ad6aaed10a | 191 | * given Device |
joelvonrotz | 0:11ad6aaed10a | 192 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 193 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 194 | */ |
joelvonrotz | 0:11ad6aaed10a | 195 | VL53L0X_API VL53L0X_Error VL53L0X_GetPalState(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 196 | VL53L0X_State *pPalState); |
joelvonrotz | 0:11ad6aaed10a | 197 | |
joelvonrotz | 0:11ad6aaed10a | 198 | /** |
joelvonrotz | 0:11ad6aaed10a | 199 | * @brief Set the power mode for a given Device |
joelvonrotz | 0:11ad6aaed10a | 200 | * The power mode can be Standby or Idle. Different level of both Standby and |
joelvonrotz | 0:11ad6aaed10a | 201 | * Idle can exists. |
joelvonrotz | 0:11ad6aaed10a | 202 | * This function should not be used when device is in Ranging state. |
joelvonrotz | 0:11ad6aaed10a | 203 | * |
joelvonrotz | 0:11ad6aaed10a | 204 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 205 | * |
joelvonrotz | 0:11ad6aaed10a | 206 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 207 | * @param PowerMode The value of the power mode to set. |
joelvonrotz | 0:11ad6aaed10a | 208 | * see ::VL53L0X_PowerModes |
joelvonrotz | 0:11ad6aaed10a | 209 | * Valid values are: |
joelvonrotz | 0:11ad6aaed10a | 210 | * VL53L0X_POWERMODE_STANDBY_LEVEL1, |
joelvonrotz | 0:11ad6aaed10a | 211 | * VL53L0X_POWERMODE_IDLE_LEVEL1 |
joelvonrotz | 0:11ad6aaed10a | 212 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 213 | * @return VL53L0X_ERROR_MODE_NOT_SUPPORTED This error occurs when PowerMode |
joelvonrotz | 0:11ad6aaed10a | 214 | * is not in the supported list |
joelvonrotz | 0:11ad6aaed10a | 215 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 216 | */ |
joelvonrotz | 0:11ad6aaed10a | 217 | VL53L0X_API VL53L0X_Error VL53L0X_SetPowerMode(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 218 | VL53L0X_PowerModes PowerMode); |
joelvonrotz | 0:11ad6aaed10a | 219 | |
joelvonrotz | 0:11ad6aaed10a | 220 | /** |
joelvonrotz | 0:11ad6aaed10a | 221 | * @brief Get the power mode for a given Device |
joelvonrotz | 0:11ad6aaed10a | 222 | * |
joelvonrotz | 0:11ad6aaed10a | 223 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 224 | * |
joelvonrotz | 0:11ad6aaed10a | 225 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 226 | * @param pPowerMode Pointer to the current value of the power |
joelvonrotz | 0:11ad6aaed10a | 227 | * mode. see ::VL53L0X_PowerModes |
joelvonrotz | 0:11ad6aaed10a | 228 | * Valid values are: |
joelvonrotz | 0:11ad6aaed10a | 229 | * VL53L0X_POWERMODE_STANDBY_LEVEL1, |
joelvonrotz | 0:11ad6aaed10a | 230 | * VL53L0X_POWERMODE_IDLE_LEVEL1 |
joelvonrotz | 0:11ad6aaed10a | 231 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 232 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 233 | */ |
joelvonrotz | 0:11ad6aaed10a | 234 | VL53L0X_API VL53L0X_Error VL53L0X_GetPowerMode(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 235 | VL53L0X_PowerModes *pPowerMode); |
joelvonrotz | 0:11ad6aaed10a | 236 | |
joelvonrotz | 0:11ad6aaed10a | 237 | /** |
joelvonrotz | 0:11ad6aaed10a | 238 | * Set or over-hide part to part calibration offset |
joelvonrotz | 0:11ad6aaed10a | 239 | * \sa VL53L0X_DataInit() VL53L0X_GetOffsetCalibrationDataMicroMeter() |
joelvonrotz | 0:11ad6aaed10a | 240 | * |
joelvonrotz | 0:11ad6aaed10a | 241 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 242 | * |
joelvonrotz | 0:11ad6aaed10a | 243 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 244 | * @param OffsetCalibrationDataMicroMeter Offset (microns) |
joelvonrotz | 0:11ad6aaed10a | 245 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 246 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 247 | */ |
joelvonrotz | 0:11ad6aaed10a | 248 | VL53L0X_API VL53L0X_Error VL53L0X_SetOffsetCalibrationDataMicroMeter( |
joelvonrotz | 0:11ad6aaed10a | 249 | VL53L0X_DEV Dev, int32_t OffsetCalibrationDataMicroMeter); |
joelvonrotz | 0:11ad6aaed10a | 250 | |
joelvonrotz | 0:11ad6aaed10a | 251 | /** |
joelvonrotz | 0:11ad6aaed10a | 252 | * @brief Get part to part calibration offset |
joelvonrotz | 0:11ad6aaed10a | 253 | * |
joelvonrotz | 0:11ad6aaed10a | 254 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 255 | * Should only be used after a successful call to @a VL53L0X_DataInit to backup |
joelvonrotz | 0:11ad6aaed10a | 256 | * device NVM value |
joelvonrotz | 0:11ad6aaed10a | 257 | * |
joelvonrotz | 0:11ad6aaed10a | 258 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 259 | * |
joelvonrotz | 0:11ad6aaed10a | 260 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 261 | * @param pOffsetCalibrationDataMicroMeter Return part to part |
joelvonrotz | 0:11ad6aaed10a | 262 | * calibration offset from device (microns) |
joelvonrotz | 0:11ad6aaed10a | 263 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 264 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 265 | */ |
joelvonrotz | 0:11ad6aaed10a | 266 | VL53L0X_API VL53L0X_Error VL53L0X_GetOffsetCalibrationDataMicroMeter( |
joelvonrotz | 0:11ad6aaed10a | 267 | VL53L0X_DEV Dev, int32_t *pOffsetCalibrationDataMicroMeter); |
joelvonrotz | 0:11ad6aaed10a | 268 | |
joelvonrotz | 0:11ad6aaed10a | 269 | /** |
joelvonrotz | 0:11ad6aaed10a | 270 | * Set the linearity corrective gain |
joelvonrotz | 0:11ad6aaed10a | 271 | * |
joelvonrotz | 0:11ad6aaed10a | 272 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 273 | * |
joelvonrotz | 0:11ad6aaed10a | 274 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 275 | * @param LinearityCorrectiveGain Linearity corrective |
joelvonrotz | 0:11ad6aaed10a | 276 | * gain in x1000 |
joelvonrotz | 0:11ad6aaed10a | 277 | * if value is 1000 then no modification is applied. |
joelvonrotz | 0:11ad6aaed10a | 278 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 279 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 280 | */ |
joelvonrotz | 0:11ad6aaed10a | 281 | VL53L0X_API VL53L0X_Error VL53L0X_SetLinearityCorrectiveGain(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 282 | int16_t LinearityCorrectiveGain); |
joelvonrotz | 0:11ad6aaed10a | 283 | |
joelvonrotz | 0:11ad6aaed10a | 284 | /** |
joelvonrotz | 0:11ad6aaed10a | 285 | * @brief Get the linearity corrective gain |
joelvonrotz | 0:11ad6aaed10a | 286 | * |
joelvonrotz | 0:11ad6aaed10a | 287 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 288 | * Should only be used after a successful call to @a VL53L0X_DataInit to backup |
joelvonrotz | 0:11ad6aaed10a | 289 | * device NVM value |
joelvonrotz | 0:11ad6aaed10a | 290 | * |
joelvonrotz | 0:11ad6aaed10a | 291 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 292 | * |
joelvonrotz | 0:11ad6aaed10a | 293 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 294 | * @param pLinearityCorrectiveGain Pointer to the linearity |
joelvonrotz | 0:11ad6aaed10a | 295 | * corrective gain in x1000 |
joelvonrotz | 0:11ad6aaed10a | 296 | * if value is 1000 then no modification is applied. |
joelvonrotz | 0:11ad6aaed10a | 297 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 298 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 299 | */ |
joelvonrotz | 0:11ad6aaed10a | 300 | VL53L0X_API VL53L0X_Error VL53L0X_GetLinearityCorrectiveGain(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 301 | uint16_t *pLinearityCorrectiveGain); |
joelvonrotz | 0:11ad6aaed10a | 302 | |
joelvonrotz | 0:11ad6aaed10a | 303 | /** |
joelvonrotz | 0:11ad6aaed10a | 304 | * Set Group parameter Hold state |
joelvonrotz | 0:11ad6aaed10a | 305 | * |
joelvonrotz | 0:11ad6aaed10a | 306 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 307 | * Set or remove device internal group parameter hold |
joelvonrotz | 0:11ad6aaed10a | 308 | * |
joelvonrotz | 0:11ad6aaed10a | 309 | * @note This function is not Implemented |
joelvonrotz | 0:11ad6aaed10a | 310 | * |
joelvonrotz | 0:11ad6aaed10a | 311 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 312 | * @param GroupParamHold Group parameter Hold state to be set (on/off) |
joelvonrotz | 0:11ad6aaed10a | 313 | * @return VL53L0X_ERROR_NOT_IMPLEMENTED Not implemented |
joelvonrotz | 0:11ad6aaed10a | 314 | */ |
joelvonrotz | 0:11ad6aaed10a | 315 | VL53L0X_API VL53L0X_Error VL53L0X_SetGroupParamHold(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 316 | uint8_t GroupParamHold); |
joelvonrotz | 0:11ad6aaed10a | 317 | |
joelvonrotz | 0:11ad6aaed10a | 318 | /** |
joelvonrotz | 0:11ad6aaed10a | 319 | * @brief Get the maximal distance for actual setup |
joelvonrotz | 0:11ad6aaed10a | 320 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 321 | * Device must be initialized through @a VL53L0X_SetParameters() prior calling |
joelvonrotz | 0:11ad6aaed10a | 322 | * this function. |
joelvonrotz | 0:11ad6aaed10a | 323 | * |
joelvonrotz | 0:11ad6aaed10a | 324 | * Any range value more than the value returned is to be considered as |
joelvonrotz | 0:11ad6aaed10a | 325 | * "no target detected" or |
joelvonrotz | 0:11ad6aaed10a | 326 | * "no target in detectable range"\n |
joelvonrotz | 0:11ad6aaed10a | 327 | * @warning The maximal distance depends on the setup |
joelvonrotz | 0:11ad6aaed10a | 328 | * |
joelvonrotz | 0:11ad6aaed10a | 329 | * @note This function is not Implemented |
joelvonrotz | 0:11ad6aaed10a | 330 | * |
joelvonrotz | 0:11ad6aaed10a | 331 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 332 | * @param pUpperLimitMilliMeter The maximal range limit for actual setup |
joelvonrotz | 0:11ad6aaed10a | 333 | * (in millimeter) |
joelvonrotz | 0:11ad6aaed10a | 334 | * @return VL53L0X_ERROR_NOT_IMPLEMENTED Not implemented |
joelvonrotz | 0:11ad6aaed10a | 335 | */ |
joelvonrotz | 0:11ad6aaed10a | 336 | VL53L0X_API VL53L0X_Error VL53L0X_GetUpperLimitMilliMeter(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 337 | uint16_t *pUpperLimitMilliMeter); |
joelvonrotz | 0:11ad6aaed10a | 338 | |
joelvonrotz | 0:11ad6aaed10a | 339 | |
joelvonrotz | 0:11ad6aaed10a | 340 | /** |
joelvonrotz | 0:11ad6aaed10a | 341 | * @brief Get the Total Signal Rate |
joelvonrotz | 0:11ad6aaed10a | 342 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 343 | * This function will return the Total Signal Rate after a good ranging is done. |
joelvonrotz | 0:11ad6aaed10a | 344 | * |
joelvonrotz | 0:11ad6aaed10a | 345 | * @note This function access to Device |
joelvonrotz | 0:11ad6aaed10a | 346 | * |
joelvonrotz | 0:11ad6aaed10a | 347 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 348 | * @param pTotalSignalRate Total Signal Rate value in Mega count per second |
joelvonrotz | 0:11ad6aaed10a | 349 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 350 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 351 | */ |
joelvonrotz | 0:11ad6aaed10a | 352 | VL53L0X_Error VL53L0X_GetTotalSignalRate(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 353 | FixPoint1616_t *pTotalSignalRate); |
joelvonrotz | 0:11ad6aaed10a | 354 | |
joelvonrotz | 0:11ad6aaed10a | 355 | /** @} VL53L0X_general_group */ |
joelvonrotz | 0:11ad6aaed10a | 356 | |
joelvonrotz | 0:11ad6aaed10a | 357 | /** @defgroup VL53L0X_init_group VL53L0X Init Functions |
joelvonrotz | 0:11ad6aaed10a | 358 | * @brief VL53L0X Init Functions |
joelvonrotz | 0:11ad6aaed10a | 359 | * @{ |
joelvonrotz | 0:11ad6aaed10a | 360 | */ |
joelvonrotz | 0:11ad6aaed10a | 361 | |
joelvonrotz | 0:11ad6aaed10a | 362 | /** |
joelvonrotz | 0:11ad6aaed10a | 363 | * @brief Set new device address |
joelvonrotz | 0:11ad6aaed10a | 364 | * |
joelvonrotz | 0:11ad6aaed10a | 365 | * After completion the device will answer to the new address programmed. |
joelvonrotz | 0:11ad6aaed10a | 366 | * This function should be called when several devices are used in parallel |
joelvonrotz | 0:11ad6aaed10a | 367 | * before start programming the sensor. |
joelvonrotz | 0:11ad6aaed10a | 368 | * When a single device us used, there is no need to call this function. |
joelvonrotz | 0:11ad6aaed10a | 369 | * |
joelvonrotz | 0:11ad6aaed10a | 370 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 371 | * |
joelvonrotz | 0:11ad6aaed10a | 372 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 373 | * @param DeviceAddress The new Device address |
joelvonrotz | 0:11ad6aaed10a | 374 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 375 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 376 | */ |
joelvonrotz | 0:11ad6aaed10a | 377 | VL53L0X_API VL53L0X_Error VL53L0X_SetDeviceAddress(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 378 | uint8_t DeviceAddress); |
joelvonrotz | 0:11ad6aaed10a | 379 | |
joelvonrotz | 0:11ad6aaed10a | 380 | /** |
joelvonrotz | 0:11ad6aaed10a | 381 | * |
joelvonrotz | 0:11ad6aaed10a | 382 | * @brief One time device initialization |
joelvonrotz | 0:11ad6aaed10a | 383 | * |
joelvonrotz | 0:11ad6aaed10a | 384 | * To be called once and only once after device is brought out of reset |
joelvonrotz | 0:11ad6aaed10a | 385 | * (Chip enable) and booted see @a VL53L0X_WaitDeviceBooted() |
joelvonrotz | 0:11ad6aaed10a | 386 | * |
joelvonrotz | 0:11ad6aaed10a | 387 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 388 | * When not used after a fresh device "power up" or reset, it may return |
joelvonrotz | 0:11ad6aaed10a | 389 | * @a #VL53L0X_ERROR_CALIBRATION_WARNING meaning wrong calibration data |
joelvonrotz | 0:11ad6aaed10a | 390 | * may have been fetched from device that can result in ranging offset error\n |
joelvonrotz | 0:11ad6aaed10a | 391 | * If application cannot execute device reset or need to run VL53L0X_DataInit |
joelvonrotz | 0:11ad6aaed10a | 392 | * multiple time then it must ensure proper offset calibration saving and |
joelvonrotz | 0:11ad6aaed10a | 393 | * restore on its own by using @a VL53L0X_GetOffsetCalibrationData() on first |
joelvonrotz | 0:11ad6aaed10a | 394 | * power up and then @a VL53L0X_SetOffsetCalibrationData() in all subsequent init |
joelvonrotz | 0:11ad6aaed10a | 395 | * This function will change the VL53L0X_State from VL53L0X_STATE_POWERDOWN to |
joelvonrotz | 0:11ad6aaed10a | 396 | * VL53L0X_STATE_WAIT_STATICINIT. |
joelvonrotz | 0:11ad6aaed10a | 397 | * |
joelvonrotz | 0:11ad6aaed10a | 398 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 399 | * |
joelvonrotz | 0:11ad6aaed10a | 400 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 401 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 402 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 403 | */ |
joelvonrotz | 0:11ad6aaed10a | 404 | VL53L0X_API VL53L0X_Error VL53L0X_DataInit(VL53L0X_DEV Dev); |
joelvonrotz | 0:11ad6aaed10a | 405 | |
joelvonrotz | 0:11ad6aaed10a | 406 | /** |
joelvonrotz | 0:11ad6aaed10a | 407 | * @brief Set the tuning settings pointer |
joelvonrotz | 0:11ad6aaed10a | 408 | * |
joelvonrotz | 0:11ad6aaed10a | 409 | * This function is used to specify the Tuning settings buffer to be used |
joelvonrotz | 0:11ad6aaed10a | 410 | * for a given device. The buffer contains all the necessary data to permit |
joelvonrotz | 0:11ad6aaed10a | 411 | * the API to write tuning settings. |
joelvonrotz | 0:11ad6aaed10a | 412 | * This function permit to force the usage of either external or internal |
joelvonrotz | 0:11ad6aaed10a | 413 | * tuning settings. |
joelvonrotz | 0:11ad6aaed10a | 414 | * |
joelvonrotz | 0:11ad6aaed10a | 415 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 416 | * |
joelvonrotz | 0:11ad6aaed10a | 417 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 418 | * @param pTuningSettingBuffer Pointer to tuning settings buffer. |
joelvonrotz | 0:11ad6aaed10a | 419 | * @param UseInternalTuningSettings Use internal tuning settings value. |
joelvonrotz | 0:11ad6aaed10a | 420 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 421 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 422 | */ |
joelvonrotz | 0:11ad6aaed10a | 423 | VL53L0X_API VL53L0X_Error VL53L0X_SetTuningSettingBuffer(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 424 | uint8_t *pTuningSettingBuffer, uint8_t UseInternalTuningSettings); |
joelvonrotz | 0:11ad6aaed10a | 425 | |
joelvonrotz | 0:11ad6aaed10a | 426 | /** |
joelvonrotz | 0:11ad6aaed10a | 427 | * @brief Get the tuning settings pointer and the internal external switch |
joelvonrotz | 0:11ad6aaed10a | 428 | * value. |
joelvonrotz | 0:11ad6aaed10a | 429 | * |
joelvonrotz | 0:11ad6aaed10a | 430 | * This function is used to get the Tuning settings buffer pointer and the |
joelvonrotz | 0:11ad6aaed10a | 431 | * value. |
joelvonrotz | 0:11ad6aaed10a | 432 | * of the switch to select either external or internal tuning settings. |
joelvonrotz | 0:11ad6aaed10a | 433 | * |
joelvonrotz | 0:11ad6aaed10a | 434 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 435 | * |
joelvonrotz | 0:11ad6aaed10a | 436 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 437 | * @param ppTuningSettingBuffer Pointer to tuning settings buffer. |
joelvonrotz | 0:11ad6aaed10a | 438 | * @param pUseInternalTuningSettings Pointer to store Use internal tuning |
joelvonrotz | 0:11ad6aaed10a | 439 | * settings value. |
joelvonrotz | 0:11ad6aaed10a | 440 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 441 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 442 | */ |
joelvonrotz | 0:11ad6aaed10a | 443 | VL53L0X_API VL53L0X_Error VL53L0X_GetTuningSettingBuffer(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 444 | uint8_t **ppTuningSettingBuffer, uint8_t *pUseInternalTuningSettings); |
joelvonrotz | 0:11ad6aaed10a | 445 | |
joelvonrotz | 0:11ad6aaed10a | 446 | /** |
joelvonrotz | 0:11ad6aaed10a | 447 | * @brief Do basic device init (and eventually patch loading) |
joelvonrotz | 0:11ad6aaed10a | 448 | * This function will change the VL53L0X_State from |
joelvonrotz | 0:11ad6aaed10a | 449 | * VL53L0X_STATE_WAIT_STATICINIT to VL53L0X_STATE_IDLE. |
joelvonrotz | 0:11ad6aaed10a | 450 | * In this stage all default setting will be applied. |
joelvonrotz | 0:11ad6aaed10a | 451 | * |
joelvonrotz | 0:11ad6aaed10a | 452 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 453 | * |
joelvonrotz | 0:11ad6aaed10a | 454 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 455 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 456 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 457 | */ |
joelvonrotz | 0:11ad6aaed10a | 458 | VL53L0X_API VL53L0X_Error VL53L0X_StaticInit(VL53L0X_DEV Dev); |
joelvonrotz | 0:11ad6aaed10a | 459 | |
joelvonrotz | 0:11ad6aaed10a | 460 | /** |
joelvonrotz | 0:11ad6aaed10a | 461 | * @brief Wait for device booted after chip enable (hardware standby) |
joelvonrotz | 0:11ad6aaed10a | 462 | * This function can be run only when VL53L0X_State is VL53L0X_STATE_POWERDOWN. |
joelvonrotz | 0:11ad6aaed10a | 463 | * |
joelvonrotz | 0:11ad6aaed10a | 464 | * @note This function is not Implemented |
joelvonrotz | 0:11ad6aaed10a | 465 | * |
joelvonrotz | 0:11ad6aaed10a | 466 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 467 | * @return VL53L0X_ERROR_NOT_IMPLEMENTED Not implemented |
joelvonrotz | 0:11ad6aaed10a | 468 | * |
joelvonrotz | 0:11ad6aaed10a | 469 | */ |
joelvonrotz | 0:11ad6aaed10a | 470 | VL53L0X_API VL53L0X_Error VL53L0X_WaitDeviceBooted(VL53L0X_DEV Dev); |
joelvonrotz | 0:11ad6aaed10a | 471 | |
joelvonrotz | 0:11ad6aaed10a | 472 | /** |
joelvonrotz | 0:11ad6aaed10a | 473 | * @brief Do an hard reset or soft reset (depending on implementation) of the |
joelvonrotz | 0:11ad6aaed10a | 474 | * device \nAfter call of this function, device must be in same state as right |
joelvonrotz | 0:11ad6aaed10a | 475 | * after a power-up sequence.This function will change the VL53L0X_State to |
joelvonrotz | 0:11ad6aaed10a | 476 | * VL53L0X_STATE_POWERDOWN. |
joelvonrotz | 0:11ad6aaed10a | 477 | * |
joelvonrotz | 0:11ad6aaed10a | 478 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 479 | * |
joelvonrotz | 0:11ad6aaed10a | 480 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 481 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 482 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 483 | */ |
joelvonrotz | 0:11ad6aaed10a | 484 | VL53L0X_API VL53L0X_Error VL53L0X_ResetDevice(VL53L0X_DEV Dev); |
joelvonrotz | 0:11ad6aaed10a | 485 | |
joelvonrotz | 0:11ad6aaed10a | 486 | /** @} VL53L0X_init_group */ |
joelvonrotz | 0:11ad6aaed10a | 487 | |
joelvonrotz | 0:11ad6aaed10a | 488 | /** @defgroup VL53L0X_parameters_group VL53L0X Parameters Functions |
joelvonrotz | 0:11ad6aaed10a | 489 | * @brief Functions used to prepare and setup the device |
joelvonrotz | 0:11ad6aaed10a | 490 | * @{ |
joelvonrotz | 0:11ad6aaed10a | 491 | */ |
joelvonrotz | 0:11ad6aaed10a | 492 | |
joelvonrotz | 0:11ad6aaed10a | 493 | /** |
joelvonrotz | 0:11ad6aaed10a | 494 | * @brief Prepare device for operation |
joelvonrotz | 0:11ad6aaed10a | 495 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 496 | * Update device with provided parameters |
joelvonrotz | 0:11ad6aaed10a | 497 | * @li Then start ranging operation. |
joelvonrotz | 0:11ad6aaed10a | 498 | * |
joelvonrotz | 0:11ad6aaed10a | 499 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 500 | * |
joelvonrotz | 0:11ad6aaed10a | 501 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 502 | * @param pDeviceParameters Pointer to store current device parameters. |
joelvonrotz | 0:11ad6aaed10a | 503 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 504 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 505 | */ |
joelvonrotz | 0:11ad6aaed10a | 506 | VL53L0X_API VL53L0X_Error VL53L0X_SetDeviceParameters(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 507 | const VL53L0X_DeviceParameters_t *pDeviceParameters); |
joelvonrotz | 0:11ad6aaed10a | 508 | |
joelvonrotz | 0:11ad6aaed10a | 509 | /** |
joelvonrotz | 0:11ad6aaed10a | 510 | * @brief Retrieve current device parameters |
joelvonrotz | 0:11ad6aaed10a | 511 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 512 | * Get actual parameters of the device |
joelvonrotz | 0:11ad6aaed10a | 513 | * @li Then start ranging operation. |
joelvonrotz | 0:11ad6aaed10a | 514 | * |
joelvonrotz | 0:11ad6aaed10a | 515 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 516 | * |
joelvonrotz | 0:11ad6aaed10a | 517 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 518 | * @param pDeviceParameters Pointer to store current device parameters. |
joelvonrotz | 0:11ad6aaed10a | 519 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 520 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 521 | */ |
joelvonrotz | 0:11ad6aaed10a | 522 | VL53L0X_API VL53L0X_Error VL53L0X_GetDeviceParameters(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 523 | VL53L0X_DeviceParameters_t *pDeviceParameters); |
joelvonrotz | 0:11ad6aaed10a | 524 | |
joelvonrotz | 0:11ad6aaed10a | 525 | /** |
joelvonrotz | 0:11ad6aaed10a | 526 | * @brief Set a new device mode |
joelvonrotz | 0:11ad6aaed10a | 527 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 528 | * Set device to a new mode (ranging, histogram ...) |
joelvonrotz | 0:11ad6aaed10a | 529 | * |
joelvonrotz | 0:11ad6aaed10a | 530 | * @note This function doesn't Access to the device |
joelvonrotz | 0:11ad6aaed10a | 531 | * |
joelvonrotz | 0:11ad6aaed10a | 532 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 533 | * @param DeviceMode New device mode to apply |
joelvonrotz | 0:11ad6aaed10a | 534 | * Valid values are: |
joelvonrotz | 0:11ad6aaed10a | 535 | * VL53L0X_DEVICEMODE_SINGLE_RANGING |
joelvonrotz | 0:11ad6aaed10a | 536 | * VL53L0X_DEVICEMODE_CONTINUOUS_RANGING |
joelvonrotz | 0:11ad6aaed10a | 537 | * VL53L0X_DEVICEMODE_CONTINUOUS_TIMED_RANGING |
joelvonrotz | 0:11ad6aaed10a | 538 | * VL53L0X_DEVICEMODE_SINGLE_HISTOGRAM |
joelvonrotz | 0:11ad6aaed10a | 539 | * VL53L0X_HISTOGRAMMODE_REFERENCE_ONLY |
joelvonrotz | 0:11ad6aaed10a | 540 | * VL53L0X_HISTOGRAMMODE_RETURN_ONLY |
joelvonrotz | 0:11ad6aaed10a | 541 | * VL53L0X_HISTOGRAMMODE_BOTH |
joelvonrotz | 0:11ad6aaed10a | 542 | * |
joelvonrotz | 0:11ad6aaed10a | 543 | * |
joelvonrotz | 0:11ad6aaed10a | 544 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 545 | * @return VL53L0X_ERROR_MODE_NOT_SUPPORTED This error occurs when DeviceMode is |
joelvonrotz | 0:11ad6aaed10a | 546 | * not in the supported list |
joelvonrotz | 0:11ad6aaed10a | 547 | */ |
joelvonrotz | 0:11ad6aaed10a | 548 | VL53L0X_API VL53L0X_Error VL53L0X_SetDeviceMode(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 549 | VL53L0X_DeviceModes DeviceMode); |
joelvonrotz | 0:11ad6aaed10a | 550 | |
joelvonrotz | 0:11ad6aaed10a | 551 | /** |
joelvonrotz | 0:11ad6aaed10a | 552 | * @brief Get current new device mode |
joelvonrotz | 0:11ad6aaed10a | 553 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 554 | * Get actual mode of the device(ranging, histogram ...) |
joelvonrotz | 0:11ad6aaed10a | 555 | * |
joelvonrotz | 0:11ad6aaed10a | 556 | * @note This function doesn't Access to the device |
joelvonrotz | 0:11ad6aaed10a | 557 | * |
joelvonrotz | 0:11ad6aaed10a | 558 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 559 | * @param pDeviceMode Pointer to current apply mode value |
joelvonrotz | 0:11ad6aaed10a | 560 | * Valid values are: |
joelvonrotz | 0:11ad6aaed10a | 561 | * VL53L0X_DEVICEMODE_SINGLE_RANGING |
joelvonrotz | 0:11ad6aaed10a | 562 | * VL53L0X_DEVICEMODE_CONTINUOUS_RANGING |
joelvonrotz | 0:11ad6aaed10a | 563 | * VL53L0X_DEVICEMODE_CONTINUOUS_TIMED_RANGING |
joelvonrotz | 0:11ad6aaed10a | 564 | * VL53L0X_DEVICEMODE_SINGLE_HISTOGRAM |
joelvonrotz | 0:11ad6aaed10a | 565 | * VL53L0X_HISTOGRAMMODE_REFERENCE_ONLY |
joelvonrotz | 0:11ad6aaed10a | 566 | * VL53L0X_HISTOGRAMMODE_RETURN_ONLY |
joelvonrotz | 0:11ad6aaed10a | 567 | * VL53L0X_HISTOGRAMMODE_BOTH |
joelvonrotz | 0:11ad6aaed10a | 568 | * |
joelvonrotz | 0:11ad6aaed10a | 569 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 570 | * @return VL53L0X_ERROR_MODE_NOT_SUPPORTED This error occurs when |
joelvonrotz | 0:11ad6aaed10a | 571 | * DeviceMode is not in the supported list |
joelvonrotz | 0:11ad6aaed10a | 572 | */ |
joelvonrotz | 0:11ad6aaed10a | 573 | VL53L0X_API VL53L0X_Error VL53L0X_GetDeviceMode(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 574 | VL53L0X_DeviceModes *pDeviceMode); |
joelvonrotz | 0:11ad6aaed10a | 575 | |
joelvonrotz | 0:11ad6aaed10a | 576 | /** |
joelvonrotz | 0:11ad6aaed10a | 577 | * @brief Sets the resolution of range measurements. |
joelvonrotz | 0:11ad6aaed10a | 578 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 579 | * Set resolution of range measurements to either 0.25mm if |
joelvonrotz | 0:11ad6aaed10a | 580 | * fraction enabled or 1mm if not enabled. |
joelvonrotz | 0:11ad6aaed10a | 581 | * |
joelvonrotz | 0:11ad6aaed10a | 582 | * @note This function Accesses the device |
joelvonrotz | 0:11ad6aaed10a | 583 | * |
joelvonrotz | 0:11ad6aaed10a | 584 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 585 | * @param Enable Enable high resolution |
joelvonrotz | 0:11ad6aaed10a | 586 | * |
joelvonrotz | 0:11ad6aaed10a | 587 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 588 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 589 | */ |
joelvonrotz | 0:11ad6aaed10a | 590 | VL53L0X_API VL53L0X_Error VL53L0X_SetRangeFractionEnable(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 591 | uint8_t Enable); |
joelvonrotz | 0:11ad6aaed10a | 592 | |
joelvonrotz | 0:11ad6aaed10a | 593 | /** |
joelvonrotz | 0:11ad6aaed10a | 594 | * @brief Gets the fraction enable parameter indicating the resolution of |
joelvonrotz | 0:11ad6aaed10a | 595 | * range measurements. |
joelvonrotz | 0:11ad6aaed10a | 596 | * |
joelvonrotz | 0:11ad6aaed10a | 597 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 598 | * Gets the fraction enable state, which translates to the resolution of |
joelvonrotz | 0:11ad6aaed10a | 599 | * range measurements as follows :Enabled:=0.25mm resolution, |
joelvonrotz | 0:11ad6aaed10a | 600 | * Not Enabled:=1mm resolution. |
joelvonrotz | 0:11ad6aaed10a | 601 | * |
joelvonrotz | 0:11ad6aaed10a | 602 | * @note This function Accesses the device |
joelvonrotz | 0:11ad6aaed10a | 603 | * |
joelvonrotz | 0:11ad6aaed10a | 604 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 605 | * @param pEnable Output Parameter reporting the fraction enable state. |
joelvonrotz | 0:11ad6aaed10a | 606 | * |
joelvonrotz | 0:11ad6aaed10a | 607 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 608 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 609 | */ |
joelvonrotz | 0:11ad6aaed10a | 610 | VL53L0X_API VL53L0X_Error VL53L0X_GetFractionEnable(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 611 | uint8_t *pEnable); |
joelvonrotz | 0:11ad6aaed10a | 612 | |
joelvonrotz | 0:11ad6aaed10a | 613 | /** |
joelvonrotz | 0:11ad6aaed10a | 614 | * @brief Set a new Histogram mode |
joelvonrotz | 0:11ad6aaed10a | 615 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 616 | * Set device to a new Histogram mode |
joelvonrotz | 0:11ad6aaed10a | 617 | * |
joelvonrotz | 0:11ad6aaed10a | 618 | * @note This function doesn't Access to the device |
joelvonrotz | 0:11ad6aaed10a | 619 | * |
joelvonrotz | 0:11ad6aaed10a | 620 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 621 | * @param HistogramMode New device mode to apply |
joelvonrotz | 0:11ad6aaed10a | 622 | * Valid values are: |
joelvonrotz | 0:11ad6aaed10a | 623 | * VL53L0X_HISTOGRAMMODE_DISABLED |
joelvonrotz | 0:11ad6aaed10a | 624 | * VL53L0X_DEVICEMODE_SINGLE_HISTOGRAM |
joelvonrotz | 0:11ad6aaed10a | 625 | * VL53L0X_HISTOGRAMMODE_REFERENCE_ONLY |
joelvonrotz | 0:11ad6aaed10a | 626 | * VL53L0X_HISTOGRAMMODE_RETURN_ONLY |
joelvonrotz | 0:11ad6aaed10a | 627 | * VL53L0X_HISTOGRAMMODE_BOTH |
joelvonrotz | 0:11ad6aaed10a | 628 | * |
joelvonrotz | 0:11ad6aaed10a | 629 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 630 | * @return VL53L0X_ERROR_MODE_NOT_SUPPORTED This error occurs when |
joelvonrotz | 0:11ad6aaed10a | 631 | * HistogramMode is not in the supported list |
joelvonrotz | 0:11ad6aaed10a | 632 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 633 | */ |
joelvonrotz | 0:11ad6aaed10a | 634 | VL53L0X_API VL53L0X_Error VL53L0X_SetHistogramMode(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 635 | VL53L0X_HistogramModes HistogramMode); |
joelvonrotz | 0:11ad6aaed10a | 636 | |
joelvonrotz | 0:11ad6aaed10a | 637 | /** |
joelvonrotz | 0:11ad6aaed10a | 638 | * @brief Get current new device mode |
joelvonrotz | 0:11ad6aaed10a | 639 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 640 | * Get current Histogram mode of a Device |
joelvonrotz | 0:11ad6aaed10a | 641 | * |
joelvonrotz | 0:11ad6aaed10a | 642 | * @note This function doesn't Access to the device |
joelvonrotz | 0:11ad6aaed10a | 643 | * |
joelvonrotz | 0:11ad6aaed10a | 644 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 645 | * @param pHistogramMode Pointer to current Histogram Mode value |
joelvonrotz | 0:11ad6aaed10a | 646 | * Valid values are: |
joelvonrotz | 0:11ad6aaed10a | 647 | * VL53L0X_HISTOGRAMMODE_DISABLED |
joelvonrotz | 0:11ad6aaed10a | 648 | * VL53L0X_DEVICEMODE_SINGLE_HISTOGRAM |
joelvonrotz | 0:11ad6aaed10a | 649 | * VL53L0X_HISTOGRAMMODE_REFERENCE_ONLY |
joelvonrotz | 0:11ad6aaed10a | 650 | * VL53L0X_HISTOGRAMMODE_RETURN_ONLY |
joelvonrotz | 0:11ad6aaed10a | 651 | * VL53L0X_HISTOGRAMMODE_BOTH |
joelvonrotz | 0:11ad6aaed10a | 652 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 653 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 654 | */ |
joelvonrotz | 0:11ad6aaed10a | 655 | VL53L0X_API VL53L0X_Error VL53L0X_GetHistogramMode(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 656 | VL53L0X_HistogramModes *pHistogramMode); |
joelvonrotz | 0:11ad6aaed10a | 657 | |
joelvonrotz | 0:11ad6aaed10a | 658 | /** |
joelvonrotz | 0:11ad6aaed10a | 659 | * @brief Set Ranging Timing Budget in microseconds |
joelvonrotz | 0:11ad6aaed10a | 660 | * |
joelvonrotz | 0:11ad6aaed10a | 661 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 662 | * Defines the maximum time allowed by the user to the device to run a |
joelvonrotz | 0:11ad6aaed10a | 663 | * full ranging sequence for the current mode (ranging, histogram, ASL ...) |
joelvonrotz | 0:11ad6aaed10a | 664 | * |
joelvonrotz | 0:11ad6aaed10a | 665 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 666 | * |
joelvonrotz | 0:11ad6aaed10a | 667 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 668 | * @param MeasurementTimingBudgetMicroSeconds Max measurement time in |
joelvonrotz | 0:11ad6aaed10a | 669 | * microseconds. |
joelvonrotz | 0:11ad6aaed10a | 670 | * Valid values are: |
joelvonrotz | 0:11ad6aaed10a | 671 | * >= 17000 microsecs when wraparound enabled |
joelvonrotz | 0:11ad6aaed10a | 672 | * >= 12000 microsecs when wraparound disabled |
joelvonrotz | 0:11ad6aaed10a | 673 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 674 | * @return VL53L0X_ERROR_INVALID_PARAMS This error is returned if |
joelvonrotz | 0:11ad6aaed10a | 675 | MeasurementTimingBudgetMicroSeconds out of range |
joelvonrotz | 0:11ad6aaed10a | 676 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 677 | */ |
joelvonrotz | 0:11ad6aaed10a | 678 | VL53L0X_API VL53L0X_Error VL53L0X_SetMeasurementTimingBudgetMicroSeconds( |
joelvonrotz | 0:11ad6aaed10a | 679 | VL53L0X_DEV Dev, uint32_t MeasurementTimingBudgetMicroSeconds); |
joelvonrotz | 0:11ad6aaed10a | 680 | |
joelvonrotz | 0:11ad6aaed10a | 681 | /** |
joelvonrotz | 0:11ad6aaed10a | 682 | * @brief Get Ranging Timing Budget in microseconds |
joelvonrotz | 0:11ad6aaed10a | 683 | * |
joelvonrotz | 0:11ad6aaed10a | 684 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 685 | * Returns the programmed the maximum time allowed by the user to the |
joelvonrotz | 0:11ad6aaed10a | 686 | * device to run a full ranging sequence for the current mode |
joelvonrotz | 0:11ad6aaed10a | 687 | * (ranging, histogram, ASL ...) |
joelvonrotz | 0:11ad6aaed10a | 688 | * |
joelvonrotz | 0:11ad6aaed10a | 689 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 690 | * |
joelvonrotz | 0:11ad6aaed10a | 691 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 692 | * @param pMeasurementTimingBudgetMicroSeconds Max measurement time in |
joelvonrotz | 0:11ad6aaed10a | 693 | * microseconds. |
joelvonrotz | 0:11ad6aaed10a | 694 | * Valid values are: |
joelvonrotz | 0:11ad6aaed10a | 695 | * >= 17000 microsecs when wraparound enabled |
joelvonrotz | 0:11ad6aaed10a | 696 | * >= 12000 microsecs when wraparound disabled |
joelvonrotz | 0:11ad6aaed10a | 697 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 698 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 699 | */ |
joelvonrotz | 0:11ad6aaed10a | 700 | VL53L0X_API VL53L0X_Error VL53L0X_GetMeasurementTimingBudgetMicroSeconds( |
joelvonrotz | 0:11ad6aaed10a | 701 | VL53L0X_DEV Dev, uint32_t *pMeasurementTimingBudgetMicroSeconds); |
joelvonrotz | 0:11ad6aaed10a | 702 | |
joelvonrotz | 0:11ad6aaed10a | 703 | /** |
joelvonrotz | 0:11ad6aaed10a | 704 | * @brief Gets the VCSEL pulse period. |
joelvonrotz | 0:11ad6aaed10a | 705 | * |
joelvonrotz | 0:11ad6aaed10a | 706 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 707 | * This function retrieves the VCSEL pulse period for the given period type. |
joelvonrotz | 0:11ad6aaed10a | 708 | * |
joelvonrotz | 0:11ad6aaed10a | 709 | * @note This function Accesses the device |
joelvonrotz | 0:11ad6aaed10a | 710 | * |
joelvonrotz | 0:11ad6aaed10a | 711 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 712 | * @param VcselPeriodType VCSEL period identifier (pre-range|final). |
joelvonrotz | 0:11ad6aaed10a | 713 | * @param pVCSELPulsePeriod Pointer to VCSEL period value. |
joelvonrotz | 0:11ad6aaed10a | 714 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 715 | * @return VL53L0X_ERROR_INVALID_PARAMS Error VcselPeriodType parameter not |
joelvonrotz | 0:11ad6aaed10a | 716 | * supported. |
joelvonrotz | 0:11ad6aaed10a | 717 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 718 | */ |
joelvonrotz | 0:11ad6aaed10a | 719 | VL53L0X_API VL53L0X_Error VL53L0X_GetVcselPulsePeriod(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 720 | VL53L0X_VcselPeriod VcselPeriodType, uint8_t *pVCSELPulsePeriod); |
joelvonrotz | 0:11ad6aaed10a | 721 | |
joelvonrotz | 0:11ad6aaed10a | 722 | /** |
joelvonrotz | 0:11ad6aaed10a | 723 | * @brief Sets the VCSEL pulse period. |
joelvonrotz | 0:11ad6aaed10a | 724 | * |
joelvonrotz | 0:11ad6aaed10a | 725 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 726 | * This function retrieves the VCSEL pulse period for the given period type. |
joelvonrotz | 0:11ad6aaed10a | 727 | * |
joelvonrotz | 0:11ad6aaed10a | 728 | * @note This function Accesses the device |
joelvonrotz | 0:11ad6aaed10a | 729 | * |
joelvonrotz | 0:11ad6aaed10a | 730 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 731 | * @param VcselPeriodType VCSEL period identifier (pre-range|final). |
joelvonrotz | 0:11ad6aaed10a | 732 | * @param VCSELPulsePeriod VCSEL period value |
joelvonrotz | 0:11ad6aaed10a | 733 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 734 | * @return VL53L0X_ERROR_INVALID_PARAMS Error VcselPeriodType parameter not |
joelvonrotz | 0:11ad6aaed10a | 735 | * supported. |
joelvonrotz | 0:11ad6aaed10a | 736 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 737 | */ |
joelvonrotz | 0:11ad6aaed10a | 738 | VL53L0X_API VL53L0X_Error VL53L0X_SetVcselPulsePeriod(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 739 | VL53L0X_VcselPeriod VcselPeriodType, uint8_t VCSELPulsePeriod); |
joelvonrotz | 0:11ad6aaed10a | 740 | |
joelvonrotz | 0:11ad6aaed10a | 741 | /** |
joelvonrotz | 0:11ad6aaed10a | 742 | * @brief Sets the (on/off) state of a requested sequence step. |
joelvonrotz | 0:11ad6aaed10a | 743 | * |
joelvonrotz | 0:11ad6aaed10a | 744 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 745 | * This function enables/disables a requested sequence step. |
joelvonrotz | 0:11ad6aaed10a | 746 | * |
joelvonrotz | 0:11ad6aaed10a | 747 | * @note This function Accesses the device |
joelvonrotz | 0:11ad6aaed10a | 748 | * |
joelvonrotz | 0:11ad6aaed10a | 749 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 750 | * @param SequenceStepId Sequence step identifier. |
joelvonrotz | 0:11ad6aaed10a | 751 | * @param SequenceStepEnabled Demanded state {0=Off,1=On} |
joelvonrotz | 0:11ad6aaed10a | 752 | * is enabled. |
joelvonrotz | 0:11ad6aaed10a | 753 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 754 | * @return VL53L0X_ERROR_INVALID_PARAMS Error SequenceStepId parameter not |
joelvonrotz | 0:11ad6aaed10a | 755 | * supported. |
joelvonrotz | 0:11ad6aaed10a | 756 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 757 | */ |
joelvonrotz | 0:11ad6aaed10a | 758 | VL53L0X_API VL53L0X_Error VL53L0X_SetSequenceStepEnable(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 759 | VL53L0X_SequenceStepId SequenceStepId, uint8_t SequenceStepEnabled); |
joelvonrotz | 0:11ad6aaed10a | 760 | |
joelvonrotz | 0:11ad6aaed10a | 761 | /** |
joelvonrotz | 0:11ad6aaed10a | 762 | * @brief Gets the (on/off) state of a requested sequence step. |
joelvonrotz | 0:11ad6aaed10a | 763 | * |
joelvonrotz | 0:11ad6aaed10a | 764 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 765 | * This function retrieves the state of a requested sequence step, i.e. on/off. |
joelvonrotz | 0:11ad6aaed10a | 766 | * |
joelvonrotz | 0:11ad6aaed10a | 767 | * @note This function Accesses the device |
joelvonrotz | 0:11ad6aaed10a | 768 | * |
joelvonrotz | 0:11ad6aaed10a | 769 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 770 | * @param SequenceStepId Sequence step identifier. |
joelvonrotz | 0:11ad6aaed10a | 771 | * @param pSequenceStepEnabled Out parameter reporting if the sequence step |
joelvonrotz | 0:11ad6aaed10a | 772 | * is enabled {0=Off,1=On}. |
joelvonrotz | 0:11ad6aaed10a | 773 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 774 | * @return VL53L0X_ERROR_INVALID_PARAMS Error SequenceStepId parameter not |
joelvonrotz | 0:11ad6aaed10a | 775 | * supported. |
joelvonrotz | 0:11ad6aaed10a | 776 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 777 | */ |
joelvonrotz | 0:11ad6aaed10a | 778 | VL53L0X_API VL53L0X_Error VL53L0X_GetSequenceStepEnable(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 779 | VL53L0X_SequenceStepId SequenceStepId, uint8_t *pSequenceStepEnabled); |
joelvonrotz | 0:11ad6aaed10a | 780 | |
joelvonrotz | 0:11ad6aaed10a | 781 | /** |
joelvonrotz | 0:11ad6aaed10a | 782 | * @brief Gets the (on/off) state of all sequence steps. |
joelvonrotz | 0:11ad6aaed10a | 783 | * |
joelvonrotz | 0:11ad6aaed10a | 784 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 785 | * This function retrieves the state of all sequence step in the scheduler. |
joelvonrotz | 0:11ad6aaed10a | 786 | * |
joelvonrotz | 0:11ad6aaed10a | 787 | * @note This function Accesses the device |
joelvonrotz | 0:11ad6aaed10a | 788 | * |
joelvonrotz | 0:11ad6aaed10a | 789 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 790 | * @param pSchedulerSequenceSteps Pointer to struct containing result. |
joelvonrotz | 0:11ad6aaed10a | 791 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 792 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 793 | */ |
joelvonrotz | 0:11ad6aaed10a | 794 | VL53L0X_API VL53L0X_Error VL53L0X_GetSequenceStepEnables(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 795 | VL53L0X_SchedulerSequenceSteps_t *pSchedulerSequenceSteps); |
joelvonrotz | 0:11ad6aaed10a | 796 | |
joelvonrotz | 0:11ad6aaed10a | 797 | /** |
joelvonrotz | 0:11ad6aaed10a | 798 | * @brief Sets the timeout of a requested sequence step. |
joelvonrotz | 0:11ad6aaed10a | 799 | * |
joelvonrotz | 0:11ad6aaed10a | 800 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 801 | * This function sets the timeout of a requested sequence step. |
joelvonrotz | 0:11ad6aaed10a | 802 | * |
joelvonrotz | 0:11ad6aaed10a | 803 | * @note This function Accesses the device |
joelvonrotz | 0:11ad6aaed10a | 804 | * |
joelvonrotz | 0:11ad6aaed10a | 805 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 806 | * @param SequenceStepId Sequence step identifier. |
joelvonrotz | 0:11ad6aaed10a | 807 | * @param TimeOutMilliSecs Demanded timeout |
joelvonrotz | 0:11ad6aaed10a | 808 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 809 | * @return VL53L0X_ERROR_INVALID_PARAMS Error SequenceStepId parameter not |
joelvonrotz | 0:11ad6aaed10a | 810 | * supported. |
joelvonrotz | 0:11ad6aaed10a | 811 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 812 | */ |
joelvonrotz | 0:11ad6aaed10a | 813 | VL53L0X_API VL53L0X_Error VL53L0X_SetSequenceStepTimeout(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 814 | VL53L0X_SequenceStepId SequenceStepId, FixPoint1616_t TimeOutMilliSecs); |
joelvonrotz | 0:11ad6aaed10a | 815 | |
joelvonrotz | 0:11ad6aaed10a | 816 | /** |
joelvonrotz | 0:11ad6aaed10a | 817 | * @brief Gets the timeout of a requested sequence step. |
joelvonrotz | 0:11ad6aaed10a | 818 | * |
joelvonrotz | 0:11ad6aaed10a | 819 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 820 | * This function retrieves the timeout of a requested sequence step. |
joelvonrotz | 0:11ad6aaed10a | 821 | * |
joelvonrotz | 0:11ad6aaed10a | 822 | * @note This function Accesses the device |
joelvonrotz | 0:11ad6aaed10a | 823 | * |
joelvonrotz | 0:11ad6aaed10a | 824 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 825 | * @param SequenceStepId Sequence step identifier. |
joelvonrotz | 0:11ad6aaed10a | 826 | * @param pTimeOutMilliSecs Timeout value. |
joelvonrotz | 0:11ad6aaed10a | 827 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 828 | * @return VL53L0X_ERROR_INVALID_PARAMS Error SequenceStepId parameter not |
joelvonrotz | 0:11ad6aaed10a | 829 | * supported. |
joelvonrotz | 0:11ad6aaed10a | 830 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 831 | */ |
joelvonrotz | 0:11ad6aaed10a | 832 | VL53L0X_API VL53L0X_Error VL53L0X_GetSequenceStepTimeout(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 833 | VL53L0X_SequenceStepId SequenceStepId, |
joelvonrotz | 0:11ad6aaed10a | 834 | FixPoint1616_t *pTimeOutMilliSecs); |
joelvonrotz | 0:11ad6aaed10a | 835 | |
joelvonrotz | 0:11ad6aaed10a | 836 | /** |
joelvonrotz | 0:11ad6aaed10a | 837 | * @brief Gets number of sequence steps managed by the API. |
joelvonrotz | 0:11ad6aaed10a | 838 | * |
joelvonrotz | 0:11ad6aaed10a | 839 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 840 | * This function retrieves the number of sequence steps currently managed |
joelvonrotz | 0:11ad6aaed10a | 841 | * by the API |
joelvonrotz | 0:11ad6aaed10a | 842 | * |
joelvonrotz | 0:11ad6aaed10a | 843 | * @note This function Accesses the device |
joelvonrotz | 0:11ad6aaed10a | 844 | * |
joelvonrotz | 0:11ad6aaed10a | 845 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 846 | * @param pNumberOfSequenceSteps Out parameter reporting the number of |
joelvonrotz | 0:11ad6aaed10a | 847 | * sequence steps. |
joelvonrotz | 0:11ad6aaed10a | 848 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 849 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 850 | */ |
joelvonrotz | 0:11ad6aaed10a | 851 | VL53L0X_API VL53L0X_Error VL53L0X_GetNumberOfSequenceSteps(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 852 | uint8_t *pNumberOfSequenceSteps); |
joelvonrotz | 0:11ad6aaed10a | 853 | |
joelvonrotz | 0:11ad6aaed10a | 854 | /** |
joelvonrotz | 0:11ad6aaed10a | 855 | * @brief Gets the name of a given sequence step. |
joelvonrotz | 0:11ad6aaed10a | 856 | * |
joelvonrotz | 0:11ad6aaed10a | 857 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 858 | * This function retrieves the name of sequence steps corresponding to |
joelvonrotz | 0:11ad6aaed10a | 859 | * SequenceStepId. |
joelvonrotz | 0:11ad6aaed10a | 860 | * |
joelvonrotz | 0:11ad6aaed10a | 861 | * @note This function doesn't Accesses the device |
joelvonrotz | 0:11ad6aaed10a | 862 | * |
joelvonrotz | 0:11ad6aaed10a | 863 | * @param SequenceStepId Sequence step identifier. |
joelvonrotz | 0:11ad6aaed10a | 864 | * @param pSequenceStepsString Pointer to Info string |
joelvonrotz | 0:11ad6aaed10a | 865 | * |
joelvonrotz | 0:11ad6aaed10a | 866 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 867 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 868 | */ |
joelvonrotz | 0:11ad6aaed10a | 869 | VL53L0X_API VL53L0X_Error VL53L0X_GetSequenceStepsInfo( |
joelvonrotz | 0:11ad6aaed10a | 870 | VL53L0X_SequenceStepId SequenceStepId, char *pSequenceStepsString); |
joelvonrotz | 0:11ad6aaed10a | 871 | |
joelvonrotz | 0:11ad6aaed10a | 872 | /** |
joelvonrotz | 0:11ad6aaed10a | 873 | * Program continuous mode Inter-Measurement period in milliseconds |
joelvonrotz | 0:11ad6aaed10a | 874 | * |
joelvonrotz | 0:11ad6aaed10a | 875 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 876 | * When trying to set too short time return INVALID_PARAMS minimal value |
joelvonrotz | 0:11ad6aaed10a | 877 | * |
joelvonrotz | 0:11ad6aaed10a | 878 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 879 | * |
joelvonrotz | 0:11ad6aaed10a | 880 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 881 | * @param InterMeasurementPeriodMilliSeconds Inter-Measurement Period in ms. |
joelvonrotz | 0:11ad6aaed10a | 882 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 883 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 884 | */ |
joelvonrotz | 0:11ad6aaed10a | 885 | VL53L0X_API VL53L0X_Error VL53L0X_SetInterMeasurementPeriodMilliSeconds( |
joelvonrotz | 0:11ad6aaed10a | 886 | VL53L0X_DEV Dev, uint32_t InterMeasurementPeriodMilliSeconds); |
joelvonrotz | 0:11ad6aaed10a | 887 | |
joelvonrotz | 0:11ad6aaed10a | 888 | /** |
joelvonrotz | 0:11ad6aaed10a | 889 | * Get continuous mode Inter-Measurement period in milliseconds |
joelvonrotz | 0:11ad6aaed10a | 890 | * |
joelvonrotz | 0:11ad6aaed10a | 891 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 892 | * When trying to set too short time return INVALID_PARAMS minimal value |
joelvonrotz | 0:11ad6aaed10a | 893 | * |
joelvonrotz | 0:11ad6aaed10a | 894 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 895 | * |
joelvonrotz | 0:11ad6aaed10a | 896 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 897 | * @param pInterMeasurementPeriodMilliSeconds Pointer to programmed |
joelvonrotz | 0:11ad6aaed10a | 898 | * Inter-Measurement Period in milliseconds. |
joelvonrotz | 0:11ad6aaed10a | 899 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 900 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 901 | */ |
joelvonrotz | 0:11ad6aaed10a | 902 | VL53L0X_API VL53L0X_Error VL53L0X_GetInterMeasurementPeriodMilliSeconds( |
joelvonrotz | 0:11ad6aaed10a | 903 | VL53L0X_DEV Dev, uint32_t *pInterMeasurementPeriodMilliSeconds); |
joelvonrotz | 0:11ad6aaed10a | 904 | |
joelvonrotz | 0:11ad6aaed10a | 905 | /** |
joelvonrotz | 0:11ad6aaed10a | 906 | * @brief Enable/Disable Cross talk compensation feature |
joelvonrotz | 0:11ad6aaed10a | 907 | * |
joelvonrotz | 0:11ad6aaed10a | 908 | * @note This function is not Implemented. |
joelvonrotz | 0:11ad6aaed10a | 909 | * Enable/Disable Cross Talk by set to zero the Cross Talk value |
joelvonrotz | 0:11ad6aaed10a | 910 | * by using @a VL53L0X_SetXTalkCompensationRateMegaCps(). |
joelvonrotz | 0:11ad6aaed10a | 911 | * |
joelvonrotz | 0:11ad6aaed10a | 912 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 913 | * @param XTalkCompensationEnable Cross talk compensation |
joelvonrotz | 0:11ad6aaed10a | 914 | * to be set 0=disabled else = enabled |
joelvonrotz | 0:11ad6aaed10a | 915 | * @return VL53L0X_ERROR_NOT_IMPLEMENTED Not implemented |
joelvonrotz | 0:11ad6aaed10a | 916 | */ |
joelvonrotz | 0:11ad6aaed10a | 917 | VL53L0X_API VL53L0X_Error VL53L0X_SetXTalkCompensationEnable(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 918 | uint8_t XTalkCompensationEnable); |
joelvonrotz | 0:11ad6aaed10a | 919 | |
joelvonrotz | 0:11ad6aaed10a | 920 | /** |
joelvonrotz | 0:11ad6aaed10a | 921 | * @brief Get Cross talk compensation rate |
joelvonrotz | 0:11ad6aaed10a | 922 | * |
joelvonrotz | 0:11ad6aaed10a | 923 | * @note This function is not Implemented. |
joelvonrotz | 0:11ad6aaed10a | 924 | * Enable/Disable Cross Talk by set to zero the Cross Talk value by |
joelvonrotz | 0:11ad6aaed10a | 925 | * using @a VL53L0X_SetXTalkCompensationRateMegaCps(). |
joelvonrotz | 0:11ad6aaed10a | 926 | * |
joelvonrotz | 0:11ad6aaed10a | 927 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 928 | * @param pXTalkCompensationEnable Pointer to the Cross talk compensation |
joelvonrotz | 0:11ad6aaed10a | 929 | * state 0=disabled or 1 = enabled |
joelvonrotz | 0:11ad6aaed10a | 930 | * @return VL53L0X_ERROR_NOT_IMPLEMENTED Not implemented |
joelvonrotz | 0:11ad6aaed10a | 931 | */ |
joelvonrotz | 0:11ad6aaed10a | 932 | VL53L0X_API VL53L0X_Error VL53L0X_GetXTalkCompensationEnable(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 933 | uint8_t *pXTalkCompensationEnable); |
joelvonrotz | 0:11ad6aaed10a | 934 | |
joelvonrotz | 0:11ad6aaed10a | 935 | /** |
joelvonrotz | 0:11ad6aaed10a | 936 | * @brief Set Cross talk compensation rate |
joelvonrotz | 0:11ad6aaed10a | 937 | * |
joelvonrotz | 0:11ad6aaed10a | 938 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 939 | * Set Cross talk compensation rate. |
joelvonrotz | 0:11ad6aaed10a | 940 | * |
joelvonrotz | 0:11ad6aaed10a | 941 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 942 | * |
joelvonrotz | 0:11ad6aaed10a | 943 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 944 | * @param XTalkCompensationRateMegaCps Compensation rate in |
joelvonrotz | 0:11ad6aaed10a | 945 | * Mega counts per second (16.16 fix point) see datasheet for details |
joelvonrotz | 0:11ad6aaed10a | 946 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 947 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 948 | */ |
joelvonrotz | 0:11ad6aaed10a | 949 | VL53L0X_API VL53L0X_Error VL53L0X_SetXTalkCompensationRateMegaCps(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 950 | FixPoint1616_t XTalkCompensationRateMegaCps); |
joelvonrotz | 0:11ad6aaed10a | 951 | |
joelvonrotz | 0:11ad6aaed10a | 952 | /** |
joelvonrotz | 0:11ad6aaed10a | 953 | * @brief Get Cross talk compensation rate |
joelvonrotz | 0:11ad6aaed10a | 954 | * |
joelvonrotz | 0:11ad6aaed10a | 955 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 956 | * Get Cross talk compensation rate. |
joelvonrotz | 0:11ad6aaed10a | 957 | * |
joelvonrotz | 0:11ad6aaed10a | 958 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 959 | * |
joelvonrotz | 0:11ad6aaed10a | 960 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 961 | * @param pXTalkCompensationRateMegaCps Pointer to Compensation rate |
joelvonrotz | 0:11ad6aaed10a | 962 | in Mega counts per second (16.16 fix point) see datasheet for details |
joelvonrotz | 0:11ad6aaed10a | 963 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 964 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 965 | */ |
joelvonrotz | 0:11ad6aaed10a | 966 | VL53L0X_API VL53L0X_Error VL53L0X_GetXTalkCompensationRateMegaCps(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 967 | FixPoint1616_t *pXTalkCompensationRateMegaCps); |
joelvonrotz | 0:11ad6aaed10a | 968 | |
joelvonrotz | 0:11ad6aaed10a | 969 | /** |
joelvonrotz | 0:11ad6aaed10a | 970 | * @brief Set Reference Calibration Parameters |
joelvonrotz | 0:11ad6aaed10a | 971 | * |
joelvonrotz | 0:11ad6aaed10a | 972 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 973 | * Set Reference Calibration Parameters. |
joelvonrotz | 0:11ad6aaed10a | 974 | * |
joelvonrotz | 0:11ad6aaed10a | 975 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 976 | * |
joelvonrotz | 0:11ad6aaed10a | 977 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 978 | * @param VhvSettings Parameter for VHV |
joelvonrotz | 0:11ad6aaed10a | 979 | * @param PhaseCal Parameter for PhaseCal |
joelvonrotz | 0:11ad6aaed10a | 980 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 981 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 982 | */ |
joelvonrotz | 0:11ad6aaed10a | 983 | VL53L0X_API VL53L0X_Error VL53L0X_SetRefCalibration(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 984 | uint8_t VhvSettings, uint8_t PhaseCal); |
joelvonrotz | 0:11ad6aaed10a | 985 | |
joelvonrotz | 0:11ad6aaed10a | 986 | /** |
joelvonrotz | 0:11ad6aaed10a | 987 | * @brief Get Reference Calibration Parameters |
joelvonrotz | 0:11ad6aaed10a | 988 | * |
joelvonrotz | 0:11ad6aaed10a | 989 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 990 | * Get Reference Calibration Parameters. |
joelvonrotz | 0:11ad6aaed10a | 991 | * |
joelvonrotz | 0:11ad6aaed10a | 992 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 993 | * |
joelvonrotz | 0:11ad6aaed10a | 994 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 995 | * @param pVhvSettings Pointer to VHV parameter |
joelvonrotz | 0:11ad6aaed10a | 996 | * @param pPhaseCal Pointer to PhaseCal Parameter |
joelvonrotz | 0:11ad6aaed10a | 997 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 998 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 999 | */ |
joelvonrotz | 0:11ad6aaed10a | 1000 | VL53L0X_API VL53L0X_Error VL53L0X_GetRefCalibration(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 1001 | uint8_t *pVhvSettings, uint8_t *pPhaseCal); |
joelvonrotz | 0:11ad6aaed10a | 1002 | |
joelvonrotz | 0:11ad6aaed10a | 1003 | /** |
joelvonrotz | 0:11ad6aaed10a | 1004 | * @brief Get the number of the check limit managed by a given Device |
joelvonrotz | 0:11ad6aaed10a | 1005 | * |
joelvonrotz | 0:11ad6aaed10a | 1006 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 1007 | * This function give the number of the check limit managed by the Device |
joelvonrotz | 0:11ad6aaed10a | 1008 | * |
joelvonrotz | 0:11ad6aaed10a | 1009 | * @note This function doesn't Access to the device |
joelvonrotz | 0:11ad6aaed10a | 1010 | * |
joelvonrotz | 0:11ad6aaed10a | 1011 | * @param pNumberOfLimitCheck Pointer to the number of check limit. |
joelvonrotz | 0:11ad6aaed10a | 1012 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 1013 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 1014 | */ |
joelvonrotz | 0:11ad6aaed10a | 1015 | VL53L0X_API VL53L0X_Error VL53L0X_GetNumberOfLimitCheck( |
joelvonrotz | 0:11ad6aaed10a | 1016 | uint16_t *pNumberOfLimitCheck); |
joelvonrotz | 0:11ad6aaed10a | 1017 | |
joelvonrotz | 0:11ad6aaed10a | 1018 | /** |
joelvonrotz | 0:11ad6aaed10a | 1019 | * @brief Return a description string for a given limit check number |
joelvonrotz | 0:11ad6aaed10a | 1020 | * |
joelvonrotz | 0:11ad6aaed10a | 1021 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 1022 | * This function returns a description string for a given limit check number. |
joelvonrotz | 0:11ad6aaed10a | 1023 | * The limit check is identified with the LimitCheckId. |
joelvonrotz | 0:11ad6aaed10a | 1024 | * |
joelvonrotz | 0:11ad6aaed10a | 1025 | * @note This function doesn't Access to the device |
joelvonrotz | 0:11ad6aaed10a | 1026 | * |
joelvonrotz | 0:11ad6aaed10a | 1027 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 1028 | * @param LimitCheckId Limit Check ID |
joelvonrotz | 0:11ad6aaed10a | 1029 | (0<= LimitCheckId < VL53L0X_GetNumberOfLimitCheck() ). |
joelvonrotz | 0:11ad6aaed10a | 1030 | * @param pLimitCheckString Pointer to the |
joelvonrotz | 0:11ad6aaed10a | 1031 | description string of the given check limit. |
joelvonrotz | 0:11ad6aaed10a | 1032 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 1033 | * @return VL53L0X_ERROR_INVALID_PARAMS This error is |
joelvonrotz | 0:11ad6aaed10a | 1034 | returned when LimitCheckId value is out of range. |
joelvonrotz | 0:11ad6aaed10a | 1035 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 1036 | */ |
joelvonrotz | 0:11ad6aaed10a | 1037 | VL53L0X_API VL53L0X_Error VL53L0X_GetLimitCheckInfo(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 1038 | uint16_t LimitCheckId, char *pLimitCheckString); |
joelvonrotz | 0:11ad6aaed10a | 1039 | |
joelvonrotz | 0:11ad6aaed10a | 1040 | /** |
joelvonrotz | 0:11ad6aaed10a | 1041 | * @brief Return a the Status of the specified check limit |
joelvonrotz | 0:11ad6aaed10a | 1042 | * |
joelvonrotz | 0:11ad6aaed10a | 1043 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 1044 | * This function returns the Status of the specified check limit. |
joelvonrotz | 0:11ad6aaed10a | 1045 | * The value indicate if the check is fail or not. |
joelvonrotz | 0:11ad6aaed10a | 1046 | * The limit check is identified with the LimitCheckId. |
joelvonrotz | 0:11ad6aaed10a | 1047 | * |
joelvonrotz | 0:11ad6aaed10a | 1048 | * @note This function doesn't Access to the device |
joelvonrotz | 0:11ad6aaed10a | 1049 | * |
joelvonrotz | 0:11ad6aaed10a | 1050 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 1051 | * @param LimitCheckId Limit Check ID |
joelvonrotz | 0:11ad6aaed10a | 1052 | (0<= LimitCheckId < VL53L0X_GetNumberOfLimitCheck() ). |
joelvonrotz | 0:11ad6aaed10a | 1053 | * @param pLimitCheckStatus Pointer to the |
joelvonrotz | 0:11ad6aaed10a | 1054 | Limit Check Status of the given check limit. |
joelvonrotz | 0:11ad6aaed10a | 1055 | * LimitCheckStatus : |
joelvonrotz | 0:11ad6aaed10a | 1056 | * 0 the check is not fail |
joelvonrotz | 0:11ad6aaed10a | 1057 | * 1 the check if fail or not enabled |
joelvonrotz | 0:11ad6aaed10a | 1058 | * |
joelvonrotz | 0:11ad6aaed10a | 1059 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 1060 | * @return VL53L0X_ERROR_INVALID_PARAMS This error is |
joelvonrotz | 0:11ad6aaed10a | 1061 | returned when LimitCheckId value is out of range. |
joelvonrotz | 0:11ad6aaed10a | 1062 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 1063 | */ |
joelvonrotz | 0:11ad6aaed10a | 1064 | VL53L0X_API VL53L0X_Error VL53L0X_GetLimitCheckStatus(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 1065 | uint16_t LimitCheckId, uint8_t *pLimitCheckStatus); |
joelvonrotz | 0:11ad6aaed10a | 1066 | |
joelvonrotz | 0:11ad6aaed10a | 1067 | /** |
joelvonrotz | 0:11ad6aaed10a | 1068 | * @brief Enable/Disable a specific limit check |
joelvonrotz | 0:11ad6aaed10a | 1069 | * |
joelvonrotz | 0:11ad6aaed10a | 1070 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 1071 | * This function Enable/Disable a specific limit check. |
joelvonrotz | 0:11ad6aaed10a | 1072 | * The limit check is identified with the LimitCheckId. |
joelvonrotz | 0:11ad6aaed10a | 1073 | * |
joelvonrotz | 0:11ad6aaed10a | 1074 | * @note This function doesn't Access to the device |
joelvonrotz | 0:11ad6aaed10a | 1075 | * |
joelvonrotz | 0:11ad6aaed10a | 1076 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 1077 | * @param LimitCheckId Limit Check ID |
joelvonrotz | 0:11ad6aaed10a | 1078 | * (0<= LimitCheckId < VL53L0X_GetNumberOfLimitCheck() ). |
joelvonrotz | 0:11ad6aaed10a | 1079 | * @param LimitCheckEnable if 1 the check limit |
joelvonrotz | 0:11ad6aaed10a | 1080 | * corresponding to LimitCheckId is Enabled |
joelvonrotz | 0:11ad6aaed10a | 1081 | * if 0 the check limit |
joelvonrotz | 0:11ad6aaed10a | 1082 | * corresponding to LimitCheckId is disabled |
joelvonrotz | 0:11ad6aaed10a | 1083 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 1084 | * @return VL53L0X_ERROR_INVALID_PARAMS This error is returned |
joelvonrotz | 0:11ad6aaed10a | 1085 | * when LimitCheckId value is out of range. |
joelvonrotz | 0:11ad6aaed10a | 1086 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 1087 | */ |
joelvonrotz | 0:11ad6aaed10a | 1088 | VL53L0X_API VL53L0X_Error VL53L0X_SetLimitCheckEnable(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 1089 | uint16_t LimitCheckId, uint8_t LimitCheckEnable); |
joelvonrotz | 0:11ad6aaed10a | 1090 | |
joelvonrotz | 0:11ad6aaed10a | 1091 | /** |
joelvonrotz | 0:11ad6aaed10a | 1092 | * @brief Get specific limit check enable state |
joelvonrotz | 0:11ad6aaed10a | 1093 | * |
joelvonrotz | 0:11ad6aaed10a | 1094 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 1095 | * This function get the enable state of a specific limit check. |
joelvonrotz | 0:11ad6aaed10a | 1096 | * The limit check is identified with the LimitCheckId. |
joelvonrotz | 0:11ad6aaed10a | 1097 | * |
joelvonrotz | 0:11ad6aaed10a | 1098 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 1099 | * |
joelvonrotz | 0:11ad6aaed10a | 1100 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 1101 | * @param LimitCheckId Limit Check ID |
joelvonrotz | 0:11ad6aaed10a | 1102 | * (0<= LimitCheckId < VL53L0X_GetNumberOfLimitCheck() ). |
joelvonrotz | 0:11ad6aaed10a | 1103 | * @param pLimitCheckEnable Pointer to the check limit enable |
joelvonrotz | 0:11ad6aaed10a | 1104 | * value. |
joelvonrotz | 0:11ad6aaed10a | 1105 | * if 1 the check limit |
joelvonrotz | 0:11ad6aaed10a | 1106 | * corresponding to LimitCheckId is Enabled |
joelvonrotz | 0:11ad6aaed10a | 1107 | * if 0 the check limit |
joelvonrotz | 0:11ad6aaed10a | 1108 | * corresponding to LimitCheckId is disabled |
joelvonrotz | 0:11ad6aaed10a | 1109 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 1110 | * @return VL53L0X_ERROR_INVALID_PARAMS This error is returned |
joelvonrotz | 0:11ad6aaed10a | 1111 | * when LimitCheckId value is out of range. |
joelvonrotz | 0:11ad6aaed10a | 1112 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 1113 | */ |
joelvonrotz | 0:11ad6aaed10a | 1114 | VL53L0X_API VL53L0X_Error VL53L0X_GetLimitCheckEnable(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 1115 | uint16_t LimitCheckId, uint8_t *pLimitCheckEnable); |
joelvonrotz | 0:11ad6aaed10a | 1116 | |
joelvonrotz | 0:11ad6aaed10a | 1117 | /** |
joelvonrotz | 0:11ad6aaed10a | 1118 | * @brief Set a specific limit check value |
joelvonrotz | 0:11ad6aaed10a | 1119 | * |
joelvonrotz | 0:11ad6aaed10a | 1120 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 1121 | * This function set a specific limit check value. |
joelvonrotz | 0:11ad6aaed10a | 1122 | * The limit check is identified with the LimitCheckId. |
joelvonrotz | 0:11ad6aaed10a | 1123 | * |
joelvonrotz | 0:11ad6aaed10a | 1124 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 1125 | * |
joelvonrotz | 0:11ad6aaed10a | 1126 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 1127 | * @param LimitCheckId Limit Check ID |
joelvonrotz | 0:11ad6aaed10a | 1128 | * (0<= LimitCheckId < VL53L0X_GetNumberOfLimitCheck() ). |
joelvonrotz | 0:11ad6aaed10a | 1129 | * @param LimitCheckValue Limit check Value for a given |
joelvonrotz | 0:11ad6aaed10a | 1130 | * LimitCheckId |
joelvonrotz | 0:11ad6aaed10a | 1131 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 1132 | * @return VL53L0X_ERROR_INVALID_PARAMS This error is returned when either |
joelvonrotz | 0:11ad6aaed10a | 1133 | * LimitCheckId or LimitCheckValue value is out of range. |
joelvonrotz | 0:11ad6aaed10a | 1134 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 1135 | */ |
joelvonrotz | 0:11ad6aaed10a | 1136 | VL53L0X_API VL53L0X_Error VL53L0X_SetLimitCheckValue(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 1137 | uint16_t LimitCheckId, FixPoint1616_t LimitCheckValue); |
joelvonrotz | 0:11ad6aaed10a | 1138 | |
joelvonrotz | 0:11ad6aaed10a | 1139 | /** |
joelvonrotz | 0:11ad6aaed10a | 1140 | * @brief Get a specific limit check value |
joelvonrotz | 0:11ad6aaed10a | 1141 | * |
joelvonrotz | 0:11ad6aaed10a | 1142 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 1143 | * This function get a specific limit check value from device then it updates |
joelvonrotz | 0:11ad6aaed10a | 1144 | * internal values and check enables. |
joelvonrotz | 0:11ad6aaed10a | 1145 | * The limit check is identified with the LimitCheckId. |
joelvonrotz | 0:11ad6aaed10a | 1146 | * |
joelvonrotz | 0:11ad6aaed10a | 1147 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 1148 | * |
joelvonrotz | 0:11ad6aaed10a | 1149 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 1150 | * @param LimitCheckId Limit Check ID |
joelvonrotz | 0:11ad6aaed10a | 1151 | * (0<= LimitCheckId < VL53L0X_GetNumberOfLimitCheck() ). |
joelvonrotz | 0:11ad6aaed10a | 1152 | * @param pLimitCheckValue Pointer to Limit |
joelvonrotz | 0:11ad6aaed10a | 1153 | * check Value for a given LimitCheckId. |
joelvonrotz | 0:11ad6aaed10a | 1154 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 1155 | * @return VL53L0X_ERROR_INVALID_PARAMS This error is returned |
joelvonrotz | 0:11ad6aaed10a | 1156 | * when LimitCheckId value is out of range. |
joelvonrotz | 0:11ad6aaed10a | 1157 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 1158 | */ |
joelvonrotz | 0:11ad6aaed10a | 1159 | VL53L0X_API VL53L0X_Error VL53L0X_GetLimitCheckValue(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 1160 | uint16_t LimitCheckId, FixPoint1616_t *pLimitCheckValue); |
joelvonrotz | 0:11ad6aaed10a | 1161 | |
joelvonrotz | 0:11ad6aaed10a | 1162 | /** |
joelvonrotz | 0:11ad6aaed10a | 1163 | * @brief Get the current value of the signal used for the limit check |
joelvonrotz | 0:11ad6aaed10a | 1164 | * |
joelvonrotz | 0:11ad6aaed10a | 1165 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 1166 | * This function get a the current value of the signal used for the limit check. |
joelvonrotz | 0:11ad6aaed10a | 1167 | * To obtain the latest value you should run a ranging before. |
joelvonrotz | 0:11ad6aaed10a | 1168 | * The value reported is linked to the limit check identified with the |
joelvonrotz | 0:11ad6aaed10a | 1169 | * LimitCheckId. |
joelvonrotz | 0:11ad6aaed10a | 1170 | * |
joelvonrotz | 0:11ad6aaed10a | 1171 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 1172 | * |
joelvonrotz | 0:11ad6aaed10a | 1173 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 1174 | * @param LimitCheckId Limit Check ID |
joelvonrotz | 0:11ad6aaed10a | 1175 | * (0<= LimitCheckId < VL53L0X_GetNumberOfLimitCheck() ). |
joelvonrotz | 0:11ad6aaed10a | 1176 | * @param pLimitCheckCurrent Pointer to current Value for a |
joelvonrotz | 0:11ad6aaed10a | 1177 | * given LimitCheckId. |
joelvonrotz | 0:11ad6aaed10a | 1178 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 1179 | * @return VL53L0X_ERROR_INVALID_PARAMS This error is returned when |
joelvonrotz | 0:11ad6aaed10a | 1180 | * LimitCheckId value is out of range. |
joelvonrotz | 0:11ad6aaed10a | 1181 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 1182 | */ |
joelvonrotz | 0:11ad6aaed10a | 1183 | VL53L0X_API VL53L0X_Error VL53L0X_GetLimitCheckCurrent(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 1184 | uint16_t LimitCheckId, FixPoint1616_t *pLimitCheckCurrent); |
joelvonrotz | 0:11ad6aaed10a | 1185 | |
joelvonrotz | 0:11ad6aaed10a | 1186 | /** |
joelvonrotz | 0:11ad6aaed10a | 1187 | * @brief Enable (or disable) Wrap around Check |
joelvonrotz | 0:11ad6aaed10a | 1188 | * |
joelvonrotz | 0:11ad6aaed10a | 1189 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 1190 | * |
joelvonrotz | 0:11ad6aaed10a | 1191 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 1192 | * @param WrapAroundCheckEnable Wrap around Check to be set |
joelvonrotz | 0:11ad6aaed10a | 1193 | * 0=disabled, other = enabled |
joelvonrotz | 0:11ad6aaed10a | 1194 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 1195 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 1196 | */ |
joelvonrotz | 0:11ad6aaed10a | 1197 | VL53L0X_API VL53L0X_Error VL53L0X_SetWrapAroundCheckEnable(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 1198 | uint8_t WrapAroundCheckEnable); |
joelvonrotz | 0:11ad6aaed10a | 1199 | |
joelvonrotz | 0:11ad6aaed10a | 1200 | /** |
joelvonrotz | 0:11ad6aaed10a | 1201 | * @brief Get setup of Wrap around Check |
joelvonrotz | 0:11ad6aaed10a | 1202 | * |
joelvonrotz | 0:11ad6aaed10a | 1203 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 1204 | * This function get the wrapAround check enable parameters |
joelvonrotz | 0:11ad6aaed10a | 1205 | * |
joelvonrotz | 0:11ad6aaed10a | 1206 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 1207 | * |
joelvonrotz | 0:11ad6aaed10a | 1208 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 1209 | * @param pWrapAroundCheckEnable Pointer to the Wrap around Check state |
joelvonrotz | 0:11ad6aaed10a | 1210 | * 0=disabled or 1 = enabled |
joelvonrotz | 0:11ad6aaed10a | 1211 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 1212 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 1213 | */ |
joelvonrotz | 0:11ad6aaed10a | 1214 | VL53L0X_API VL53L0X_Error VL53L0X_GetWrapAroundCheckEnable(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 1215 | uint8_t *pWrapAroundCheckEnable); |
joelvonrotz | 0:11ad6aaed10a | 1216 | |
joelvonrotz | 0:11ad6aaed10a | 1217 | /** |
joelvonrotz | 0:11ad6aaed10a | 1218 | * @brief Set Dmax Calibration Parameters for a given device |
joelvonrotz | 0:11ad6aaed10a | 1219 | * When one of the parameter is zero, this function will get parameter |
joelvonrotz | 0:11ad6aaed10a | 1220 | * from NVM. |
joelvonrotz | 0:11ad6aaed10a | 1221 | * @note This function doesn't Access to the device |
joelvonrotz | 0:11ad6aaed10a | 1222 | * |
joelvonrotz | 0:11ad6aaed10a | 1223 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 1224 | * @param RangeMilliMeter Calibration Distance |
joelvonrotz | 0:11ad6aaed10a | 1225 | * @param SignalRateRtnMegaCps Signal rate return read at CalDistance |
joelvonrotz | 0:11ad6aaed10a | 1226 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 1227 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 1228 | */ |
joelvonrotz | 0:11ad6aaed10a | 1229 | VL53L0X_API VL53L0X_Error VL53L0X_SetDmaxCalParameters(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 1230 | uint16_t RangeMilliMeter, FixPoint1616_t SignalRateRtnMegaCps); |
joelvonrotz | 0:11ad6aaed10a | 1231 | |
joelvonrotz | 0:11ad6aaed10a | 1232 | /** |
joelvonrotz | 0:11ad6aaed10a | 1233 | * @brief Get Dmax Calibration Parameters for a given device |
joelvonrotz | 0:11ad6aaed10a | 1234 | * |
joelvonrotz | 0:11ad6aaed10a | 1235 | * |
joelvonrotz | 0:11ad6aaed10a | 1236 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 1237 | * |
joelvonrotz | 0:11ad6aaed10a | 1238 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 1239 | * @param pRangeMilliMeter Pointer to Calibration Distance |
joelvonrotz | 0:11ad6aaed10a | 1240 | * @param pSignalRateRtnMegaCps Pointer to Signal rate return |
joelvonrotz | 0:11ad6aaed10a | 1241 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 1242 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 1243 | */ |
joelvonrotz | 0:11ad6aaed10a | 1244 | VL53L0X_API VL53L0X_Error VL53L0X_GetDmaxCalParameters(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 1245 | uint16_t *pRangeMilliMeter, FixPoint1616_t *pSignalRateRtnMegaCps); |
joelvonrotz | 0:11ad6aaed10a | 1246 | |
joelvonrotz | 0:11ad6aaed10a | 1247 | /** @} VL53L0X_parameters_group */ |
joelvonrotz | 0:11ad6aaed10a | 1248 | |
joelvonrotz | 0:11ad6aaed10a | 1249 | /** @defgroup VL53L0X_measurement_group VL53L0X Measurement Functions |
joelvonrotz | 0:11ad6aaed10a | 1250 | * @brief Functions used for the measurements |
joelvonrotz | 0:11ad6aaed10a | 1251 | * @{ |
joelvonrotz | 0:11ad6aaed10a | 1252 | */ |
joelvonrotz | 0:11ad6aaed10a | 1253 | |
joelvonrotz | 0:11ad6aaed10a | 1254 | /** |
joelvonrotz | 0:11ad6aaed10a | 1255 | * @brief Single shot measurement. |
joelvonrotz | 0:11ad6aaed10a | 1256 | * |
joelvonrotz | 0:11ad6aaed10a | 1257 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 1258 | * Perform simple measurement sequence (Start measure, Wait measure to end, |
joelvonrotz | 0:11ad6aaed10a | 1259 | * and returns when measurement is done). |
joelvonrotz | 0:11ad6aaed10a | 1260 | * Once function returns, user can get valid data by calling |
joelvonrotz | 0:11ad6aaed10a | 1261 | * VL53L0X_GetRangingMeasurement or VL53L0X_GetHistogramMeasurement |
joelvonrotz | 0:11ad6aaed10a | 1262 | * depending on defined measurement mode |
joelvonrotz | 0:11ad6aaed10a | 1263 | * User should Clear the interrupt in case this are enabled by using the |
joelvonrotz | 0:11ad6aaed10a | 1264 | * function VL53L0X_ClearInterruptMask(). |
joelvonrotz | 0:11ad6aaed10a | 1265 | * |
joelvonrotz | 0:11ad6aaed10a | 1266 | * @warning This function is a blocking function |
joelvonrotz | 0:11ad6aaed10a | 1267 | * |
joelvonrotz | 0:11ad6aaed10a | 1268 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 1269 | * |
joelvonrotz | 0:11ad6aaed10a | 1270 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 1271 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 1272 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 1273 | */ |
joelvonrotz | 0:11ad6aaed10a | 1274 | VL53L0X_API VL53L0X_Error VL53L0X_PerformSingleMeasurement(VL53L0X_DEV Dev); |
joelvonrotz | 0:11ad6aaed10a | 1275 | |
joelvonrotz | 0:11ad6aaed10a | 1276 | /** |
joelvonrotz | 0:11ad6aaed10a | 1277 | * @brief Perform Reference Calibration |
joelvonrotz | 0:11ad6aaed10a | 1278 | * |
joelvonrotz | 0:11ad6aaed10a | 1279 | * @details Perform a reference calibration of the Device. |
joelvonrotz | 0:11ad6aaed10a | 1280 | * This function should be run from time to time before doing |
joelvonrotz | 0:11ad6aaed10a | 1281 | * a ranging measurement. |
joelvonrotz | 0:11ad6aaed10a | 1282 | * This function will launch a special ranging measurement, so |
joelvonrotz | 0:11ad6aaed10a | 1283 | * if interrupt are enable an interrupt will be done. |
joelvonrotz | 0:11ad6aaed10a | 1284 | * This function will clear the interrupt generated automatically. |
joelvonrotz | 0:11ad6aaed10a | 1285 | * |
joelvonrotz | 0:11ad6aaed10a | 1286 | * @warning This function is a blocking function |
joelvonrotz | 0:11ad6aaed10a | 1287 | * |
joelvonrotz | 0:11ad6aaed10a | 1288 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 1289 | * |
joelvonrotz | 0:11ad6aaed10a | 1290 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 1291 | * @param pVhvSettings Pointer to vhv settings parameter. |
joelvonrotz | 0:11ad6aaed10a | 1292 | * @param pPhaseCal Pointer to PhaseCal parameter. |
joelvonrotz | 0:11ad6aaed10a | 1293 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 1294 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 1295 | */ |
joelvonrotz | 0:11ad6aaed10a | 1296 | VL53L0X_API VL53L0X_Error VL53L0X_PerformRefCalibration(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 1297 | uint8_t *pVhvSettings, uint8_t *pPhaseCal); |
joelvonrotz | 0:11ad6aaed10a | 1298 | |
joelvonrotz | 0:11ad6aaed10a | 1299 | /** |
joelvonrotz | 0:11ad6aaed10a | 1300 | * @brief Perform XTalk Measurement |
joelvonrotz | 0:11ad6aaed10a | 1301 | * |
joelvonrotz | 0:11ad6aaed10a | 1302 | * @details Measures the current cross talk from glass in front |
joelvonrotz | 0:11ad6aaed10a | 1303 | * of the sensor. |
joelvonrotz | 0:11ad6aaed10a | 1304 | * This functions performs a histogram measurement and uses the results |
joelvonrotz | 0:11ad6aaed10a | 1305 | * to measure the crosstalk. For the function to be successful, there |
joelvonrotz | 0:11ad6aaed10a | 1306 | * must be no target in front of the sensor. |
joelvonrotz | 0:11ad6aaed10a | 1307 | * |
joelvonrotz | 0:11ad6aaed10a | 1308 | * @warning This function is a blocking function |
joelvonrotz | 0:11ad6aaed10a | 1309 | * |
joelvonrotz | 0:11ad6aaed10a | 1310 | * @warning This function is not supported when the final range |
joelvonrotz | 0:11ad6aaed10a | 1311 | * vcsel clock period is set below 10 PCLKS. |
joelvonrotz | 0:11ad6aaed10a | 1312 | * |
joelvonrotz | 0:11ad6aaed10a | 1313 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 1314 | * |
joelvonrotz | 0:11ad6aaed10a | 1315 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 1316 | * @param TimeoutMs Histogram measurement duration. |
joelvonrotz | 0:11ad6aaed10a | 1317 | * @param pXtalkPerSpad Output parameter containing the crosstalk |
joelvonrotz | 0:11ad6aaed10a | 1318 | * measurement result, in MCPS/Spad. Format fixpoint 16:16. |
joelvonrotz | 0:11ad6aaed10a | 1319 | * @param pAmbientTooHigh Output parameter which indicate that |
joelvonrotz | 0:11ad6aaed10a | 1320 | * pXtalkPerSpad is not good if the Ambient is too high. |
joelvonrotz | 0:11ad6aaed10a | 1321 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 1322 | * @return VL53L0X_ERROR_INVALID_PARAMS vcsel clock period not supported |
joelvonrotz | 0:11ad6aaed10a | 1323 | * for this operation. Must not be less than 10PCLKS. |
joelvonrotz | 0:11ad6aaed10a | 1324 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 1325 | */ |
joelvonrotz | 0:11ad6aaed10a | 1326 | VL53L0X_API VL53L0X_Error VL53L0X_PerformXTalkMeasurement(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 1327 | uint32_t TimeoutMs, FixPoint1616_t *pXtalkPerSpad, |
joelvonrotz | 0:11ad6aaed10a | 1328 | uint8_t *pAmbientTooHigh); |
joelvonrotz | 0:11ad6aaed10a | 1329 | |
joelvonrotz | 0:11ad6aaed10a | 1330 | /** |
joelvonrotz | 0:11ad6aaed10a | 1331 | * @brief Perform XTalk Calibration |
joelvonrotz | 0:11ad6aaed10a | 1332 | * |
joelvonrotz | 0:11ad6aaed10a | 1333 | * @details Perform a XTalk calibration of the Device. |
joelvonrotz | 0:11ad6aaed10a | 1334 | * This function will launch a ranging measurement, if interrupts |
joelvonrotz | 0:11ad6aaed10a | 1335 | * are enabled an interrupt will be done. |
joelvonrotz | 0:11ad6aaed10a | 1336 | * This function will clear the interrupt generated automatically. |
joelvonrotz | 0:11ad6aaed10a | 1337 | * This function will program a new value for the XTalk compensation |
joelvonrotz | 0:11ad6aaed10a | 1338 | * and it will enable the cross talk before exit. |
joelvonrotz | 0:11ad6aaed10a | 1339 | * This function will disable the VL53L0X_CHECKENABLE_RANGE_IGNORE_THRESHOLD. |
joelvonrotz | 0:11ad6aaed10a | 1340 | * |
joelvonrotz | 0:11ad6aaed10a | 1341 | * @warning This function is a blocking function |
joelvonrotz | 0:11ad6aaed10a | 1342 | * |
joelvonrotz | 0:11ad6aaed10a | 1343 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 1344 | * |
joelvonrotz | 0:11ad6aaed10a | 1345 | * @note This function change the device mode to |
joelvonrotz | 0:11ad6aaed10a | 1346 | * VL53L0X_DEVICEMODE_SINGLE_RANGING |
joelvonrotz | 0:11ad6aaed10a | 1347 | * |
joelvonrotz | 0:11ad6aaed10a | 1348 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 1349 | * @param XTalkCalDistance XTalkCalDistance value used for the XTalk |
joelvonrotz | 0:11ad6aaed10a | 1350 | * computation. |
joelvonrotz | 0:11ad6aaed10a | 1351 | * @param pXTalkCompensationRateMegaCps Pointer to new |
joelvonrotz | 0:11ad6aaed10a | 1352 | * XTalkCompensation value. |
joelvonrotz | 0:11ad6aaed10a | 1353 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 1354 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 1355 | */ |
joelvonrotz | 0:11ad6aaed10a | 1356 | VL53L0X_API VL53L0X_Error VL53L0X_PerformXTalkCalibration(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 1357 | FixPoint1616_t XTalkCalDistance, |
joelvonrotz | 0:11ad6aaed10a | 1358 | FixPoint1616_t *pXTalkCompensationRateMegaCps); |
joelvonrotz | 0:11ad6aaed10a | 1359 | |
joelvonrotz | 0:11ad6aaed10a | 1360 | /** |
joelvonrotz | 0:11ad6aaed10a | 1361 | * @brief Perform Offset Calibration |
joelvonrotz | 0:11ad6aaed10a | 1362 | * |
joelvonrotz | 0:11ad6aaed10a | 1363 | * @details Perform a Offset calibration of the Device. |
joelvonrotz | 0:11ad6aaed10a | 1364 | * This function will launch a ranging measurement, if interrupts are |
joelvonrotz | 0:11ad6aaed10a | 1365 | * enabled an interrupt will be done. |
joelvonrotz | 0:11ad6aaed10a | 1366 | * This function will clear the interrupt generated automatically. |
joelvonrotz | 0:11ad6aaed10a | 1367 | * This function will program a new value for the Offset calibration value |
joelvonrotz | 0:11ad6aaed10a | 1368 | * This function will disable the VL53L0X_CHECKENABLE_RANGE_IGNORE_THRESHOLD. |
joelvonrotz | 0:11ad6aaed10a | 1369 | * |
joelvonrotz | 0:11ad6aaed10a | 1370 | * @warning This function is a blocking function |
joelvonrotz | 0:11ad6aaed10a | 1371 | * |
joelvonrotz | 0:11ad6aaed10a | 1372 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 1373 | * |
joelvonrotz | 0:11ad6aaed10a | 1374 | * @note This function does not change the device mode. |
joelvonrotz | 0:11ad6aaed10a | 1375 | * |
joelvonrotz | 0:11ad6aaed10a | 1376 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 1377 | * @param CalDistanceMilliMeter Calibration distance value used for the |
joelvonrotz | 0:11ad6aaed10a | 1378 | * offset compensation. |
joelvonrotz | 0:11ad6aaed10a | 1379 | * @param pOffsetMicroMeter Pointer to new Offset value computed by the |
joelvonrotz | 0:11ad6aaed10a | 1380 | * function. |
joelvonrotz | 0:11ad6aaed10a | 1381 | * |
joelvonrotz | 0:11ad6aaed10a | 1382 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 1383 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 1384 | */ |
joelvonrotz | 0:11ad6aaed10a | 1385 | VL53L0X_API VL53L0X_Error VL53L0X_PerformOffsetCalibration(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 1386 | FixPoint1616_t CalDistanceMilliMeter, int32_t *pOffsetMicroMeter); |
joelvonrotz | 0:11ad6aaed10a | 1387 | |
joelvonrotz | 0:11ad6aaed10a | 1388 | /** |
joelvonrotz | 0:11ad6aaed10a | 1389 | * @brief Start device measurement |
joelvonrotz | 0:11ad6aaed10a | 1390 | * |
joelvonrotz | 0:11ad6aaed10a | 1391 | * @details Started measurement will depend on device parameters set through |
joelvonrotz | 0:11ad6aaed10a | 1392 | * @a VL53L0X_SetParameters() |
joelvonrotz | 0:11ad6aaed10a | 1393 | * This is a non-blocking function. |
joelvonrotz | 0:11ad6aaed10a | 1394 | * This function will change the VL53L0X_State from VL53L0X_STATE_IDLE to |
joelvonrotz | 0:11ad6aaed10a | 1395 | * VL53L0X_STATE_RUNNING. |
joelvonrotz | 0:11ad6aaed10a | 1396 | * |
joelvonrotz | 0:11ad6aaed10a | 1397 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 1398 | * |
joelvonrotz | 0:11ad6aaed10a | 1399 | |
joelvonrotz | 0:11ad6aaed10a | 1400 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 1401 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 1402 | * @return VL53L0X_ERROR_MODE_NOT_SUPPORTED This error occurs when |
joelvonrotz | 0:11ad6aaed10a | 1403 | * DeviceMode programmed with @a VL53L0X_SetDeviceMode is not in the supported |
joelvonrotz | 0:11ad6aaed10a | 1404 | * list: |
joelvonrotz | 0:11ad6aaed10a | 1405 | * Supported mode are: |
joelvonrotz | 0:11ad6aaed10a | 1406 | * VL53L0X_DEVICEMODE_SINGLE_RANGING, |
joelvonrotz | 0:11ad6aaed10a | 1407 | * VL53L0X_DEVICEMODE_CONTINUOUS_RANGING, |
joelvonrotz | 0:11ad6aaed10a | 1408 | * VL53L0X_DEVICEMODE_CONTINUOUS_TIMED_RANGING |
joelvonrotz | 0:11ad6aaed10a | 1409 | * @return VL53L0X_ERROR_TIME_OUT Time out on start measurement |
joelvonrotz | 0:11ad6aaed10a | 1410 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 1411 | */ |
joelvonrotz | 0:11ad6aaed10a | 1412 | VL53L0X_API VL53L0X_Error VL53L0X_StartMeasurement(VL53L0X_DEV Dev); |
joelvonrotz | 0:11ad6aaed10a | 1413 | |
joelvonrotz | 0:11ad6aaed10a | 1414 | /** |
joelvonrotz | 0:11ad6aaed10a | 1415 | * @brief Stop device measurement |
joelvonrotz | 0:11ad6aaed10a | 1416 | * |
joelvonrotz | 0:11ad6aaed10a | 1417 | * @details Will set the device in standby mode at end of current measurement\n |
joelvonrotz | 0:11ad6aaed10a | 1418 | * Not necessary in single mode as device shall return automatically |
joelvonrotz | 0:11ad6aaed10a | 1419 | * in standby mode at end of measurement. |
joelvonrotz | 0:11ad6aaed10a | 1420 | * This function will change the VL53L0X_State from VL53L0X_STATE_RUNNING |
joelvonrotz | 0:11ad6aaed10a | 1421 | * to VL53L0X_STATE_IDLE. |
joelvonrotz | 0:11ad6aaed10a | 1422 | * |
joelvonrotz | 0:11ad6aaed10a | 1423 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 1424 | * |
joelvonrotz | 0:11ad6aaed10a | 1425 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 1426 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 1427 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 1428 | */ |
joelvonrotz | 0:11ad6aaed10a | 1429 | VL53L0X_API VL53L0X_Error VL53L0X_StopMeasurement(VL53L0X_DEV Dev); |
joelvonrotz | 0:11ad6aaed10a | 1430 | |
joelvonrotz | 0:11ad6aaed10a | 1431 | /** |
joelvonrotz | 0:11ad6aaed10a | 1432 | * @brief Return Measurement Data Ready |
joelvonrotz | 0:11ad6aaed10a | 1433 | * |
joelvonrotz | 0:11ad6aaed10a | 1434 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 1435 | * This function indicate that a measurement data is ready. |
joelvonrotz | 0:11ad6aaed10a | 1436 | * This function check if interrupt mode is used then check is done accordingly. |
joelvonrotz | 0:11ad6aaed10a | 1437 | * If perform function clear the interrupt, this function will not work, |
joelvonrotz | 0:11ad6aaed10a | 1438 | * like in case of @a VL53L0X_PerformSingleRangingMeasurement(). |
joelvonrotz | 0:11ad6aaed10a | 1439 | * The previous function is blocking function, VL53L0X_GetMeasurementDataReady |
joelvonrotz | 0:11ad6aaed10a | 1440 | * is used for non-blocking capture. |
joelvonrotz | 0:11ad6aaed10a | 1441 | * |
joelvonrotz | 0:11ad6aaed10a | 1442 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 1443 | * |
joelvonrotz | 0:11ad6aaed10a | 1444 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 1445 | * @param pMeasurementDataReady Pointer to Measurement Data Ready. |
joelvonrotz | 0:11ad6aaed10a | 1446 | * 0=data not ready, 1 = data ready |
joelvonrotz | 0:11ad6aaed10a | 1447 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 1448 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 1449 | */ |
joelvonrotz | 0:11ad6aaed10a | 1450 | VL53L0X_API VL53L0X_Error VL53L0X_GetMeasurementDataReady(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 1451 | uint8_t *pMeasurementDataReady); |
joelvonrotz | 0:11ad6aaed10a | 1452 | |
joelvonrotz | 0:11ad6aaed10a | 1453 | /** |
joelvonrotz | 0:11ad6aaed10a | 1454 | * @brief Wait for device ready for a new measurement command. |
joelvonrotz | 0:11ad6aaed10a | 1455 | * Blocking function. |
joelvonrotz | 0:11ad6aaed10a | 1456 | * |
joelvonrotz | 0:11ad6aaed10a | 1457 | * @note This function is not Implemented |
joelvonrotz | 0:11ad6aaed10a | 1458 | * |
joelvonrotz | 0:11ad6aaed10a | 1459 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 1460 | * @param MaxLoop Max Number of polling loop (timeout). |
joelvonrotz | 0:11ad6aaed10a | 1461 | * @return VL53L0X_ERROR_NOT_IMPLEMENTED Not implemented |
joelvonrotz | 0:11ad6aaed10a | 1462 | */ |
joelvonrotz | 0:11ad6aaed10a | 1463 | VL53L0X_API VL53L0X_Error VL53L0X_WaitDeviceReadyForNewMeasurement(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 1464 | uint32_t MaxLoop); |
joelvonrotz | 0:11ad6aaed10a | 1465 | |
joelvonrotz | 0:11ad6aaed10a | 1466 | /** |
joelvonrotz | 0:11ad6aaed10a | 1467 | * @brief Retrieve the Reference Signal after a measurements |
joelvonrotz | 0:11ad6aaed10a | 1468 | * |
joelvonrotz | 0:11ad6aaed10a | 1469 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 1470 | * Get Reference Signal from last successful Ranging measurement |
joelvonrotz | 0:11ad6aaed10a | 1471 | * This function return a valid value after that you call the |
joelvonrotz | 0:11ad6aaed10a | 1472 | * @a VL53L0X_GetRangingMeasurementData(). |
joelvonrotz | 0:11ad6aaed10a | 1473 | * |
joelvonrotz | 0:11ad6aaed10a | 1474 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 1475 | * |
joelvonrotz | 0:11ad6aaed10a | 1476 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 1477 | * @param pMeasurementRefSignal Pointer to the Ref Signal to fill up. |
joelvonrotz | 0:11ad6aaed10a | 1478 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 1479 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 1480 | */ |
joelvonrotz | 0:11ad6aaed10a | 1481 | VL53L0X_API VL53L0X_Error VL53L0X_GetMeasurementRefSignal(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 1482 | FixPoint1616_t *pMeasurementRefSignal); |
joelvonrotz | 0:11ad6aaed10a | 1483 | |
joelvonrotz | 0:11ad6aaed10a | 1484 | /** |
joelvonrotz | 0:11ad6aaed10a | 1485 | * @brief Retrieve the measurements from device for a given setup |
joelvonrotz | 0:11ad6aaed10a | 1486 | * |
joelvonrotz | 0:11ad6aaed10a | 1487 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 1488 | * Get data from last successful Ranging measurement |
joelvonrotz | 0:11ad6aaed10a | 1489 | * @warning USER should take care about @a VL53L0X_GetNumberOfROIZones() |
joelvonrotz | 0:11ad6aaed10a | 1490 | * before get data. |
joelvonrotz | 0:11ad6aaed10a | 1491 | * PAL will fill a NumberOfROIZones times the corresponding data |
joelvonrotz | 0:11ad6aaed10a | 1492 | * structure used in the measurement function. |
joelvonrotz | 0:11ad6aaed10a | 1493 | * |
joelvonrotz | 0:11ad6aaed10a | 1494 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 1495 | * |
joelvonrotz | 0:11ad6aaed10a | 1496 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 1497 | * @param pRangingMeasurementData Pointer to the data structure to fill up. |
joelvonrotz | 0:11ad6aaed10a | 1498 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 1499 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 1500 | */ |
joelvonrotz | 0:11ad6aaed10a | 1501 | VL53L0X_API VL53L0X_Error VL53L0X_GetRangingMeasurementData(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 1502 | VL53L0X_RangingMeasurementData_t *pRangingMeasurementData); |
joelvonrotz | 0:11ad6aaed10a | 1503 | |
joelvonrotz | 0:11ad6aaed10a | 1504 | /** |
joelvonrotz | 0:11ad6aaed10a | 1505 | * @brief Retrieve the measurements from device for a given setup |
joelvonrotz | 0:11ad6aaed10a | 1506 | * |
joelvonrotz | 0:11ad6aaed10a | 1507 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 1508 | * Get data from last successful Histogram measurement |
joelvonrotz | 0:11ad6aaed10a | 1509 | * @warning USER should take care about @a VL53L0X_GetNumberOfROIZones() |
joelvonrotz | 0:11ad6aaed10a | 1510 | * before get data. |
joelvonrotz | 0:11ad6aaed10a | 1511 | * PAL will fill a NumberOfROIZones times the corresponding data structure |
joelvonrotz | 0:11ad6aaed10a | 1512 | * used in the measurement function. |
joelvonrotz | 0:11ad6aaed10a | 1513 | * |
joelvonrotz | 0:11ad6aaed10a | 1514 | * @note This function is not Implemented |
joelvonrotz | 0:11ad6aaed10a | 1515 | * |
joelvonrotz | 0:11ad6aaed10a | 1516 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 1517 | * @param pHistogramMeasurementData Pointer to the histogram data structure. |
joelvonrotz | 0:11ad6aaed10a | 1518 | * @return VL53L0X_ERROR_NOT_IMPLEMENTED Not implemented |
joelvonrotz | 0:11ad6aaed10a | 1519 | */ |
joelvonrotz | 0:11ad6aaed10a | 1520 | VL53L0X_API VL53L0X_Error VL53L0X_GetHistogramMeasurementData(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 1521 | VL53L0X_HistogramMeasurementData_t *pHistogramMeasurementData); |
joelvonrotz | 0:11ad6aaed10a | 1522 | |
joelvonrotz | 0:11ad6aaed10a | 1523 | /** |
joelvonrotz | 0:11ad6aaed10a | 1524 | * @brief Performs a single ranging measurement and retrieve the ranging |
joelvonrotz | 0:11ad6aaed10a | 1525 | * measurement data |
joelvonrotz | 0:11ad6aaed10a | 1526 | * |
joelvonrotz | 0:11ad6aaed10a | 1527 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 1528 | * This function will change the device mode to VL53L0X_DEVICEMODE_SINGLE_RANGING |
joelvonrotz | 0:11ad6aaed10a | 1529 | * with @a VL53L0X_SetDeviceMode(), |
joelvonrotz | 0:11ad6aaed10a | 1530 | * It performs measurement with @a VL53L0X_PerformSingleMeasurement() |
joelvonrotz | 0:11ad6aaed10a | 1531 | * It get data from last successful Ranging measurement with |
joelvonrotz | 0:11ad6aaed10a | 1532 | * @a VL53L0X_GetRangingMeasurementData. |
joelvonrotz | 0:11ad6aaed10a | 1533 | * Finally it clear the interrupt with @a VL53L0X_ClearInterruptMask(). |
joelvonrotz | 0:11ad6aaed10a | 1534 | * |
joelvonrotz | 0:11ad6aaed10a | 1535 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 1536 | * |
joelvonrotz | 0:11ad6aaed10a | 1537 | * @note This function change the device mode to |
joelvonrotz | 0:11ad6aaed10a | 1538 | * VL53L0X_DEVICEMODE_SINGLE_RANGING |
joelvonrotz | 0:11ad6aaed10a | 1539 | * |
joelvonrotz | 0:11ad6aaed10a | 1540 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 1541 | * @param pRangingMeasurementData Pointer to the data structure to fill up. |
joelvonrotz | 0:11ad6aaed10a | 1542 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 1543 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 1544 | */ |
joelvonrotz | 0:11ad6aaed10a | 1545 | VL53L0X_API VL53L0X_Error VL53L0X_PerformSingleRangingMeasurement(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 1546 | VL53L0X_RangingMeasurementData_t *pRangingMeasurementData); |
joelvonrotz | 0:11ad6aaed10a | 1547 | |
joelvonrotz | 0:11ad6aaed10a | 1548 | /** |
joelvonrotz | 0:11ad6aaed10a | 1549 | * @brief Performs a single histogram measurement and retrieve the histogram |
joelvonrotz | 0:11ad6aaed10a | 1550 | * measurement data |
joelvonrotz | 0:11ad6aaed10a | 1551 | * Is equivalent to VL53L0X_PerformSingleMeasurement + |
joelvonrotz | 0:11ad6aaed10a | 1552 | * VL53L0X_GetHistogramMeasurementData |
joelvonrotz | 0:11ad6aaed10a | 1553 | * |
joelvonrotz | 0:11ad6aaed10a | 1554 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 1555 | * Get data from last successful Ranging measurement. |
joelvonrotz | 0:11ad6aaed10a | 1556 | * This function will clear the interrupt in case of these are enabled. |
joelvonrotz | 0:11ad6aaed10a | 1557 | * |
joelvonrotz | 0:11ad6aaed10a | 1558 | * @note This function is not Implemented |
joelvonrotz | 0:11ad6aaed10a | 1559 | * |
joelvonrotz | 0:11ad6aaed10a | 1560 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 1561 | * @param pHistogramMeasurementData Pointer to the data structure to fill up. |
joelvonrotz | 0:11ad6aaed10a | 1562 | * @return VL53L0X_ERROR_NOT_IMPLEMENTED Not implemented |
joelvonrotz | 0:11ad6aaed10a | 1563 | */ |
joelvonrotz | 0:11ad6aaed10a | 1564 | VL53L0X_API VL53L0X_Error VL53L0X_PerformSingleHistogramMeasurement(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 1565 | VL53L0X_HistogramMeasurementData_t *pHistogramMeasurementData); |
joelvonrotz | 0:11ad6aaed10a | 1566 | |
joelvonrotz | 0:11ad6aaed10a | 1567 | /** |
joelvonrotz | 0:11ad6aaed10a | 1568 | * @brief Set the number of ROI Zones to be used for a specific Device |
joelvonrotz | 0:11ad6aaed10a | 1569 | * |
joelvonrotz | 0:11ad6aaed10a | 1570 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 1571 | * Set the number of ROI Zones to be used for a specific Device. |
joelvonrotz | 0:11ad6aaed10a | 1572 | * The programmed value should be less than the max number of ROI Zones given |
joelvonrotz | 0:11ad6aaed10a | 1573 | * with @a VL53L0X_GetMaxNumberOfROIZones(). |
joelvonrotz | 0:11ad6aaed10a | 1574 | * This version of API manage only one zone. |
joelvonrotz | 0:11ad6aaed10a | 1575 | * |
joelvonrotz | 0:11ad6aaed10a | 1576 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 1577 | * @param NumberOfROIZones Number of ROI Zones to be used for a |
joelvonrotz | 0:11ad6aaed10a | 1578 | * specific Device. |
joelvonrotz | 0:11ad6aaed10a | 1579 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 1580 | * @return VL53L0X_ERROR_INVALID_PARAMS This error is returned if |
joelvonrotz | 0:11ad6aaed10a | 1581 | * NumberOfROIZones != 1 |
joelvonrotz | 0:11ad6aaed10a | 1582 | */ |
joelvonrotz | 0:11ad6aaed10a | 1583 | VL53L0X_API VL53L0X_Error VL53L0X_SetNumberOfROIZones(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 1584 | uint8_t NumberOfROIZones); |
joelvonrotz | 0:11ad6aaed10a | 1585 | |
joelvonrotz | 0:11ad6aaed10a | 1586 | /** |
joelvonrotz | 0:11ad6aaed10a | 1587 | * @brief Get the number of ROI Zones managed by the Device |
joelvonrotz | 0:11ad6aaed10a | 1588 | * |
joelvonrotz | 0:11ad6aaed10a | 1589 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 1590 | * Get number of ROI Zones managed by the Device |
joelvonrotz | 0:11ad6aaed10a | 1591 | * USER should take care about @a VL53L0X_GetNumberOfROIZones() |
joelvonrotz | 0:11ad6aaed10a | 1592 | * before get data after a perform measurement. |
joelvonrotz | 0:11ad6aaed10a | 1593 | * PAL will fill a NumberOfROIZones times the corresponding data |
joelvonrotz | 0:11ad6aaed10a | 1594 | * structure used in the measurement function. |
joelvonrotz | 0:11ad6aaed10a | 1595 | * |
joelvonrotz | 0:11ad6aaed10a | 1596 | * @note This function doesn't Access to the device |
joelvonrotz | 0:11ad6aaed10a | 1597 | * |
joelvonrotz | 0:11ad6aaed10a | 1598 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 1599 | * @param pNumberOfROIZones Pointer to the Number of ROI Zones value. |
joelvonrotz | 0:11ad6aaed10a | 1600 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 1601 | */ |
joelvonrotz | 0:11ad6aaed10a | 1602 | VL53L0X_API VL53L0X_Error VL53L0X_GetNumberOfROIZones(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 1603 | uint8_t *pNumberOfROIZones); |
joelvonrotz | 0:11ad6aaed10a | 1604 | |
joelvonrotz | 0:11ad6aaed10a | 1605 | /** |
joelvonrotz | 0:11ad6aaed10a | 1606 | * @brief Get the Maximum number of ROI Zones managed by the Device |
joelvonrotz | 0:11ad6aaed10a | 1607 | * |
joelvonrotz | 0:11ad6aaed10a | 1608 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 1609 | * Get Maximum number of ROI Zones managed by the Device. |
joelvonrotz | 0:11ad6aaed10a | 1610 | * |
joelvonrotz | 0:11ad6aaed10a | 1611 | * @note This function doesn't Access to the device |
joelvonrotz | 0:11ad6aaed10a | 1612 | * |
joelvonrotz | 0:11ad6aaed10a | 1613 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 1614 | * @param pMaxNumberOfROIZones Pointer to the Maximum Number |
joelvonrotz | 0:11ad6aaed10a | 1615 | * of ROI Zones value. |
joelvonrotz | 0:11ad6aaed10a | 1616 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 1617 | */ |
joelvonrotz | 0:11ad6aaed10a | 1618 | VL53L0X_API VL53L0X_Error VL53L0X_GetMaxNumberOfROIZones(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 1619 | uint8_t *pMaxNumberOfROIZones); |
joelvonrotz | 0:11ad6aaed10a | 1620 | |
joelvonrotz | 0:11ad6aaed10a | 1621 | /** @} VL53L0X_measurement_group */ |
joelvonrotz | 0:11ad6aaed10a | 1622 | |
joelvonrotz | 0:11ad6aaed10a | 1623 | /** @defgroup VL53L0X_interrupt_group VL53L0X Interrupt Functions |
joelvonrotz | 0:11ad6aaed10a | 1624 | * @brief Functions used for interrupt managements |
joelvonrotz | 0:11ad6aaed10a | 1625 | * @{ |
joelvonrotz | 0:11ad6aaed10a | 1626 | */ |
joelvonrotz | 0:11ad6aaed10a | 1627 | |
joelvonrotz | 0:11ad6aaed10a | 1628 | /** |
joelvonrotz | 0:11ad6aaed10a | 1629 | * @brief Set the configuration of GPIO pin for a given device |
joelvonrotz | 0:11ad6aaed10a | 1630 | * |
joelvonrotz | 0:11ad6aaed10a | 1631 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 1632 | * |
joelvonrotz | 0:11ad6aaed10a | 1633 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 1634 | * @param Pin ID of the GPIO Pin |
joelvonrotz | 0:11ad6aaed10a | 1635 | * @param Functionality Select Pin functionality. |
joelvonrotz | 0:11ad6aaed10a | 1636 | * Refer to ::VL53L0X_GpioFunctionality |
joelvonrotz | 0:11ad6aaed10a | 1637 | * @param DeviceMode Device Mode associated to the Gpio. |
joelvonrotz | 0:11ad6aaed10a | 1638 | * @param Polarity Set interrupt polarity. Active high |
joelvonrotz | 0:11ad6aaed10a | 1639 | * or active low see ::VL53L0X_InterruptPolarity |
joelvonrotz | 0:11ad6aaed10a | 1640 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 1641 | * @return VL53L0X_ERROR_GPIO_NOT_EXISTING Only Pin=0 is accepted. |
joelvonrotz | 0:11ad6aaed10a | 1642 | * @return VL53L0X_ERROR_GPIO_FUNCTIONALITY_NOT_SUPPORTED This error occurs |
joelvonrotz | 0:11ad6aaed10a | 1643 | * when Functionality programmed is not in the supported list: |
joelvonrotz | 0:11ad6aaed10a | 1644 | * Supported value are: |
joelvonrotz | 0:11ad6aaed10a | 1645 | * VL53L0X_GPIOFUNCTIONALITY_OFF, |
joelvonrotz | 0:11ad6aaed10a | 1646 | * VL53L0X_GPIOFUNCTIONALITY_THRESHOLD_CROSSED_LOW, |
joelvonrotz | 0:11ad6aaed10a | 1647 | * VL53L0X_GPIOFUNCTIONALITY_THRESHOLD_CROSSED_HIGH, |
joelvonrotz | 0:11ad6aaed10a | 1648 | VL53L0X_GPIOFUNCTIONALITY_THRESHOLD_CROSSED_OUT, |
joelvonrotz | 0:11ad6aaed10a | 1649 | * VL53L0X_GPIOFUNCTIONALITY_NEW_MEASURE_READY |
joelvonrotz | 0:11ad6aaed10a | 1650 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 1651 | */ |
joelvonrotz | 0:11ad6aaed10a | 1652 | VL53L0X_API VL53L0X_Error VL53L0X_SetGpioConfig(VL53L0X_DEV Dev, uint8_t Pin, |
joelvonrotz | 0:11ad6aaed10a | 1653 | VL53L0X_DeviceModes DeviceMode, VL53L0X_GpioFunctionality Functionality, |
joelvonrotz | 0:11ad6aaed10a | 1654 | VL53L0X_InterruptPolarity Polarity); |
joelvonrotz | 0:11ad6aaed10a | 1655 | |
joelvonrotz | 0:11ad6aaed10a | 1656 | /** |
joelvonrotz | 0:11ad6aaed10a | 1657 | * @brief Get current configuration for GPIO pin for a given device |
joelvonrotz | 0:11ad6aaed10a | 1658 | * |
joelvonrotz | 0:11ad6aaed10a | 1659 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 1660 | * |
joelvonrotz | 0:11ad6aaed10a | 1661 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 1662 | * @param Pin ID of the GPIO Pin |
joelvonrotz | 0:11ad6aaed10a | 1663 | * @param pDeviceMode Pointer to Device Mode associated to the Gpio. |
joelvonrotz | 0:11ad6aaed10a | 1664 | * @param pFunctionality Pointer to Pin functionality. |
joelvonrotz | 0:11ad6aaed10a | 1665 | * Refer to ::VL53L0X_GpioFunctionality |
joelvonrotz | 0:11ad6aaed10a | 1666 | * @param pPolarity Pointer to interrupt polarity. |
joelvonrotz | 0:11ad6aaed10a | 1667 | * Active high or active low see ::VL53L0X_InterruptPolarity |
joelvonrotz | 0:11ad6aaed10a | 1668 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 1669 | * @return VL53L0X_ERROR_GPIO_NOT_EXISTING Only Pin=0 is accepted. |
joelvonrotz | 0:11ad6aaed10a | 1670 | * @return VL53L0X_ERROR_GPIO_FUNCTIONALITY_NOT_SUPPORTED This error occurs |
joelvonrotz | 0:11ad6aaed10a | 1671 | * when Functionality programmed is not in the supported list: |
joelvonrotz | 0:11ad6aaed10a | 1672 | * Supported value are: |
joelvonrotz | 0:11ad6aaed10a | 1673 | * VL53L0X_GPIOFUNCTIONALITY_OFF, |
joelvonrotz | 0:11ad6aaed10a | 1674 | * VL53L0X_GPIOFUNCTIONALITY_THRESHOLD_CROSSED_LOW, |
joelvonrotz | 0:11ad6aaed10a | 1675 | * VL53L0X_GPIOFUNCTIONALITY_THRESHOLD_CROSSED_HIGH, |
joelvonrotz | 0:11ad6aaed10a | 1676 | * VL53L0X_GPIOFUNCTIONALITY_THRESHOLD_CROSSED_OUT, |
joelvonrotz | 0:11ad6aaed10a | 1677 | * VL53L0X_GPIOFUNCTIONALITY_NEW_MEASURE_READY |
joelvonrotz | 0:11ad6aaed10a | 1678 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 1679 | */ |
joelvonrotz | 0:11ad6aaed10a | 1680 | VL53L0X_API VL53L0X_Error VL53L0X_GetGpioConfig(VL53L0X_DEV Dev, uint8_t Pin, |
joelvonrotz | 0:11ad6aaed10a | 1681 | VL53L0X_DeviceModes *pDeviceMode, |
joelvonrotz | 0:11ad6aaed10a | 1682 | VL53L0X_GpioFunctionality *pFunctionality, |
joelvonrotz | 0:11ad6aaed10a | 1683 | VL53L0X_InterruptPolarity *pPolarity); |
joelvonrotz | 0:11ad6aaed10a | 1684 | |
joelvonrotz | 0:11ad6aaed10a | 1685 | /** |
joelvonrotz | 0:11ad6aaed10a | 1686 | * @brief Set low and high Interrupt thresholds for a given mode |
joelvonrotz | 0:11ad6aaed10a | 1687 | * (ranging, ALS, ...) for a given device |
joelvonrotz | 0:11ad6aaed10a | 1688 | * |
joelvonrotz | 0:11ad6aaed10a | 1689 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 1690 | * Set low and high Interrupt thresholds for a given mode (ranging, ALS, ...) |
joelvonrotz | 0:11ad6aaed10a | 1691 | * for a given device |
joelvonrotz | 0:11ad6aaed10a | 1692 | * |
joelvonrotz | 0:11ad6aaed10a | 1693 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 1694 | * |
joelvonrotz | 0:11ad6aaed10a | 1695 | * @note DeviceMode is ignored for the current device |
joelvonrotz | 0:11ad6aaed10a | 1696 | * |
joelvonrotz | 0:11ad6aaed10a | 1697 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 1698 | * @param DeviceMode Device Mode for which change thresholds |
joelvonrotz | 0:11ad6aaed10a | 1699 | * @param ThresholdLow Low threshold (mm, lux ..., depending on the mode) |
joelvonrotz | 0:11ad6aaed10a | 1700 | * @param ThresholdHigh High threshold (mm, lux ..., depending on the mode) |
joelvonrotz | 0:11ad6aaed10a | 1701 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 1702 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 1703 | */ |
joelvonrotz | 0:11ad6aaed10a | 1704 | VL53L0X_API VL53L0X_Error VL53L0X_SetInterruptThresholds(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 1705 | VL53L0X_DeviceModes DeviceMode, FixPoint1616_t ThresholdLow, |
joelvonrotz | 0:11ad6aaed10a | 1706 | FixPoint1616_t ThresholdHigh); |
joelvonrotz | 0:11ad6aaed10a | 1707 | |
joelvonrotz | 0:11ad6aaed10a | 1708 | /** |
joelvonrotz | 0:11ad6aaed10a | 1709 | * @brief Get high and low Interrupt thresholds for a given mode |
joelvonrotz | 0:11ad6aaed10a | 1710 | * (ranging, ALS, ...) for a given device |
joelvonrotz | 0:11ad6aaed10a | 1711 | * |
joelvonrotz | 0:11ad6aaed10a | 1712 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 1713 | * Get high and low Interrupt thresholds for a given mode (ranging, ALS, ...) |
joelvonrotz | 0:11ad6aaed10a | 1714 | * for a given device |
joelvonrotz | 0:11ad6aaed10a | 1715 | * |
joelvonrotz | 0:11ad6aaed10a | 1716 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 1717 | * |
joelvonrotz | 0:11ad6aaed10a | 1718 | * @note DeviceMode is ignored for the current device |
joelvonrotz | 0:11ad6aaed10a | 1719 | * |
joelvonrotz | 0:11ad6aaed10a | 1720 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 1721 | * @param DeviceMode Device Mode from which read thresholds |
joelvonrotz | 0:11ad6aaed10a | 1722 | * @param pThresholdLow Low threshold (mm, lux ..., depending on the mode) |
joelvonrotz | 0:11ad6aaed10a | 1723 | * @param pThresholdHigh High threshold (mm, lux ..., depending on the mode) |
joelvonrotz | 0:11ad6aaed10a | 1724 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 1725 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 1726 | */ |
joelvonrotz | 0:11ad6aaed10a | 1727 | VL53L0X_API VL53L0X_Error VL53L0X_GetInterruptThresholds(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 1728 | VL53L0X_DeviceModes DeviceMode, FixPoint1616_t *pThresholdLow, |
joelvonrotz | 0:11ad6aaed10a | 1729 | FixPoint1616_t *pThresholdHigh); |
joelvonrotz | 0:11ad6aaed10a | 1730 | |
joelvonrotz | 0:11ad6aaed10a | 1731 | /** |
joelvonrotz | 0:11ad6aaed10a | 1732 | * @brief Return device stop completion status |
joelvonrotz | 0:11ad6aaed10a | 1733 | * |
joelvonrotz | 0:11ad6aaed10a | 1734 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 1735 | * Returns stop completiob status. |
joelvonrotz | 0:11ad6aaed10a | 1736 | * User shall call this function after a stop command |
joelvonrotz | 0:11ad6aaed10a | 1737 | * |
joelvonrotz | 0:11ad6aaed10a | 1738 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 1739 | * |
joelvonrotz | 0:11ad6aaed10a | 1740 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 1741 | * @param pStopStatus Pointer to status variable to update |
joelvonrotz | 0:11ad6aaed10a | 1742 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 1743 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 1744 | */ |
joelvonrotz | 0:11ad6aaed10a | 1745 | VL53L0X_API VL53L0X_Error VL53L0X_GetStopCompletedStatus(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 1746 | uint32_t *pStopStatus); |
joelvonrotz | 0:11ad6aaed10a | 1747 | |
joelvonrotz | 0:11ad6aaed10a | 1748 | |
joelvonrotz | 0:11ad6aaed10a | 1749 | /** |
joelvonrotz | 0:11ad6aaed10a | 1750 | * @brief Clear given system interrupt condition |
joelvonrotz | 0:11ad6aaed10a | 1751 | * |
joelvonrotz | 0:11ad6aaed10a | 1752 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 1753 | * Clear given interrupt(s). |
joelvonrotz | 0:11ad6aaed10a | 1754 | * |
joelvonrotz | 0:11ad6aaed10a | 1755 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 1756 | * |
joelvonrotz | 0:11ad6aaed10a | 1757 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 1758 | * @param InterruptMask Mask of interrupts to clear |
joelvonrotz | 0:11ad6aaed10a | 1759 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 1760 | * @return VL53L0X_ERROR_INTERRUPT_NOT_CLEARED Cannot clear interrupts |
joelvonrotz | 0:11ad6aaed10a | 1761 | * |
joelvonrotz | 0:11ad6aaed10a | 1762 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 1763 | */ |
joelvonrotz | 0:11ad6aaed10a | 1764 | VL53L0X_API VL53L0X_Error VL53L0X_ClearInterruptMask(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 1765 | uint32_t InterruptMask); |
joelvonrotz | 0:11ad6aaed10a | 1766 | |
joelvonrotz | 0:11ad6aaed10a | 1767 | /** |
joelvonrotz | 0:11ad6aaed10a | 1768 | * @brief Return device interrupt status |
joelvonrotz | 0:11ad6aaed10a | 1769 | * |
joelvonrotz | 0:11ad6aaed10a | 1770 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 1771 | * Returns currently raised interrupts by the device. |
joelvonrotz | 0:11ad6aaed10a | 1772 | * User shall be able to activate/deactivate interrupts through |
joelvonrotz | 0:11ad6aaed10a | 1773 | * @a VL53L0X_SetGpioConfig() |
joelvonrotz | 0:11ad6aaed10a | 1774 | * |
joelvonrotz | 0:11ad6aaed10a | 1775 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 1776 | * |
joelvonrotz | 0:11ad6aaed10a | 1777 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 1778 | * @param pInterruptMaskStatus Pointer to status variable to update |
joelvonrotz | 0:11ad6aaed10a | 1779 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 1780 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 1781 | */ |
joelvonrotz | 0:11ad6aaed10a | 1782 | VL53L0X_API VL53L0X_Error VL53L0X_GetInterruptMaskStatus(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 1783 | uint32_t *pInterruptMaskStatus); |
joelvonrotz | 0:11ad6aaed10a | 1784 | |
joelvonrotz | 0:11ad6aaed10a | 1785 | /** |
joelvonrotz | 0:11ad6aaed10a | 1786 | * @brief Configure ranging interrupt reported to system |
joelvonrotz | 0:11ad6aaed10a | 1787 | * |
joelvonrotz | 0:11ad6aaed10a | 1788 | * @note This function is not Implemented |
joelvonrotz | 0:11ad6aaed10a | 1789 | * |
joelvonrotz | 0:11ad6aaed10a | 1790 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 1791 | * @param InterruptMask Mask of interrupt to Enable/disable |
joelvonrotz | 0:11ad6aaed10a | 1792 | * (0:interrupt disabled or 1: interrupt enabled) |
joelvonrotz | 0:11ad6aaed10a | 1793 | * @return VL53L0X_ERROR_NOT_IMPLEMENTED Not implemented |
joelvonrotz | 0:11ad6aaed10a | 1794 | */ |
joelvonrotz | 0:11ad6aaed10a | 1795 | VL53L0X_API VL53L0X_Error VL53L0X_EnableInterruptMask(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 1796 | uint32_t InterruptMask); |
joelvonrotz | 0:11ad6aaed10a | 1797 | |
joelvonrotz | 0:11ad6aaed10a | 1798 | /** @} VL53L0X_interrupt_group */ |
joelvonrotz | 0:11ad6aaed10a | 1799 | |
joelvonrotz | 0:11ad6aaed10a | 1800 | /** @defgroup VL53L0X_SPADfunctions_group VL53L0X SPAD Functions |
joelvonrotz | 0:11ad6aaed10a | 1801 | * @brief Functions used for SPAD managements |
joelvonrotz | 0:11ad6aaed10a | 1802 | * @{ |
joelvonrotz | 0:11ad6aaed10a | 1803 | */ |
joelvonrotz | 0:11ad6aaed10a | 1804 | |
joelvonrotz | 0:11ad6aaed10a | 1805 | /** |
joelvonrotz | 0:11ad6aaed10a | 1806 | * @brief Set the SPAD Ambient Damper Threshold value |
joelvonrotz | 0:11ad6aaed10a | 1807 | * |
joelvonrotz | 0:11ad6aaed10a | 1808 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 1809 | * This function set the SPAD Ambient Damper Threshold value |
joelvonrotz | 0:11ad6aaed10a | 1810 | * |
joelvonrotz | 0:11ad6aaed10a | 1811 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 1812 | * |
joelvonrotz | 0:11ad6aaed10a | 1813 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 1814 | * @param SpadAmbientDamperThreshold SPAD Ambient Damper Threshold value |
joelvonrotz | 0:11ad6aaed10a | 1815 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 1816 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 1817 | */ |
joelvonrotz | 0:11ad6aaed10a | 1818 | VL53L0X_API VL53L0X_Error VL53L0X_SetSpadAmbientDamperThreshold(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 1819 | uint16_t SpadAmbientDamperThreshold); |
joelvonrotz | 0:11ad6aaed10a | 1820 | |
joelvonrotz | 0:11ad6aaed10a | 1821 | /** |
joelvonrotz | 0:11ad6aaed10a | 1822 | * @brief Get the current SPAD Ambient Damper Threshold value |
joelvonrotz | 0:11ad6aaed10a | 1823 | * |
joelvonrotz | 0:11ad6aaed10a | 1824 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 1825 | * This function get the SPAD Ambient Damper Threshold value |
joelvonrotz | 0:11ad6aaed10a | 1826 | * |
joelvonrotz | 0:11ad6aaed10a | 1827 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 1828 | * |
joelvonrotz | 0:11ad6aaed10a | 1829 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 1830 | * @param pSpadAmbientDamperThreshold Pointer to programmed |
joelvonrotz | 0:11ad6aaed10a | 1831 | * SPAD Ambient Damper Threshold value |
joelvonrotz | 0:11ad6aaed10a | 1832 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 1833 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 1834 | */ |
joelvonrotz | 0:11ad6aaed10a | 1835 | VL53L0X_API VL53L0X_Error VL53L0X_GetSpadAmbientDamperThreshold(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 1836 | uint16_t *pSpadAmbientDamperThreshold); |
joelvonrotz | 0:11ad6aaed10a | 1837 | |
joelvonrotz | 0:11ad6aaed10a | 1838 | /** |
joelvonrotz | 0:11ad6aaed10a | 1839 | * @brief Set the SPAD Ambient Damper Factor value |
joelvonrotz | 0:11ad6aaed10a | 1840 | * |
joelvonrotz | 0:11ad6aaed10a | 1841 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 1842 | * This function set the SPAD Ambient Damper Factor value |
joelvonrotz | 0:11ad6aaed10a | 1843 | * |
joelvonrotz | 0:11ad6aaed10a | 1844 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 1845 | * |
joelvonrotz | 0:11ad6aaed10a | 1846 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 1847 | * @param SpadAmbientDamperFactor SPAD Ambient Damper Factor value |
joelvonrotz | 0:11ad6aaed10a | 1848 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 1849 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 1850 | */ |
joelvonrotz | 0:11ad6aaed10a | 1851 | VL53L0X_API VL53L0X_Error VL53L0X_SetSpadAmbientDamperFactor(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 1852 | uint16_t SpadAmbientDamperFactor); |
joelvonrotz | 0:11ad6aaed10a | 1853 | |
joelvonrotz | 0:11ad6aaed10a | 1854 | /** |
joelvonrotz | 0:11ad6aaed10a | 1855 | * @brief Get the current SPAD Ambient Damper Factor value |
joelvonrotz | 0:11ad6aaed10a | 1856 | * |
joelvonrotz | 0:11ad6aaed10a | 1857 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 1858 | * This function get the SPAD Ambient Damper Factor value |
joelvonrotz | 0:11ad6aaed10a | 1859 | * |
joelvonrotz | 0:11ad6aaed10a | 1860 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 1861 | * |
joelvonrotz | 0:11ad6aaed10a | 1862 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 1863 | * @param pSpadAmbientDamperFactor Pointer to programmed SPAD Ambient |
joelvonrotz | 0:11ad6aaed10a | 1864 | * Damper Factor value |
joelvonrotz | 0:11ad6aaed10a | 1865 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 1866 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 1867 | */ |
joelvonrotz | 0:11ad6aaed10a | 1868 | VL53L0X_API VL53L0X_Error VL53L0X_GetSpadAmbientDamperFactor(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 1869 | uint16_t *pSpadAmbientDamperFactor); |
joelvonrotz | 0:11ad6aaed10a | 1870 | |
joelvonrotz | 0:11ad6aaed10a | 1871 | /** |
joelvonrotz | 0:11ad6aaed10a | 1872 | * @brief Performs Reference Spad Management |
joelvonrotz | 0:11ad6aaed10a | 1873 | * |
joelvonrotz | 0:11ad6aaed10a | 1874 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 1875 | * The reference SPAD initialization procedure determines the minimum amount |
joelvonrotz | 0:11ad6aaed10a | 1876 | * of reference spads to be enables to achieve a target reference signal rate |
joelvonrotz | 0:11ad6aaed10a | 1877 | * and should be performed once during initialization. |
joelvonrotz | 0:11ad6aaed10a | 1878 | * |
joelvonrotz | 0:11ad6aaed10a | 1879 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 1880 | * |
joelvonrotz | 0:11ad6aaed10a | 1881 | * @note This function change the device mode to |
joelvonrotz | 0:11ad6aaed10a | 1882 | * VL53L0X_DEVICEMODE_SINGLE_RANGING |
joelvonrotz | 0:11ad6aaed10a | 1883 | * |
joelvonrotz | 0:11ad6aaed10a | 1884 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 1885 | * @param refSpadCount Reports ref Spad Count |
joelvonrotz | 0:11ad6aaed10a | 1886 | * @param isApertureSpads Reports if spads are of type |
joelvonrotz | 0:11ad6aaed10a | 1887 | * aperture or non-aperture. |
joelvonrotz | 0:11ad6aaed10a | 1888 | * 1:=aperture, 0:=Non-Aperture |
joelvonrotz | 0:11ad6aaed10a | 1889 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 1890 | * @return VL53L0X_ERROR_REF_SPAD_INIT Error in the Ref Spad procedure. |
joelvonrotz | 0:11ad6aaed10a | 1891 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 1892 | */ |
joelvonrotz | 0:11ad6aaed10a | 1893 | VL53L0X_API VL53L0X_Error VL53L0X_PerformRefSpadManagement(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 1894 | uint32_t *refSpadCount, uint8_t *isApertureSpads); |
joelvonrotz | 0:11ad6aaed10a | 1895 | |
joelvonrotz | 0:11ad6aaed10a | 1896 | /** |
joelvonrotz | 0:11ad6aaed10a | 1897 | * @brief Applies Reference SPAD configuration |
joelvonrotz | 0:11ad6aaed10a | 1898 | * |
joelvonrotz | 0:11ad6aaed10a | 1899 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 1900 | * This function applies a given number of reference spads, identified as |
joelvonrotz | 0:11ad6aaed10a | 1901 | * either Aperture or Non-Aperture. |
joelvonrotz | 0:11ad6aaed10a | 1902 | * The requested spad count and type are stored within the device specific |
joelvonrotz | 0:11ad6aaed10a | 1903 | * parameters data for access by the host. |
joelvonrotz | 0:11ad6aaed10a | 1904 | * |
joelvonrotz | 0:11ad6aaed10a | 1905 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 1906 | * |
joelvonrotz | 0:11ad6aaed10a | 1907 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 1908 | * @param refSpadCount Number of ref spads. |
joelvonrotz | 0:11ad6aaed10a | 1909 | * @param isApertureSpads Defines if spads are of type |
joelvonrotz | 0:11ad6aaed10a | 1910 | * aperture or non-aperture. |
joelvonrotz | 0:11ad6aaed10a | 1911 | * 1:=aperture, 0:=Non-Aperture |
joelvonrotz | 0:11ad6aaed10a | 1912 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 1913 | * @return VL53L0X_ERROR_REF_SPAD_INIT Error in the in the reference |
joelvonrotz | 0:11ad6aaed10a | 1914 | * spad configuration. |
joelvonrotz | 0:11ad6aaed10a | 1915 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 1916 | */ |
joelvonrotz | 0:11ad6aaed10a | 1917 | VL53L0X_API VL53L0X_Error VL53L0X_SetReferenceSpads(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 1918 | uint32_t refSpadCount, uint8_t isApertureSpads); |
joelvonrotz | 0:11ad6aaed10a | 1919 | |
joelvonrotz | 0:11ad6aaed10a | 1920 | /** |
joelvonrotz | 0:11ad6aaed10a | 1921 | * @brief Retrieves SPAD configuration |
joelvonrotz | 0:11ad6aaed10a | 1922 | * |
joelvonrotz | 0:11ad6aaed10a | 1923 | * @par Function Description |
joelvonrotz | 0:11ad6aaed10a | 1924 | * This function retrieves the current number of applied reference spads |
joelvonrotz | 0:11ad6aaed10a | 1925 | * and also their type : Aperture or Non-Aperture. |
joelvonrotz | 0:11ad6aaed10a | 1926 | * |
joelvonrotz | 0:11ad6aaed10a | 1927 | * @note This function Access to the device |
joelvonrotz | 0:11ad6aaed10a | 1928 | * |
joelvonrotz | 0:11ad6aaed10a | 1929 | * @param Dev Device Handle |
joelvonrotz | 0:11ad6aaed10a | 1930 | * @param refSpadCount Number ref Spad Count |
joelvonrotz | 0:11ad6aaed10a | 1931 | * @param isApertureSpads Reports if spads are of type |
joelvonrotz | 0:11ad6aaed10a | 1932 | * aperture or non-aperture. |
joelvonrotz | 0:11ad6aaed10a | 1933 | * 1:=aperture, 0:=Non-Aperture |
joelvonrotz | 0:11ad6aaed10a | 1934 | * @return VL53L0X_ERROR_NONE Success |
joelvonrotz | 0:11ad6aaed10a | 1935 | * @return VL53L0X_ERROR_REF_SPAD_INIT Error in the in the reference |
joelvonrotz | 0:11ad6aaed10a | 1936 | * spad configuration. |
joelvonrotz | 0:11ad6aaed10a | 1937 | * @return "Other error code" See ::VL53L0X_Error |
joelvonrotz | 0:11ad6aaed10a | 1938 | */ |
joelvonrotz | 0:11ad6aaed10a | 1939 | VL53L0X_API VL53L0X_Error VL53L0X_GetReferenceSpads(VL53L0X_DEV Dev, |
joelvonrotz | 0:11ad6aaed10a | 1940 | uint32_t *refSpadCount, uint8_t *isApertureSpads); |
joelvonrotz | 0:11ad6aaed10a | 1941 | |
joelvonrotz | 0:11ad6aaed10a | 1942 | /** @} VL53L0X_SPADfunctions_group */ |
joelvonrotz | 0:11ad6aaed10a | 1943 | |
joelvonrotz | 0:11ad6aaed10a | 1944 | /** @} VL53L0X_cut11_group */ |
joelvonrotz | 0:11ad6aaed10a | 1945 | |
joelvonrotz | 0:11ad6aaed10a | 1946 | #ifdef __cplusplus |
joelvonrotz | 0:11ad6aaed10a | 1947 | } |
joelvonrotz | 0:11ad6aaed10a | 1948 | #endif |
joelvonrotz | 0:11ad6aaed10a | 1949 | |
joelvonrotz | 0:11ad6aaed10a | 1950 | #endif /* _VL53L0X_API_H_ */ |