vl53l1_platform.h
Go to the documentation of this file.
1 
2 /*
3 * Copyright (c) 2017, STMicroelectronics - All Rights Reserved
4 *
5 * This file is part of VL53L1 Core and is dual licensed,
6 * either 'STMicroelectronics
7 * Proprietary license'
8 * or 'BSD 3-clause "New" or "Revised" License' , at your option.
9 *
10 ********************************************************************************
11 *
12 * 'STMicroelectronics Proprietary license'
13 *
14 ********************************************************************************
15 *
16 * License terms: STMicroelectronics Proprietary in accordance with licensing
17 * terms at www.st.com/sla0081
18 *
19 * STMicroelectronics confidential
20 * Reproduction and Communication of this document is strictly prohibited unless
21 * specifically authorized in writing by STMicroelectronics.
22 *
23 *
24 ********************************************************************************
25 *
26 * Alternatively, VL53L1 Core may be distributed under the terms of
27 * 'BSD 3-clause "New" or "Revised" License', in which case the following
28 * provisions apply instead of the ones mentioned above :
29 *
30 ********************************************************************************
31 *
32 * License terms: BSD 3-clause "New" or "Revised" License.
33 *
34 * Redistribution and use in source and binary forms, with or without
35 * modification, are permitted provided that the following conditions are met:
36 *
37 * 1. Redistributions of source code must retain the above copyright notice, this
38 * list of conditions and the following disclaimer.
39 *
40 * 2. Redistributions in binary form must reproduce the above copyright notice,
41 * this list of conditions and the following disclaimer in the documentation
42 * and/or other materials provided with the distribution.
43 *
44 * 3. Neither the name of the copyright holder nor the names of its contributors
45 * may be used to endorse or promote products derived from this software
46 * without specific prior written permission.
47 *
48 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
49 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
50 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
51 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
52 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
53 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
54 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
55 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
56 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
57 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
58 *
59 *
60 ********************************************************************************
61 *
62 */
63 
64 #ifndef _VL53L1_PLATFORM_H_
65 #define _VL53L1_PLATFORM_H_
66 
67 #include "vl53l1_ll_def.h"
68 #include "vl53l1_platform_log.h"
69 
70 #define VL53L1_IPP_API
72 
73 #ifdef __cplusplus
74 extern "C"
75 {
76 #endif
77 
79  VL53L1_Dev_t *pdev,
80  uint8_t comms_type,
81  uint16_t comms_speed_khz);
82 
84  VL53L1_Dev_t *pdev);
85 
87  VL53L1_Dev_t *pdev,
88  uint16_t index,
89  uint8_t *pdata,
90  uint32_t count);
91 
93  VL53L1_Dev_t *pdev,
94  uint16_t index,
95  uint8_t *pdata,
96  uint32_t count);
97 
99  VL53L1_Dev_t *pdev,
100  uint16_t index,
101  uint8_t VL53L1_PRM_00005);
102 
104  VL53L1_Dev_t *pdev,
105  uint16_t index,
106  uint16_t VL53L1_PRM_00005);
107 
109  VL53L1_Dev_t *pdev,
110  uint16_t index,
111  uint32_t VL53L1_PRM_00005);
112 
114  VL53L1_Dev_t *pdev,
115  uint16_t index,
116  uint8_t *pdata);
117 
119  VL53L1_Dev_t *pdev,
120  uint16_t index,
121  uint16_t *pdata);
122 
124  VL53L1_Dev_t *pdev,
125  uint16_t index,
126  uint32_t *pdata);
127 
129  VL53L1_Dev_t *pdev,
130  int32_t wait_us);
131 
133  VL53L1_Dev_t *pdev,
134  int32_t wait_ms);
135 
137 
139 
141 
143 
145 
147 
149 
151 
152 VL53L1_Error VL53L1_GpioInterruptEnable(void (*function)(void), uint8_t edge_type);
153 
155 
157  uint32_t *ptime_ms);
158 
160  VL53L1_Dev_t *pdev,
161  uint32_t timeout_ms,
162  uint16_t index,
163  uint8_t value,
164  uint8_t mask,
165  uint32_t poll_delay_ms);
166 
167 #ifdef __cplusplus
168 }
169 #endif
170 
171 #endif
VL53L1_GpioSetValue
VL53L1_Error VL53L1_GpioSetValue(uint8_t pin, uint8_t value)
VL53L1_GpioPowerEnable
VL53L1_Error VL53L1_GpioPowerEnable(uint8_t value)
VL53L1_RdWord
VL53L1_Error VL53L1_RdWord(VL53L1_Dev_t *pdev, uint16_t index, uint16_t *pdata)
vl53l1_ll_def.h
Type definitions for VL53L1 LL Driver.
uint32_t
unsigned int uint32_t
Typedef defining 32 bit unsigned int type. The developer should modify this to suit the platform bein...
Definition: vl53l1_types.h:113
uint8_t
unsigned char uint8_t
Typedef defining 8 bit unsigned char type. The developer should modify this to suit the platform bein...
Definition: vl53l1_types.h:133
vl53l1_platform_log.h
EwokPlus25 platform logging function definition.
VL53L1_WrByte
VL53L1_Error VL53L1_WrByte(VL53L1_Dev_t *pdev, uint16_t index, uint8_t VL53L1_PRM_00005)
VL53L1_GpioSetMode
VL53L1_Error VL53L1_GpioSetMode(uint8_t pin, uint8_t mode)
VL53L1_GetTimerFrequency
VL53L1_Error VL53L1_GetTimerFrequency(int32_t *ptimer_freq_hz)
Definition: vl53l1_platform.c:66
VL53L1_GetTickCount
VL53L1_Error VL53L1_GetTickCount(uint32_t *ptime_ms)
Definition: vl53l1_platform.c:51
VL53L1_Dev_t
Definition: vl53l1_platform_user_data.h:78
VL53L1_WaitMs
VL53L1_Error VL53L1_WaitMs(VL53L1_Dev_t *pdev, int32_t wait_ms)
Definition: vl53l1_platform.c:72
VL53L1_WrWord
VL53L1_Error VL53L1_WrWord(VL53L1_Dev_t *pdev, uint16_t index, uint16_t VL53L1_PRM_00005)
VL53L1_WrDWord
VL53L1_Error VL53L1_WrDWord(VL53L1_Dev_t *pdev, uint16_t index, uint32_t VL53L1_PRM_00005)
VL53L1_WriteMulti
VL53L1_Error VL53L1_WriteMulti(VL53L1_Dev_t *pdev, uint16_t index, uint8_t *pdata, uint32_t count)
VL53L1_GetTimerValue
VL53L1_Error VL53L1_GetTimerValue(int32_t *ptimer_count)
VL53L1_WaitValueMaskEx
VL53L1_Error VL53L1_WaitValueMaskEx(VL53L1_Dev_t *pdev, uint32_t timeout_ms, uint16_t index, uint8_t value, uint8_t mask, uint32_t poll_delay_ms)
Definition: vl53l1_platform.c:82
VL53L1_GpioCommsSelect
VL53L1_Error VL53L1_GpioCommsSelect(uint8_t value)
VL53L1_GpioGetValue
VL53L1_Error VL53L1_GpioGetValue(uint8_t pin, uint8_t *pvalue)
VL53L1_GpioInterruptDisable
VL53L1_Error VL53L1_GpioInterruptDisable(void)
VL53L1_GpioXshutdown
VL53L1_Error VL53L1_GpioXshutdown(uint8_t value)
int32_t
int int32_t
Typedef defining 32 bit int type. The developer should modify this to suit the platform being deploye...
Definition: vl53l1_types.h:118
VL53L1_CommsInitialise
VL53L1_Error VL53L1_CommsInitialise(VL53L1_Dev_t *pdev, uint8_t comms_type, uint16_t comms_speed_khz)
VL53L1_RdDWord
VL53L1_Error VL53L1_RdDWord(VL53L1_Dev_t *pdev, uint16_t index, uint32_t *pdata)
VL53L1_CommsClose
VL53L1_Error VL53L1_CommsClose(VL53L1_Dev_t *pdev)
VL53L1_Error
int8_t VL53L1_Error
Definition: vl53l1_error_codes.h:89
VL53L1_RdByte
VL53L1_Error VL53L1_RdByte(VL53L1_Dev_t *pdev, uint16_t index, uint8_t *pdata)
uint16_t
unsigned short uint16_t
Typedef defining 16 bit unsigned short type. The developer should modify this to suit the platform be...
Definition: vl53l1_types.h:123
vl53l1_platform_user_data.h
VL53L1_ReadMulti
VL53L1_Error VL53L1_ReadMulti(VL53L1_Dev_t *pdev, uint16_t index, uint8_t *pdata, uint32_t count)
VL53L1_GpioInterruptEnable
VL53L1_Error VL53L1_GpioInterruptEnable(void(*function)(void), uint8_t edge_type)
VL53L1_WaitUs
VL53L1_Error VL53L1_WaitUs(VL53L1_Dev_t *pdev, int32_t wait_us)
Definition: vl53l1_platform.c:77


vl53l1x
Author(s):
autogenerated on Fri Aug 2 2024 08:35:54