Statistics
| Branch: | Tag: | Revision:

amiro-lld / drivers / VL53L1X / v1 / api / platform / vl53l1_platform_user_data.h @ 4dba9195

History | View | Annotate | Download (3.623 KB)

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_USER_DATA_H_
65
#define _VL53L1_PLATFORM_USER_DATA_H_
66
// #include "stm32xxx_hal.h"
67
#include "vl53l1_def.h"
68
#include <alld_VL53L1X_types.h>
69
#ifdef __cplusplus
70
extern "C"
71
{
72
#endif
73

    
74

    
75
// typedef struct {
76
//     uint32_t dummy;
77
// } I2C_HandleTypeDef;
78

    
79
typedef struct {
80

    
81
        VL53L1_DevData_t   Data;
82

    
83
        // uint8_t   I2cDevAddr;
84
        // uint8_t   comms_type;
85
        // uint16_t  comms_speed_khz;
86
        // uint32_t  new_data_ready_poll_duration_ms;
87
        // I2C_HandleTypeDef *I2cHandle;
88
        VL53L1XDriver vl53l1x;
89

    
90
} VL53L1_Dev_t;
91

    
92
typedef VL53L1_Dev_t *VL53L1_DEV;
93

    
94
#define VL53L1DevDataGet(Dev, field) (Dev->Data.field)
95
#define VL53L1DevDataSet(Dev, field, VL53L1_PRM_00005) ((Dev->Data.field) = (VL53L1_PRM_00005))
96
#define VL53L1DevStructGetLLDriverHandle(Dev) (&Dev->Data.LLData)
97
#define VL53L1DevStructGetLLResultsHandle(Dev) (&Dev->Data.llresults)
98
#ifdef __cplusplus
99
}
100
#endif
101
#endif