lightranger4 2.0.0.0
lightranger4.h
Go to the documentation of this file.
1/*
2 * MikroSDK - MikroE Software Development Kit
3 * Copyright© 2020 MikroElektronika d.o.o.
4 *
5 * Permission is hereby granted, free of charge, to any person
6 * obtaining a copy of this software and associated documentation
7 * files (the "Software"), to deal in the Software without restriction,
8 * including without limitation the rights to use, copy, modify, merge,
9 * publish, distribute, sublicense, and/or sell copies of the Software,
10 * and to permit persons to whom the Software is furnished to do so,
11 * subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be
14 * included in all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
20 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
22 * OR OTHER DEALINGS IN THE SOFTWARE.
23 */
24
33// ----------------------------------------------------------------------------
34
35#ifndef LIGHTRANGER4_H
36#define LIGHTRANGER4_H
37
42#ifdef PREINIT_SUPPORTED
43#include "preinit.h"
44#endif
45
46#ifdef MikroCCoreVersion
47 #if MikroCCoreVersion >= 1
48 #include "delays.h"
49 #endif
50#endif
51
52#include "drv_digital_out.h"
53#include "drv_digital_in.h"
54#include "drv_i2c_master.h"
55
56// -------------------------------------------------------------- PUBLIC MACROS
66#define LIGHTRANGER4_MAP_MIKROBUS( cfg, mikrobus ) \
67 cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
68 cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA ); \
69 cfg.xsh = MIKROBUS( mikrobus, MIKROBUS_RST ); \
70 cfg.int_pin = MIKROBUS( mikrobus, MIKROBUS_INT );
77#define LIGHTRANGER4_RETVAL uint8_t
78
79#define LIGHTRANGER4_OK 0x00
80#define LIGHTRANGER4_INIT_ERROR 0xFF
87#define LR4_REG_SOFT_RESET 0x0000
88#define LR4_REG_SLAVE_DEVICE_ADDRESS 0x0001
89#define LR4_REG_CFG_VHV_REF_SEL_VDDPIX 0x0002
90#define LR4_REG_CFG_VHV_REF_SEL_VQUENCH 0x0003
91#define LR4_REG_CFG_AVDD1V2_SEL 0x0004
92#define LR4_REG_FAST_OSC_TRIM 0x0005
93#define LR4_REG_FAST_OSC_FREQUENCY 0x0006
94#define LR4_REG_FAST_OSC_FREQUENCY_MSB 0x0006
95#define LR4_REG_FAST_OSC_FREQUENCY_LSB 0x0007
96#define LR4_REG_CFG_TIMEOUT_MACROP_LOOP_BOUND 0x0008
97#define LR4_REG_CFG_COUNT_THRESH 0x0009
98#define LR4_REG_CFG_OFFSET 0x000A
99#define LR4_REG_CFG_INIT 0x000B
100#define LR4_REG_GLOBAL_CFG_SPAD_ENABLES_REF_0 0x000D
101#define LR4_REG_GLOBAL_CFG_SPAD_ENABLES_REF_1 0x000E
102#define LR4_REG_GLOBAL_CFG_SPAD_ENABLES_REF_2 0x000F
103#define LR4_REG_GLOBAL_CFG_SPAD_ENABLES_REF_3 0x0010
104#define LR4_REG_GLOBAL_CFG_SPAD_ENABLES_REF_4 0x0011
105#define LR4_REG_GLOBAL_CFG_SPAD_ENABLES_REF_5 0x0012
106#define LR4_REG_GLOBAL_CFG_REF_EN_START_SELECT 0x0013
107#define LR4_REG_NUM_REQUESTED_REF_SPADS 0x0014
108#define LR4_REG_REF_LOCATION 0x0015
109#define LR4_REG_COMP_PLANE_OFFSET_KCPS 0x0016
110#define LR4_REG_COMP_PLANE_OFFSET_KCPS_LSB 0x0016
111#define LR4_REG_COMP_PLANE_OFFSET_KCPS_MSB 0x0017
112#define LR4_REG_COMP_X_PLANE_GRADIENT_KCPS 0x0018
113#define LR4_REG_COMP_X_PLANE_GRADIENT_KCPS_MSB 0x0018
114#define LR4_REG_COMP_X_PLANE_GRADIENT_KCPS_LSB 0x0019
115#define LR4_REG_COMP_Y_PLANE_GRADIENT_KCPS 0x001A
116#define LR4_REG_COMP_Y_PLANE_GRADIENT_KCPS_MSB 0x001A
117#define LR4_REG_COMP_Y_PLANE_GRADIENT_KCPS_LSB 0x001B
118#define LR4_REG_TOTAL_RATE_TARGET_MCPS 0x001C
119#define LR4_REG_TOTAL_RATE_TARGET_MCPS_MSB 0x001C
120#define LR4_REG_TOTAL_RATE_TARGET_MCPS_LSB 0x001D
121#define LR4_REG_PART_TO_PART_RANGE_OFFSET_MM 0x001E
122#define LR4_REG_PART_TO_PART_RANGE_OFFSET_MM_MSB 0x001E
123#define LR4_REG_PART_TO_PART_RANGE_OFFSET_MM_LSB 0x001F
124#define LR4_REG_INNER_OFFSET_MM 0x0020
125#define LR4_REG_INNER_OFFSET_MM_MSB 0x0020
126#define LR4_REG_INNER_OFFSET_MM_LSB 0x0021
127#define LR4_REG_OUTER_OFFSET_MM 0x0022
128#define LR4_REG_OUTER_OFFSET_MM_MSB 0x0022
129#define LR4_REG_OUTER_OFFSET_MM_LSB 0x0023
130#define LR4_REG_TARGET_TOTAL_RATE_MCPS 0x0024
131#define LR4_REG_TARGET_TOTAL_RATE_MCPS_MSB 0x0024
132#define LR4_REG_TARGET_TOTAL_RATE_MCPS_LSB 0x0025
133#define LR4_REG_DEBUG_CTRL 0x0026
134#define LR4_REG_TEST_MODE_CTRL 0x0027
135#define LR4_REG_CLK_GATING_CTRL 0x0028
136
137
138#define LR4_NVM_BIST_CTRL 0x0029
139#define LR4_NVM_BIST_NUM_NVM_WORDS 0x002A
140#define LR4_NVM_BIST_START_ADDRESS 0x002B
141#define LR4_HOST_IF_STATUS 0x002C
142#define LR4_PAD_I2C_HV_CONFIG 0x002D
143#define LR4_PAD_I2C_HV_EXTSUP_CONFIG 0x002E
144#define LR4_GPIO_HV_PAD_CTRL 0x002F
145#define LR4_GPIO_HV_MUX_CTRL 0x0030
146#define LR4_GPIO_TIO_HV_STATUS 0x0031
147#define LR4_GPIO_FIO_HV_STATUS 0x0032
148#define LR4_ANA_CONFIG_SPAD_SEL_PSWIDTH 0x0033
149#define LR4_ANA_CONFIG_VCSEL_PULSE_WIDTH_OFFSET 0x0034
150#define LR4_ANA_CONFIG_FAST_OSC_CONFIG_CTRL 0x0035
151#define LR4_SIGMA_ESTIMATOR_EFFECTIVE_PULSE_WIDTH_NS 0x0036
152#define LR4_SIGMA_ESTIMATOR_EFFECTIVE_AMBIENT_WIDTH_NS 0x0037
153#define LR4_SIGMA_ESTIMATOR_SIGMA_REF_MM 0x0038
154#define LR4_ALGO_CROSSTALK_COMPENSATION_VALID_HEIGHT_MM 0x0039
155#define LR4_SPARE_HOST_CONFIG_STATIC_CONFIG_SPARE_0 0x003A
156#define LR4_SPARE_HOST_CONFIG_STATIC_CONFIG_SPARE_1 0x003B
157#define LR4_ALGO_RANGE_IGNORE_THRESHOLD_MCPS 0x003C
158#define LR4_ALGO_RANGE_IGNORE_THRESHOLD_MCPS_HI 0x003C
159#define LR4_ALGO_RANGE_IGNORE_THRESHOLD_MCPS_LO 0x003D
160#define LR4_ALGO_RANGE_IGNORE_VALID_HEIGHT_MM 0x003E
161#define LR4_ALGO_RANGE_MIN_CLIP 0x003F
162#define LR4_ALGO_CONSISTENCY_CHECK_TOLERANCE 0x0040
163#define LR4_SPARE_HOST_CONFIG_STATIC_CONFIG_SPARE_2 0x0041
164#define LR4_SD_CONFIG_RESET_STAGES_MSB 0x0042
165#define LR4_SD_CONFIG_RESET_STAGES_LSB 0x0043
166#define LR4_GPH_CONFIG_STREAM_COUNT_UPDATE_VALUE 0x0044
167#define LR4_GLOBAL_CONFIG_STREAM_DIVIDER 0x0045
168#define LR4_SYSTEM_INTERRUPT_CONFIG_GPIO 0x0046
169#define LR4_CAL_CONFIG_VCSEL_START 0x0047
170#define LR4_CAL_CONFIG_REPEAT_RATE 0x0048
171#define LR4_CAL_CONFIG_REPEAT_RATE_HI 0x0048
172#define LR4_CAL_CONFIG_REPEAT_RATE_LO 0x0049
173#define LR4_GLOBAL_CONFIG_VCSEL_WIDTH 0x004A
174#define LR4_PHASECAL_CONFIG_TIMEOUT_MACROP 0x004B
175#define LR4_PHASECAL_CONFIG_TARGET 0x004C
176#define LR4_PHASECAL_CONFIG_OVERRIDE 0x004D
177#define LR4_DSS_CONFIG_ROI_MODE_CONTROL 0x004F
178#define LR4_SYSTEM_THRESH_RATE_HIGH 0x0050
179#define LR4_SYSTEM_THRESH_RATE_HIGH_HI 0x0050
180#define LR4_SYSTEM_THRESH_RATE_HIGH_LO 0x0051
181#define LR4_SYSTEM_THRESH_RATE_LOW 0x0052
182#define LR4_SYSTEM_THRESH_RATE_LOW_HI 0x0052
183#define LR4_SYSTEM_THRESH_RATE_LOW_LO 0x0053
184#define LR4_DSS_CONFIG_MANUAL_EFFECTIVE_SPADS_SELECT 0x0054
185#define LR4_DSS_CONFIG_MANUAL_EFFECTIVE_SPADS_SELECT_HI 0x0054
186#define LR4_DSS_CONFIG_MANUAL_EFFECTIVE_SPADS_SELECT_LO 0x0055
187#define LR4_DSS_CONFIG_MANUAL_BLOCK_SELECT 0x0056
188#define LR4_DSS_CONFIG_APERTURE_ATTENUATION 0x0057
189#define LR4_DSS_CONFIG_MAX_SPADS_LIMIT 0x0058
190#define LR4_DSS_CONFIG_MIN_SPADS_LIMIT 0x0059
191#define LR4_MM_CONFIG_TIMEOUT_MACROP_A_HI 0x005A
192#define LR4_MM_CONFIG_TIMEOUT_MACROP_A_LO 0x005B
193#define LR4_MM_CONFIG_TIMEOUT_MACROP_B_HI 0x005C
194#define LR4_MM_CONFIG_TIMEOUT_MACROP_B_LO 0x005D
195#define LR4_RANGE_CONFIG_TIMEOUT_MACROP_A_HI 0x005E
196#define LR4_RANGE_CONFIG_TIMEOUT_MACROP_A_LO 0x005F
197#define LR4_RANGE_CONFIG_VCSEL_PERIOD_A 0x0060
198#define LR4_RANGE_CONFIG_TIMEOUT_MACROP_B_HI 0x0061
199#define LR4_RANGE_CONFIG_TIMEOUT_MACROP_B_LO 0x0062
200#define LR4_RANGE_CONFIG_VCSEL_PERIOD_B 0x0063
201#define LR4_RANGE_CONFIG_SIGMA_THRESH 0x0064
202#define LR4_RANGE_CONFIG_SIGMA_THRESH_HI 0x0064
203#define LR4_RANGE_CONFIG_SIGMA_THRESH_LO 0x0065
204#define LR4_RANGE_CONFIG_MIN_COUNT_RATE_RTN_LIMIT_MCPS 0x0066
205#define LR4_RANGE_CONFIG_MIN_COUNT_RATE_RTN_LIMIT_MCPS_HI 0x0066
206#define LR4_RANGE_CONFIG_MIN_COUNT_RATE_RTN_LIMIT_MCPS_LO 0x0067
207#define LR4_RANGE_CONFIG_VALID_PHASE_LOW 0x0068
208#define LR4_RANGE_CONFIG_VALID_PHASE_HIGH 0x0069
209#define LR4_SYSTEM_INTERMEASUREMENT_PERIOD 0x006C
210#define LR4_SYSTEM_INTERMEASUREMENT_PERIOD_3 0x006C
211#define LR4_SYSTEM_INTERMEASUREMENT_PERIOD_2 0x006D
212#define LR4_SYSTEM_INTERMEASUREMENT_PERIOD_1 0x006E
213#define LR4_SYSTEM_INTERMEASUREMENT_PERIOD_0 0x006F
214#define LR4_SYSTEM_FRACTIONAL_ENABLE 0x0070
215#define LR4_SYSTEM_GROUPED_PARAMETER_HOLD_0 0x0071
216#define LR4_SYSTEM_THRESH_HIGH 0x0072
217#define LR4_SYSTEM_THRESH_HIGH_HI 0x0072
218#define LR4_SYSTEM_THRESH_HIGH_LO 0x0073
219#define LR4_SYSTEM_THRESH_LOW 0x0074
220#define LR4_SYSTEM_THRESH_LOW_HI 0x0074
221#define LR4_SYSTEM_THRESH_LOW_LO 0x0075
222#define LR4_SYSTEM_ENABLE_XTALK_PER_QUADRANT 0x0076
223#define LR4_SYSTEM_SEED_CONFIG 0x0077
224#define LR4_SD_CONFIG_WOI_SD0 0x0078
225#define LR4_SD_CONFIG_WOI_SD1 0x0079
226#define LR4_SD_CONFIG_INITIAL_PHASE_SD0 0x007A
227#define LR4_SD_CONFIG_INITIAL_PHASE_SD1 0x007B
228#define LR4_SYSTEM_GROUPED_PARAMETER_HOLD_1 0x007C
229#define LR4_SD_CONFIG_FIRST_ORDER_SELECT 0x007D
230#define LR4_SD_CONFIG_QUANTIFIER 0x007E
231#define LR4_ROI_CONFIG_USER_ROI_CENTRE_SPAD 0x007F
232#define LR4_ROI_CONFIG_USER_ROI_REQUESTED_GLOBAL_XY_SIZE 0x0080
233#define LR4_SYSTEM_SEQUENCE_CONFIG 0x0081
234#define LR4_SYSTEM_GROUPED_PARAMETER_HOLD 0x0082
235#define LR4_POWER_MANAGEMENT_GO1_POWER_FORCE 0x0083
236#define LR4_SYSTEM_STREAM_COUNT_CTRL 0x0084
237#define LR4_FIRMWARE_ENABLE 0x0085
238#define LR4_SYSTEM_INTERRUPT_CLEAR 0x0086
239#define LR4_SYSTEM_MODE_START 0x0087
246#define LR4_RESULT_INTERRUPT_STATUS 0x0088
247#define LR4_RESULT_RANGE_STATUS 0x0089
248#define LR4_RESULT_REPORT_STATUS 0x008A
249#define LR4_RESULT_STREAM_COUNT 0x008B
250#define LR4_RESULT_DSS_ACTUAL_EFFECTIVE_SPADS_SD0 0x008C
251#define LR4_RESULT_DSS_ACTUAL_EFFECTIVE_SPADS_SD0_HI 0x008C
252#define LR4_RESULT_DSS_ACTUAL_EFFECTIVE_SPADS_SD0_LO 0x008D
253#define LR4_RESULT_PEAK_SIGNAL_COUNT_RATE_MCPS_SD0 0x008E
254#define LR4_RESULT_PEAK_SIGNAL_COUNT_RATE_MCPS_SD0_HI 0x008E
255#define LR4_RESULT_PEAK_SIGNAL_COUNT_RATE_MCPS_SD0_LO 0x008F
256#define LR4_RESULT_AMBIENT_COUNT_RATE_MCPS_SD0 0x0090
257#define LR4_RESULT_AMBIENT_COUNT_RATE_MCPS_SD0_HI 0x0090
258#define LR4_RESULT_AMBIENT_COUNT_RATE_MCPS_SD0_LO 0x0091
259#define LR4_RESULT_SIGMA_SD0 0x0092
260#define LR4_RESULT_SIGMA_SD0_HI 0x0092
261#define LR4_RESULT_SIGMA_SD0_LO 0x0093
262#define LR4_RESULT_PHASE_SD0 0x0094
263#define LR4_RESULT_PHASE_SD0_HI 0x0094
264#define LR4_RESULT_PHASE_SD0_LO 0x0095
265#define LR4_RESULT_FINAL_CROSSTALK_CORRECTED_RANGE_MM_SD0 0x0096
266#define LR4_RESULT_FINAL_CROSSTALK_CORRECTED_RANGE_MM_SD0_HI 0x009
267#define LR4_RESULT_FINAL_CROSSTALK_CORRECTED_RANGE_MM_SD0_LO 0x0097
268#define LR4_RESULT_PEAK_SIGNAL_COUNT_RATE_CROSSTALK_CORRECTED_MCPS_SD0 0x0098
269#define LR4_RESULT_PEAK_SIGNAL_COUNT_RATE_CROSSTALK_CORRECTED_MCPS_SD0_HI 0x0098
270#define LR4_RESULT_PEAK_SIGNAL_COUNT_RATE_CROSSTALK_CORRECTED_MCPS_SD0_LO 0x0099
271#define LR4_RESULT_MM_INNER_ACTUAL_EFFECTIVE_SPADS_SD0 0x009A
272#define LR4_RESULT_MM_INNER_ACTUAL_EFFECTIVE_SPADS_SD0_HI 0x009A
273#define LR4_RESULT_MM_INNER_ACTUAL_EFFECTIVE_SPADS_SD0_LO 0x009B
274#define LR4_RESULT_MM_OUTER_ACTUAL_EFFECTIVE_SPADS_SD0 0x009C
275#define LR4_RESULT_MM_OUTER_ACTUAL_EFFECTIVE_SPADS_SD0_HI 0x009C
276#define LR4_RESULT_MM_OUTER_ACTUAL_EFFECTIVE_SPADS_SD0_LO 0x009D
277#define LR4_RESULT_AVG_SIGNAL_COUNT_RATE_MCPS_SD0 0x009E
278#define LR4_RESULT_AVG_SIGNAL_COUNT_RATE_MCPS_SD0_HI 0x009E
279#define LR4_RESULT_AVG_SIGNAL_COUNT_RATE_MCPS_SD0_LO 0x009F
280#define LR4_RESULT_DSS_ACTUAL_EFFECTIVE_SPADS_SD1 0x00A0
281#define LR4_RESULT_DSS_ACTUAL_EFFECTIVE_SPADS_SD1_HI 0x00A0
282#define LR4_RESULT_DSS_ACTUAL_EFFECTIVE_SPADS_SD1_LO 0x00A1
283#define LR4_RESULT_PEAK_SIGNAL_COUNT_RATE_MCPS_SD1 0x00A2
284#define LR4_RESULT_PEAK_SIGNAL_COUNT_RATE_MCPS_SD1_HI 0x00A2
285#define LR4_RESULT_PEAK_SIGNAL_COUNT_RATE_MCPS_SD1_LO 0x00A3
286#define LR4_RESULT_AMBIENT_COUNT_RATE_MCPS_SD1 0x00A4
287#define LR4_RESULT_AMBIENT_COUNT_RATE_MCPS_SD1_HI 0x00A4
288#define LR4_RESULT_AMBIENT_COUNT_RATE_MCPS_SD1_LO 0x00A5
289#define LR4_RESULT_SIGMA_SD1 0x00A6
290#define LR4_RESULT_SIGMA_SD1_HI 0x00A6
291#define LR4_RESULT_SIGMA_SD1_LO 0x00A7
292#define LR4_RESULT_PHASE_SD1 0x00A8
293#define LR4_RESULT_PHASE_SD1_HI 0x00A8
294#define LR4_RESULT_PHASE_SD1_LO 0x00A9
295#define LR4_RESULT_FINAL_CROSSTALK_CORRECTED_RANGE_MM_SD1 0x00AA
296#define LR4_RESULT_FINAL_CROSSTALK_CORRECTED_RANGE_MM_SD1_HI 0x00AA
297#define LR4_RESULT_FINAL_CROSSTALK_CORRECTED_RANGE_MM_SD1_LO 0x00AB
298#define LR4_RESULT_SPARE_0_SD1 0x00AC
299#define LR4_RESULT_SPARE_0_SD1_HI 0x00AC
300#define LR4_RESULT_SPARE_0_SD1_LO 0x00AD
301#define LR4_RESULT_SPARE_1_SD1 0x00AE
302#define LR4_RESULT_SPARE_1_SD1_HI 0x00AE
303#define LR4_RESULT_SPARE_1_SD1_LO 0x00AF
304#define LR4_RESULT_SPARE_2_SD1 0x00B0
305#define LR4_RESULT_SPARE_2_SD1_HI 0x00B0
306#define LR4_RESULT_SPARE_2_SD1_LO 0x00B1
307#define LR4_RESULT_SPARE_3_SD1 0x00B2
308#define LR4_RESULT_THRESH_INFO 0x00B3
315#define LR4_RESULT_CORE_AMBIENT_WINDOW_EVENTS_SD0 0x00B4
316#define LR4_RESULT_CORE_AMBIENT_WINDOW_EVENTS_SD0_3 0x00B4
317#define LR4_RESULT_CORE_AMBIENT_WINDOW_EVENTS_SD0_2 0x00B5
318#define LR4_RESULT_CORE_AMBIENT_WINDOW_EVENTS_SD0_1 0x00B6
319#define LR4_RESULT_CORE_AMBIENT_WINDOW_EVENTS_SD0_0 0x00B7
320#define LR4_RESULT_CORE_RANGING_TOTAL_EVENTS_SD0 0x00B8
321#define LR4_RESULT_CORE_RANGING_TOTAL_EVENTS_SD0_3 0x00B8
322#define LR4_RESULT_CORE_RANGING_TOTAL_EVENTS_SD0_2 0x00B9
323#define LR4_RESULT_CORE_RANGING_TOTAL_EVENTS_SD0_1 0x00BA
324#define LR4_RESULT_CORE_RANGING_TOTAL_EVENTS_SD0_0 0x00BB
325#define LR4_RESULT_CORE_SIGNAL_TOTAL_EVENTS_SD0 0x00BC
326#define LR4_RESULT_CORE_SIGNAL_TOTAL_EVENTS_SD0_3 0x00BC
327#define LR4_RESULT_CORE_SIGNAL_TOTAL_EVENTS_SD0_2 0x00BD
328#define LR4_RESULT_CORE_SIGNAL_TOTAL_EVENTS_SD0_1 0x00BE
329#define LR4_RESULT_CORE_SIGNAL_TOTAL_EVENTS_SD0_0 0x00BF
330#define LR4_RESULT_CORE_TOTAL_PERIODS_ELAPSED_SD0 0x00C0
331#define LR4_RESULT_CORE_TOTAL_PERIODS_ELAPSED_SD0_3 0x00C0
332#define LR4_RESULT_CORE_TOTAL_PERIODS_ELAPSED_SD0_2 0x00C1
333#define LR4_RESULT_CORE_TOTAL_PERIODS_ELAPSED_SD0_1 0x00C2
334#define LR4_RESULT_CORE_TOTAL_PERIODS_ELAPSED_SD0_0 0x00C3
335#define LR4_RESULT_CORE_AMBIENT_WINDOW_EVENTS_SD1 0x00C4
336#define LR4_RESULT_CORE_AMBIENT_WINDOW_EVENTS_SD1_3 0x00C4
337#define LR4_RESULT_CORE_AMBIENT_WINDOW_EVENTS_SD1_2 0x00C5
338#define LR4_RESULT_CORE_AMBIENT_WINDOW_EVENTS_SD1_1 0x00C6
339#define LR4_RESULT_CORE_AMBIENT_WINDOW_EVENTS_SD1_0 0x00C7
340#define LR4_RESULT_CORE_RANGING_TOTAL_EVENTS_SD1 0x00C8
341#define LR4_RESULT_CORE_RANGING_TOTAL_EVENTS_SD1_3 0x00C8
342#define LR4_RESULT_CORE_RANGING_TOTAL_EVENTS_SD1_2 0x00C9
343#define LR4_RESULT_CORE_RANGING_TOTAL_EVENTS_SD1_1 0x00CA
344#define LR4_RESULT_CORE_RANGING_TOTAL_EVENTS_SD1_0 0x00CB
345#define LR4_RESULT_CORE_SIGNAL_TOTAL_EVENTS_SD1 0x00CC
346#define LR4_RESULT_CORE_SIGNAL_TOTAL_EVENTS_SD1_3 0x00CC
347#define LR4_RESULT_CORE_SIGNAL_TOTAL_EVENTS_SD1_2 0x00CD
348#define LR4_RESULT_CORE_SIGNAL_TOTAL_EVENTS_SD1_1 0x00CE
349#define LR4_RESULT_CORE_SIGNAL_TOTAL_EVENTS_SD1_0 0x00CF
350#define LR4_RESULT_CORE_TOTAL_PERIODS_ELAPSED_SD1 0x00D0
351#define LR4_RESULT_CORE_TOTAL_PERIODS_ELAPSED_SD1_3 0x00D0
352#define LR4_RESULT_CORE_TOTAL_PERIODS_ELAPSED_SD1_2 0x00D1
353#define LR4_RESULT_CORE_TOTAL_PERIODS_ELAPSED_SD1_1 0x00D2
354#define LR4_RESULT_CORE_TOTAL_PERIODS_ELAPSED_SD1_0 0x00D3
355#define LR4_RESULT_CORE_SPARE_0 0x00D4
362#define LR4_PHASECAL_RESULT_REFERENCE_PHASE 0x00D6
363#define LR4_PHASECAL_RESULT_REFERENCE_PHASE_HI 0x00D6
364#define LR4_PHASECAL_RESULT_REFERENCE_PHASE_LO 0x00D7
365#define LR4_PHASECAL_RESULT_VCSEL_START 0x00D8
366
367
368#define LR4_REF_SPAD_CHAR_RESULT__NUM_ACTUAL_REF_SPADS 0x00D9
369#define LR4_REF_SPAD_CHAR_RESULT__REF_LOCATION 0x00DA
370#define LR4_VHV_RESULT_COLDBOOT_STATUS 0x00DB
371#define LR4_VHV_RESULT_SEARCH_RESULT 0x00DC
372#define LR4_VHV_RESULT_LATEST_SETTING 0x00DD
373#define LR4_RESULT_OSC_CALIBRATE_VAL 0x00DE
374#define LR4_RESULT_OSC_CALIBRATE_VAL_HI 0x00DE
375#define LR4_RESULT_OSC_CALIBRATE_VAL_LO 0x00DF
376#define LR4_ANA_CONFIG_POWERDOWN_GO1 0x00E0
377#define LR4_ANA_CONFIG_REF_BG_CTRL 0x00E1
378#define LR4_ANA_CONFIG_REGDVDD1V2_CTRL 0x00E2
379#define LR4_ANA_CONFIG_OSC_SLOW_CTRL 0x00E3
380#define LR4_TEST_MODE_STATUS 0x00E4
387#define LR4_FIRMWARE_SYSTEM_STATUS 0x00E5
388#define LR4_FIRMWARE_MODE_STATUS 0x00E6
389#define LR4_FIRMWARE_SECONDARY_MODE_STATUS 0x00E7
390#define LR4_FIRMWARE_CAL_REPEAT_RATE_COUNTER 0x00E8
391#define LR4_FIRMWARE_CAL_REPEAT_RATE_COUNTER_HI 0x00E8
392#define LR4_FIRMWARE_CAL_REPEAT_RATE_COUNTER_LO 0x00E9
393#define LR4_FIRMWARE_HISTOGRAM_BIN 0x00EA
400#define LR4_GPH_SYSTEM_THRESH_HIGH 0x00EC
401#define LR4_GPH_SYSTEM_THRESH_HIGH_HI 0x00EC
402#define LR4_GPH_SYSTEM_THRESH_HIGH_LO 0x00ED
403#define LR4_GPH_SYSTEM_THRESH_LOW 0x00EE
404#define LR4_GPH_SYSTEM_THRESH_LOW_HI 0x00EE
405#define LR4_GPH_SYSTEM_THRESH_LOW_LO 0x00EF
406#define LR4_GPH_SYSTEM_ENABLE_XTALK_PER_QUADRANT 0x00F0
407
408#define LR4_GPH_SPARE_0 0x00F1
409#define LR4_GPH_SD_CONFIG_WOI_SD0 0x00F2
410#define LR4_GPH_SD_CONFIG_WOI_SD1 0x00F3
411#define LR4_GPH_SD_CONFIG_INITIAL_PHASE_SD0 0x00F4
412#define LR4_GPH_SD_CONFIG_INITIAL_PHASE_SD1 0x00F5
413#define LR4_GPH_SD_CONFIG_FIRST_ORDER_SELECT 0x00F6
414#define LR4_GPH_SD_CONFIG_QUANTIFIER 0x00F7
415#define LR4_GPH_ROI_CONFIG_USER_ROI_CENTRE_SPAD 0x00F8
416#define LR4_GPH_ROI_CONFIG_USER_ROI_REQUESTED_GLOBAL_XY_SIZE 0x00F9
417#define LR4_GPH_SYSTEM_SEQUENCE_CONFIG 0x00FA
418#define LR4_GPH_GPH_ID 0x00FB
419
420
421#define LR4_SYSTEM_INTERRUPT_SET 0x00FC
422#define LR4_INTERRUPT_MANAGER_ENABLES 0x00FD
423#define LR4_INTERRUPT_MANAGER_CLEAR 0x00FE
424#define LR4_INTERRUPT_MANAGER_STATUS 0x00FF
425#define LR4_MCU_TO_HOST_BANK_WR_ACCESS_EN 0x0100
426#define LR4_POWER_MANAGEMENT_GO1_RESET_STATUS 0x0101
427#define LR4_PAD_STARTUP_MODE_VALUE_RO 0x0102
428#define LR4_PAD_STARTUP_MODE_VALUE_CTRL 0x0103
429#define LR4_PLL_PERIOD_US 0x0104
430#define LR4_PLL_PERIOD_US_3 0x0104
431#define LR4_PLL_PERIOD_US_2 0x0105
432#define LR4_PLL_PERIOD_US_1 0x0106
433#define LR4_PLL_PERIOD_US_0 0x0107
434#define LR4_INTERRUPT_SCHEDULER_DATA_OUT 0x0108
435#define LR4_INTERRUPT_SCHEDULER_DATA_OUT_3 0x0108
436#define LR4_INTERRUPT_SCHEDULER_DATA_OUT_2 0x0109
437#define LR4_INTERRUPT_SCHEDULER_DATA_OUT_1 0x010A
438#define LR4_INTERRUPT_SCHEDULER_DATA_OUT_0 0x010B
439#define LR4_NVM_BIST_COMPLETE 0x010C
440#define LR4_NVM_BIST_STATUS 0x010D
447#define LR4_IDENTIFICATION_MODEL_ID 0x010F
448#define LR4_IDENTIFICATION_MODULE_TYPE 0x0110
449#define LR4_IDENTIFICATION_REVISION_ID 0x0111
450#define LR4_IDENTIFICATION_MODULE_ID 0x0112
451#define LR4_IDENTIFICATION_MODULE_ID_HI 0x0112
452#define LR4_IDENTIFICATION_MODULE_ID_LO 0x0113
459#define LR4_ANA_CONFIG_FAST_OSC__TRIM_MAX 0x0114
460#define LR4_ANA_CONFIG_FAST_OSC__FREQ_SET 0x0115
461#define LR4_ANA_CONFIG_VCSEL_TRIM 0x0116
462#define LR4_ANA_CONFIG_VCSEL_SELION 0x0117
463#define LR4_ANA_CONFIG_VCSEL_SELION_MAX 0x0118
470#define LR4_PROTECTED_LASER_SAFETY__LOCK_BIT 0x0119
471#define LR4_LASER_SAFETY_KEY 0x011A
472#define LR4_LASER_SAFETY_KEY_RO 0x011B
473#define LR4_LASER_SAFETY_CLIP 0x011C
474#define LR4_LASER_SAFETY_MULT 0x011D
481#define LR4_GLOBAL_CONFIG_SPAD_ENABLES_RTN_0 0x011E
482#define LR4_GLOBAL_CONFIG_SPAD_ENABLES_RTN_1 0x011F
483#define LR4_GLOBAL_CONFIG_SPAD_ENABLES_RTN_2 0x0120
484#define LR4_GLOBAL_CONFIG_SPAD_ENABLES_RTN_3 0x0121
485#define LR4_GLOBAL_CONFIG_SPAD_ENABLES_RTN_4 0x0122
486#define LR4_GLOBAL_CONFIG_SPAD_ENABLES_RTN_5 0x0123
487#define LR4_GLOBAL_CONFIG_SPAD_ENABLES_RTN_6 0x0124
488#define LR4_GLOBAL_CONFIG_SPAD_ENABLES_RTN_7 0x0125
489#define LR4_GLOBAL_CONFIG_SPAD_ENABLES_RTN_8 0x0126
490#define LR4_GLOBAL_CONFIG_SPAD_ENABLES_RTN_9 0x0127
491#define LR4_GLOBAL_CONFIG_SPAD_ENABLES_RTN_10 0x0128
492#define LR4_GLOBAL_CONFIG_SPAD_ENABLES_RTN_11 0x0129
493#define LR4_GLOBAL_CONFIG_SPAD_ENABLES_RTN_12 0x012A
494#define LR4_GLOBAL_CONFIG_SPAD_ENABLES_RTN_13 0x012B
495#define LR4_GLOBAL_CONFIG_SPAD_ENABLES_RTN_14 0x012C
496#define LR4_GLOBAL_CONFIG_SPAD_ENABLES_RTN_15 0x012D
497#define LR4_GLOBAL_CONFIG_SPAD_ENABLES_RTN_16 0x012E
498#define LR4_GLOBAL_CONFIG_SPAD_ENABLES_RTN_17 0x012F
499#define LR4_GLOBAL_CONFIG_SPAD_ENABLES_RTN_18 0x0130
500#define LR4_GLOBAL_CONFIG_SPAD_ENABLES_RTN_19 0x0131
501#define LR4_GLOBAL_CONFIG_SPAD_ENABLES_RTN_20 0x0132
502#define LR4_GLOBAL_CONFIG_SPAD_ENABLES_RTN_21 0x0133
503#define LR4_GLOBAL_CONFIG_SPAD_ENABLES_RTN_22 0x0134
504#define LR4_GLOBAL_CONFIG_SPAD_ENABLES_RTN_23 0x0135
505#define LR4_GLOBAL_CONFIG_SPAD_ENABLES_RTN_24 0x0136
506#define LR4_GLOBAL_CONFIG_SPAD_ENABLES_RTN_25 0x0137
507#define LR4_GLOBAL_CONFIG_SPAD_ENABLES_RTN_26 0x0138
508#define LR4_GLOBAL_CONFIG_SPAD_ENABLES_RTN_27 0x0139
509#define LR4_GLOBAL_CONFIG_SPAD_ENABLES_RTN_28 0x013A
510#define LR4_GLOBAL_CONFIG_SPAD_ENABLES_RTN_29 0x013B
511#define LR4_GLOBAL_CONFIG_SPAD_ENABLES_RTN_30 0x013C
512#define LR4_GLOBAL_CONFIG_SPAD_ENABLES_RTN_31 0x013D
519#define LR4_ROI_CONFIG_MODE_ROI_CENTRE_SPAD 0x013E
520#define LR4_ROI_CONFIG_MODE_ROI_XY_SIZE 0x013F
521
522#define LR4_GO2_HOST_BANK_ACCESS_OVERRIDE 0x0300
529#define LR4_MCU_UTIL_MULTIPLIER_MULTIPLICAND 0x0400
530#define LR4_MCU_UTIL_MULTIPLIER_MULTIPLICAND_3 0x0400
531#define LR4_MCU_UTIL_MULTIPLIER_MULTIPLICAND_2 0x0401
532#define LR4_MCU_UTIL_MULTIPLIER_MULTIPLICAND_1 0x0402
533#define LR4_MCU_UTIL_MULTIPLIER_MULTIPLICAND_0 0x0403
534#define LR4_MCU_UTIL_MULTIPLIER_MULTIPLIER 0x0404
535#define LR4_MCU_UTIL_MULTIPLIER_MULTIPLIER_3 0x0404
536#define LR4_MCU_UTIL_MULTIPLIER_MULTIPLIER_2 0x0405
537#define LR4_MCU_UTIL_MULTIPLIER_MULTIPLIER_1 0x0406
538#define LR4_MCU_UTIL_MULTIPLIER_MULTIPLIER_0 0x0407
539#define LR4_MCU_UTIL_MULTIPLIER_PRODUCT_HI 0x0408
540#define LR4_MCU_UTIL_MULTIPLIER_PRODUCT_HI_3 0x0408
541#define LR4_MCU_UTIL_MULTIPLIER_PRODUCT_HI_2 0x0409
542#define LR4_MCU_UTIL_MULTIPLIER_PRODUCT_HI_1 0x040A
543#define LR4_MCU_UTIL_MULTIPLIER_PRODUCT_HI_0 0x040B
544#define LR4_MCU_UTIL_MULTIPLIER_PRODUCT_LO 0x040C
545#define LR4_MCU_UTIL_MULTIPLIER_PRODUCT_LO_3 0x040C
546#define LR4_MCU_UTIL_MULTIPLIER_PRODUCT_LO_2 0x040D
547#define LR4_MCU_UTIL_MULTIPLIER_PRODUCT_LO_1 0x040E
548#define LR4_MCU_UTIL_MULTIPLIER_PRODUCT_LO_0 0x040F
549#define LR4_MCU_UTIL_MULTIPLIER_START 0x0410
550#define LR4_MCU_UTIL_MULTIPLIER_STATUS 0x0411
557#define LR4_MCU_UTIL_DIVIDER_START 0x0412
558#define LR4_MCU_UTIL_DIVIDER_STATUS 0x0413
559#define LR4_MCU_UTIL_DIVIDER_DIVIDEND 0x0414
560#define LR4_MCU_UTIL_DIVIDER_DIVIDEND_3 0x0414
561#define LR4_MCU_UTIL_DIVIDER_DIVIDEND_2 0x0415
562#define LR4_MCU_UTIL_DIVIDER_DIVIDEND_1 0x0416
563#define LR4_MCU_UTIL_DIVIDER_DIVIDEND_0 0x0417
564#define LR4_MCU_UTIL_DIVIDER_DIVISOR 0x0418
565#define LR4_MCU_UTIL_DIVIDER_DIVISOR_3 0x0418
566#define LR4_MCU_UTIL_DIVIDER_DIVISOR_2 0x0419
567#define LR4_MCU_UTIL_DIVIDER_DIVISOR_1 0x041A
568#define LR4_MCU_UTIL_DIVIDER_DIVISOR_0 0x041B
569#define LR4_MCU_UTIL_DIVIDER_QUOTIENT 0x041C
570#define LR4_MCU_UTIL_DIVIDER_QUOTIENT_3 0x041C
571#define LR4_MCU_UTIL_DIVIDER_QUOTIENT_2 0x041D
572#define LR4_MCU_UTIL_DIVIDER_QUOTIENT_1 0x041E
573#define LR4_MCU_UTIL_DIVIDER_QUOTIENT_0 0x041F
580#define LR4_TIMER0_VALUE_IN 0x0420
581#define LR4_TIMER0_VALUE_IN_3 0x0420
582#define LR4_TIMER0_VALUE_IN_2 0x0421
583#define LR4_TIMER0_VALUE_IN_1 0x0422
584#define LR4_TIMER0_VALUE_IN_0 0x0423
585#define LR4_TIMER1_VALUE_IN 0x0424
586#define LR4_TIMER1_VALUE_IN_3 0x0424
587#define LR4_TIMER1_VALUE_IN_2 0x0425
588#define LR4_TIMER1_VALUE_IN_1 0x0426
589#define LR4_TIMER1_VALUE_IN_0 0x0427
590#define LR4_TIMER0_CTRL 0x0428
591#define LR4_TIMER1_CTRL 0x0429
598#define LR4_MCU_GENERAL_PURPOSE_GP_0 0x042C
599#define LR4_MCU_GENERAL_PURPOSE_GP_1 0x042D
600#define LR4_MCU_GENERAL_PURPOSE_GP_2 0x042E
601#define LR4_MCU_GENERAL_PURPOSE_GP_3 0x042F
608#define LR4_MCU_RANGE_CALC_CONFIG 0x0430
609#define LR4_MCU_RANGE_CALC_OFFSET_CORRECTED_RANGE 0x0432
610#define LR4_MCU_RANGE_CALC_OFFSET_CORRECTED_RANGE_HI 0x0432
611#define LR4_MCU_RANGE_CALC_OFFSET_CORRECTED_RANGE_LO 0x0433
612#define LR4_MCU_RANGE_CALC_SPARE_4 0x0434
613#define LR4_MCU_RANGE_CALC_SPARE_4_3 0x0434
614#define LR4_MCU_RANGE_CALC_SPARE_4_2 0x0435
615#define LR4_MCU_RANGE_CALC_SPARE_4_1 0x0436
616#define LR4_MCU_RANGE_CALC_SPARE_4_0 0x0437
617#define LR4_MCU_RANGE_CALC_AMBIENT_DURATION_PRE_CALC 0x0438
618#define LR4_MCU_RANGE_CALC_AMBIENT_DURATION_PRE_CALC_HI 0x0438
619#define LR4_MCU_RANGE_CALC_AMBIENT_DURATION_PRE_CALC_LO 0x0439
620#define LR4_MCU_RANGE_CALC_ALGO_VCSEL_PERIOD 0x043C
621#define LR4_MCU_RANGE_CALC_SPARE_5 0x043D
622#define LR4_MCU_RANGE_CALC_ALGO_TOTAL_PERIODS 0x043E
623#define LR4_MCU_RANGE_CALC_ALGO_TOTAL_PERIODS_HI 0x043E
624#define LR4_MCU_RANGE_CALC_ALGO_TOTAL_PERIODS_LO 0x043F
625#define LR4_MCU_RANGE_CALC_ALGO_ACCUM_PHASE 0x0440
626#define LR4_MCU_RANGE_CALC_ALGO_ACCUM_PHASE_3 0x0440
627#define LR4_MCU_RANGE_CALC_ALGO_ACCUM_PHASE_2 0x0441
628#define LR4_MCU_RANGE_CALC_ALGO_ACCUM_PHASE_1 0x0442
629#define LR4_MCU_RANGE_CALC_ALGO_ACCUM_PHASE_0 0x0443
630#define LR4_MCU_RANGE_CALC_ALGO_SIGNAL_EVENTS 0x0444
631#define LR4_MCU_RANGE_CALC_ALGO_SIGNAL_EVENTS_3 0x0444
632#define LR4_MCU_RANGE_CALC_ALGO_SIGNAL_EVENTS_2 0x0445
633#define LR4_MCU_RANGE_CALC_ALGO_SIGNAL_EVENTS_1 0x0446
634#define LR4_MCU_RANGE_CALC_ALGO_SIGNAL_EVENTS_0 0x0447
635#define LR4_MCU_RANGE_CALC_ALGO_AMBIENT_EVENTS 0x0448
636#define LR4_MCU_RANGE_CALC_ALGO_AMBIENT_EVENTS_3 0x0448
637#define LR4_MCU_RANGE_CALC_ALGO_AMBIENT_EVENTS_2 0x0449
638#define LR4_MCU_RANGE_CALC_ALGO_AMBIENT_EVENTS_1 0x044A
639#define LR4_MCU_RANGE_CALC_ALGO_AMBIENT_EVENTS_0 0x044B
640#define LR4_MCU_RANGE_CALC_SPARE_6 0x044C
641#define LR4_MCU_RANGE_CALC_SPARE_6_HI 0x044C
642#define LR4_MCU_RANGE_CALC_SPARE_6_LO 0x044D
643#define LR4_MCU_RANGE_CALC_ALGO_ADJUST_VCSEL_PERIOD 0x044E
644#define LR4_MCU_RANGE_CALC_ALGO_ADJUST_VCSEL_PERIOD_HI 0x044E
645#define LR4_MCU_RANGE_CALC_ALGO_ADJUST_VCSEL_PERIOD_LO 0x044F
646#define LR4_MCU_RANGE_CALC_NUM_SPADS 0x0450
647#define LR4_MCU_RANGE_CALC_NUM_SPADS_HI 0x0450
648#define LR4_MCU_RANGE_CALC_NUM_SPADS_LO 0x0451
649#define LR4_MCU_RANGE_CALC_PHASE_OUTPUT 0x0452
650#define LR4_MCU_RANGE_CALC_PHASE_OUTPUT_HI 0x0452
651#define LR4_MCU_RANGE_CALC_PHASE_OUTPUT_LO 0x0453
652#define LR4_MCU_RANGE_CALC_RATE_PER_SPAD_MCPS 0x0454
653#define LR4_MCU_RANGE_CALC_RATE_PER_SPAD_MCPS_3 0x0454
654#define LR4_MCU_RANGE_CALC_RATE_PER_SPAD_MCPS_2 0x0455
655#define LR4_MCU_RANGE_CALC_RATE_PER_SPAD_MCPS_1 0x0456
656#define LR4_MCU_RANGE_CALC_RATE_PER_SPAD_MCPS_0 0x0457
657#define LR4_MCU_RANGE_CALC_SPARE_7 0x0458
658#define LR4_MCU_RANGE_CALC_SPARE_8 0x0459
659#define LR4_MCU_RANGE_CALC_PEAK_SIGNAL_RATE_MCPS 0x045A
660#define LR4_MCU_RANGE_CALC_PEAK_SIGNAL_RATE_MCPS_HI 0x045A
661#define LR4_MCU_RANGE_CALC_PEAK_SIGNAL_RATE_MCPS_LO 0x045B
662#define LR4_MCU_RANGE_CALC_AVG_SIGNAL_RATE_MCPS 0x045C
663#define LR4_MCU_RANGE_CALC_AVG_SIGNAL_RATE_MCPS_HI 0x045C
664#define LR4_MCU_RANGE_CALC_AVG_SIGNAL_RATE_MCPS_LO 0x045D
665#define LR4_MCU_RANGE_CALC_AMBIENT_RATE_MCPS 0x045E
666#define LR4_MCU_RANGE_CALC_AMBIENT_RATE_MCPS_HI 0x045E
667#define LR4_MCU_RANGE_CALC_AMBIENT_RATE_MCPS_LO 0x045F
668#define LR4_MCU_RANGE_CALC_XTALK 0x0460
669#define LR4_MCU_RANGE_CALC_XTALK_HI 0x0460
670#define LR4_MCU_RANGE_CALC_XTALK_LO 0x0461
671#define LR4_MCU_RANGE_CALC_CALC_STATUS 0x0462
672#define LR4_MCU_RANGE_CALC_DEBUG 0x0463
673#define LR4_MCU_RANGE_CALC_PEAK_SIGNAL_RATE_XTALK_CORR_MCPS 0x0464
674#define LR4_MCU_RANGE_CALC_PEAK_SIGNAL_RATE_XTALK_CORR_MCPS_HI 0x0464
675#define LR4_MCU_RANGE_CALC_PEAK_SIGNAL_RATE_XTALK_CORR_MCPS_LO 0x0465
676#define LR4_MCU_RANGE_CALC_SPARE_0 0x0468
677#define LR4_MCU_RANGE_CALC_SPARE_1 0x0469
678#define LR4_MCU_RANGE_CALC_SPARE_2 0x046A
679#define LR4_MCU_RANGE_CALC_SPARE_3 0x046B
686#define LR4_PATCH_CTRL 0x0470
687#define LR4_PATCH_JMP_ENABLES 0x0472
688#define LR4_PATCH_JMP_ENABLES_HI 0x0472
689#define LR4_PATCH_JMP_ENABLES_LO 0x0473
690#define LR4_PATCH_DATA_ENABLES 0x0474
691#define LR4_PATCH_DATA_ENABLES_HI 0x0474
692#define LR4_PATCH_DATA_ENABLES_LO 0x0475
693#define LR4_PATCH_OFFSET_0 0x0476
694#define LR4_PATCH_OFFSET_0_HI 0x0476
695#define LR4_PATCH_OFFSET_0_LO 0x0477
696#define LR4_PATCH_OFFSET_1 0x0478
697#define LR4_PATCH_OFFSET_1_HI 0x0478
698#define LR4_PATCH_OFFSET_1_LO 0x0479
699#define LR4_PATCH_OFFSET_2 0x047A
700#define LR4_PATCH_OFFSET_2_HI 0x047A
701#define LR4_PATCH_OFFSET_2_LO 0x047B
702#define LR4_PATCH_OFFSET_3 0x047C
703#define LR4_PATCH_OFFSET_3_HI 0x047C
704#define LR4_PATCH_OFFSET_3_LO 0x047D
705#define LR4_PATCH_OFFSET_4 0x047E
706#define LR4_PATCH_OFFSET_4_HI 0x047E
707#define LR4_PATCH_OFFSET_4_LO 0x047F
708#define LR4_PATCH_OFFSET_5 0x0480
709#define LR4_PATCH_OFFSET_5_HI 0x0480
710#define LR4_PATCH_OFFSET_5_LO 0x0481
711#define LR4_PATCH_OFFSET_6 0x0482
712#define LR4_PATCH_OFFSET_6_HI 0x0482
713#define LR4_PATCH_OFFSET_6_LO 0x0483
714#define LR4_PATCH_OFFSET_7 0x0484
715#define LR4_PATCH_OFFSET_7_HI 0x0484
716#define LR4_PATCH_OFFSET_7_LO 0x0485
717#define LR4_PATCH_OFFSET_8 0x0486
718#define LR4_PATCH_OFFSET_8_HI 0x0486
719#define LR4_PATCH_OFFSET_8_LO 0x0487
720#define LR4_PATCH_OFFSET_9 0x0488
721#define LR4_PATCH_OFFSET_9_HI 0x0488
722#define LR4_PATCH_OFFSET_9_LO 0x0489
723#define LR4_PATCH_OFFSET_10 0x048A
724#define LR4_PATCH_OFFSET_10_HI 0x048A
725#define LR4_PATCH_OFFSET_10_LO 0x048B
726#define LR4_PATCH_OFFSET_11 0x048C
727#define LR4_PATCH_OFFSET_11_HI 0x048C
728#define LR4_PATCH_OFFSET_11_LO 0x048D
729#define LR4_PATCH_OFFSET_12 0x048E
730#define LR4_PATCH_OFFSET_12_HI 0x048E
731#define LR4_PATCH_OFFSET_12_LO 0x048F
732#define LR4_PATCH_OFFSET_13 0x0490
733#define LR4_PATCH_OFFSET_13_HI 0x0490
734#define LR4_PATCH_OFFSET_13_LO 0x0491
735#define LR4_PATCH_OFFSET_14 0x0492
736#define LR4_PATCH_OFFSET_14_HI 0x0492
737#define LR4_PATCH_OFFSET_14_LO 0x0493
738#define LR4_PATCH_OFFSET_15 0x0494
739#define LR4_PATCH_OFFSET_15_HI 0x0494
740#define LR4_PATCH_OFFSET_15_LO 0x0495
741#define LR4_PATCH_ADDRESS_0 0x0496
742#define LR4_PATCH_ADDRESS_0_HI 0x0496
743#define LR4_PATCH_ADDRESS_0_LO 0x0497
744#define LR4_PATCH_ADDRESS_1 0x0498
745#define LR4_PATCH_ADDRESS_1_HI 0x0498
746#define LR4_PATCH_ADDRESS_1_LO 0x0499
747#define LR4_PATCH_ADDRESS_2 0x049A
748#define LR4_PATCH_ADDRESS_2_HI 0x049A
749#define LR4_PATCH_ADDRESS_2_LO 0x049B
750#define LR4_PATCH_ADDRESS_3 0x049C
751#define LR4_PATCH_ADDRESS_3_HI 0x049C
752#define LR4_PATCH_ADDRESS_3_LO 0x049D
753#define LR4_PATCH_ADDRESS_4 0x049E
754#define LR4_PATCH_ADDRESS_4_HI 0x049E
755#define LR4_PATCH_ADDRESS_4_LO 0x049F
756#define LR4_PATCH_ADDRESS_5 0x04A0
757#define LR4_PATCH_ADDRESS_5_HI 0x04A0
758#define LR4_PATCH_ADDRESS_5_LO 0x04A1
759#define LR4_PATCH_ADDRESS_6 0x04A2
760#define LR4_PATCH_ADDRESS_6_HI 0x04A2
761#define LR4_PATCH_ADDRESS_6_LO 0x04A3
762#define LR4_PATCH_ADDRESS_7 0x04A4
763#define LR4_PATCH_ADDRESS_7_HI 0x04A4
764#define LR4_PATCH_ADDRESS_7_LO 0x04A5
765#define LR4_PATCH_ADDRESS_8 0x04A6
766#define LR4_PATCH_ADDRESS_8_HI 0x04A6
767#define LR4_PATCH_ADDRESS_8_LO 0x04A7
768#define LR4_PATCH_ADDRESS_9 0x04A8
769#define LR4_PATCH_ADDRESS_9_HI 0x04A8
770#define LR4_PATCH_ADDRESS_9_LO 0x04A9
771#define LR4_PATCH_ADDRESS_10 0x04AA
772#define LR4_PATCH_ADDRESS_10_HI 0x04AA
773#define LR4_PATCH_ADDRESS_10_LO 0x04AB
774#define LR4_PATCH_ADDRESS_11 0x04AC
775#define LR4_PATCH_ADDRESS_11_HI 0x04AC
776#define LR4_PATCH_ADDRESS_11_LO 0x04AD
777#define LR4_PATCH_ADDRESS_12 0x04AE
778#define LR4_PATCH_ADDRESS_12_HI 0x04AE
779#define LR4_PATCH_ADDRESS_12_LO 0x04AF
780#define LR4_PATCH_ADDRESS_13 0x04B0
781#define LR4_PATCH_ADDRESS_13_HI 0x04B0
782#define LR4_PATCH_ADDRESS_13_LO 0x04B1
783#define LR4_PATCH_ADDRESS_14 0x04B2
784#define LR4_PATCH_ADDRESS_14_HI 0x04B2
785#define LR4_PATCH_ADDRESS_14_LO 0x04B3
786#define LR4_PATCH_ADDRESS_15 0x04B4
787#define LR4_PATCH_ADDRESS_15_HI 0x04B4
788#define LR4_PATCH_ADDRESS_15_LO 0x04B5
789
790
791#define LR4_SPI_ASYNC_MUX_CTRL 0x04C0
792#define LR4_CLK_CONFIG 0x04C4
793#define LR4_GPIO_LV_MUX_CTRL 0x04CC
794#define LR4_GPIO_LV_PAD_CTRL 0x04CD
795#define LR4_PAD_I2C_LV_CONFIG 0x04D0
796#define LR4_PAD_STARTUP_MODE_VALUE_RO_GO1 0x04D4
797#define LR4_HOST_IF_STATUS_GO1 0x04D5
798#define LR4_MCU_CLK_GATING_CTRL 0x04D8
805#define LR4_TEST_BIST_ROM_CTRL 0x04E0
806#define LR4_TEST_BIST_ROM_RESULT 0x04E1
807#define LR4_TEST_BIST_ROM_MCU_SIG 0x04E2
808#define LR4_TEST_BIST_ROM_MCU_SIG_HI 0x04E2
809#define LR4_TEST_BIST_ROM_MCU_SIG_LO 0x04E3
810#define LR4_TEST_BIST_RAM_CTRL 0x04E4
811#define LR4_TEST_BIST_RAM_RESULT 0x04E5
812#define LR4_TEST_TMC 0x04E8
813#define LR4_TEST_PLL_BIST_MIN_THRESHOLD 0x04F0
814#define LR4_TEST_PLL_BIST_MIN_THRESHOLD_HI 0x04F0
815#define LR4_TEST_PLL_BIST_MIN_THRESHOLD_LO 0x04F1
816#define LR4_TEST_PLL_BIST_MAX_THRESHOLD 0x04F2
817#define LR4_TEST_PLL_BIST_MAX_THRESHOLD_HI 0x04F2
818#define LR4_TEST_PLL_BIST_MAX_THRESHOLD_LO 0x04F3
819#define LR4_TEST_PLL_BIST_COUNT_OUT 0x04F4
820#define LR4_TEST_PLL_BIST_COUNT_OUT_HI 0x04F4
821#define LR4_TEST_PLL_BIST_COUNT_OUT_LO 0x04F5
822#define LR4_TEST_PLL_BIST_GONOGO 0x04F6
823#define LR4_TEST_PLL_BIST_CTRL 0x04F7
830#define LR4_RANGING_CORE_DEVICE_ID 0x0680
831#define LR4_RANGING_CORE_REVISION_ID 0x0681
832#define LR4_RANGING_CORE_CLK_CTRL1 0x0683
833#define LR4_RANGING_CORE_CLK_CTRL2 0x0684
834#define LR4_RANGING_CORE_WOI_1 0x0685
835#define LR4_RANGING_CORE_WOI_REF_1 0x0686
836#define LR4_RANGING_CORE_START_RANGING 0x0687
837#define LR4_RANGING_CORE_LOW_LIMIT_1 0x0690
838#define LR4_RANGING_CORE_HIGH_LIMIT_1 0x0691
839#define LR4_RANGING_CORE_LOW_LIMIT_REF_1 0x0692
840#define LR4_RANGING_CORE_HIGH_LIMIT_REF_1 0x0693
841#define LR4_RANGING_CORE_QUANTIFIER_1_MSB 0x0694
842#define LR4_RANGING_CORE_QUANTIFIER_1_LSB 0x0695
843#define LR4_RANGING_CORE_QUANTIFIER_REF_1_MSB 0x0696
844#define LR4_RANGING_CORE_QUANTIFIER_REF_1_LSB 0x0697
845#define LR4_RANGING_CORE_AMBIENT_OFFSET_1_MSB 0x0698
846#define LR4_RANGING_CORE_AMBIENT_OFFSET_1_LSB 0x0699
847#define LR4_RANGING_CORE_AMBIENT_OFFSET_REF_1_MSB 0x069A
848#define LR4_RANGING_CORE_AMBIENT_OFFSET_REF_1_LSB 0x069B
849#define LR4_RANGING_CORE_FILTER_STRENGTH_1 0x069C
850#define LR4_RANGING_CORE_FILTER_STRENGTH_REF_1 0x069D
851#define LR4_RANGING_CORE_SIGNAL_EVENT_LIMIT_1_MSB 0x069E
852#define LR4_RANGING_CORE_SIGNAL_EVENT_LIMIT_1_LSB 0x069F
853#define LR4_RANGING_CORE_SIGNAL_EVENT_LIMIT_REF_1_MSB 0x06A0
854#define LR4_RANGING_CORE_SIGNAL_EVENT_LIMIT_REF_1_LSB 0x06A1
855#define LR4_RANGING_CORE_TIMEOUT_OVERALL_PERIODS_MSB 0x06A4
856#define LR4_RANGING_CORE_TIMEOUT_OVERALL_PERIODS_LSB 0x06A5
857#define LR4_RANGING_CORE_INVERT_HW 0x06A6
858#define LR4_RANGING_CORE_FORCE_HW 0x06A7
859#define LR4_RANGING_CORE_STATIC_HW_VALUE 0x06A8
860#define LR4_RANGING_CORE_FORCE_CONTINUOUS_AMBIENT 0x06A9
861#define LR4_RANGING_CORE_TEST_PHASE_SELECT_TO_FILTER 0x06AA
862#define LR4_RANGING_CORE_TEST_PHASE_SELECT_TO_TIMING_GEN 0x06AB
863#define LR4_RANGING_CORE_INITIAL_PHASE_VALUE_1 0x06AC
864#define LR4_RANGING_CORE_INITIAL_PHASE_VALUE_REF_1 0x06AD
865#define LR4_RANGING_CORE_FORCE_UP_IN 0x06AE
866#define LR4_RANGING_CORE_FORCE_DN_IN 0x06AF
867#define LR4_RANGING_CORE_STATIC_UP_VALUE_1 0x06B0
868#define LR4_RANGING_CORE_STATIC_UP_VALUE_REF_1 0x06B1
869#define LR4_RANGING_CORE_STATIC_DN_VALUE_1 0x06B2
870#define LR4_RANGING_CORE_STATIC_DN_VALUE_REF_1 0x06B3
871#define LR4_RANGING_CORE_MONITOR_UP_DN 0x06B4
872#define LR4_RANGING_CORE_INVERT_UP_DN 0x06B5
873#define LR4_RANGING_CORE_CPUMP_1 0x06B6
874#define LR4_RANGING_CORE_CPUMP_2 0x06B7
875#define LR4_RANGING_CORE_CPUMP_3 0x06B8
876#define LR4_RANGING_CORE_OSC_1 0x06B9
877#define LR4_RANGING_CORE_PLL_1 0x06BB
878#define LR4_RANGING_CORE_PLL_2 0x06BC
879#define LR4_RANGING_CORE_REFERENCE_1 0x06BD
880#define LR4_RANGING_CORE_REFERENCE_3 0x06BF
881#define LR4_RANGING_CORE_REFERENCE_4 0x06C0
882#define LR4_RANGING_CORE_REFERENCE_5 0x06C1
883#define LR4_RANGING_CORE_REGAVDD1V2 0x06C3
884#define LR4_RANGING_CORE_CALIB_1 0x06C4
885#define LR4_RANGING_CORE_CALIB_2 0x06C5
886#define LR4_RANGING_CORE_CALIB_3 0x06C6
887#define LR4_RANGING_CORE_TST_MUX_SEL1 0x06C9
888#define LR4_RANGING_CORE_TST_MUX_SEL2 0x06CA
889#define LR4_RANGING_CORE_TST_MUX 0x06CB
890#define LR4_RANGING_CORE_GPIO_OUT_TESTMUX 0x06CC
891#define LR4_RANGING_CORE_CUSTOM_FE 0x06CD
892#define LR4_RANGING_CORE_CUSTOM_FE_2 0x06CE
893#define LR4_RANGING_CORE_SPAD_READOUT 0x06CF
894#define LR4_RANGING_CORE_SPAD_READOUT_1 0x06D0
895#define LR4_RANGING_CORE_SPAD_READOUT_2 0x06D1
896#define LR4_RANGING_CORE_SPAD_PS 0x06D2
897#define LR4_RANGING_CORE_LASER_SAFETY_2 0x06D4
898#define LR4_RANGING_CORE_NVM_CTRL_MODE 0x0780
899#define LR4_RANGING_CORE_NVM_CTRL_PDN 0x0781
900#define LR4_RANGING_CORE_NVM_CTRL_PROGN 0x0782
901#define LR4_RANGING_CORE_NVM_CTRL_READN 0x0783
902#define LR4_RANGING_CORE_NVM_CTRL_PULSE_WIDTH_MSB 0x0784
903#define LR4_RANGING_CORE_NVM_CTRL_PULSE_WIDTH_LSB 0x0785
904#define LR4_RANGING_CORE_NVM_CTRL_HV_RISE_MSB 0x0786
905#define LR4_RANGING_CORE_NVM_CTRL_HV_RISE_LSB 0x0787
906#define LR4_RANGING_CORE_NVM_CTRL_HV_FALL_MSB 0x0788
907#define LR4_RANGING_CORE_NVM_CTRL_HV_FALL_LSB 0x0789
908#define LR4_RANGING_CORE_NVM_CTRL_TST 0x078A
909#define LR4_RANGING_CORE_NVM_CTRL_TESTREAD 0x078B
910#define LR4_RANGING_CORE_NVM_CTRL_DATAIN_MMM 0x078C
911#define LR4_RANGING_CORE_NVM_CTRL_DATAIN_LMM 0x078D
912#define LR4_RANGING_CORE_NVM_CTRL_DATAIN_LLM 0x078E
913#define LR4_RANGING_CORE_NVM_CTRL_DATAIN_LLL 0x078F
914#define LR4_RANGING_CORE_NVM_CTRL_DATAOUT_MMM 0x0790
915#define LR4_RANGING_CORE_NVM_CTRL_DATAOUT_LMM 0x0791
916#define LR4_RANGING_CORE_NVM_CTRL_DATAOUT_LLM 0x0792
917#define LR4_RANGING_CORE_NVM_CTRL_DATAOUT_LLL 0x0793
918#define LR4_RANGING_CORE_NVM_CTRL_ADDR 0x0794
919#define LR4_RANGING_CORE_NVM_CTRL_DATAOUT_ECC 0x0795
920#define LR4_RANGING_CORE_RET_SPAD_EN_0 0x0796
921#define LR4_RANGING_CORE_RET_SPAD_EN_1 0x0797
922#define LR4_RANGING_CORE_RET_SPAD_EN_2 0x0798
923#define LR4_RANGING_CORE_RET_SPAD_EN_3 0x0799
924#define LR4_RANGING_CORE_RET_SPAD_EN_4 0x079A
925#define LR4_RANGING_CORE_RET_SPAD_EN_5 0x079B
926#define LR4_RANGING_CORE_RET_SPAD_EN_6 0x079C
927#define LR4_RANGING_CORE_RET_SPAD_EN_7 0x079D
928#define LR4_RANGING_CORE_RET_SPAD_EN_8 0x079E
929#define LR4_RANGING_CORE_RET_SPAD_EN_9 0x079F
930#define LR4_RANGING_CORE_RET_SPAD_EN_10 0x07A0
931#define LR4_RANGING_CORE_RET_SPAD_EN_11 0x07A1
932#define LR4_RANGING_CORE_RET_SPAD_EN_12 0x07A2
933#define LR4_RANGING_CORE_RET_SPAD_EN_13 0x07A3
934#define LR4_RANGING_CORE_RET_SPAD_EN_14 0x07A4
935#define LR4_RANGING_CORE_RET_SPAD_EN_15 0x07A5
936#define LR4_RANGING_CORE_RET_SPAD_EN_16 0x07A6
937#define LR4_RANGING_CORE_RET_SPAD_EN_17 0x07A7
938#define LR4_RANGING_CORE_SPAD_SHIFT_EN 0x07BA
939#define LR4_RANGING_CORE_SPAD_DISABLE_CTRL 0x07BB
940#define LR4_RANGING_CORE_SPAD_EN_SHIFT_OUT_DEBUG 0x07BC
941#define LR4_RANGING_CORE_SPI_MODE 0x07BD
942#define LR4_RANGING_CORE_GPIO_DIR 0x07BE
943#define LR4_RANGING_CORE_VCSEL_PERIOD 0x0880
944#define LR4_RANGING_CORE_VCSEL_START 0x0881
945#define LR4_RANGING_CORE_VCSEL_STOP 0x0882
946#define LR4_RANGING_CORE_VCSEL_1 0x0885
947#define LR4_RANGING_CORE_VCSEL_STATUS 0x088D
948#define LR4_RANGING_CORE_STATUS 0x0980
949#define LR4_RANGING_CORE_LASER_CONTINUITY_STATE 0x0981
950#define LR4_RANGING_CORE_RANGE_1_MMM 0x0982
951#define LR4_RANGING_CORE_RANGE_1_LMM 0x0983
952#define LR4_RANGING_CORE_RANGE_1_LLM 0x0984
953#define LR4_RANGING_CORE_RANGE_1_LLL 0x0985
954#define LR4_RANGING_CORE_RANGE_REF_1_MMM 0x0986
955#define LR4_RANGING_CORE_RANGE_REF_1_LMM 0x0987
956#define LR4_RANGING_CORE_RANGE_REF_1_LLM 0x0988
957#define LR4_RANGING_CORE_RANGE_REF_1_LLL 0x0989
958#define LR4_RANGING_CORE_AMBIENT_WINDOW_EVENTS_1_MMM 0x098A
959#define LR4_RANGING_CORE_AMBIENT_WINDOW_EVENTS_1_LMM 0x098B
960#define LR4_RANGING_CORE_AMBIENT_WINDOW_EVENTS_1_LLM 0x098C
961#define LR4_RANGING_CORE_AMBIENT_WINDOW_EVENTS_1_LLL 0x098D
962#define LR4_RANGING_CORE_RANGING_TOTAL_EVENTS_1_MMM 0x098E
963#define LR4_RANGING_CORE_RANGING_TOTAL_EVENTS_1_LMM 0x098F
964#define LR4_RANGING_CORE_RANGING_TOTAL_EVENTS_1_LLM 0x0990
965#define LR4_RANGING_CORE_RANGING_TOTAL_EVENTS_1_LLL 0x0991
966#define LR4_RANGING_CORE_SIGNAL_TOTAL_EVENTS_1_MMM 0x0992
967#define LR4_RANGING_CORE_SIGNAL_TOTAL_EVENTS_1_LMM 0x0993
968#define LR4_RANGING_CORE_SIGNAL_TOTAL_EVENTS_1_LLM 0x0994
969#define LR4_RANGING_CORE_SIGNAL_TOTAL_EVENTS_1_LLL 0x0995
970#define LR4_RANGING_CORE_TOTAL_PERIODS_ELAPSED_1_MM 0x0996
971#define LR4_RANGING_CORE_TOTAL_PERIODS_ELAPSED_1_LM 0x0997
972#define LR4_RANGING_CORE_TOTAL_PERIODS_ELAPSED_1_LL 0x0998
973#define LR4_RANGING_CORE_AMBIENT_MISMATCH_MM 0x0999
974#define LR4_RANGING_CORE_AMBIENT_MISMATCH_LM 0x099A
975#define LR4_RANGING_CORE_AMBIENT_MISMATCH_LL 0x099B
976#define LR4_RANGING_CORE_AMBIENT_WINDOW_EVENTS_REF_1_MMM 0x099C
977#define LR4_RANGING_CORE_AMBIENT_WINDOW_EVENTS_REF_1_LMM 0x099D
978#define LR4_RANGING_CORE_AMBIENT_WINDOW_EVENTS_REF_1_LLM 0x099E
979#define LR4_RANGING_CORE_AMBIENT_WINDOW_EVENTS_REF_1_LLL 0x099F
980#define LR4_RANGING_CORE_RANGING_TOTAL_EVENTS_REF_1_MMM 0x09A0
981#define LR4_RANGING_CORE_RANGING_TOTAL_EVENTS_REF_1_LMM 0x09A1
982#define LR4_RANGING_CORE_RANGING_TOTAL_EVENTS_REF_1_LLM 0x09A2
983#define LR4_RANGING_CORE_RANGING_TOTAL_EVENTS_REF_1_LLL 0x09A3
984#define LR4_RANGING_CORE_SIGNAL_TOTAL_EVENTS_REF_1_MMM 0x09A4
985#define LR4_RANGING_CORE_SIGNAL_TOTAL_EVENTS_REF_1_LMM 0x09A5
986#define LR4_RANGING_CORE_SIGNAL_TOTAL_EVENTS_REF_1_LLM 0x09A6
987#define LR4_RANGING_CORE_SIGNAL_TOTAL_EVENTS_REF_1_LLL 0x09A7
988#define LR4_RANGING_CORE_TOTAL_PERIODS_ELAPSED_REF_1_MM 0x09A8
989#define LR4_RANGING_CORE_TOTAL_PERIODS_ELAPSED_REF_1_LM 0x09A9
990#define LR4_RANGING_CORE_TOTAL_PERIODS_ELAPSED_REF_1_LL 0x09AA
991#define LR4_RANGING_CORE_AMBIENT_MISMATCH_REF_MM 0x09AB
992#define LR4_RANGING_CORE_AMBIENT_MISMATCH_REF_LM 0x09AC
993#define LR4_RANGING_CORE_AMBIENT_MISMATCH_REF_LL 0x09AD
994#define LR4_RANGING_CORE_GPIO_CONFIG__A0 0x0A00
995#define LR4_RANGING_CORE_RESET_CONTROL__A0 0x0A01
996#define LR4_RANGING_CORE_INTR_MANAGER__A0 0x0A02
997#define LR4_RANGING_CORE_POWER_FSM_TIME_OSC__A0 0x0A06
998#define LR4_RANGING_CORE_VCSEL_ATEST__A0 0x0A07
999#define LR4_RANGING_CORE_VCSEL_PERIOD_CLIPPED__A0 0x0A08
1000#define LR4_RANGING_CORE_VCSEL_STOP_CLIPPED__A0 0x0A09
1001#define LR4_RANGING_CORE_CALIB_2__A0 0x0A0A
1002#define LR4_RANGING_CORE_STOP_CONDITION__A0 0x0A0B
1003#define LR4_RANGING_CORE_STATUS_RESET__A0 0x0A0C
1004#define LR4_RANGING_CORE_READOUT_CFG__A0 0x0A0D
1005#define LR4_RANGING_CORE_WINDOW_SETTING__A0 0x0A0E
1006#define LR4_RANGING_CORE_VCSEL_DELAY__A0 0x0A1A
1007#define LR4_RANGING_CORE_REFERENCE_2__A0 0x0A1B
1008#define LR4_RANGING_CORE_REGAVDD1V2__A0 0x0A1D
1009#define LR4_RANGING_CORE_TST_MUX__A0 0x0A1F
1010#define LR4_RANGING_CORE_CUSTOM_FE_2__A0 0x0A20
1011#define LR4_RANGING_CORE_SPAD_READOUT__A0 0x0A21
1012#define LR4_RANGING_CORE_CPUMP_1__A0 0x0A22
1013#define LR4_RANGING_CORE_SPARE_REGISTER__A0 0x0A23
1014#define LR4_RANGING_CORE_VCSEL_CONT_STAGE5_BYPASS__A0 0x0A24
1015#define LR4_RANGING_CORE_RET_SPAD_EN_18 0x0A25
1016#define LR4_RANGING_CORE_RET_SPAD_EN_19 0x0A26
1017#define LR4_RANGING_CORE_RET_SPAD_EN_20 0x0A27
1018#define LR4_RANGING_CORE_RET_SPAD_EN_21 0x0A28
1019#define LR4_RANGING_CORE_RET_SPAD_EN_22 0x0A29
1020#define LR4_RANGING_CORE_RET_SPAD_EN_23 0x0A2A
1021#define LR4_RANGING_CORE_RET_SPAD_EN_24 0x0A2B
1022#define LR4_RANGING_CORE_RET_SPAD_EN_25 0x0A2C
1023#define LR4_RANGING_CORE_RET_SPAD_EN_26 0x0A2D
1024#define LR4_RANGING_CORE_RET_SPAD_EN_27 0x0A2E
1025#define LR4_RANGING_CORE_RET_SPAD_EN_28 0x0A2F
1026#define LR4_RANGING_CORE_RET_SPAD_EN_29 0x0A30
1027#define LR4_RANGING_CORE_RET_SPAD_EN_30 0x0A31
1028#define LR4_RANGING_CORE_RET_SPAD_EN_31 0x0A32
1029#define LR4_RANGING_CORE_REF_SPAD_EN_0__EWOK 0x0A33
1030#define LR4_RANGING_CORE_REF_SPAD_EN_1__EWOK 0x0A34
1031#define LR4_RANGING_CORE_REF_SPAD_EN_2__EWOK 0x0A35
1032#define LR4_RANGING_CORE_REF_SPAD_EN_3__EWOK 0x0A36
1033#define LR4_RANGING_CORE_REF_SPAD_EN_4__EWOK 0x0A37
1034#define LR4_RANGING_CORE_REF_SPAD_EN_5__EWOK 0x0A38
1035#define LR4_RANGING_CORE_REF_EN_START_SELECT 0x0A39
1036#define LR4_RANGING_CORE_REGDVDD1V2_ATEST__EWOK 0x0A41
1037
1038#define LR4_SOFT_RESET_GO1 0x0B00
1039#define LR4_PRIVATE__PATCH_BASE_ADDR_RSLV 0x0E00
1046#define LR4_PREV_SHADOW_RESULT_INTERRUPT_STATUS 0x0ED0
1047#define LR4_PREV_SHADOW_RESULT_RANGE_STATUS 0x0ED1
1048#define LR4_PREV_SHADOW_RESULT_REPORT_STATUS 0x0ED2
1049#define LR4_PREV_SHADOW_RESULT_STREAM_COUNT 0x0ED3
1050#define LR4_PREV_SHADOW_RESULT_DSS_ACTUAL_EFFECTIVE_SPADS_SD0 0x0ED4
1051#define LR4_PREV_SHADOW_RESULT_DSS_ACTUAL_EFFECTIVE_SPADS_SD0_HI 0x0ED4
1052#define LR4_PREV_SHADOW_RESULT_DSS_ACTUAL_EFFECTIVE_SPADS_SD0_LO 0x0ED5
1053#define LR4_PREV_SHADOW_RESULT_PEAK_SIGNAL_COUNT_RATE_MCPS_SD0 0x0ED6
1054#define LR4_PREV_SHADOW_RESULT_PEAK_SIGNAL_COUNT_RATE_MCPS_SD0_HI 0x0ED6
1055#define LR4_PREV_SHADOW_RESULT_PEAK_SIGNAL_COUNT_RATE_MCPS_SD0_LO 0x0ED7
1056#define LR4_PREV_SHADOW_RESULT_AMBIENT_COUNT_RATE_MCPS_SD0 0x0ED8
1057#define LR4_PREV_SHADOW_RESULT_AMBIENT_COUNT_RATE_MCPS_SD0_HI 0x0ED8
1058#define LR4_PREV_SHADOW_RESULT_AMBIENT_COUNT_RATE_MCPS_SD0_LO 0x0ED9
1059#define LR4_PREV_SHADOW_RESULT_SIGMA_SD0 0x0EDA
1060#define LR4_PREV_SHADOW_RESULT_SIGMA_SD0_HI 0x0EDA
1061#define LR4_PREV_SHADOW_RESULT_SIGMA_SD0_LO 0x0EDB
1062#define LR4_PREV_SHADOW_RESULT_PHASE_SD0 0x0EDC
1063#define LR4_PREV_SHADOW_RESULT_PHASE_SD0_HI 0x0EDC
1064#define LR4_PREV_SHADOW_RESULT_PHASE_SD0_LO 0x0EDD
1065#define LR4_PREV_SHADOW_RESULT_FINAL_CROSSTALK_CORRECTED_RANGE_MM_SD0 0x0EDE
1066#define LR4_PREV_SHADOW_RESULT_FINAL_CROSSTALK_CORRECTED_RANGE_MM_SD0_HI 0x0EDE
1067#define LR4_PREV_SHADOW_RESULT_FINAL_CROSSTALK_CORRECTED_RANGE_MM_SD0_LO 0x0EDF
1068
1069#define LR4_PREV_SHADOW_RESULT_PEAK_SIGNAL_COUNT_RATE_CROSSTALK_CORRECTED_MCP 0x0EE0
1070#define LR4_PREV_SHADOW_RESULT_PEAK_SIGNAL_COUNT_RATE_CROSSTALK_CORRECTED_MCP_MSB 0x0EE0
1071#define LR4_PREV_SHADOW_RESULT_PEAK_SIGNAL_COUNT_RATE_CROSSTALK_CORRECTED_MCP_LSB 0x0EE1
1072
1073#define LR4_PREV_SHADOW_RESULT_MM_INNER_ACTUAL_EFFECTIVE_SPADS_SD0 0x0EE2
1074#define LR4_PREV_SHADOW_RESULT_MM_INNER_ACTUAL_EFFECTIVE_SPADS_SD0_HI 0x0EE2
1075#define LR4_PREV_SHADOW_RESULT_MM_INNER_ACTUAL_EFFECTIVE_SPADS_SD0_LO 0x0EE3
1076#define LR4_PREV_SHADOW_RESULT_MM_OUTER_ACTUAL_EFFECTIVE_SPADS_SD0 0x0EE4
1077#define LR4_PREV_SHADOW_RESULT_MM_OUTER_ACTUAL_EFFECTIVE_SPADS_SD0_HI 0x0EE4
1078#define LR4_PREV_SHADOW_RESULT_MM_OUTER_ACTUAL_EFFECTIVE_SPADS_SD0_LO 0x0EE5
1079#define LR4_PREV_SHADOW_RESULT_AVG_SIGNAL_COUNT_RATE_MCPS_SD0 0x0EE6
1080#define LR4_PREV_SHADOW_RESULT_AVG_SIGNAL_COUNT_RATE_MCPS_SD0_HI 0x0EE6
1081#define LR4_PREV_SHADOW_RESULT_AVG_SIGNAL_COUNT_RATE_MCPS_SD0_LO 0x0EE7
1082#define LR4_PREV_SHADOW_RESULT_DSS_ACTUAL_EFFECTIVE_SPADS_SD1 0x0EE8
1083#define LR4_PREV_SHADOW_RESULT_DSS_ACTUAL_EFFECTIVE_SPADS_SD1_HI 0x0EE8
1084#define LR4_PREV_SHADOW_RESULT_DSS_ACTUAL_EFFECTIVE_SPADS_SD1_LO 0x0EE9
1085#define LR4_PREV_SHADOW_RESULT_PEAK_SIGNAL_COUNT_RATE_MCPS_SD1 0x0EEA
1086#define LR4_PREV_SHADOW_RESULT_PEAK_SIGNAL_COUNT_RATE_MCPS_SD1_HI 0x0EEA
1087#define LR4_PREV_SHADOW_RESULT_PEAK_SIGNAL_COUNT_RATE_MCPS_SD1_LO 0x0EEB
1088#define LR4_PREV_SHADOW_RESULT_AMBIENT_COUNT_RATE_MCPS_SD1 0x0EEC
1089#define LR4_PREV_SHADOW_RESULT_AMBIENT_COUNT_RATE_MCPS_SD1_HI 0x0EEC
1090#define LR4_PREV_SHADOW_RESULT_AMBIENT_COUNT_RATE_MCPS_SD1_LO 0x0EED
1091#define LR4_PREV_SHADOW_RESULT_SIGMA_SD1 0x0EEE
1092#define LR4_PREV_SHADOW_RESULT_SIGMA_SD1_HI 0x0EEE
1093#define LR4_PREV_SHADOW_RESULT_SIGMA_SD1_LO 0x0EEF
1094#define LR4_PREV_SHADOW_RESULT_PHASE_SD1 0x0EF0
1095#define LR4_PREV_SHADOW_RESULT_PHASE_SD1_HI 0x0EF0
1096#define LR4_PREV_SHADOW_RESULT_PHASE_SD1_LO 0x0EF1
1097#define LR4_PREV_SHADOW_RESULT_FINAL_CROSSTALK_CORRECTED_RANGE_MM_SD1 0x0EF2
1098#define LR4_PREV_SHADOW_RESULT_FINAL_CROSSTALK_CORRECTED_RANGE_MM_SD1_HI 0x0EF2
1099#define LR4_PREV_SHADOW_RESULT_FINAL_CROSSTALK_CORRECTED_RANGE_MM_SD1_LO 0x0EF3
1100#define LR4_PREV_SHADOW_RESULT_SPARE_0_SD1 0x0EF4
1101#define LR4_PREV_SHADOW_RESULT_SPARE_0_SD1_HI 0x0EF4
1102#define LR4_PREV_SHADOW_RESULT_SPARE_0_SD1_LO 0x0EF5
1103#define LR4_PREV_SHADOW_RESULT_SPARE_1_SD1 0x0EF6
1104#define LR4_PREV_SHADOW_RESULT_SPARE_1_SD1_HI 0x0EF6
1105#define LR4_PREV_SHADOW_RESULT_SPARE_1_SD1_LO 0x0EF7
1106#define LR4_PREV_SHADOW_RESULT_SPARE_2_SD1 0x0EF8
1107#define LR4_PREV_SHADOW_RESULT_SPARE_2_SD1_HI 0x0EF8
1108#define LR4_PREV_SHADOW_RESULT_SPARE_2_SD1_LO 0x0EF9
1109#define LR4_PREV_SHADOW_RESULT_SPARE_3_SD1 0x0EFA
1110#define LR4_PREV_SHADOW_RESULT_SPARE_3_SD1_HI 0x0EFA
1111#define LR4_PREV_SHADOW_RESULT_SPARE_3_SD1_LO 0x0EFB
1112
1113#define LR4_PREV_SHADOW_RESULT_CORE_AMBIENT_WINDOW_EVENTS_SD0 0x0EFC
1114#define LR4_PREV_SHADOW_RESULT_CORE_AMBIENT_WINDOW_EVENTS_SD0_3 0x0EFC
1115#define LR4_PREV_SHADOW_RESULT_CORE_AMBIENT_WINDOW_EVENTS_SD0_2 0x0EFD
1116#define LR4_PREV_SHADOW_RESULT_CORE_AMBIENT_WINDOW_EVENTS_SD0_1 0x0EFE
1117#define LR4_PREV_SHADOW_RESULT_CORE_AMBIENT_WINDOW_EVENTS_SD0_0 0x0EFF
1118#define LR4_PREV_SHADOW_RESULT_CORE_RANGING_TOTAL_EVENTS_SD0 0x0F00
1119#define LR4_PREV_SHADOW_RESULT_CORE_RANGING_TOTAL_EVENTS_SD0_3 0x0F00
1120#define LR4_PREV_SHADOW_RESULT_CORE_RANGING_TOTAL_EVENTS_SD0_2 0x0F01
1121#define LR4_PREV_SHADOW_RESULT_CORE_RANGING_TOTAL_EVENTS_SD0_1 0x0F02
1122#define LR4_PREV_SHADOW_RESULT_CORE_RANGING_TOTAL_EVENTS_SD0_0 0x0F03
1123#define LR4_PREV_SHADOW_RESULT_CORE_SIGNAL_TOTAL_EVENTS_SD0 0x0F04
1124#define LR4_PREV_SHADOW_RESULT_CORE_SIGNAL_TOTAL_EVENTS_SD0_3 0x0F04
1125#define LR4_PREV_SHADOW_RESULT_CORE_SIGNAL_TOTAL_EVENTS_SD0_2 0x0F05
1126#define LR4_PREV_SHADOW_RESULT_CORE_SIGNAL_TOTAL_EVENTS_SD0_1 0x0F06
1127#define LR4_PREV_SHADOW_RESULT_CORE_SIGNAL_TOTAL_EVENTS_SD0_0 0x0F07
1128#define LR4_PREV_SHADOW_RESULT_CORE_TOTAL_PERIODS_ELAPSED_SD0 0x0F08
1129#define LR4_PREV_SHADOW_RESULT_CORE_TOTAL_PERIODS_ELAPSED_SD0_3 0x0F08
1130#define LR4_PREV_SHADOW_RESULT_CORE_TOTAL_PERIODS_ELAPSED_SD0_2 0x0F09
1131#define LR4_PREV_SHADOW_RESULT_CORE_TOTAL_PERIODS_ELAPSED_SD0_1 0x0F0A
1132#define LR4_PREV_SHADOW_RESULT_CORE_TOTAL_PERIODS_ELAPSED_SD0_0 0x0F0B
1133#define LR4_PREV_SHADOW_RESULT_CORE_AMBIENT_WINDOW_EVENTS_SD1 0x0F0C
1134#define LR4_PREV_SHADOW_RESULT_CORE_AMBIENT_WINDOW_EVENTS_SD1_3 0x0F0C
1135#define LR4_PREV_SHADOW_RESULT_CORE_AMBIENT_WINDOW_EVENTS_SD1_2 0x0F0D
1136#define LR4_PREV_SHADOW_RESULT_CORE_AMBIENT_WINDOW_EVENTS_SD1_1 0x0F0E
1137#define LR4_PREV_SHADOW_RESULT_CORE_AMBIENT_WINDOW_EVENTS_SD1_0 0x0F0F
1138#define LR4_PREV_SHADOW_RESULT_CORE_RANGING_TOTAL_EVENTS_SD1 0x0F10
1139#define LR4_PREV_SHADOW_RESULT_CORE_RANGING_TOTAL_EVENTS_SD1_3 0x0F10
1140#define LR4_PREV_SHADOW_RESULT_CORE_RANGING_TOTAL_EVENTS_SD1_2 0x0F11
1141#define LR4_PREV_SHADOW_RESULT_CORE_RANGING_TOTAL_EVENTS_SD1_1 0x0F12
1142#define LR4_PREV_SHADOW_RESULT_CORE_RANGING_TOTAL_EVENTS_SD1_0 0x0F13
1143#define LR4_PREV_SHADOW_RESULT_CORE_SIGNAL_TOTAL_EVENTS_SD1 0x0F14
1144#define LR4_PREV_SHADOW_RESULT_CORE_SIGNAL_TOTAL_EVENTS_SD1_3 0x0F14
1145#define LR4_PREV_SHADOW_RESULT_CORE_SIGNAL_TOTAL_EVENTS_SD1_2 0x0F15
1146#define LR4_PREV_SHADOW_RESULT_CORE_SIGNAL_TOTAL_EVENTS_SD1_1 0x0F16
1147#define LR4_PREV_SHADOW_RESULT_CORE_SIGNAL_TOTAL_EVENTS_SD1_0 0x0F17
1148#define LR4_PREV_SHADOW_RESULT_CORE_TOTAL_PERIODS_ELAPSED_SD1 0x0F18
1149#define LR4_PREV_SHADOW_RESULT_CORE_TOTAL_PERIODS_ELAPSED_SD1_3 0x0F18
1150#define LR4_PREV_SHADOW_RESULT_CORE_TOTAL_PERIODS_ELAPSED_SD1_2 0x0F19
1151#define LR4_PREV_SHADOW_RESULT_CORE_TOTAL_PERIODS_ELAPSED_SD1_1 0x0F1A
1152#define LR4_PREV_SHADOW_RESULT_CORE_TOTAL_PERIODS_ELAPSED_SD1_0 0x0F1B
1153#define LR4_PREV_SHADOW_RESULT_CORE_SPARE_0 0x0F1C
1160#define LR4_RESULT_DEBUG_STATUS 0x0F20
1161#define LR4_RESULT_DEBUG_STAGE 0x0F21
1168#define LR4_GPH_SYSTEM_THRESH_RATE_HIGH 0x0F24
1169#define LR4_GPH_SYSTEM_THRESH_RATE_HIGH_HI 0x0F24
1170#define LR4_GPH_SYSTEM_THRESH_RATE_HIGH_LO 0x0F25
1171#define LR4_GPH_SYSTEM_THRESH_RATE_LOW 0x0F26
1172#define LR4_GPH_SYSTEM_THRESH_RATE_LOW_HI 0x0F26
1173#define LR4_GPH_SYSTEM_THRESH_RATE_LOW_LO 0x0F27
1174#define LR4_GPH_SYSTEM_INTERRUPT_CONFIG_GPIO 0x0F28
1175#define LR4_GPH_DSS_CONFIG_ROI_MODE_CONTROL 0x0F2F
1176#define LR4_GPH_DSS_CONFIG_MANUAL_EFFECTIVE_SPADS_SELECT 0x0F30
1177#define LR4_GPH_DSS_CONFIG_MANUAL_EFFECTIVE_SPADS_SELECT_HI 0x0F30
1178#define LR4_GPH_DSS_CONFIG_MANUAL_EFFECTIVE_SPADS_SELECT_LO 0x0F31
1179#define LR4_GPH_DSS_CONFIG_MANUAL_BLOCK_SELECT 0x0F32
1180#define LR4_GPH_DSS_CONFIG_MAX_SPADS_LIMIT 0x0F33
1181#define LR4_GPH_DSS_CONFIG_MIN_SPADS_LIMIT 0x0F34
1182#define LR4_GPH_MM_CONFIG_TIMEOUT_MACROP_A_HI 0x0F36
1183#define LR4_GPH_MM_CONFIG_TIMEOUT_MACROP_A_LO 0x0F37
1184#define LR4_GPH_MM_CONFIG_TIMEOUT_MACROP_B_HI 0x0F38
1185#define LR4_GPH_MM_CONFIG_TIMEOUT_MACROP_B_LO 0x0F39
1186#define LR4_GPH_RANGE_CONFIG_TIMEOUT_MACROP_A_HI 0x0F3A
1187#define LR4_GPH_RANGE_CONFIG_TIMEOUT_MACROP_A_LO 0x0F3B
1188#define LR4_GPH_RANGE_CONFIG_VCSEL_PERIOD_A 0x0F3C
1189#define LR4_GPH_RANGE_CONFIG_VCSEL_PERIOD_B 0x0F3D
1190#define LR4_GPH_RANGE_CONFIG_TIMEOUT_MACROP_B_HI 0x0F3E
1191#define LR4_GPH_RANGE_CONFIG_TIMEOUT_MACROP_B_LO 0x0F3F
1192#define LR4_GPH_RANGE_CONFIG_SIGMA_THRESH 0x0F40
1193#define LR4_GPH_RANGE_CONFIG_SIGMA_THRESH_HI 0x0F40
1194#define LR4_GPH_RANGE_CONFIG_SIGMA_THRESH_LO 0x0F41
1195#define LR4_GPH_RANGE_CONFIG_MIN_COUNT_RATE_RTN_LIMIT_MCPS 0x0F42
1196#define LR4_GPH_RANGE_CONFIG_MIN_COUNT_RATE_RTN_LIMIT_MCPS_HI 0x0F42
1197#define LR4_GPH_RANGE_CONFIG_MIN_COUNT_RATE_RTN_LIMIT_MCPS_LO 0x0F43
1198#define LR4_GPH_RANGE_CONFIG_VALID_PHASE_LOW 0x0F44
1199#define LR4_GPH_RANGE_CONFIG_VALID_PHASE_HIGH 0x0F45
1200
1201
1202#define LR4_FIRMWARE__INTERNAL_STREAM_COUNT_DIV 0x0F46
1203#define LR4_FIRMWARE__INTERNAL_STREAM_COUNTER_VAL 0x0F47
1210#define LR4_DSS_CALC_ROI_CTRL 0x0F54
1211#define LR4_DSS_CALC_SPARE_1 0x0F55
1212#define LR4_DSS_CALC_SPARE_2 0x0F56
1213#define LR4_DSS_CALC_SPARE_3 0x0F57
1214#define LR4_DSS_CALC_SPARE_4 0x0F58
1215#define LR4_DSS_CALC_SPARE_5 0x0F59
1216#define LR4_DSS_CALC_SPARE_6 0x0F5A
1217#define LR4_DSS_CALC_SPARE_7 0x0F5B
1218#define LR4_DSS_CALC_USER_ROI_SPAD_EN_0 0x0F5C
1219#define LR4_DSS_CALC_USER_ROI_SPAD_EN_1 0x0F5D
1220#define LR4_DSS_CALC_USER_ROI_SPAD_EN_2 0x0F5E
1221#define LR4_DSS_CALC_USER_ROI_SPAD_EN_3 0x0F5F
1222#define LR4_DSS_CALC_USER_ROI_SPAD_EN_4 0x0F60
1223#define LR4_DSS_CALC_USER_ROI_SPAD_EN_5 0x0F61
1224#define LR4_DSS_CALC_USER_ROI_SPAD_EN_6 0x0F62
1225#define LR4_DSS_CALC_USER_ROI_SPAD_EN_7 0x0F63
1226#define LR4_DSS_CALC_USER_ROI_SPAD_EN_8 0x0F64
1227#define LR4_DSS_CALC_USER_ROI_SPAD_EN_9 0x0F65
1228#define LR4_DSS_CALC_USER_ROI_SPAD_EN_10 0x0F66
1229#define LR4_DSS_CALC_USER_ROI_SPAD_EN_11 0x0F67
1230#define LR4_DSS_CALC_USER_ROI_SPAD_EN_12 0x0F68
1231#define LR4_DSS_CALC_USER_ROI_SPAD_EN_13 0x0F69
1232#define LR4_DSS_CALC_USER_ROI_SPAD_EN_14 0x0F6A
1233#define LR4_DSS_CALC_USER_ROI_SPAD_EN_15 0x0F6B
1234#define LR4_DSS_CALC_USER_ROI_SPAD_EN_16 0x0F6C
1235#define LR4_DSS_CALC_USER_ROI_SPAD_EN_17 0x0F6D
1236#define LR4_DSS_CALC_USER_ROI_SPAD_EN_18 0x0F6E
1237#define LR4_DSS_CALC_USER_ROI_SPAD_EN_19 0x0F6F
1238#define LR4_DSS_CALC_USER_ROI_SPAD_EN_20 0x0F70
1239#define LR4_DSS_CALC_USER_ROI_SPAD_EN_21 0x0F71
1240#define LR4_DSS_CALC_USER_ROI_SPAD_EN_22 0x0F72
1241#define LR4_DSS_CALC_USER_ROI_SPAD_EN_23 0x0F73
1242#define LR4_DSS_CALC_USER_ROI_SPAD_EN_24 0x0F74
1243#define LR4_DSS_CALC_USER_ROI_SPAD_EN_25 0x0F75
1244#define LR4_DSS_CALC_USER_ROI_SPAD_EN_26 0x0F76
1245#define LR4_DSS_CALC_USER_ROI_SPAD_EN_27 0x0F77
1246#define LR4_DSS_CALC_USER_ROI_SPAD_EN_28 0x0F78
1247#define LR4_DSS_CALC_USER_ROI_SPAD_EN_29 0x0F79
1248#define LR4_DSS_CALC_USER_ROI_SPAD_EN_30 0x0F7A
1249#define LR4_DSS_CALC_USER_ROI_SPAD_EN_31 0x0F7B
1250#define LR4_DSS_CALC_USER_ROI_0 0x0F7C
1251#define LR4_DSS_CALC_USER_ROI_1 0x0F7D
1252#define LR4_DSS_CALC_MODE_ROI_0 0x0F7E
1253#define LR4_DSS_CALC_MODE_ROI_1 0x0F7F
1260#define LR4_SIGMA_ESTIMATOR_CALC_SPARE_0 0x0F80
1267#define LR4_VHV_RESULT_PEAK_SIGNAL_RATE_MCPS 0x0F82
1268#define LR4_VHV_RESULT_PEAK_SIGNAL_RATE_MCPS_HI 0x0F82
1269#define LR4_VHV_RESULT_PEAK_SIGNAL_RATE_MCPS_LO 0x0F83
1270#define LR4_VHV_RESULT_SIGNAL_TOTAL_EVENTS_REF 0x0F84
1271#define LR4_VHV_RESULT_SIGNAL_TOTAL_EVENTS_REF_3 0x0F84
1272#define LR4_VHV_RESULT_SIGNAL_TOTAL_EVENTS_REF_2 0x0F85
1273#define LR4_VHV_RESULT_SIGNAL_TOTAL_EVENTS_REF_1 0x0F86
1274#define LR4_VHV_RESULT_SIGNAL_TOTAL_EVENTS_REF_0 0x0F87
1281#define LR4_PHASECAL_RESULT_PHASE_OUTPUT_REF 0x0F88
1282#define LR4_PHASECAL_RESULT_PHASE_OUTPUT_REF_HI 0x0F88
1283#define LR4_PHASECAL_RESULT_PHASE_OUTPUT_REF_LO 0x0F89
1290#define LR4_DSS_RESULT_TOTAL_RATE_PER_SPAD 0x0F8A
1291#define LR4_DSS_RESULT_TOTAL_RATE_PER_SPAD_HI 0x0F8A
1292#define LR4_DSS_RESULT_TOTAL_RATE_PER_SPAD_LO 0x0F8B
1293#define LR4_DSS_RESULT_ENABLED_BLOCKS 0x0F8C
1294#define LR4_DSS_RESULT_NUM_REQUESTED_SPADS 0x0F8E
1295#define LR4_DSS_RESULT_NUM_REQUESTED_SPADS_HI 0x0F8E
1296#define LR4_DSS_RESULT_NUM_REQUESTED_SPADS_LO 0x0F8F
1303#define LR4_MM_RESULT_INNER_INTERSECTION_RATE 0x0F92
1304#define LR4_MM_RESULT_INNER_INTERSECTION_RATE_HI 0x0F92
1305#define LR4_MM_RESULT_INNER_INTERSECTION_RATE_LO 0x0F93
1306#define LR4_MM_RESULT_OUTER_COMPLEMENT_RATE 0x0F94
1307#define LR4_MM_RESULT_OUTER_COMPLEMENT_RATE_HI 0x0F94
1308#define LR4_MM_RESULT_OUTER_COMPLEMENT_RATE_LO 0x0F95
1309#define LR4_MM_RESULT_TOTAL_OFFSET 0x0F96
1310#define LR4_MM_RESULT_TOTAL_OFFSET_HI 0x0F96
1311#define LR4_MM_RESULT_TOTAL_OFFSET_LO 0x0F97
1318#define LR4_XTALK_CALC_XTALK_FOR_ENABLED_SPADS 0x0F98
1319#define LR4_XTALK_CALC_XTALK_FOR_ENABLED_SPADS_3 0x0F98
1320#define LR4_XTALK_CALC_XTALK_FOR_ENABLED_SPADS_2 0x0F99
1321#define LR4_XTALK_CALC_XTALK_FOR_ENABLED_SPADS_1 0x0F9A
1322#define LR4_XTALK_CALC_XTALK_FOR_ENABLED_SPADS_0 0x0F9B
1329#define LR4_XTALK_RESULT_AVG_XTALK_USER_ROI_KCPS 0x0F9C
1330#define LR4_XTALK_RESULT_AVG_XTALK_USER_ROI_KCPS_3 0x0F9C
1331#define LR4_XTALK_RESULT_AVG_XTALK_USER_ROI_KCPS_2 0x0F9D
1332#define LR4_XTALK_RESULT_AVG_XTALK_USER_ROI_KCPS_1 0x0F9E
1333#define LR4_XTALK_RESULT_AVG_XTALK_USER_ROI_KCPS_0 0x0F9F
1334#define LR4_XTALK_RESULT_AVG_XTALK_MM_INNER_ROI_KCPS 0x0FA0
1335#define LR4_XTALK_RESULT_AVG_XTALK_MM_INNER_ROI_KCPS_3 0x0FA0
1336#define LR4_XTALK_RESULT_AVG_XTALK_MM_INNER_ROI_KCPS_2 0x0FA1
1337#define LR4_XTALK_RESULT_AVG_XTALK_MM_INNER_ROI_KCPS_1 0x0FA2
1338#define LR4_XTALK_RESULT_AVG_XTALK_MM_INNER_ROI_KCPS_0 0x0FA3
1339#define LR4_XTALK_RESULT_AVG_XTALK_MM_OUTER_ROI_KCPS 0x0FA4
1340#define LR4_XTALK_RESULT_AVG_XTALK_MM_OUTER_ROI_KCPS_3 0x0FA4
1341#define LR4_XTALK_RESULT_AVG_XTALK_MM_OUTER_ROI_KCPS_2 0x0FA5
1342#define LR4_XTALK_RESULT_AVG_XTALK_MM_OUTER_ROI_KCPS_1 0x0FA6
1343#define LR4_XTALK_RESULT_AVG_XTALK_MM_OUTER_ROI_KCPS_0 0x0FA7
1344#define LR4_RANGE_RESULT_ACCUM_PHASE 0x0FA8
1345#define LR4_RANGE_RESULT_ACCUM_PHASE_3 0x0FA8
1346#define LR4_RANGE_RESULT_ACCUM_PHASE_2 0x0FA9
1347#define LR4_RANGE_RESULT_ACCUM_PHASE_1 0x0FAA
1348#define LR4_RANGE_RESULT_ACCUM_PHASE_0 0x0FAB
1349#define LR4_RANGE_RESULT_OFFSET_CORRECTED_RANGE 0x0FAC
1350#define LR4_RANGE_RESULT_OFFSET_CORRECTED_RANGE_HI 0x0FAC
1351#define LR4_RANGE_RESULT_OFFSET_CORRECTED_RANGE_LO 0x0FAD
1358#define LR4_SHADOW_PHASECAL_RESULT_VCSEL_START 0x0FAE
1359#define LR4_SHADOW_RESULT_INTERRUPT_STATUS 0x0FB0
1360#define LR4_SHADOW_RESULT_RANGE_STATUS 0x0FB1
1361#define LR4_SHADOW_RESULT_REPORT_STATUS 0x0FB2
1362#define LR4_SHADOW_RESULT_STREAM_COUNT 0x0FB3
1363#define LR4_SHADOW_RESULT_DSS_ACTUAL_EFFECTIVE_SPADS_SD0 0x0FB4
1364#define LR4_SHADOW_RESULT_DSS_ACTUAL_EFFECTIVE_SPADS_SD0_HI 0x0FB4
1365#define LR4_SHADOW_RESULT_DSS_ACTUAL_EFFECTIVE_SPADS_SD0_LO 0x0FB5
1366#define LR4_SHADOW_RESULT_PEAK_SIGNAL_COUNT_RATE_MCPS_SD0 0x0FB6
1367#define LR4_SHADOW_RESULT_PEAK_SIGNAL_COUNT_RATE_MCPS_SD0_HI 0x0FB6
1368#define LR4_SHADOW_RESULT_PEAK_SIGNAL_COUNT_RATE_MCPS_SD0_LO 0x0FB7
1369#define LR4_SHADOW_RESULT_AMBIENT_COUNT_RATE_MCPS_SD0 0x0FB8
1370#define LR4_SHADOW_RESULT_AMBIENT_COUNT_RATE_MCPS_SD0_HI 0x0FB8
1371#define LR4_SHADOW_RESULT_AMBIENT_COUNT_RATE_MCPS_SD0_LO 0x0FB9
1372#define LR4_SHADOW_RESULT_SIGMA_SD0 0x0FBA
1373#define LR4_SHADOW_RESULT_SIGMA_SD0_HI 0x0FBA
1374#define LR4_SHADOW_RESULT_SIGMA_SD0_LO 0x0FBB
1375#define LR4_SHADOW_RESULT_PHASE_SD0 0x0FBC
1376#define LR4_SHADOW_RESULT_PHASE_SD0_HI 0x0FBC
1377#define LR4_SHADOW_RESULT_PHASE_SD0_LO 0x0FBD
1378#define LR4_SHADOW_RESULT_FINAL_CROSSTALK_CORRECTED_RANGE_MM_SD0 0x0FBE
1379#define LR4_SHADOW_RESULT_FINAL_CROSSTALK_CORRECTED_RANGE_MM_SD0_HI 0x0FBE
1380
1381#define LR4_SHADOW_RESULT_FINAL_CROSSTALK_CORRECTED_RANGE_MM_SD0_LO 0x0FBF
1382#define LR4_SHADOW_RESULT_PEAK_SIGNAL_COUNT_RATE_CROSSTALK_CORRECTED_MCPS_SD0 0x0FC0
1383#define LR4_SHADOW_RESULT_PEAK_SIGNAL_COUNT_RATE_CROSSTALK_CORRECTED_MCPS_SD0_HI 0x0FC0
1384#define LR4_SHADOW_RESULT_PEAK_SIGNAL_COUNT_RATE_CROSSTALK_CORRECTED_MCPS_SD0_LO 0x0FC1
1385#define LR4_SHADOW_RESULT_MM_INNER_ACTUAL_EFFECTIVE_SPADS_SD0 0x0FC2
1386#define LR4_SHADOW_RESULT_MM_INNER_ACTUAL_EFFECTIVE_SPADS_SD0_HI 0x0FC2
1387#define LR4_SHADOW_RESULT_MM_INNER_ACTUAL_EFFECTIVE_SPADS_SD0_LO 0x0FC3
1388#define LR4_SHADOW_RESULT_MM_OUTER_ACTUAL_EFFECTIVE_SPADS_SD0 0x0FC4
1389#define LR4_SHADOW_RESULT_MM_OUTER_ACTUAL_EFFECTIVE_SPADS_SD0_HI 0x0FC4
1390#define LR4_SHADOW_RESULT_MM_OUTER_ACTUAL_EFFECTIVE_SPADS_SD0_LO 0x0FC5
1391#define LR4_SHADOW_RESULT_AVG_SIGNAL_COUNT_RATE_MCPS_SD0 0x0FC6
1392#define LR4_SHADOW_RESULT_AVG_SIGNAL_COUNT_RATE_MCPS_SD0_HI 0x0FC6
1393#define LR4_SHADOW_RESULT_AVG_SIGNAL_COUNT_RATE_MCPS_SD0_LO 0x0FC7
1394#define LR4_SHADOW_RESULT_DSS_ACTUAL_EFFECTIVE_SPADS_SD1 0x0FC8
1395#define LR4_SHADOW_RESULT_DSS_ACTUAL_EFFECTIVE_SPADS_SD1_HI 0x0FC8
1396#define LR4_SHADOW_RESULT_DSS_ACTUAL_EFFECTIVE_SPADS_SD1_LO 0x0FC9
1397#define LR4_SHADOW_RESULT_PEAK_SIGNAL_COUNT_RATE_MCPS_SD1 0x0FCA
1398#define LR4_SHADOW_RESULT_PEAK_SIGNAL_COUNT_RATE_MCPS_SD1_HI 0x0FCA
1399#define LR4_SHADOW_RESULT_PEAK_SIGNAL_COUNT_RATE_MCPS_SD1_LO 0x0FCB
1400#define LR4_SHADOW_RESULT_AMBIENT_COUNT_RATE_MCPS_SD1 0x0FCC
1401#define LR4_SHADOW_RESULT_AMBIENT_COUNT_RATE_MCPS_SD1_HI 0x0FCC
1402#define LR4_SHADOW_RESULT_AMBIENT_COUNT_RATE_MCPS_SD1_LO 0x0FCD
1403#define LR4_SHADOW_RESULT_SIGMA_SD1 0x0FCE
1404#define LR4_SHADOW_RESULT_SIGMA_SD1_HI 0x0FCE
1405#define LR4_SHADOW_RESULT_SIGMA_SD1_LO 0x0FCF
1406#define LR4_SHADOW_RESULT_PHASE_SD1 0x0FD0
1407#define LR4_SHADOW_RESULT_PHASE_SD1_HI 0x0FD0
1408#define LR4_SHADOW_RESULT_PHASE_SD1_LO 0x0FD1
1409#define LR4_SHADOW_RESULT_FINAL_CROSSTALK_CORRECTED_RANGE_MM_SD1 0x0FD2
1410#define LR4_SHADOW_RESULT_FINAL_CROSSTALK_CORRECTED_RANGE_MM_SD1_HI 0x0FD2
1411#define LR4_SHADOW_RESULT_FINAL_CROSSTALK_CORRECTED_RANGE_MM_SD1_LO 0x0FD3
1412#define LR4_SHADOW_RESULT_SPARE_0_SD1 0x0FD4
1413#define LR4_SHADOW_RESULT_SPARE_0_SD1_HI 0x0FD4
1414#define LR4_SHADOW_RESULT_SPARE_0_SD1_LO 0x0FD5
1415#define LR4_SHADOW_RESULT_SPARE_1_SD1 0x0FD6
1416#define LR4_SHADOW_RESULT_SPARE_1_SD1_HI 0x0FD6
1417#define LR4_SHADOW_RESULT_SPARE_1_SD1_LO 0x0FD7
1418#define LR4_SHADOW_RESULT_SPARE_2_SD1 0x0FD8
1419#define LR4_SHADOW_RESULT_SPARE_2_SD1_HI 0x0FD8
1420#define LR4_SHADOW_RESULT_SPARE_2_SD1_LO 0x0FD9
1421#define LR4_SHADOW_RESULT_SPARE_3_SD1 0x0FDA
1422#define LR4_SHADOW_RESULT_THRESH_INFO 0x0FDB
1423#define LR4_SHADOW_RESULT_CORE_AMBIENT_WINDOW_EVENTS_SD0 0x0FDC
1424#define LR4_SHADOW_RESULT_CORE_AMBIENT_WINDOW_EVENTS_SD0_3 0x0FDC
1425#define LR4_SHADOW_RESULT_CORE_AMBIENT_WINDOW_EVENTS_SD0_2 0x0FDD
1426#define LR4_SHADOW_RESULT_CORE_AMBIENT_WINDOW_EVENTS_SD0_1 0x0FDE
1427#define LR4_SHADOW_RESULT_CORE_AMBIENT_WINDOW_EVENTS_SD0_0 0x0FDF
1428#define LR4_SHADOW_RESULT_CORE_RANGING_TOTAL_EVENTS_SD0 0x0FE0
1429#define LR4_SHADOW_RESULT_CORE_RANGING_TOTAL_EVENTS_SD0_3 0x0FE0
1430#define LR4_SHADOW_RESULT_CORE_RANGING_TOTAL_EVENTS_SD0_2 0x0FE1
1431#define LR4_SHADOW_RESULT_CORE_RANGING_TOTAL_EVENTS_SD0_1 0x0FE2
1432#define LR4_SHADOW_RESULT_CORE_RANGING_TOTAL_EVENTS_SD0_0 0x0FE3
1433#define LR4_SHADOW_RESULT_CORE_SIGNAL_TOTAL_EVENTS_SD0 0x0FE4
1434#define LR4_SHADOW_RESULT_CORE_SIGNAL_TOTAL_EVENTS_SD0_3 0x0FE4
1435#define LR4_SHADOW_RESULT_CORE_SIGNAL_TOTAL_EVENTS_SD0_2 0x0FE5
1436#define LR4_SHADOW_RESULT_CORE_SIGNAL_TOTAL_EVENTS_SD0_1 0x0FE6
1437#define LR4_SHADOW_RESULT_CORE_SIGNAL_TOTAL_EVENTS_SD0_0 0x0FE7
1438#define LR4_SHADOW_RESULT_CORE_TOTAL_PERIODS_ELAPSED_SD0 0x0FE8
1439#define LR4_SHADOW_RESULT_CORE_TOTAL_PERIODS_ELAPSED_SD0_3 0x0FE8
1440#define LR4_SHADOW_RESULT_CORE_TOTAL_PERIODS_ELAPSED_SD0_2 0x0FE9
1441#define LR4_SHADOW_RESULT_CORE_TOTAL_PERIODS_ELAPSED_SD0_1 0x0FEA
1442#define LR4_SHADOW_RESULT_CORE_TOTAL_PERIODS_ELAPSED_SD0_0 0x0FEB
1443#define LR4_SHADOW_RESULT_CORE_AMBIENT_WINDOW_EVENTS_SD1 0x0FEC
1444#define LR4_SHADOW_RESULT_CORE_AMBIENT_WINDOW_EVENTS_SD1_3 0x0FEC
1445#define LR4_SHADOW_RESULT_CORE_AMBIENT_WINDOW_EVENTS_SD1_2 0x0FED
1446#define LR4_SHADOW_RESULT_CORE_AMBIENT_WINDOW_EVENTS_SD1_1 0x0FEE
1447#define LR4_SHADOW_RESULT_CORE_AMBIENT_WINDOW_EVENTS_SD1_0 0x0FEF
1448#define LR4_SHADOW_RESULT_CORE_RANGING_TOTAL_EVENTS_SD1 0x0FF0
1449#define LR4_SHADOW_RESULT_CORE_RANGING_TOTAL_EVENTS_SD1_3 0x0FF0
1450#define LR4_SHADOW_RESULT_CORE_RANGING_TOTAL_EVENTS_SD1_2 0x0FF1
1451#define LR4_SHADOW_RESULT_CORE_RANGING_TOTAL_EVENTS_SD1_1 0x0FF2
1452#define LR4_SHADOW_RESULT_CORE_RANGING_TOTAL_EVENTS_SD1_0 0x0FF3
1453#define LR4_SHADOW_RESULT_CORE_SIGNAL_TOTAL_EVENTS_SD1 0x0FF4
1454#define LR4_SHADOW_RESULT_CORE_SIGNAL_TOTAL_EVENTS_SD1_3 0x0FF4
1455#define LR4_SHADOW_RESULT_CORE_SIGNAL_TOTAL_EVENTS_SD1_2 0x0FF5
1456#define LR4_SHADOW_RESULT_CORE_SIGNAL_TOTAL_EVENTS_SD1_1 0x0FF6
1457#define LR4_SHADOW_RESULT_CORE_SIGNAL_TOTAL_EVENTS_SD1_0 0x0FF7
1458#define LR4_SHADOW_RESULT_CORE_TOTAL_PERIODS_ELAPSED_SD1 0x0FF8
1459#define LR4_SHADOW_RESULT_CORE_TOTAL_PERIODS_ELAPSED_SD1_3 0x0FF8
1460#define LR4_SHADOW_RESULT_CORE_TOTAL_PERIODS_ELAPSED_SD1_2 0x0FF9
1461#define LR4_SHADOW_RESULT_CORE_TOTAL_PERIODS_ELAPSED_SD1_1 0x0FFA
1462#define LR4_SHADOW_RESULT_CORE_TOTAL_PERIODS_ELAPSED_SD1_0 0x0FFB
1463#define LR4_SHADOW_RESULT_CORE_SPARE_0 0x0FFC
1464#define LR4_SHADOW_PHASECAL_RESULT_REFERENCE_PHASE_HI 0x0FFE
1465#define LR4_SHADOW_PHASECAL_RESULT_REFERENCE_PHASE_LO 0x0FFF
1472#define LR4_DISTANCE_MODE_SHORT 0x00
1473#define LR4_DISTANCE_MODE_MEDIUM 0x01
1474#define LR4_DISTANCE_MODE_LONG 0x02
1481#define LR4_RESP_INSUFFICIENT_BUDGET 0x02
1482#define LR4_RESP_TOO_HIGH_BUDGET 0x01
1483#define LR4_RESP_BUDGET_IS_SUCCESSFULLY_SET 0x00
1484#define LR4_RESP_DEVICE_ERROR_ID_IS_NOT_VALID 0x01
1485#define LR4_RESP_FIRMWARE_TIMEOUT_ERROR 0x02
1486#define LR4_RESP_INIT_IS_SUCCESSFUL 0x00
1487#define LR4_RESP_WRONG_MODE 0x01
1488#define LR4_RESP_MODE_SUCCESSFULLY_SET 0x00
1489#define LR4_MRESP_SIGNAL_FAIL 0x04
1490#define LR4_MRESP_PHASE_OUT_OF_VALID_LIMITS 0x05
1491#define LR4_MRESP_SIGMA_FAIL 0x06
1492#define LR4_MRESP_WRAP_TARGET_FAIL 0x07
1493#define LR4_MRESP_MINIMUM_DETECTION_THRESHOLD 0x08
1500#define LR4_DEFAULT_SLAVE_ADDRESS 0x29
1503 // End group macro
1504// --------------------------------------------------------------- PUBLIC TYPES
1513typedef struct
1514{
1515 // Output pins
1516
1517 digital_out_t xsh;
1518
1519 // Input pins
1520
1521 digital_in_t int_pin;
1522
1523 // Modules
1524
1525 i2c_master_t i2c;
1526
1527 // ctx variable
1528
1530
1533
1535
1539typedef struct
1540{
1541 // Communication gpio pins
1542
1543 pin_name_t scl;
1544 pin_name_t sda;
1545
1546 // Additional gpio pins
1547
1548 pin_name_t xsh;
1549 pin_name_t int_pin;
1550
1551 // static variable
1552
1553 uint32_t i2c_speed;
1555
1557
1561typedef struct
1562{
1563 uint8_t top_left_x;
1564 uint8_t top_left_y;
1567
1569
1570 // End types group
1571// ----------------------------------------------- PUBLIC FUNCTION DECLARATIONS
1572
1578#ifdef __cplusplus
1579extern "C"{
1580#endif
1581
1591
1600
1611
1622void lightranger4_generic_write ( lightranger4_t *ctx, uint16_t reg, uint8_t *data_buf, uint8_t len );
1623
1635void lightranger4_generic_read ( lightranger4_t *ctx, uint16_t reg, uint8_t *data_buf, uint8_t len );
1636
1643
1651void lightranger4_start_measurement ( lightranger4_t *ctx, uint32_t period_ms );
1652
1653
1662
1675
1683
1695uint8_t lightranger4_set_distance_mode ( lightranger4_t *ctx, uint8_t mode );
1696
1704
1712void lightranger4_set_center ( lightranger4_t *ctx, uint8_t center_x, uint8_t center_y);
1713
1721void lightranger4_set_zone_size ( lightranger4_t *ctx, uint8_t width, uint8_t height );
1722
1730
1740
1748
1757void lightranger4_set_xshut_pin ( lightranger4_t *ctx, uint8_t state );
1758
1765
1766#ifdef __cplusplus
1767}
1768#endif
1769#endif // _LIGHTRANGER4_H_
1770
1771 // End public_function group
1773
1774// ------------------------------------------------------------------------- END
#define LIGHTRANGER4_RETVAL
Definition lightranger4.h:77
LIGHTRANGER4_RETVAL lightranger4_default_cfg(lightranger4_t *ctx)
Click Default Configuration function.
void lightranger4_set_zone_size(lightranger4_t *ctx, uint8_t width, uint8_t height)
Functions for sets zone size.
void lightranger4_cfg_setup(lightranger4_cfg_t *cfg)
Config Object Initialization function.
void lightranger4_set_center(lightranger4_t *ctx, uint8_t center_x, uint8_t center_y)
Functions for set center position.
uint8_t lightranger4_set_distance_mode(lightranger4_t *ctx, uint8_t mode)
Functions for sets distance measurement mode.
uint16_t lightranger4_get_distance(lightranger4_t *ctx)
Function reads distance of the object in front of the sensor.
void lightranger4_generic_read(lightranger4_t *ctx, uint16_t reg, uint8_t *data_buf, uint8_t len)
Generic read function.
uint16_t lightranger4_get_signal_rate(lightranger4_t *ctx)
Function reads signal rate.
void lightranger4_software_reset(lightranger4_t *ctx)
Function for software reset.
void lightranger4_set_xshut_pin(lightranger4_t *ctx, uint8_t state)
Function for sets XSHUT pin.
LIGHTRANGER4_RETVAL lightranger4_set_measurement_timing_budget(lightranger4_t *ctx, uint32_t budget_us)
Functions for sets measurement timing budget.
uint8_t lightranger4_get_intrrupt_state(lightranger4_t *ctx)
Function reads interrupt pin state.
void lightranger4_start_measurement(lightranger4_t *ctx, uint32_t period_ms)
Functions for start measurement.
void lightranger4_set_user_roi(lightranger4_t *ctx, lightranger4_user_roi_t *roi)
Functions for sets user Roi.
void lightranger4_generic_write(lightranger4_t *ctx, uint16_t reg, uint8_t *data_buf, uint8_t len)
Generic write function.
void lightranger4_power_on(lightranger4_t *ctx)
Function for starts power ON procedure.
uint8_t lightranger4_get_range_status(lightranger4_t *ctx)
Function reads range status.
uint8_t lightranger4_new_data_ready(lightranger4_t *ctx)
Function that checks whether the new data is ready for reading.
LIGHTRANGER4_RETVAL lightranger4_init(lightranger4_t *ctx, lightranger4_cfg_t *cfg)
Initialization function.
Click configuration structure definition.
Definition lightranger4.h:1540
uint32_t i2c_speed
Definition lightranger4.h:1553
pin_name_t xsh
Definition lightranger4.h:1548
pin_name_t scl
Definition lightranger4.h:1543
pin_name_t int_pin
Definition lightranger4.h:1549
pin_name_t sda
Definition lightranger4.h:1544
uint8_t i2c_address
Definition lightranger4.h:1554
Click ctx object definition.
Definition lightranger4.h:1514
uint16_t osc_calibrate_val
Definition lightranger4.h:1532
digital_out_t xsh
Definition lightranger4.h:1517
digital_in_t int_pin
Definition lightranger4.h:1521
i2c_master_t i2c
Definition lightranger4.h:1525
uint16_t fast_osc_frequency
Definition lightranger4.h:1531
uint8_t slave_address
Definition lightranger4.h:1529
User ROI structure definition.
Definition lightranger4.h:1562
uint8_t top_left_x
Definition lightranger4.h:1563
uint8_t bottom_right_y
Definition lightranger4.h:1566
uint8_t bottom_right_x
Definition lightranger4.h:1565
uint8_t top_left_y
Definition lightranger4.h:1564