Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: X_NUCLEO_COMMON ST_INTERFACES
Dependents: VL53L3ExpansionBoard
vl53lx_platform_user_data.h
00001 00002 /* 00003 * This file is part of VL53LX Platform 00004 * 00005 * Copyright (c) 2016, STMicroelectronics - All Rights Reserved 00006 * 00007 * License terms: BSD 3-clause "New" or "Revised" License. 00008 * 00009 * Redistribution and use in source and binary forms, with or without 00010 * modification, are permitted provided that the following conditions are met: 00011 * 00012 * 1. Redistributions of source code must retain the above copyright notice, this 00013 * list of conditions and the following disclaimer. 00014 * 00015 * 2. Redistributions in binary form must reproduce the above copyright notice, 00016 * this list of conditions and the following disclaimer in the documentation 00017 * and/or other materials provided with the distribution. 00018 * 00019 * 3. Neither the name of the copyright holder nor the names of its contributors 00020 * may be used to endorse or promote products derived from this software 00021 * without specific prior written permission. 00022 * 00023 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00024 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00025 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00026 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 00027 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00028 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 00029 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 00030 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 00031 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 00032 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00033 * 00034 */ 00035 00036 00037 #ifndef __VL53LX_PLATFORM_USER_DATA_H 00038 #define __VL53LX_PLATFORM_USER_DATA_H 00039 00040 00041 #///include "stm32xxx_hal.h" 00042 00043 00044 00045 00046 00047 00048 00049 00050 00051 00052 00053 00054 00055 00056 00057 00058 00059 00060 00061 00062 00063 00064 00065 00066 00067 #ifndef _VL53LX_PLATFORM_USER_DATA_H_ 00068 #define _VL53LX_PLATFORM_USER_DATA_H_ 00069 00070 #ifndef __KERNEL__ 00071 #include <stdlib.h> 00072 #endif 00073 00074 #include "vl53lx_def.h" 00075 00076 #ifdef __cplusplus 00077 extern "C" 00078 { 00079 #endif 00080 00081 00082 typedef struct { 00083 VL53LX_DevData_t Data; 00084 /*!< Low Level Driver data structure */ 00085 uint8_t i2c_slave_address; 00086 uint8_t comms_type; 00087 uint16_t comms_speed_khz; 00088 vl53L3_DevI2C *I2cHandle; 00089 uint8_t I2cDevAddr; 00090 int Present; 00091 int Enabled; 00092 int LoopState; 00093 int FirstStreamCountZero; 00094 int Idle; 00095 int Ready; 00096 uint8_t RangeStatus; 00097 FixPoint1616_t SignalRateRtnMegaCps; 00098 VL53LX_DeviceState device_state; /*!< Device State */ 00099 } VL53LX_Dev_t; 00100 00101 00102 00103 00104 00105 00106 typedef VL53LX_Dev_t* VL53LX_DEV; 00107 00108 00109 00110 00111 00112 /** 00113 * @def VL53LXDevDataGet 00114 * @brief Get ST private structure @a VL53LX_DevData_t data access 00115 * 00116 * @param Dev Device Handle 00117 * @param field ST structure field name 00118 * It maybe used and as real data "ref" not just as "get" for sub-structure item 00119 * like VL53L1DevDataGet(FilterData.field)[i] or 00120 * VL53L1DevDataGet(FilterData.MeasurementIndex)++ 00121 */ 00122 #define VL53LXDevDataGet(Dev, field) (Dev->Data.field) 00123 00124 00125 /** 00126 * @def VL53LXDevDataSet(Dev, field, data) 00127 * @brief Set ST private structure @a VL53LX_DevData_t data field 00128 * @param Dev Device Handle 00129 * @param field ST structure field name 00130 * @param data Data to be set 00131 */ 00132 #define VL53LXDevDataSet(Dev, field, data) ((Dev->Data.field) = (data)) 00133 00134 00135 00136 00137 00138 00139 00140 00141 00142 00143 00144 #define PALDevDataGet(Dev, field) (Dev->Data.field) 00145 00146 00147 00148 00149 00150 00151 00152 00153 00154 00155 00156 00157 #define PALDevDataSet(Dev, field, VL53LX_PRM_00005) (Dev->Data.field)=(VL53LX_PRM_00005) 00158 00159 00160 00161 00162 00163 00164 00165 00166 00167 //#define VL53LXDevStructGetLLDriverHandle(Dev) (&Dev->Data.LLData) 00168 00169 00170 00171 00172 00173 00174 00175 00176 //#define VL53LXDevStructGetLLResultsHandle(Dev) (&Dev->Data.llresults) 00177 00178 00179 00180 #ifdef __cplusplus 00181 } 00182 #endif 00183 00184 #endif 00185 00186 #endif /* __VL53LX_PLATFORM_USER_DATA_H */
Generated on Fri Jul 15 2022 05:39:18 by
1.7.2