Statistics
| Branch: | Tag: | Revision:

amiro-lld / include / VL53L0X / v1 / Api_vl53l0x / core / inc / vl53l0x_api_strings.h @ 6ebebd4d

History | View | Annotate | Download (13.1 KB)

1 6ebebd4d Andre Raming
/*******************************************************************************
2
Copyright ? 2016, STMicroelectronics International N.V.
3
All rights reserved.
4

5
Redistribution and use in source and binary forms, with or without
6
modification, are permitted provided that the following conditions are met:
7
    * Redistributions of source code must retain the above copyright
8
      notice, this list of conditions and the following disclaimer.
9
    * Redistributions in binary form must reproduce the above copyright
10
      notice, this list of conditions and the following disclaimer in the
11
      documentation and/or other materials provided with the distribution.
12
    * Neither the name of STMicroelectronics nor the
13
      names of its contributors may be used to endorse or promote products
14
      derived from this software without specific prior written permission.
15

16
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND
19
NON-INFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS ARE DISCLAIMED.
20
IN NO EVENT SHALL STMICROELECTRONICS INTERNATIONAL N.V. BE LIABLE FOR ANY
21
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
*******************************************************************************/
28
29
#ifndef VL53L0X_API_STRINGS_H_
30
#define VL53L0X_API_STRINGS_H_
31
32
33
#include "vl53l0x_def.h"
34
#include "vl53l0x_platform.h"
35
36
//#include "alld_vl53l0x.h"
37
38
39
#ifdef __cplusplus
40
extern "C" {
41
#endif
42
43
44
45
46
VL53L0X_Error VL53L0X_get_device_info(VL53L0X_DEV Dev,
47
            VL53L0X_DeviceInfo_t *pVL53L0X_DeviceInfo);
48
49
VL53L0X_Error VL53L0X_get_device_error_string(VL53L0X_DeviceError ErrorCode,
50
        char *pDeviceErrorString);
51
52
VL53L0X_Error VL53L0X_get_range_status_string(uint8_t RangeStatus,
53
        char *pRangeStatusString);
54
55
VL53L0X_Error VL53L0X_get_pal_error_string(VL53L0X_Error PalErrorCode,
56
        char *pPalErrorString);
57
58
VL53L0X_Error VL53L0X_get_pal_state_string(VL53L0X_State PalStateCode,
59
        char *pPalStateString);
60
61
VL53L0X_Error VL53L0X_get_sequence_steps_info(
62
        VL53L0X_SequenceStepId SequenceStepId,
63
        char *pSequenceStepsString);
64
65
VL53L0X_Error VL53L0X_get_limit_check_info(VL53L0X_DEV Dev, uint16_t LimitCheckId,
66
    char *pLimitCheckString);
67
68
69
#ifdef USE_EMPTY_STRING
70
    #define  VL53L0X_STRING_DEVICE_INFO_NAME                             ""
71
    #define  VL53L0X_STRING_DEVICE_INFO_NAME_TS0                         ""
72
    #define  VL53L0X_STRING_DEVICE_INFO_NAME_TS1                         ""
73
    #define  VL53L0X_STRING_DEVICE_INFO_NAME_TS2                         ""
74
    #define  VL53L0X_STRING_DEVICE_INFO_NAME_ES1                         ""
75
    #define  VL53L0X_STRING_DEVICE_INFO_TYPE                             ""
76
77
    /* PAL ERROR strings */
78
    #define  VL53L0X_STRING_ERROR_NONE                                   ""
79
    #define  VL53L0X_STRING_ERROR_CALIBRATION_WARNING                    ""
80
    #define  VL53L0X_STRING_ERROR_MIN_CLIPPED                            ""
81
    #define  VL53L0X_STRING_ERROR_UNDEFINED                              ""
82
    #define  VL53L0X_STRING_ERROR_INVALID_PARAMS                         ""
83
    #define  VL53L0X_STRING_ERROR_NOT_SUPPORTED                          ""
84
    #define  VL53L0X_STRING_ERROR_RANGE_ERROR                            ""
85
    #define  VL53L0X_STRING_ERROR_TIME_OUT                               ""
86
    #define  VL53L0X_STRING_ERROR_MODE_NOT_SUPPORTED                     ""
87
    #define  VL53L0X_STRING_ERROR_BUFFER_TOO_SMALL                       ""
88
    #define  VL53L0X_STRING_ERROR_GPIO_NOT_EXISTING                      ""
89
    #define  VL53L0X_STRING_ERROR_GPIO_FUNCTIONALITY_NOT_SUPPORTED       ""
90
    #define  VL53L0X_STRING_ERROR_CONTROL_INTERFACE                      ""
91
    #define  VL53L0X_STRING_ERROR_INVALID_COMMAND                        ""
92
    #define  VL53L0X_STRING_ERROR_DIVISION_BY_ZERO                       ""
93
    #define  VL53L0X_STRING_ERROR_REF_SPAD_INIT                          ""
94
    #define  VL53L0X_STRING_ERROR_NOT_IMPLEMENTED                        ""
95
96
    #define  VL53L0X_STRING_UNKNOW_ERROR_CODE                            ""
97
98
99
100
    /* Range Status */
101
    #define  VL53L0X_STRING_RANGESTATUS_NONE                             ""
102
    #define  VL53L0X_STRING_RANGESTATUS_RANGEVALID                       ""
103
    #define  VL53L0X_STRING_RANGESTATUS_SIGMA                            ""
104
    #define  VL53L0X_STRING_RANGESTATUS_SIGNAL                           ""
105
    #define  VL53L0X_STRING_RANGESTATUS_MINRANGE                         ""
106
    #define  VL53L0X_STRING_RANGESTATUS_PHASE                            ""
107
    #define  VL53L0X_STRING_RANGESTATUS_HW                               ""
108
109
110
    /* Range Status */
111
    #define  VL53L0X_STRING_STATE_POWERDOWN                              ""
112
    #define  VL53L0X_STRING_STATE_WAIT_STATICINIT                        ""
113
    #define  VL53L0X_STRING_STATE_STANDBY                                ""
114
    #define  VL53L0X_STRING_STATE_IDLE                                   ""
115
    #define  VL53L0X_STRING_STATE_RUNNING                                ""
116
    #define  VL53L0X_STRING_STATE_UNKNOWN                                ""
117
    #define  VL53L0X_STRING_STATE_ERROR                                  ""
118
119
120
    /* Device Specific */
121
    #define  VL53L0X_STRING_DEVICEERROR_NONE                             ""
122
    #define  VL53L0X_STRING_DEVICEERROR_VCSELCONTINUITYTESTFAILURE       ""
123
    #define  VL53L0X_STRING_DEVICEERROR_VCSELWATCHDOGTESTFAILURE         ""
124
    #define  VL53L0X_STRING_DEVICEERROR_NOVHVVALUEFOUND                  ""
125
    #define  VL53L0X_STRING_DEVICEERROR_MSRCNOTARGET                     ""
126
    #define  VL53L0X_STRING_DEVICEERROR_SNRCHECK                         ""
127
    #define  VL53L0X_STRING_DEVICEERROR_RANGEPHASECHECK                  ""
128
    #define  VL53L0X_STRING_DEVICEERROR_SIGMATHRESHOLDCHECK              ""
129
    #define  VL53L0X_STRING_DEVICEERROR_TCC                              ""
130
    #define  VL53L0X_STRING_DEVICEERROR_PHASECONSISTENCY                 ""
131
    #define  VL53L0X_STRING_DEVICEERROR_MINCLIP                          ""
132
    #define  VL53L0X_STRING_DEVICEERROR_RANGECOMPLETE                    ""
133
    #define  VL53L0X_STRING_DEVICEERROR_ALGOUNDERFLOW                    ""
134
    #define  VL53L0X_STRING_DEVICEERROR_ALGOOVERFLOW                     ""
135
    #define  VL53L0X_STRING_DEVICEERROR_RANGEIGNORETHRESHOLD             ""
136
    #define  VL53L0X_STRING_DEVICEERROR_UNKNOWN                          ""
137
138
    /* Check Enable */
139
    #define  VL53L0X_STRING_CHECKENABLE_SIGMA_FINAL_RANGE                ""
140
    #define  VL53L0X_STRING_CHECKENABLE_SIGNAL_RATE_FINAL_RANGE          ""
141
    #define  VL53L0X_STRING_CHECKENABLE_SIGNAL_REF_CLIP                  ""
142
    #define  VL53L0X_STRING_CHECKENABLE_RANGE_IGNORE_THRESHOLD           ""
143
144
    /* Sequence Step */
145
    #define  VL53L0X_STRING_SEQUENCESTEP_TCC                             ""
146
    #define  VL53L0X_STRING_SEQUENCESTEP_DSS                             ""
147
    #define  VL53L0X_STRING_SEQUENCESTEP_MSRC                            ""
148
    #define  VL53L0X_STRING_SEQUENCESTEP_PRE_RANGE                       ""
149
    #define  VL53L0X_STRING_SEQUENCESTEP_FINAL_RANGE                     ""
150
#else
151
    #define  VL53L0X_STRING_DEVICE_INFO_NAME          "VL53L0X cut1.0"
152
    #define  VL53L0X_STRING_DEVICE_INFO_NAME_TS0      "VL53L0X TS0"
153
    #define  VL53L0X_STRING_DEVICE_INFO_NAME_TS1      "VL53L0X TS1"
154
    #define  VL53L0X_STRING_DEVICE_INFO_NAME_TS2      "VL53L0X TS2"
155
    #define  VL53L0X_STRING_DEVICE_INFO_NAME_ES1      "VL53L0X ES1 or later"
156
    #define  VL53L0X_STRING_DEVICE_INFO_TYPE          "VL53L0X"
157
158
    /* PAL ERROR strings */
159
    #define  VL53L0X_STRING_ERROR_NONE \
160
            "No Error"
161
    #define  VL53L0X_STRING_ERROR_CALIBRATION_WARNING \
162
            "Calibration Warning Error"
163
    #define  VL53L0X_STRING_ERROR_MIN_CLIPPED \
164
            "Min clipped error"
165
    #define  VL53L0X_STRING_ERROR_UNDEFINED \
166
            "Undefined error"
167
    #define  VL53L0X_STRING_ERROR_INVALID_PARAMS \
168
            "Invalid parameters error"
169
    #define  VL53L0X_STRING_ERROR_NOT_SUPPORTED \
170
            "Not supported error"
171
    #define  VL53L0X_STRING_ERROR_RANGE_ERROR \
172
            "Range error"
173
    #define  VL53L0X_STRING_ERROR_TIME_OUT \
174
            "Time out error"
175
    #define  VL53L0X_STRING_ERROR_MODE_NOT_SUPPORTED \
176
            "Mode not supported error"
177
    #define  VL53L0X_STRING_ERROR_BUFFER_TOO_SMALL \
178
            "Buffer too small"
179
    #define  VL53L0X_STRING_ERROR_GPIO_NOT_EXISTING \
180
            "GPIO not existing"
181
    #define  VL53L0X_STRING_ERROR_GPIO_FUNCTIONALITY_NOT_SUPPORTED \
182
            "GPIO funct not supported"
183
    #define  VL53L0X_STRING_ERROR_INTERRUPT_NOT_CLEARED \
184
            "Interrupt not Cleared"
185
    #define  VL53L0X_STRING_ERROR_CONTROL_INTERFACE \
186
            "Control Interface Error"
187
    #define  VL53L0X_STRING_ERROR_INVALID_COMMAND \
188
            "Invalid Command Error"
189
    #define  VL53L0X_STRING_ERROR_DIVISION_BY_ZERO \
190
            "Division by zero Error"
191
    #define  VL53L0X_STRING_ERROR_REF_SPAD_INIT \
192
            "Reference Spad Init Error"
193
    #define  VL53L0X_STRING_ERROR_NOT_IMPLEMENTED \
194
            "Not implemented error"
195
196
    #define  VL53L0X_STRING_UNKNOW_ERROR_CODE \
197
            "Unknown Error Code"
198
199
200
201
    /* Range Status */
202
    #define  VL53L0X_STRING_RANGESTATUS_NONE                 "No Update"
203
    #define  VL53L0X_STRING_RANGESTATUS_RANGEVALID           "Range Valid"
204
    #define  VL53L0X_STRING_RANGESTATUS_SIGMA                "Sigma Fail"
205
    #define  VL53L0X_STRING_RANGESTATUS_SIGNAL               "Signal Fail"
206
    #define  VL53L0X_STRING_RANGESTATUS_MINRANGE             "Min Range Fail"
207
    #define  VL53L0X_STRING_RANGESTATUS_PHASE                "Phase Fail"
208
    #define  VL53L0X_STRING_RANGESTATUS_HW                   "Hardware Fail"
209
210
211
    /* Range Status */
212
    #define  VL53L0X_STRING_STATE_POWERDOWN               "POWERDOWN State"
213
    #define  VL53L0X_STRING_STATE_WAIT_STATICINIT \
214
            "Wait for staticinit State"
215
    #define  VL53L0X_STRING_STATE_STANDBY                 "STANDBY State"
216
    #define  VL53L0X_STRING_STATE_IDLE                    "IDLE State"
217
    #define  VL53L0X_STRING_STATE_RUNNING                 "RUNNING State"
218
    #define  VL53L0X_STRING_STATE_UNKNOWN                 "UNKNOWN State"
219
    #define  VL53L0X_STRING_STATE_ERROR                   "ERROR State"
220
221
222
    /* Device Specific */
223
    #define  VL53L0X_STRING_DEVICEERROR_NONE                   "No Update"
224
    #define  VL53L0X_STRING_DEVICEERROR_VCSELCONTINUITYTESTFAILURE \
225
            "VCSEL Continuity Test Failure"
226
    #define  VL53L0X_STRING_DEVICEERROR_VCSELWATCHDOGTESTFAILURE \
227
            "VCSEL Watchdog Test Failure"
228
    #define  VL53L0X_STRING_DEVICEERROR_NOVHVVALUEFOUND \
229
            "No VHV Value found"
230
    #define  VL53L0X_STRING_DEVICEERROR_MSRCNOTARGET \
231
            "MSRC No Target Error"
232
    #define  VL53L0X_STRING_DEVICEERROR_SNRCHECK \
233
            "SNR Check Exit"
234
    #define  VL53L0X_STRING_DEVICEERROR_RANGEPHASECHECK \
235
            "Range Phase Check Error"
236
    #define  VL53L0X_STRING_DEVICEERROR_SIGMATHRESHOLDCHECK \
237
            "Sigma Threshold Check Error"
238
    #define  VL53L0X_STRING_DEVICEERROR_TCC \
239
            "TCC Error"
240
    #define  VL53L0X_STRING_DEVICEERROR_PHASECONSISTENCY \
241
            "Phase Consistency Error"
242
    #define  VL53L0X_STRING_DEVICEERROR_MINCLIP \
243
            "Min Clip Error"
244
    #define  VL53L0X_STRING_DEVICEERROR_RANGECOMPLETE \
245
            "Range Complete"
246
    #define  VL53L0X_STRING_DEVICEERROR_ALGOUNDERFLOW \
247
            "Range Algo Underflow Error"
248
    #define  VL53L0X_STRING_DEVICEERROR_ALGOOVERFLOW \
249
            "Range Algo Overlow Error"
250
    #define  VL53L0X_STRING_DEVICEERROR_RANGEIGNORETHRESHOLD \
251
            "Range Ignore Threshold Error"
252
    #define  VL53L0X_STRING_DEVICEERROR_UNKNOWN \
253
            "Unknown error code"
254
255
    /* Check Enable */
256
    #define  VL53L0X_STRING_CHECKENABLE_SIGMA_FINAL_RANGE \
257
            "SIGMA FINAL RANGE"
258
    #define  VL53L0X_STRING_CHECKENABLE_SIGNAL_RATE_FINAL_RANGE \
259
            "SIGNAL RATE FINAL RANGE"
260
    #define  VL53L0X_STRING_CHECKENABLE_SIGNAL_REF_CLIP \
261
            "SIGNAL REF CLIP"
262
    #define  VL53L0X_STRING_CHECKENABLE_RANGE_IGNORE_THRESHOLD \
263
            "RANGE IGNORE THRESHOLD"
264
    #define  VL53L0X_STRING_CHECKENABLE_SIGNAL_RATE_MSRC \
265
            "SIGNAL RATE MSRC"
266
    #define  VL53L0X_STRING_CHECKENABLE_SIGNAL_RATE_PRE_RANGE \
267
            "SIGNAL RATE PRE RANGE"
268
269
    /* Sequence Step */
270
    #define  VL53L0X_STRING_SEQUENCESTEP_TCC                   "TCC"
271
    #define  VL53L0X_STRING_SEQUENCESTEP_DSS                   "DSS"
272
    #define  VL53L0X_STRING_SEQUENCESTEP_MSRC                  "MSRC"
273
    #define  VL53L0X_STRING_SEQUENCESTEP_PRE_RANGE             "PRE RANGE"
274
    #define  VL53L0X_STRING_SEQUENCESTEP_FINAL_RANGE           "FINAL RANGE"
275
#endif /* USE_EMPTY_STRING */
276
277
278
#ifdef __cplusplus
279
}
280
#endif
281
282
#endif