Statistics
| Branch: | Tag: | Revision:

amiro-lld / drivers / VL53L1X / v1 / api / core / vl53l1_register_funcs.h @ 4dba9195

History | View | Annotate | Download (51.173 KB)

1 4dba9195 galberding
/*
2
* Copyright (c) 2017, STMicroelectronics - All Rights Reserved
3
*
4
* This file is part of VL53L1 Core and is dual licensed,
5
* either 'STMicroelectronics
6
* Proprietary license'
7
* or 'BSD 3-clause "New" or "Revised" License' , at your option.
8
*
9
********************************************************************************
10
*
11
* 'STMicroelectronics Proprietary license'
12
*
13
********************************************************************************
14
*
15
* License terms: STMicroelectronics Proprietary in accordance with licensing
16
* terms at www.st.com/sla0081
17
*
18
* STMicroelectronics confidential
19
* Reproduction and Communication of this document is strictly prohibited unless
20
* specifically authorized in writing by STMicroelectronics.
21
*
22
*
23
********************************************************************************
24
*
25
* Alternatively, VL53L1 Core may be distributed under the terms of
26
* 'BSD 3-clause "New" or "Revised" License', in which case the following
27
* provisions apply instead of the ones mentioned above :
28
*
29
********************************************************************************
30
*
31
* License terms: BSD 3-clause "New" or "Revised" License.
32
*
33
* Redistribution and use in source and binary forms, with or without
34
* modification, are permitted provided that the following conditions are met:
35
*
36
* 1. Redistributions of source code must retain the above copyright notice, this
37
* list of conditions and the following disclaimer.
38
*
39
* 2. Redistributions in binary form must reproduce the above copyright notice,
40
* this list of conditions and the following disclaimer in the documentation
41
* and/or other materials provided with the distribution.
42
*
43
* 3. Neither the name of the copyright holder nor the names of its contributors
44
* may be used to endorse or promote products derived from this software
45
* without specific prior written permission.
46
*
47
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
48
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
49
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
50
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
51
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
52
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
53
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
54
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
55
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
56
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
57
*
58
*
59
********************************************************************************
60
*
61
*/
62
63
/**
64
 * @file   vl53l1_register_funcs.h
65
 * @brief  VL53L1 Register Function declarations
66
 */
