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
vl53l1_platform_user_data.h
00001 00002 /******************************************************************************* 00003 This file is part of VL53L1 Platform 00004 00005 Copyright (c) 2020, 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 00038 #ifndef _VL53L1_PLATFORM_USER_DATA_H_ 00039 #define _VL53L1_PLATFORM_USER_DATA_H_ 00040 00041 #ifndef __KERNEL__ 00042 #include <stdlib.h> 00043 #endif 00044 00045 #include "vl53l1_def.h" 00046 00047 #ifdef __cplusplus 00048 extern "C" 00049 { 00050 #endif 00051 00052 00053 00054 00055 00056 typedef struct { 00057 00058 VL53L1_DevData_t Data; 00059 00060 00061 uint8_t i2c_slave_address; 00062 00063 uint8_t comms_type; 00064 00065 uint16_t comms_speed_khz; 00066 00067 00068 uint32_t new_data_ready_poll_duration_ms; 00069 00070 } VL53L1_Dev_t; 00071 00072 00073 00074 typedef VL53L1_Dev_t *VL53L1_DEV; 00075 00076 00077 #define VL53L1DevDataGet(Dev, field) (Dev->Data.field) 00078 00079 00080 00081 #define VL53L1DevDataSet(Dev, field, VL53L1_p_002) ((Dev->Data.field) = (VL53L1_p_002)) 00082 00083 00084 00085 #define VL53L1DevStructGetLLDriverHandle(Dev) (&Dev->Data.LLData) 00086 00087 00088 #define VL53L1DevStructGetLLResultsHandle(Dev) (&Dev->Data.llresults) 00089 00090 00091 00092 #ifdef __cplusplus 00093 } 00094 #endif 00095 00096 #endif 00097 00098 00099
Generated on Thu Jul 14 2022 10:20:22 by
1.7.2