67
68
#ifndef _VL53L1_REGISTER_FUNCS_H_
69
#define _VL53L1_REGISTER_FUNCS_H_
70
71
#include "vl53l1_platform.h"
72
73
#ifdef __cplusplus
74
extern "C"
75
{
76
#endif
77
78
79
/**
80
 * @brief  Encodes data structure VL53L1_static_nvm_managed_t into a I2C write buffer
81
 *
82
 * Buffer must be at least 11 bytes
83
 *
84
 * @param[in]   pdata     : pointer to VL53L1_static_nvm_managed_t data structure
85
 * @param[in]   buf_size  : size of input buffer
86
 * @param[out]  pbuffer   : uint8_t buffer to write serialised data into (I2C Write Buffer)
87
 */
88
89
VL53L1_Error VL53L1_i2c_encode_static_nvm_managed(
90
        VL53L1_static_nvm_managed_t  *pdata,
91
        uint16_t                   buf_size,
92
        uint8_t                   *pbuffer);
93
94
95
/**
96
 * @brief  Decodes data structure VL53L1_static_nvm_managed_t from the input I2C read buffer
97
 *
98
 * Buffer must be at least 11 bytes
99
 *
100
 * @param[in]   buf_size  : size of input buffer
101
 * @param[in]   pbuffer   : uint8_t buffer contain input serialised data (I2C read buffer)
102
 * @param[out]  pdata     : pointer to VL53L1_static_nvm_managed_t data structure
103
 *
104
 * @return  VL53L1_ERROR_NONE     Success
105
 * @return  "Other error code"    See ::VL53L1_Error
106
 */
107
108
VL53L1_Error VL53L1_i2c_decode_static_nvm_managed(
109
        uint16_t                   buf_size,
110
        uint8_t                   *pbuffer,
111
        VL53L1_static_nvm_managed_t  *pdata);
112
113
114
/**
115
 * @brief  Sets static_nvm_managed register group
116
 *
117
 * Serailises (encodes) VL53L1_static_nvm_managed_t structure into a I2C write data buffer
118
 * and sends the buffer to the device via a multi byte I2C write transaction
119
 *
120
 * @param[in]  Dev       : device handle
121
 * @param[in]  pdata     : pointer to VL53L1_static_nvm_managed_t
122
 *
123
 * @return  VL53L1_ERROR_NONE     Success
124
 * @return  "Other error code"    See ::VL53L1_Error
125
 */
126
127
VL53L1_Error VL53L1_set_static_nvm_managed(
128
        VL53L1_DEV                 Dev,
129
        VL53L1_static_nvm_managed_t  *pdata);
130
131
132
/**
133
 * @brief  Gets static_nvm_managed register group
134
 *
135
 * Reads register info from the device via a multi byte I2C read transaction and
136
 * deserialises (decodes) the data into the VL53L1_static_nvm_managed_t structure
137
 *
138
 * @param[in]  Dev       : device handle
139
 * @param[out] pdata     : pointer to VL53L1_static_nvm_managed_t
140
 *
141
 * @return  VL53L1_ERROR_NONE     Success
142
 * @return  "Other error code"    See ::VL53L1_Error
143
 */
144
145
VL53L1_Error VL53L1_get_static_nvm_managed(
146
        VL53L1_DEV                 Dev,
147
        VL53L1_static_nvm_managed_t  *pdata);
148
149
150
/**
151
 * @brief  Encodes data structure VL53L1_customer_nvm_managed_t into a I2C write buffer
152
 *
153
 * Buffer must be at least 23 bytes
154
 *
155
 * @param[in]   pdata     : pointer to VL53L1_customer_nvm_managed_t data structure
156
 * @param[in]   buf_size  : size of input buffer
157
 * @param[out]  pbuffer   : uint8_t buffer to write serialised data into (I2C Write Buffer)
158
 */
159
160
VL53L1_Error VL53L1_i2c_encode_customer_nvm_managed(
161
        VL53L1_customer_nvm_managed_t  *pdata,
162
        uint16_t                   buf_size,
163
        uint8_t                   *pbuffer);
164
165
166
/**
167
 * @brief  Decodes data structure VL53L1_customer_nvm_managed_t from the input I2C read buffer
168
 *
169
 * Buffer must be at least 23 bytes
170
 *
171
 * @param[in]   buf_size  : size of input buffer
172
 * @param[in]   pbuffer   : uint8_t buffer contain input serialised data (I2C read buffer)
173
 * @param[out]  pdata     : pointer to VL53L1_customer_nvm_managed_t data structure
174
 *
175
 * @return  VL53L1_ERROR_NONE     Success
176
 * @return  "Other error code"    See ::VL53L1_Error
177
 */
178
179
VL53L1_Error VL53L1_i2c_decode_customer_nvm_managed(
180
        uint16_t                   buf_size,
181
        uint8_t                   *pbuffer,
182
        VL53L1_customer_nvm_managed_t  *pdata);
183
184
185
/**
186
 * @brief  Sets customer_nvm_managed register group
187
 *
188
 * Serailises (encodes) VL53L1_customer_nvm_managed_t structure into a I2C write data buffer
189
 * and sends the buffer to the device via a multi byte I2C write transaction
190
 *
191
 * @param[in]  Dev       : device handle
192
 * @param[in]  pdata     : pointer to VL53L1_customer_nvm_managed_t
193
 *
194
 * @return  VL53L1_ERROR_NONE     Success
195
 * @return  "Other error code"    See ::VL53L1_Error
196
 */
197
198
VL53L1_Error VL53L1_set_customer_nvm_managed(
199
        VL53L1_DEV                 Dev,
200
        VL53L1_customer_nvm_managed_t  *pdata);
201
202
203
/**
204
 * @brief  Gets customer_nvm_managed register group
205
 *
206
 * Reads register info from the device via a multi byte I2C read transaction and
207
 * deserialises (decodes) the data into the VL53L1_customer_nvm_managed_t structure
208
 *
209
 * @param[in]  Dev       : device handle
210
 * @param[out] pdata     : pointer to VL53L1_customer_nvm_managed_t
211
 *
212
 * @return  VL53L1_ERROR_NONE     Success
213
 * @return  "Other error code"    See ::VL53L1_Error
214
 */
215
216
VL53L1_Error VL53L1_get_customer_nvm_managed(
217
        VL53L1_DEV                 Dev,
218
        VL53L1_customer_nvm_managed_t  *pdata);
219
220
221
/**
222
 * @brief  Encodes data structure VL53L1_static_config_t into a I2C write buffer
223
 *
224
 * Buffer must be at least 32 bytes
225
 *
226
 * @param[in]   pdata     : pointer to VL53L1_static_config_t data structure
227
 * @param[in]   buf_size  : size of input buffer
228
 * @param[out]  pbuffer   : uint8_t buffer to write serialised data into (I2C Write Buffer)
229
 */
230
231
VL53L1_Error VL53L1_i2c_encode_static_config(
232
        VL53L1_static_config_t    *pdata,
233
        uint16_t                   buf_size,
234
        uint8_t                   *pbuffer);
235
236
237
/**
238
 * @brief  Decodes data structure VL53L1_static_config_t from the input I2C read buffer
239
 *
240
 * Buffer must be at least 32 bytes
241
 *
242
 * @param[in]   buf_size  : size of input buffer
243
 * @param[in]   pbuffer   : uint8_t buffer contain input serialised data (I2C read buffer)
244
 * @param[out]  pdata     : pointer to VL53L1_static_config_t data structure
245
 *
246
 * @return  VL53L1_ERROR_NONE     Success
247
 * @return  "Other error code"    See ::VL53L1_Error
248
 */
249
250
VL53L1_Error VL53L1_i2c_decode_static_config(
251
        uint16_t                   buf_size,
252
        uint8_t                   *pbuffer,
253
        VL53L1_static_config_t    *pdata);
254
255
256
/**
257
 * @brief  Sets static_config register group
258
 *
259
 * Serailises (encodes) VL53L1_static_config_t structure into a I2C write data buffer
260
 * and sends the buffer to the device via a multi byte I2C write transaction
261
 *
262
 * @param[in]  Dev       : device handle
263
 * @param[in]  pdata     : pointer to VL53L1_static_config_t
264
 *
265
 * @return  VL53L1_ERROR_NONE     Success
266
 * @return  "Other error code"    See ::VL53L1_Error
267
 */
268
269
VL53L1_Error VL53L1_set_static_config(
270
        VL53L1_DEV                 Dev,
271
        VL53L1_static_config_t    *pdata);
272
273
274
/**
275
 * @brief  Gets static_config register group
276
 *
277
 * Reads register info from the device via a multi byte I2C read transaction and
278
 * deserialises (decodes) the data into the VL53L1_static_config_t structure
279
 *
280
 * @param[in]  Dev       : device handle
281
 * @param[out] pdata     : pointer to VL53L1_static_config_t
282
 *
283
 * @return  VL53L1_ERROR_NONE     Success
284
 * @return  "Other error code"    See ::VL53L1_Error
285
 */
286
287
#ifdef VL53L1_DEBUG
288
VL53L1_Error VL53L1_get_static_config(
289
        VL53L1_DEV                 Dev,
290
        VL53L1_static_config_t    *pdata);
291
#endif
292
293
294
/**
295
 * @brief  Encodes data structure VL53L1_general_config_t into a I2C write buffer
296
 *
297
 * Buffer must be at least 22 bytes
298
 *
299
 * @param[in]   pdata     : pointer to VL53L1_general_config_t data structure
300
 * @param[in]   buf_size  : size of input buffer
301
 * @param[out]  pbuffer   : uint8_t buffer to write serialised data into (I2C Write Buffer)
302
 */
303
304
VL53L1_Error VL53L1_i2c_encode_general_config(
305
        VL53L1_general_config_t   *pdata,
306
        uint16_t                   buf_size,
307
        uint8_t                   *pbuffer);
308
309
310
/**
311
 * @brief  Decodes data structure VL53L1_general_config_t from the input I2C read buffer
312
 *
313
 * Buffer must be at least 22 bytes
314
 *
315
 * @param[in]   buf_size  : size of input buffer
316
 * @param[in]   pbuffer   : uint8_t buffer contain input serialised data (I2C read buffer)
317
 * @param[out]  pdata     : pointer to VL53L1_general_config_t data structure
318
 *
319
 * @return  VL53L1_ERROR_NONE     Success
320
 * @return  "Other error code"    See ::VL53L1_Error
321
 */
322
323
VL53L1_Error VL53L1_i2c_decode_general_config(
324
        uint16_t                   buf_size,
325
        uint8_t                   *pbuffer,
326
        VL53L1_general_config_t   *pdata);
327
328
329
/**
330
 * @brief  Sets general_config register group
331
 *
332
 * Serailises (encodes) VL53L1_general_config_t structure into a I2C write data buffer
333
 * and sends the buffer to the device via a multi byte I2C write transaction
334
 *
335
 * @param[in]  Dev       : device handle
336
 * @param[in]  pdata     : pointer to VL53L1_general_config_t
337
 *
338
 * @return  VL53L1_ERROR_NONE     Success
339
 * @return  "Other error code"    See ::VL53L1_Error
340
 */
341
342
VL53L1_Error VL53L1_set_general_config(
343
        VL53L1_DEV                 Dev,
344
        VL53L1_general_config_t   *pdata);
345
346
347
/**
348
 * @brief  Gets general_config register group
349
 *
350
 * Reads register info from the device via a multi byte I2C read transaction and
351
 * deserialises (decodes) the data into the VL53L1_general_config_t structure
352
 *
353
 * @param[in]  Dev       : device handle
354
 * @param[out] pdata     : pointer to VL53L1_general_config_t
355
 *
356
 * @return  VL53L1_ERROR_NONE     Success
357
 * @return  "Other error code"    See ::VL53L1_Error
358
 */
359
360
#ifdef VL53L1_DEBUG
361
VL53L1_Error VL53L1_get_general_config(
362
        VL53L1_DEV                 Dev,
363
        VL53L1_general_config_t   *pdata);
364
#endif
365
366
367
/**
368
 * @brief  Encodes data structure VL53L1_timing_config_t into a I2C write buffer
369
 *
370
 * Buffer must be at least 23 bytes
371
 *
372
 * @param[in]   pdata     : pointer to VL53L1_timing_config_t data structure
373
 * @param[in]   buf_size  : size of input buffer
374
 * @param[out]  pbuffer   : uint8_t buffer to write serialised data into (I2C Write Buffer)
375
 */
376
377
VL53L1_Error VL53L1_i2c_encode_timing_config(
378
        VL53L1_timing_config_t    *pdata,
379
        uint16_t                   buf_size,
380
        uint8_t                   *pbuffer);
381
382
383
/**
384
 * @brief  Decodes data structure VL53L1_timing_config_t from the input I2C read buffer
385
 *
386
 * Buffer must be at least 23 bytes
387
 *
388
 * @param[in]   buf_size  : size of input buffer
389
 * @param[in]   pbuffer   : uint8_t buffer contain input serialised data (I2C read buffer)
390
 * @param[out]  pdata     : pointer to VL53L1_timing_config_t data structure
391
 *
392
 * @return  VL53L1_ERROR_NONE     Success
393
 * @return  "Other error code"    See ::VL53L1_Error
394
 */
395
396
#ifdef PAL_EXTENDED
397
VL53L1_Error VL53L1_i2c_decode_timing_config(
398
        uint16_t                   buf_size,
399
        uint8_t                   *pbuffer,
400
        VL53L1_timing_config_t    *pdata);
401
#endif
402
403
404
/**
405
 * @brief  Sets timing_config register group
406
 *
407
 * Serailises (encodes) VL53L1_timing_config_t structure into a I2C write data buffer
408
 * and sends the buffer to the device via a multi byte I2C write transaction
409
 *
410
 * @param[in]  Dev       : device handle
411
 * @param[in]  pdata     : pointer to VL53L1_timing_config_t
412
 *
413
 * @return  VL53L1_ERROR_NONE     Success
414
 * @return  "Other error code"    See ::VL53L1_Error
415
 */
416
417
#ifdef PAL_EXTENDED
418
VL53L1_Error VL53L1_set_timing_config(
419
        VL53L1_DEV                 Dev,
420
        VL53L1_timing_config_t    *pdata);
421
#endif
422
423
424
/**
425
 * @brief  Gets timing_config register group
426
 *
427
 * Reads register info from the device via a multi byte I2C read transaction and
428
 * deserialises (decodes) the data into the VL53L1_timing_config_t structure
429
 *
430
 * @param[in]  Dev       : device handle
431
 * @param[out] pdata     : pointer to VL53L1_timing_config_t
432
 *
433
 * @return  VL53L1_ERROR_NONE     Success
434
 * @return  "Other error code"    See ::VL53L1_Error
435
 */
436
437
#ifdef VL53L1_DEBUG
438
VL53L1_Error VL53L1_get_timing_config(
439
        VL53L1_DEV                 Dev,
440
        VL53L1_timing_config_t    *pdata);
441
#endif
442
443
444
/**
445
 * @brief  Encodes data structure VL53L1_dynamic_config_t into a I2C write buffer
446
 *
447
 * Buffer must be at least 18 bytes
448
 *
449
 * @param[in]   pdata     : pointer to VL53L1_dynamic_config_t data structure
450
 * @param[in]   buf_size  : size of input buffer
451
 * @param[out]  pbuffer   : uint8_t buffer to write serialised data into (I2C Write Buffer)
452
 */
453
454
VL53L1_Error VL53L1_i2c_encode_dynamic_config(
455
        VL53L1_dynamic_config_t   *pdata,
456
        uint16_t                   buf_size,
457
        uint8_t                   *pbuffer);
458
459
460
/**
461
 * @brief  Decodes data structure VL53L1_dynamic_config_t from the input I2C read buffer
462
 *
463
 * Buffer must be at least 18 bytes
464
 *
465
 * @param[in]   buf_size  : size of input buffer
466
 * @param[in]   pbuffer   : uint8_t buffer contain input serialised data (I2C read buffer)
467
 * @param[out]  pdata     : pointer to VL53L1_dynamic_config_t data structure
468
 *
469
 * @return  VL53L1_ERROR_NONE     Success
470
 * @return  "Other error code"    See ::VL53L1_Error
471
 */
472
473
#ifdef PAL_EXTENDED
474
VL53L1_Error VL53L1_i2c_decode_dynamic_config(
475
        uint16_t                   buf_size,
476
        uint8_t                   *pbuffer,
477
        VL53L1_dynamic_config_t   *pdata);
478
#endif
479
480
481
/**
482
 * @brief  Sets dynamic_config register group
483
 *
484
 * Serailises (encodes) VL53L1_dynamic_config_t structure into a I2C write data buffer
485
 * and sends the buffer to the device via a multi byte I2C write transaction
486
 *
487
 * @param[in]  Dev       : device handle
488
 * @param[in]  pdata     : pointer to VL53L1_dynamic_config_t
489
 *
490
 * @return  VL53L1_ERROR_NONE     Success
491
 * @return  "Other error code"    See ::VL53L1_Error
492
 */
493
494
VL53L1_Error VL53L1_set_dynamic_config(
495
        VL53L1_DEV                 Dev,
496
        VL53L1_dynamic_config_t   *pdata);
497
498
499
/**
500
 * @brief  Gets dynamic_config register group
501
 *
502
 * Reads register info from the device via a multi byte I2C read transaction and
503
 * deserialises (decodes) the data into the VL53L1_dynamic_config_t structure
504
 *
505
 * @param[in]  Dev       : device handle
506
 * @param[out] pdata     : pointer to VL53L1_dynamic_config_t
507
 *
508
 * @return  VL53L1_ERROR_NONE     Success
509
 * @return  "Other error code"    See ::VL53L1_Error
510
 */
511
512
#ifdef VL53L1_DEBUG
513
VL53L1_Error VL53L1_get_dynamic_config(
514
        VL53L1_DEV                 Dev,
515
        VL53L1_dynamic_config_t   *pdata);
516
#endif
517
518
/**
519
 * @brief  Encodes data structure VL53L1_system_control_t into a I2C write buffer
520
 *
521
 * Buffer must be at least 5 bytes
522
 *
523
 * @param[in]   pdata     : pointer to VL53L1_system_control_t data structure
524
 * @param[in]   buf_size  : size of input buffer
525
 * @param[out]  pbuffer   : uint8_t buffer to write serialised data into (I2C Write Buffer)
526
 */
527
528
VL53L1_Error VL53L1_i2c_encode_system_control(
529
        VL53L1_system_control_t   *pdata,
530
        uint16_t                   buf_size,
531
        uint8_t                   *pbuffer);
532
533
534
/**
535
 * @brief  Decodes data structure VL53L1_system_control_t from the input I2C read buffer
536
 *
537
 * Buffer must be at least 5 bytes
538
 *
539
 * @param[in]   buf_size  : size of input buffer
540
 * @param[in]   pbuffer   : uint8_t buffer contain input serialised data (I2C read buffer)
541
 * @param[out]  pdata     : pointer to VL53L1_system_control_t data structure
542
 *
543
 * @return  VL53L1_ERROR_NONE     Success
544
 * @return  "Other error code"    See ::VL53L1_Error
545
 */
546
547
#ifdef PAL_EXTENDED
548
VL53L1_Error VL53L1_i2c_decode_system_control(
549
        uint16_t                   buf_size,
550
        uint8_t                   *pbuffer,
551
        VL53L1_system_control_t   *pdata);
552
#endif
553
554
555
/**
556
 * @brief  Sets system_control register group
557
 *
558
 * Serailises (encodes) VL53L1_system_control_t structure into a I2C write data buffer
559
 * and sends the buffer to the device via a multi byte I2C write transaction
560
 *
561
 * @param[in]  Dev       : device handle
562
 * @param[in]  pdata     : pointer to VL53L1_system_control_t
563
 *
564
 * @return  VL53L1_ERROR_NONE     Success
565
 * @return  "Other error code"    See ::VL53L1_Error
566
 */
567
568
VL53L1_Error VL53L1_set_system_control(
569
        VL53L1_DEV                 Dev,
570
        VL53L1_system_control_t   *pdata);
571
572
573
/**
574
 * @brief  Gets system_control register group
575
 *
576
 * Reads register info from the device via a multi byte I2C read transaction and
577
 * deserialises (decodes) the data into the VL53L1_system_control_t structure
578
 *
579
 * @param[in]  Dev       : device handle
580
 * @param[out] pdata     : pointer to VL53L1_system_control_t
581
 *
582
 * @return  VL53L1_ERROR_NONE     Success
583
 * @return  "Other error code"    See ::VL53L1_Error
584
 */
585
586
#ifdef VL53L1_DEBUG
587
VL53L1_Error VL53L1_get_system_control(
588
        VL53L1_DEV                 Dev,
589
        VL53L1_system_control_t   *pdata);
590
#endif
591
592
593
/**
594
 * @brief  Encodes data structure VL53L1_system_results_t into a I2C write buffer
595
 *
596
 * Buffer must be at least 44 bytes
597
 *
598
 * @param[in]   pdata     : pointer to VL53L1_system_results_t data structure
599
 * @param[in]   buf_size  : size of input buffer
600
 * @param[out]  pbuffer   : uint8_t buffer to write serialised data into (I2C Write Buffer)
601
 */
602
603
#ifdef PAL_EXTENDED
604
VL53L1_Error VL53L1_i2c_encode_system_results(
605
        VL53L1_system_results_t   *pdata,
606
        uint16_t                   buf_size,
607
        uint8_t                   *pbuffer);
608
#endif
609
610
611
/**
612
 * @brief  Decodes data structure VL53L1_system_results_t from the input I2C read buffer
613
 *
614
 * Buffer must be at least 44 bytes
615
 *
616
 * @param[in]   buf_size  : size of input buffer
617
 * @param[in]   pbuffer   : uint8_t buffer contain input serialised data (I2C read buffer)
618
 * @param[out]  pdata     : pointer to VL53L1_system_results_t data structure
619
 *
620
 * @return  VL53L1_ERROR_NONE     Success
621
 * @return  "Other error code"    See ::VL53L1_Error
622
 */
623
624
VL53L1_Error VL53L1_i2c_decode_system_results(
625
        uint16_t                   buf_size,
626
        uint8_t                   *pbuffer,
627
        VL53L1_system_results_t   *pdata);
628
629
630
/**
631
 * @brief  Sets system_results register group
632
 *
633
 * Serailises (encodes) VL53L1_system_results_t structure into a I2C write data buffer
634
 * and sends the buffer to the device via a multi byte I2C write transaction
635
 *
636
 * @param[in]  Dev       : device handle
637
 * @param[in]  pdata     : pointer to VL53L1_system_results_t
638
 *
639
 * @return  VL53L1_ERROR_NONE     Success
640
 * @return  "Other error code"    See ::VL53L1_Error
641
 */
642
643
#ifdef PAL_EXTENDED
644
VL53L1_Error VL53L1_set_system_results(
645
        VL53L1_DEV                 Dev,
646
        VL53L1_system_results_t   *pdata);
647
#endif
648
649
650
/**
651
 * @brief  Gets system_results register group
652
 *
653
 * Reads register info from the device via a multi byte I2C read transaction and
654
 * deserialises (decodes) the data into the VL53L1_system_results_t structure
655
 *
656
 * @param[in]  Dev       : device handle
657
 * @param[out] pdata     : pointer to VL53L1_system_results_t
658
 *
659
 * @return  VL53L1_ERROR_NONE     Success
660
 * @return  "Other error code"    See ::VL53L1_Error
661
 */
662
663
VL53L1_Error VL53L1_get_system_results(
664
        VL53L1_DEV                 Dev,
665
        VL53L1_system_results_t   *pdata);
666
667
668
/**
669
 * @brief  Encodes data structure VL53L1_core_results_t into a I2C write buffer
670
 *
671
 * Buffer must be at least 33 bytes
672
 *
673
 * @param[in]   pdata     : pointer to VL53L1_core_results_t data structure
674
 * @param[in]   buf_size  : size of input buffer
675
 * @param[out]  pbuffer   : uint8_t buffer to write serialised data into (I2C Write Buffer)
676
 */
677
678
#ifdef PAL_EXTENDED
679
VL53L1_Error VL53L1_i2c_encode_core_results(
680
        VL53L1_core_results_t     *pdata,
681
        uint16_t                   buf_size,
682
        uint8_t                   *pbuffer);
683
#endif
684
685
686
/**
687
 * @brief  Decodes data structure VL53L1_core_results_t from the input I2C read buffer
688
 *
689
 * Buffer must be at least 33 bytes
690
 *
691
 * @param[in]   buf_size  : size of input buffer
692
 * @param[in]   pbuffer   : uint8_t buffer contain input serialised data (I2C read buffer)
693
 * @param[out]  pdata     : pointer to VL53L1_core_results_t data structure
694
 *
695
 * @return  VL53L1_ERROR_NONE     Success
696
 * @return  "Other error code"    See ::VL53L1_Error
697
 */
698
699
VL53L1_Error VL53L1_i2c_decode_core_results(
700
        uint16_t                   buf_size,
701
        uint8_t                   *pbuffer,
702
        VL53L1_core_results_t     *pdata);
703
704
705
/**
706
 * @brief  Sets core_results register group
707
 *
708
 * Serailises (encodes) VL53L1_core_results_t structure into a I2C write data buffer
709
 * and sends the buffer to the device via a multi byte I2C write transaction
710
 *
711
 * @param[in]  Dev       : device handle
712
 * @param[in]  pdata     : pointer to VL53L1_core_results_t
713
 *
714
 * @return  VL53L1_ERROR_NONE     Success
715
 * @return  "Other error code"    See ::VL53L1_Error
716
 */
717
718
#ifdef VL53L1_DEBUG
719
VL53L1_Error VL53L1_set_core_results(
720
        VL53L1_DEV                 Dev,
721
        VL53L1_core_results_t     *pdata);
722
#endif
723
724
725
/**
726
 * @brief  Gets core_results register group
727
 *
728
 * Reads register info from the device via a multi byte I2C read transaction and
729
 * deserialises (decodes) the data into the VL53L1_core_results_t structure
730
 *
731
 * @param[in]  Dev       : device handle
732
 * @param[out] pdata     : pointer to VL53L1_core_results_t
733
 *
734
 * @return  VL53L1_ERROR_NONE     Success
735
 * @return  "Other error code"    See ::VL53L1_Error
736
 */
737
738
#ifdef PAL_EXTENDED
739
VL53L1_Error VL53L1_get_core_results(
740
        VL53L1_DEV                 Dev,
741
        VL53L1_core_results_t     *pdata);
742
#endif
743
744
745
/**
746
 * @brief  Encodes data structure VL53L1_debug_results_t into a I2C write buffer
747
 *
748
 * Buffer must be at least 56 bytes
749
 *
750
 * @param[in]   pdata     : pointer to VL53L1_debug_results_t data structure
751
 * @param[in]   buf_size  : size of input buffer
752
 * @param[out]  pbuffer   : uint8_t buffer to write serialised data into (I2C Write Buffer)
753
 */
754
755
#ifdef VL53L1_DEBUG
756
VL53L1_Error VL53L1_i2c_encode_debug_results(
757
        VL53L1_debug_results_t    *pdata,
758
        uint16_t                   buf_size,
759
        uint8_t                   *pbuffer);
760
#endif
761
762
/**
763
 * @brief  Decodes data structure VL53L1_debug_results_t from the input I2C read buffer
764
 *
765
 * Buffer must be at least 56 bytes
766
 *
767
 * @param[in]   buf_size  : size of input buffer
768
 * @param[in]   pbuffer   : uint8_t buffer contain input serialised data (I2C read buffer)
769
 * @param[out]  pdata     : pointer to VL53L1_debug_results_t data structure
770
 *
771
 * @return  VL53L1_ERROR_NONE     Success
772
 * @return  "Other error code"    See ::VL53L1_Error
773
 */
774
775
VL53L1_Error VL53L1_i2c_decode_debug_results(
776
        uint16_t                   buf_size,
777
        uint8_t                   *pbuffer,
778
        VL53L1_debug_results_t    *pdata);
779
780
781
/**
782
 * @brief  Sets debug_results register group
783
 *
784
 * Serailises (encodes) VL53L1_debug_results_t structure into a I2C write data buffer
785
 * and sends the buffer to the device via a multi byte I2C write transaction
786
 *
787
 * @param[in]  Dev       : device handle
788
 * @param[in]  pdata     : pointer to VL53L1_debug_results_t
789
 *
790
 * @return  VL53L1_ERROR_NONE     Success
791
 * @return  "Other error code"    See ::VL53L1_Error
792
 */
793
794
#ifdef VL53L1_DEBUG
795
VL53L1_Error VL53L1_set_debug_results(
796
        VL53L1_DEV                 Dev,
797
        VL53L1_debug_results_t    *pdata);
798
799
/**
800
 * @brief  Gets debug_results register group
801
 *
802
 * Reads register info from the device via a multi byte I2C read transaction and
803
 * deserialises (decodes) the data into the VL53L1_debug_results_t structure
804
 *
805
 * @param[in]  Dev       : device handle
806
 * @param[out] pdata     : pointer to VL53L1_debug_results_t
807
 *
808
 * @return  VL53L1_ERROR_NONE     Success
809
 * @return  "Other error code"    See ::VL53L1_Error
810
 */
811
812
VL53L1_Error VL53L1_get_debug_results(
813
        VL53L1_DEV                 Dev,
814
        VL53L1_debug_results_t    *pdata);
815
816
#endif
817
818
/**
819
 * @brief  Encodes data structure VL53L1_nvm_copy_data_t into a I2C write buffer
820
 *
821
 * Buffer must be at least 49 bytes
822
 *
823
 * @param[in]   pdata     : pointer to VL53L1_nvm_copy_data_t data structure
824
 * @param[in]   buf_size  : size of input buffer
825
 * @param[out]  pbuffer   : uint8_t buffer to write serialised data into (I2C Write Buffer)
826
 */
827
828
#ifdef PAL_EXTENDED
829
VL53L1_Error VL53L1_i2c_encode_nvm_copy_data(
830
        VL53L1_nvm_copy_data_t    *pdata,
831
        uint16_t                   buf_size,
832
        uint8_t                   *pbuffer);
833
#endif
834
835
836
/**
837
 * @brief  Decodes data structure VL53L1_nvm_copy_data_t from the input I2C read buffer
838
 *
839
 * Buffer must be at least 49 bytes
840
 *
841
 * @param[in]   buf_size  : size of input buffer
842
 * @param[in]   pbuffer   : uint8_t buffer contain input serialised data (I2C read buffer)
843
 * @param[out]  pdata     : pointer to VL53L1_nvm_copy_data_t data structure
844
 *
845
 * @return  VL53L1_ERROR_NONE     Success
846
 * @return  "Other error code"    See ::VL53L1_Error
847
 */
848
849
VL53L1_Error VL53L1_i2c_decode_nvm_copy_data(
850
        uint16_t                   buf_size,
851
        uint8_t                   *pbuffer,
852
        VL53L1_nvm_copy_data_t    *pdata);
853
854
855
/**
856
 * @brief  Sets nvm_copy_data register group
857
 *
858
 * Serailises (encodes) VL53L1_nvm_copy_data_t structure into a I2C write data buffer
859
 * and sends the buffer to the device via a multi byte I2C write transaction
860
 *
861
 * @param[in]  Dev       : device handle
862
 * @param[in]  pdata     : pointer to VL53L1_nvm_copy_data_t
863
 *
864
 * @return  VL53L1_ERROR_NONE     Success
865
 * @return  "Other error code"    See ::VL53L1_Error
866
 */
867
#ifdef PAL_EXTENDED
868
VL53L1_Error VL53L1_set_nvm_copy_data(
869
        VL53L1_DEV                 Dev,
870
        VL53L1_nvm_copy_data_t    *pdata);
871
#endif
872
873
874
/**
875
 * @brief  Gets nvm_copy_data register group
876
 *
877
 * Reads register info from the device via a multi byte I2C read transaction and
878
 * deserialises (decodes) the data into the VL53L1_nvm_copy_data_t structure
879
 *
880
 * @param[in]  Dev       : device handle
881
 * @param[out] pdata     : pointer to VL53L1_nvm_copy_data_t
882
 *
883
 * @return  VL53L1_ERROR_NONE     Success
884
 * @return  "Other error code"    See ::VL53L1_Error
885
 */
886
887
VL53L1_Error VL53L1_get_nvm_copy_data(
888
        VL53L1_DEV                 Dev,
889
        VL53L1_nvm_copy_data_t    *pdata);
890
891
892
/**
893
 * @brief  Encodes data structure VL53L1_prev_shadow_system_results_t into a I2C write buffer
894
 *
895
 * Buffer must be at least 44 bytes
896
 *
897
 * @param[in]   pdata     : pointer to VL53L1_prev_shadow_system_results_t data structure
898
 * @param[in]   buf_size  : size of input buffer
899
 * @param[out]  pbuffer   : uint8_t buffer to write serialised data into (I2C Write Buffer)
900
 */
901
902
#ifdef VL53L1_DEBUG
903
VL53L1_Error VL53L1_i2c_encode_prev_shadow_system_results(
904
        VL53L1_prev_shadow_system_results_t  *pdata,
905
        uint16_t                   buf_size,
906
        uint8_t                   *pbuffer);
907
908
909
/**
910
 * @brief  Decodes data structure VL53L1_prev_shadow_system_results_t from the input I2C read buffer
911
 *
912
 * Buffer must be at least 44 bytes
913
 *
914
 * @param[in]   buf_size  : size of input buffer
915
 * @param[in]   pbuffer   : uint8_t buffer contain input serialised data (I2C read buffer)
916
 * @param[out]  pdata     : pointer to VL53L1_prev_shadow_system_results_t data structure
917
 *
918
 * @return  VL53L1_ERROR_NONE     Success
919
 * @return  "Other error code"    See ::VL53L1_Error
920
 */
921
922
VL53L1_Error VL53L1_i2c_decode_prev_shadow_system_results(
923
        uint16_t                   buf_size,
924
        uint8_t                   *pbuffer,
925
        VL53L1_prev_shadow_system_results_t  *pdata);
926
927
928
/**
929
 * @brief  Sets prev_shadow_system_results register group
930
 *
931
 * Serailises (encodes) VL53L1_prev_shadow_system_results_t structure into a I2C write data buffer
932
 * and sends the buffer to the device via a multi byte I2C write transaction
933
 *
934
 * @param[in]  Dev       : device handle
935
 * @param[in]  pdata     : pointer to VL53L1_prev_shadow_system_results_t
936
 *
937
 * @return  VL53L1_ERROR_NONE     Success
938
 * @return  "Other error code"    See ::VL53L1_Error
939
 */
940
941
VL53L1_Error VL53L1_set_prev_shadow_system_results(
942
        VL53L1_DEV                 Dev,
943
        VL53L1_prev_shadow_system_results_t  *pdata);
944
945
946
/**
947
 * @brief  Gets prev_shadow_system_results register group
948
 *
949
 * Reads register info from the device via a multi byte I2C read transaction and
950
 * deserialises (decodes) the data into the VL53L1_prev_shadow_system_results_t structure
951
 *
952
 * @param[in]  Dev       : device handle
953
 * @param[out] pdata     : pointer to VL53L1_prev_shadow_system_results_t
954
 *
955
 * @return  VL53L1_ERROR_NONE     Success
956
 * @return  "Other error code"    See ::VL53L1_Error
957
 */
958
959
VL53L1_Error VL53L1_get_prev_shadow_system_results(
960
        VL53L1_DEV                 Dev,
961
        VL53L1_prev_shadow_system_results_t  *pdata);
962
963
/**
964
 * @brief  Encodes data structure VL53L1_prev_shadow_core_results_t into a I2C write buffer
965
 *
966
 * Buffer must be at least 33 bytes
967
 *
968
 * @param[in]   pdata     : pointer to VL53L1_prev_shadow_core_results_t data structure
969
 * @param[in]   buf_size  : size of input buffer
970
 * @param[out]  pbuffer   : uint8_t buffer to write serialised data into (I2C Write Buffer)
971
 */
972
973
VL53L1_Error VL53L1_i2c_encode_prev_shadow_core_results(
974
        VL53L1_prev_shadow_core_results_t  *pdata,
975
        uint16_t                   buf_size,
976
        uint8_t                   *pbuffer);
977
978
979
/**
980
 * @brief  Decodes data structure VL53L1_prev_shadow_core_results_t from the input I2C read buffer
981
 *
982
 * Buffer must be at least 33 bytes
983
 *
984
 * @param[in]   buf_size  : size of input buffer
985
 * @param[in]   pbuffer   : uint8_t buffer contain input serialised data (I2C read buffer)
986
 * @param[out]  pdata     : pointer to VL53L1_prev_shadow_core_results_t data structure
987
 *
988
 * @return  VL53L1_ERROR_NONE     Success
989
 * @return  "Other error code"    See ::VL53L1_Error
990
 */
991
992
VL53L1_Error VL53L1_i2c_decode_prev_shadow_core_results(
993
        uint16_t                   buf_size,
994
        uint8_t                   *pbuffer,
995
        VL53L1_prev_shadow_core_results_t  *pdata);
996
997
998
/**
999
 * @brief  Sets prev_shadow_core_results register group
1000
 *
1001
 * Serailises (encodes) VL53L1_prev_shadow_core_results_t structure into a I2C write data buffer
1002
 * and sends the buffer to the device via a multi byte I2C write transaction
1003
 *
1004
 * @param[in]  Dev       : device handle
1005
 * @param[in]  pdata     : pointer to VL53L1_prev_shadow_core_results_t
1006
 *
1007
 * @return  VL53L1_ERROR_NONE     Success
1008
 * @return  "Other error code"    See ::VL53L1_Error
1009
 */
1010
1011
VL53L1_Error VL53L1_set_prev_shadow_core_results(
1012
        VL53L1_DEV                 Dev,
1013
        VL53L1_prev_shadow_core_results_t  *pdata);
1014
1015
1016
/**
1017
 * @brief  Gets prev_shadow_core_results register group
1018
 *
1019
 * Reads register info from the device via a multi byte I2C read transaction and
1020
 * deserialises (decodes) the data into the VL53L1_prev_shadow_core_results_t structure
1021
 *
1022
 * @param[in]  Dev       : device handle
1023
 * @param[out] pdata     : pointer to VL53L1_prev_shadow_core_results_t
1024
 *
1025
 * @return  VL53L1_ERROR_NONE     Success
1026
 * @return  "Other error code"    See ::VL53L1_Error
1027
 */
1028
VL53L1_Error VL53L1_get_prev_shadow_core_results(
1029
        VL53L1_DEV                 Dev,
1030
        VL53L1_prev_shadow_core_results_t  *pdata);
1031
1032
1033
/**
1034
 * @brief  Encodes data structure VL53L1_patch_debug_t into a I2C write buffer
1035
 *
1036
 * Buffer must be at least 2 bytes
1037
 *
1038
 * @param[in]   pdata     : pointer to VL53L1_patch_debug_t data structure
1039
 * @param[in]   buf_size  : size of input buffer
1040
 * @param[out]  pbuffer   : uint8_t buffer to write serialised data into (I2C Write Buffer)
1041
 */
1042
1043
VL53L1_Error VL53L1_i2c_encode_patch_debug(
1044
        VL53L1_patch_debug_t      *pdata,
1045
        uint16_t                   buf_size,
1046
        uint8_t                   *pbuffer);
1047
1048
1049
/**
1050
 * @brief  Decodes data structure VL53L1_patch_debug_t from the input I2C read buffer
1051
 *
1052
 * Buffer must be at least 2 bytes
1053
 *
1054
 * @param[in]   buf_size  : size of input buffer
1055
 * @param[in]   pbuffer   : uint8_t buffer contain input serialised data (I2C read buffer)
1056
 * @param[out]  pdata     : pointer to VL53L1_patch_debug_t data structure
1057
 *
1058
 * @return  VL53L1_ERROR_NONE     Success
1059
 * @return  "Other error code"    See ::VL53L1_Error
1060
 */
1061
1062
VL53L1_Error VL53L1_i2c_decode_patch_debug(
1063
        uint16_t                   buf_size,
1064
        uint8_t                   *pbuffer,
1065
        VL53L1_patch_debug_t      *pdata);
1066
1067
1068
/**
1069
 * @brief  Sets patch_debug register group
1070
 *
1071
 * Serailises (encodes) VL53L1_patch_debug_t structure into a I2C write data buffer
1072
 * and sends the buffer to the device via a multi byte I2C write transaction
1073
 *
1074
 * @param[in]  Dev       : device handle
1075
 * @param[in]  pdata     : pointer to VL53L1_patch_debug_t
1076
 *
1077
 * @return  VL53L1_ERROR_NONE     Success
1078
 * @return  "Other error code"    See ::VL53L1_Error
1079
 */
1080
1081
VL53L1_Error VL53L1_set_patch_debug(
1082
        VL53L1_DEV                 Dev,
1083
        VL53L1_patch_debug_t      *pdata);
1084
1085
1086
/**
1087
 * @brief  Gets patch_debug register group
1088
 *
1089
 * Reads register info from the device via a multi byte I2C read transaction and
1090
 * deserialises (decodes) the data into the VL53L1_patch_debug_t structure
1091
 *
1092
 * @param[in]  Dev       : device handle
1093
 * @param[out] pdata     : pointer to VL53L1_patch_debug_t
1094
 *
1095
 * @return  VL53L1_ERROR_NONE     Success
1096
 * @return  "Other error code"    See ::VL53L1_Error
1097
 */
1098
1099
VL53L1_Error VL53L1_get_patch_debug(
1100
        VL53L1_DEV                 Dev,
1101
        VL53L1_patch_debug_t      *pdata);
1102
1103
#endif
1104
1105
/**
1106
 * @brief  Encodes data structure VL53L1_gph_general_config_t into a I2C write buffer
1107
 *
1108
 * Buffer must be at least 5 bytes
1109
 *
1110
 * @param[in]   pdata     : pointer to VL53L1_gph_general_config_t data structure
1111
 * @param[in]   buf_size  : size of input buffer
1112
 * @param[out]  pbuffer   : uint8_t buffer to write serialised data into (I2C Write Buffer)
1113
 */
1114
1115
#ifdef PAL_EXTENDED
1116
VL53L1_Error VL53L1_i2c_encode_gph_general_config(
1117
        VL53L1_gph_general_config_t  *pdata,
1118
        uint16_t                   buf_size,
1119
        uint8_t                   *pbuffer);
1120
#endif
1121
1122
1123
/**
1124
 * @brief  Decodes data structure VL53L1_gph_general_config_t from the input I2C read buffer
1125
 *
1126
 * Buffer must be at least 5 bytes
1127
 *
1128
 * @param[in]   buf_size  : size of input buffer
1129
 * @param[in]   pbuffer   : uint8_t buffer contain input serialised data (I2C read buffer)
1130
 * @param[out]  pdata     : pointer to VL53L1_gph_general_config_t data structure
1131
 *
1132
 * @return  VL53L1_ERROR_NONE     Success
1133
 * @return  "Other error code"    See ::VL53L1_Error
1134
 */
1135
1136
#ifdef PAL_EXTENDED
1137
VL53L1_Error VL53L1_i2c_decode_gph_general_config(
1138
        uint16_t                   buf_size,
1139
        uint8_t                   *pbuffer,
1140
        VL53L1_gph_general_config_t  *pdata);
1141
#endif
1142
1143
1144
/**
1145
 * @brief  Sets gph_general_config register group
1146
 *
1147
 * Serailises (encodes) VL53L1_gph_general_config_t structure into a I2C write data buffer
1148
 * and sends the buffer to the device via a multi byte I2C write transaction
1149
 *
1150
 * @param[in]  Dev       : device handle
1151
 * @param[in]  pdata     : pointer to VL53L1_gph_general_config_t
1152
 *
1153
 * @return  VL53L1_ERROR_NONE     Success
1154
 * @return  "Other error code"    See ::VL53L1_Error
1155
 */
1156
1157
#ifdef PAL_EXTENDED
1158
VL53L1_Error VL53L1_set_gph_general_config(
1159
        VL53L1_DEV                 Dev,
1160
        VL53L1_gph_general_config_t  *pdata);
1161
#endif
1162
1163
/**
1164
 * @brief  Gets gph_general_config register group
1165
 *
1166
 * Reads register info from the device via a multi byte I2C read transaction and
1167
 * deserialises (decodes) the data into the VL53L1_gph_general_config_t structure
1168
 *
1169
 * @param[in]  Dev       : device handle
1170
 * @param[out] pdata     : pointer to VL53L1_gph_general_config_t
1171
 *
1172
 * @return  VL53L1_ERROR_NONE     Success
1173
 * @return  "Other error code"    See ::VL53L1_Error
1174
 */
1175
1176
#ifdef PAL_EXTENDED
1177
VL53L1_Error VL53L1_get_gph_general_config(
1178
        VL53L1_DEV                 Dev,
1179
        VL53L1_gph_general_config_t  *pdata);
1180
#endif
1181
1182
1183
/**
1184
 * @brief  Encodes data structure VL53L1_gph_static_config_t into a I2C write buffer
1185
 *
1186
 * Buffer must be at least 6 bytes
1187
 *
1188
 * @param[in]   pdata     : pointer to VL53L1_gph_static_config_t data structure
1189
 * @param[in]   buf_size  : size of input buffer
1190
 * @param[out]  pbuffer   : uint8_t buffer to write serialised data into (I2C Write Buffer)
1191
 */
1192
1193
#ifdef PAL_EXTENDED
1194
VL53L1_Error VL53L1_i2c_encode_gph_static_config(
1195
        VL53L1_gph_static_config_t  *pdata,
1196
        uint16_t                   buf_size,
1197
        uint8_t                   *pbuffer);
1198
#endif
1199
1200
1201
/**
1202
 * @brief  Decodes data structure VL53L1_gph_static_config_t from the input I2C read buffer
1203
 *
1204
 * Buffer must be at least 6 bytes
1205
 *
1206
 * @param[in]   buf_size  : size of input buffer
1207
 * @param[in]   pbuffer   : uint8_t buffer contain input serialised data (I2C read buffer)
1208
 * @param[out]  pdata     : pointer to VL53L1_gph_static_config_t data structure
1209
 *
1210
 * @return  VL53L1_ERROR_NONE     Success
1211
 * @return  "Other error code"    See ::VL53L1_Error
1212
 */
1213
1214
#ifdef PAL_EXTENDED
1215
VL53L1_Error VL53L1_i2c_decode_gph_static_config(
1216
        uint16_t                   buf_size,
1217
        uint8_t                   *pbuffer,
1218
        VL53L1_gph_static_config_t  *pdata);
1219
#endif
1220
1221
1222
/**
1223
 * @brief  Sets gph_static_config register group
1224
 *
1225
 * Serailises (encodes) VL53L1_gph_static_config_t structure into a I2C write data buffer
1226
 * and sends the buffer to the device via a multi byte I2C write transaction
1227
 *
1228
 * @param[in]  Dev       : device handle
1229
 * @param[in]  pdata     : pointer to VL53L1_gph_static_config_t
1230
 *
1231
 * @return  VL53L1_ERROR_NONE     Success
1232
 * @return  "Other error code"    See ::VL53L1_Error
1233
 */
1234
1235
#ifdef VL53L1_DEBUG
1236
VL53L1_Error VL53L1_set_gph_static_config(
1237
        VL53L1_DEV                 Dev,
1238
        VL53L1_gph_static_config_t  *pdata);
1239
#endif
1240
1241
1242
/**
1243
 * @brief  Gets gph_static_config register group
1244
 *
1245
 * Reads register info from the device via a multi byte I2C read transaction and
1246
 * deserialises (decodes) the data into the VL53L1_gph_static_config_t structure
1247
 *
1248
 * @param[in]  Dev       : device handle
1249
 * @param[out] pdata     : pointer to VL53L1_gph_static_config_t
1250
 *
1251
 * @return  VL53L1_ERROR_NONE     Success
1252
 * @return  "Other error code"    See ::VL53L1_Error
1253
 */
1254
1255
#ifdef PAL_EXTENDED
1256
VL53L1_Error VL53L1_get_gph_static_config(
1257
        VL53L1_DEV                 Dev,
1258
        VL53L1_gph_static_config_t  *pdata);
1259
#endif
1260
1261
1262
/**
1263
 * @brief  Encodes data structure VL53L1_gph_timing_config_t into a I2C write buffer
1264
 *
1265
 * Buffer must be at least 16 bytes
1266
 *
1267
 * @param[in]   pdata     : pointer to VL53L1_gph_timing_config_t data structure
1268
 * @param[in]   buf_size  : size of input buffer
1269
 * @param[out]  pbuffer   : uint8_t buffer to write serialised data into (I2C Write Buffer)
1270
 */
1271
1272
#ifdef PAL_EXTENDED
1273
VL53L1_Error VL53L1_i2c_encode_gph_timing_config(
1274
        VL53L1_gph_timing_config_t  *pdata,
1275
        uint16_t                   buf_size,
1276
        uint8_t                   *pbuffer);
1277
#endif
1278
1279
1280
/**
1281
 * @brief  Decodes data structure VL53L1_gph_timing_config_t from the input I2C read buffer
1282
 *
1283
 * Buffer must be at least 16 bytes
1284
 *
1285
 * @param[in]   buf_size  : size of input buffer
1286
 * @param[in]   pbuffer   : uint8_t buffer contain input serialised data (I2C read buffer)
1287
 * @param[out]  pdata     : pointer to VL53L1_gph_timing_config_t data structure
1288
 *
1289
 * @return  VL53L1_ERROR_NONE     Success
1290
 * @return  "Other error code"    See ::VL53L1_Error
1291
 */
1292
1293
#ifdef PAL_EXTENDED
1294
VL53L1_Error VL53L1_i2c_decode_gph_timing_config(
1295
        uint16_t                   buf_size,
1296
        uint8_t                   *pbuffer,
1297
        VL53L1_gph_timing_config_t  *pdata);
1298
#endif
1299
1300
1301
/**
1302
 * @brief  Sets gph_timing_config register group
1303
 *
1304
 * Serailises (encodes) VL53L1_gph_timing_config_t structure into a I2C write data buffer
1305
 * and sends the buffer to the device via a multi byte I2C write transaction
1306
 *
1307
 * @param[in]  Dev       : device handle
1308
 * @param[in]  pdata     : pointer to VL53L1_gph_timing_config_t
1309
 *
1310
 * @return  VL53L1_ERROR_NONE     Success
1311
 * @return  "Other error code"    See ::VL53L1_Error
1312
 */
1313
1314
#ifdef VL53L1_DEBUG
1315
VL53L1_Error VL53L1_set_gph_timing_config(
1316
        VL53L1_DEV                 Dev,
1317
        VL53L1_gph_timing_config_t  *pdata);
1318
#endif
1319
1320
1321
/**
1322
 * @brief  Gets gph_timing_config register group
1323
 *
1324
 * Reads register info from the device via a multi byte I2C read transaction and
1325
 * deserialises (decodes) the data into the VL53L1_gph_timing_config_t structure
1326
 *
1327
 * @param[in]  Dev       : device handle
1328
 * @param[out] pdata     : pointer to VL53L1_gph_timing_config_t
1329
 *
1330
 * @return  VL53L1_ERROR_NONE     Success
1331
 * @return  "Other error code"    See ::VL53L1_Error
1332
 */
1333
1334
#ifdef PAL_EXTENDED
1335
VL53L1_Error VL53L1_get_gph_timing_config(
1336
        VL53L1_DEV                 Dev,
1337
        VL53L1_gph_timing_config_t  *pdata);
1338
#endif
1339
1340
1341
/**
1342
 * @brief  Encodes data structure VL53L1_fw_internal_t into a I2C write buffer
1343
 *
1344
 * Buffer must be at least 2 bytes
1345
 *
1346
 * @param[in]   pdata     : pointer to VL53L1_fw_internal_t data structure
1347
 * @param[in]   buf_size  : size of input buffer
1348
 * @param[out]  pbuffer   : uint8_t buffer to write serialised data into (I2C Write Buffer)
1349
 */
1350
1351
#ifdef VL53L1_DEBUG
1352
VL53L1_Error VL53L1_i2c_encode_fw_internal(
1353
        VL53L1_fw_internal_t      *pdata,
1354
        uint16_t                   buf_size,
1355
        uint8_t                   *pbuffer);
1356
1357
1358
/**
1359
 * @brief  Decodes data structure VL53L1_fw_internal_t from the input I2C read buffer
1360
 *
1361
 * Buffer must be at least 2 bytes
1362
 *
1363
 * @param[in]   buf_size  : size of input buffer
1364
 * @param[in]   pbuffer   : uint8_t buffer contain input serialised data (I2C read buffer)
1365
 * @param[out]  pdata     : pointer to VL53L1_fw_internal_t data structure
1366
 *
1367
 * @return  VL53L1_ERROR_NONE     Success
1368
 * @return  "Other error code"    See ::VL53L1_Error
1369
 */
1370
1371
VL53L1_Error VL53L1_i2c_decode_fw_internal(
1372
        uint16_t                   buf_size,
1373
        uint8_t                   *pbuffer,
1374
        VL53L1_fw_internal_t      *pdata);
1375
1376
1377
/**
1378
 * @brief  Sets fw_internal register group
1379
 *
1380
 * Serailises (encodes) VL53L1_fw_internal_t structure into a I2C write data buffer
1381
 * and sends the buffer to the device via a multi byte I2C write transaction
1382
 *
1383
 * @param[in]  Dev       : device handle
1384
 * @param[in]  pdata     : pointer to VL53L1_fw_internal_t
1385
 *
1386
 * @return  VL53L1_ERROR_NONE     Success
1387
 * @return  "Other error code"    See ::VL53L1_Error
1388
 */
1389
1390
VL53L1_Error VL53L1_set_fw_internal(
1391
        VL53L1_DEV                 Dev,
1392
        VL53L1_fw_internal_t      *pdata);
1393
1394
1395
/**
1396
 * @brief  Gets fw_internal register group
1397
 *
1398
 * Reads register info from the device via a multi byte I2C read transaction and
1399
 * deserialises (decodes) the data into the VL53L1_fw_internal_t structure
1400
 *
1401
 * @param[in]  Dev       : device handle
1402
 * @param[out] pdata     : pointer to VL53L1_fw_internal_t
1403
 *
1404
 * @return  VL53L1_ERROR_NONE     Success
1405
 * @return  "Other error code"    See ::VL53L1_Error
1406
 */
1407
1408
VL53L1_Error VL53L1_get_fw_internal(
1409
        VL53L1_DEV                 Dev,
1410
        VL53L1_fw_internal_t      *pdata);
1411
1412
1413
1414
/**
1415
 * @brief  Encodes data structure VL53L1_patch_results_t into a I2C write buffer
1416
 *
1417
 * Buffer must be at least 90 bytes
1418
 *
1419
 * @param[in]   pdata     : pointer to VL53L1_patch_results_t data structure
1420
 * @param[in]   buf_size  : size of input buffer
1421
 * @param[out]  pbuffer   : uint8_t buffer to write serialised data into (I2C Write Buffer)
1422
 */
1423
1424
VL53L1_Error VL53L1_i2c_encode_patch_results(
1425
        VL53L1_patch_results_t    *pdata,
1426
        uint16_t                   buf_size,
1427
        uint8_t                   *pbuffer);
1428
1429
1430
/**
1431
 * @brief  Decodes data structure VL53L1_patch_results_t from the input I2C read buffer
1432
 *
1433
 * Buffer must be at least 90 bytes
1434
 *
1435
 * @param[in]   buf_size  : size of input buffer
1436
 * @param[in]   pbuffer   : uint8_t buffer contain input serialised data (I2C read buffer)
1437
 * @param[out]  pdata     : pointer to VL53L1_patch_results_t data structure
1438
 *
1439
 * @return  VL53L1_ERROR_NONE     Success
1440
 * @return  "Other error code"    See ::VL53L1_Error
1441
 */
1442
1443
VL53L1_Error VL53L1_i2c_decode_patch_results(
1444
        uint16_t                   buf_size,
1445
        uint8_t                   *pbuffer,
1446
        VL53L1_patch_results_t    *pdata);
1447
1448
1449
/**
1450
 * @brief  Sets patch_results register group
1451
 *
1452
 * Serailises (encodes) VL53L1_patch_results_t structure into a I2C write data buffer
1453
 * and sends the buffer to the device via a multi byte I2C write transaction
1454
 *
1455
 * @param[in]  Dev       : device handle
1456
 * @param[in]  pdata     : pointer to VL53L1_patch_results_t
1457
 *
1458
 * @return  VL53L1_ERROR_NONE     Success
1459
 * @return  "Other error code"    See ::VL53L1_Error
1460
 */
1461
1462
VL53L1_Error VL53L1_set_patch_results(
1463
        VL53L1_DEV                 Dev,
1464
        VL53L1_patch_results_t    *pdata);
1465
1466
1467
/**
1468
 * @brief  Gets patch_results register group
1469
 *
1470
 * Reads register info from the device via a multi byte I2C read transaction and
1471
 * deserialises (decodes) the data into the VL53L1_patch_results_t structure
1472
 *
1473
 * @param[in]  Dev       : device handle
1474
 * @param[out] pdata     : pointer to VL53L1_patch_results_t
1475
 *
1476
 * @return  VL53L1_ERROR_NONE     Success
1477
 * @return  "Other error code"    See ::VL53L1_Error
1478
 */
1479
1480
VL53L1_Error VL53L1_get_patch_results(
1481
        VL53L1_DEV                 Dev,
1482
        VL53L1_patch_results_t    *pdata);
1483
#endif
1484
1485
1486
/**
1487
 * @brief  Encodes data structure VL53L1_shadow_system_results_t into a I2C write buffer
1488
 *
1489
 * Buffer must be at least 82 bytes
1490
 *
1491
 * @param[in]   pdata     : pointer to VL53L1_shadow_system_results_t data structure
1492
 * @param[in]   buf_size  : size of input buffer
1493
 * @param[out]  pbuffer   : uint8_t buffer to write serialised data into (I2C Write Buffer)
1494
 */
1495
1496
#ifdef VL53L1_DEBUG
1497
VL53L1_Error VL53L1_i2c_encode_shadow_system_results(
1498
        VL53L1_shadow_system_results_t  *pdata,
1499
        uint16_t                   buf_size,
1500
        uint8_t                   *pbuffer);
1501
1502
1503
/**
1504
 * @brief  Decodes data structure VL53L1_shadow_system_results_t from the input I2C read buffer
1505
 *
1506
 * Buffer must be at least 82 bytes
1507
 *
1508
 * @param[in]   buf_size  : size of input buffer
1509
 * @param[in]   pbuffer   : uint8_t buffer contain input serialised data (I2C read buffer)
1510
 * @param[out]  pdata     : pointer to VL53L1_shadow_system_results_t data structure
1511
 *
1512
 * @return  VL53L1_ERROR_NONE     Success
1513
 * @return  "Other error code"    See ::VL53L1_Error
1514
 */
1515
1516
VL53L1_Error VL53L1_i2c_decode_shadow_system_results(
1517
        uint16_t                   buf_size,
1518
        uint8_t                   *pbuffer,
1519
        VL53L1_shadow_system_results_t  *pdata);
1520
1521
1522
/**
1523
 * @brief  Sets shadow_system_results register group
1524
 *
1525
 * Serailises (encodes) VL53L1_shadow_system_results_t structure into a I2C write data buffer
1526
 * and sends the buffer to the device via a multi byte I2C write transaction
1527
 *
1528
 * @param[in]  Dev       : device handle
1529
 * @param[in]  pdata     : pointer to VL53L1_shadow_system_results_t
1530
 *
1531
 * @return  VL53L1_ERROR_NONE     Success
1532
 * @return  "Other error code"    See ::VL53L1_Error
1533
 */
1534
1535
VL53L1_Error VL53L1_set_shadow_system_results(
1536
        VL53L1_DEV                 Dev,
1537
        VL53L1_shadow_system_results_t  *pdata);
1538
1539
1540
/**
1541
 * @brief  Gets shadow_system_results register group
1542
 *
1543
 * Reads register info from the device via a multi byte I2C read transaction and
1544
 * deserialises (decodes) the data into the VL53L1_shadow_system_results_t structure
1545
 *
1546
 * @param[in]  Dev       : device handle
1547
 * @param[out] pdata     : pointer to VL53L1_shadow_system_results_t
1548
 *
1549
 * @return  VL53L1_ERROR_NONE     Success
1550
 * @return  "Other error code"    See ::VL53L1_Error
1551
 */
1552
1553
VL53L1_Error VL53L1_get_shadow_system_results(
1554
        VL53L1_DEV                 Dev,
1555
        VL53L1_shadow_system_results_t  *pdata);
1556
1557
1558
/**
1559
 * @brief  Encodes data structure VL53L1_shadow_core_results_t into a I2C write buffer
1560
 *
1561
 * Buffer must be at least 33 bytes
1562
 *
1563
 * @param[in]   pdata     : pointer to VL53L1_shadow_core_results_t data structure
1564
 * @param[in]   buf_size  : size of input buffer
1565
 * @param[out]  pbuffer   : uint8_t buffer to write serialised data into (I2C Write Buffer)
1566
 */
1567
1568
VL53L1_Error VL53L1_i2c_encode_shadow_core_results(
1569
        VL53L1_shadow_core_results_t  *pdata,
1570
        uint16_t                   buf_size,
1571
        uint8_t                   *pbuffer);
1572
1573
1574
/**
1575
 * @brief  Decodes data structure VL53L1_shadow_core_results_t from the input I2C read buffer
1576
 *
1577
 * Buffer must be at least 33 bytes
1578
 *
1579
 * @param[in]   buf_size  : size of input buffer
1580
 * @param[in]   pbuffer   : uint8_t buffer contain input serialised data (I2C read buffer)
1581
 * @param[out]  pdata     : pointer to VL53L1_shadow_core_results_t data structure
1582
 *
1583
 * @return  VL53L1_ERROR_NONE     Success
1584
 * @return  "Other error code"    See ::VL53L1_Error
1585
 */
1586
1587
VL53L1_Error VL53L1_i2c_decode_shadow_core_results(
1588
        uint16_t                   buf_size,
1589
        uint8_t                   *pbuffer,
1590
        VL53L1_shadow_core_results_t  *pdata);
1591
1592
1593
/**
1594
 * @brief  Sets shadow_core_results register group
1595
 *
1596
 * Serailises (encodes) VL53L1_shadow_core_results_t structure into a I2C write data buffer
1597
 * and sends the buffer to the device via a multi byte I2C write transaction
1598
 *
1599
 * @param[in]  Dev       : device handle
1600
 * @param[in]  pdata     : pointer to VL53L1_shadow_core_results_t
1601
 *
1602
 * @return  VL53L1_ERROR_NONE     Success
1603
 * @return  "Other error code"    See ::VL53L1_Error
1604
 */
1605
1606
VL53L1_Error VL53L1_set_shadow_core_results(
1607
        VL53L1_DEV                 Dev,
1608
        VL53L1_shadow_core_results_t  *pdata);
1609
1610
1611
/**
1612
 * @brief  Gets shadow_core_results register group
1613
 *
1614
 * Reads register info from the device via a multi byte I2C read transaction and
1615
 * deserialises (decodes) the data into the VL53L1_shadow_core_results_t structure
1616
 *
1617
 * @param[in]  Dev       : device handle
1618
 * @param[out] pdata     : pointer to VL53L1_shadow_core_results_t
1619
 *
1620
 * @return  VL53L1_ERROR_NONE     Success
1621
 * @return  "Other error code"    See ::VL53L1_Error
1622
 */
1623
1624
VL53L1_Error VL53L1_get_shadow_core_results(
1625
        VL53L1_DEV                 Dev,
1626
        VL53L1_shadow_core_results_t  *pdata);
1627
#endif
1628
1629
1630
#ifdef __cplusplus
1631
}
1632
#endif
1633
1634
#endif
1635