distance_reg_protocol.h
Go to the documentation of this file.
1 // Copyright (c) Acconeer AB, 2023
2 // All rights reserved
3
4 #ifndef DISTANCE_REG_PROTOCOL_H_
5 #define DISTANCE_REG_PROTOCOL_H_
6
7 #include <stdbool.h>
8 #include <stdint.h>
9
10 // The number of registers in the application
11 #define DISTANCE_REG_REGISTER_COUNT 40U
12
13 // The register address defines
14 #define DISTANCE_REG_VERSION_ADDRESS 0U
15 #define DISTANCE_REG_PROTOCOL_STATUS_ADDRESS 1U
16 #define DISTANCE_REG_MEASURE_COUNTER_ADDRESS 2U
17 #define DISTANCE_REG_DETECTOR_STATUS_ADDRESS 3U
18 #define DISTANCE_REG_DISTANCE_RESULT_ADDRESS 16U
19 #define DISTANCE_REG_PEAK0_DISTANCE_ADDRESS 17U
20 #define DISTANCE_REG_PEAK1_DISTANCE_ADDRESS 18U
21 #define DISTANCE_REG_PEAK2_DISTANCE_ADDRESS 19U
22 #define DISTANCE_REG_PEAK3_DISTANCE_ADDRESS 20U
23 #define DISTANCE_REG_PEAK4_DISTANCE_ADDRESS 21U
24 #define DISTANCE_REG_PEAK5_DISTANCE_ADDRESS 22U
25 #define DISTANCE_REG_PEAK6_DISTANCE_ADDRESS 23U
26 #define DISTANCE_REG_PEAK7_DISTANCE_ADDRESS 24U
27 #define DISTANCE_REG_PEAK8_DISTANCE_ADDRESS 25U
28 #define DISTANCE_REG_PEAK9_DISTANCE_ADDRESS 26U
29 #define DISTANCE_REG_PEAK0_STRENGTH_ADDRESS 27U
30 #define DISTANCE_REG_PEAK1_STRENGTH_ADDRESS 28U
31 #define DISTANCE_REG_PEAK2_STRENGTH_ADDRESS 29U
32 #define DISTANCE_REG_PEAK3_STRENGTH_ADDRESS 30U
33 #define DISTANCE_REG_PEAK4_STRENGTH_ADDRESS 31U
34 #define DISTANCE_REG_PEAK5_STRENGTH_ADDRESS 32U
35 #define DISTANCE_REG_PEAK6_STRENGTH_ADDRESS 33U
36 #define DISTANCE_REG_PEAK7_STRENGTH_ADDRESS 34U
37 #define DISTANCE_REG_PEAK8_STRENGTH_ADDRESS 35U
38 #define DISTANCE_REG_PEAK9_STRENGTH_ADDRESS 36U
39 #define DISTANCE_REG_START_ADDRESS 64U
40 #define DISTANCE_REG_END_ADDRESS 65U
41 #define DISTANCE_REG_MAX_STEP_LENGTH_ADDRESS 66U
42 #define DISTANCE_REG_CLOSE_RANGE_LEAKAGE_CANCELLATION_ADDRESS 67U
43 #define DISTANCE_REG_SIGNAL_QUALITY_ADDRESS 68U
44 #define DISTANCE_REG_MAX_PROFILE_ADDRESS 69U
45 #define DISTANCE_REG_THRESHOLD_METHOD_ADDRESS 70U
46 #define DISTANCE_REG_PEAK_SORTING_ADDRESS 71U
47 #define DISTANCE_REG_NUM_FRAMES_RECORDED_THRESHOLD_ADDRESS 72U
48 #define DISTANCE_REG_FIXED_AMPLITUDE_THRESHOLD_VALUE_ADDRESS 73U
49 #define DISTANCE_REG_THRESHOLD_SENSITIVITY_ADDRESS 74U
50 #define DISTANCE_REG_REFLECTOR_SHAPE_ADDRESS 75U
51 #define DISTANCE_REG_FIXED_STRENGTH_THRESHOLD_VALUE_ADDRESS 76U
52 #define DISTANCE_REG_MEASURE_ON_WAKEUP_ADDRESS 128U
53 #define DISTANCE_REG_COMMAND_ADDRESS 256U
54
55 // The defines for version fields (masks ans bit-positions)
56 #define DISTANCE_REG_VERSION_FIELD_MAJOR_POS 16U
57 #define DISTANCE_REG_VERSION_FIELD_MAJOR_MASK 0xffff0000
58 #define DISTANCE_REG_VERSION_FIELD_MINOR_POS 8U
59 #define DISTANCE_REG_VERSION_FIELD_MINOR_MASK 0x0000ff00
60 #define DISTANCE_REG_VERSION_FIELD_PATCH_POS 0U
61 #define DISTANCE_REG_VERSION_FIELD_PATCH_MASK 0x000000ff
62
63 // The defines for protocol_status fields (masks ans bit-positions)
64 #define DISTANCE_REG_PROTOCOL_STATUS_FIELD_PROTOCOL_STATE_ERROR_POS 0U
65 #define DISTANCE_REG_PROTOCOL_STATUS_FIELD_PROTOCOL_STATE_ERROR_MASK 0x00000001
66 #define DISTANCE_REG_PROTOCOL_STATUS_FIELD_PACKET_LENGTH_ERROR_POS 1U
67 #define DISTANCE_REG_PROTOCOL_STATUS_FIELD_PACKET_LENGTH_ERROR_MASK 0x00000002
68 #define DISTANCE_REG_PROTOCOL_STATUS_FIELD_ADDRESS_ERROR_POS 2U
69 #define DISTANCE_REG_PROTOCOL_STATUS_FIELD_ADDRESS_ERROR_MASK 0x00000004
70 #define DISTANCE_REG_PROTOCOL_STATUS_FIELD_WRITE_FAILED_POS 3U
71 #define DISTANCE_REG_PROTOCOL_STATUS_FIELD_WRITE_FAILED_MASK 0x00000008
72 #define DISTANCE_REG_PROTOCOL_STATUS_FIELD_WRITE_TO_READ_ONLY_POS 4U
73 #define DISTANCE_REG_PROTOCOL_STATUS_FIELD_WRITE_TO_READ_ONLY_MASK 0x00000010
74
75 // The defines for detector_status fields (masks ans bit-positions)
76 #define DISTANCE_REG_DETECTOR_STATUS_FIELD_RSS_REGISTER_OK_POS 0U
77 #define DISTANCE_REG_DETECTOR_STATUS_FIELD_RSS_REGISTER_OK_MASK 0x00000001
78 #define DISTANCE_REG_DETECTOR_STATUS_FIELD_CONFIG_CREATE_OK_POS 1U
79 #define DISTANCE_REG_DETECTOR_STATUS_FIELD_CONFIG_CREATE_OK_MASK 0x00000002
80 #define DISTANCE_REG_DETECTOR_STATUS_FIELD_SENSOR_CREATE_OK_POS 2U
81 #define DISTANCE_REG_DETECTOR_STATUS_FIELD_SENSOR_CREATE_OK_MASK 0x00000004
82 #define DISTANCE_REG_DETECTOR_STATUS_FIELD_DETECTOR_CREATE_OK_POS 3U
83 #define DISTANCE_REG_DETECTOR_STATUS_FIELD_DETECTOR_CREATE_OK_MASK 0x00000008
84 #define DISTANCE_REG_DETECTOR_STATUS_FIELD_DETECTOR_BUFFER_OK_POS 4U
85 #define DISTANCE_REG_DETECTOR_STATUS_FIELD_DETECTOR_BUFFER_OK_MASK 0x00000010
86 #define DISTANCE_REG_DETECTOR_STATUS_FIELD_SENSOR_BUFFER_OK_POS 5U
87 #define DISTANCE_REG_DETECTOR_STATUS_FIELD_SENSOR_BUFFER_OK_MASK 0x00000020
88 #define DISTANCE_REG_DETECTOR_STATUS_FIELD_CALIBRATION_BUFFER_OK_POS 6U
89 #define DISTANCE_REG_DETECTOR_STATUS_FIELD_CALIBRATION_BUFFER_OK_MASK 0x00000040
90 #define DISTANCE_REG_DETECTOR_STATUS_FIELD_CONFIG_APPLY_OK_POS 7U
91 #define DISTANCE_REG_DETECTOR_STATUS_FIELD_CONFIG_APPLY_OK_MASK 0x00000080
92 #define DISTANCE_REG_DETECTOR_STATUS_FIELD_SENSOR_CALIBRATE_OK_POS 8U
93 #define DISTANCE_REG_DETECTOR_STATUS_FIELD_SENSOR_CALIBRATE_OK_MASK 0x00000100
94 #define DISTANCE_REG_DETECTOR_STATUS_FIELD_DETECTOR_CALIBRATE_OK_POS 9U
95 #define DISTANCE_REG_DETECTOR_STATUS_FIELD_DETECTOR_CALIBRATE_OK_MASK 0x00000200
96 #define DISTANCE_REG_DETECTOR_STATUS_FIELD_RSS_REGISTER_ERROR_POS 16U
97 #define DISTANCE_REG_DETECTOR_STATUS_FIELD_RSS_REGISTER_ERROR_MASK 0x00010000
98 #define DISTANCE_REG_DETECTOR_STATUS_FIELD_CONFIG_CREATE_ERROR_POS 17U
99 #define DISTANCE_REG_DETECTOR_STATUS_FIELD_CONFIG_CREATE_ERROR_MASK 0x00020000
100 #define DISTANCE_REG_DETECTOR_STATUS_FIELD_SENSOR_CREATE_ERROR_POS 18U
101 #define DISTANCE_REG_DETECTOR_STATUS_FIELD_SENSOR_CREATE_ERROR_MASK 0x00040000
102 #define DISTANCE_REG_DETECTOR_STATUS_FIELD_DETECTOR_CREATE_ERROR_POS 19U
103 #define DISTANCE_REG_DETECTOR_STATUS_FIELD_DETECTOR_CREATE_ERROR_MASK 0x00080000
104 #define DISTANCE_REG_DETECTOR_STATUS_FIELD_DETECTOR_BUFFER_ERROR_POS 20U
105 #define DISTANCE_REG_DETECTOR_STATUS_FIELD_DETECTOR_BUFFER_ERROR_MASK 0x00100000
106 #define DISTANCE_REG_DETECTOR_STATUS_FIELD_SENSOR_BUFFER_ERROR_POS 21U
107 #define DISTANCE_REG_DETECTOR_STATUS_FIELD_SENSOR_BUFFER_ERROR_MASK 0x00200000
108 #define DISTANCE_REG_DETECTOR_STATUS_FIELD_CALIBRATION_BUFFER_ERROR_POS 22U
109 #define DISTANCE_REG_DETECTOR_STATUS_FIELD_CALIBRATION_BUFFER_ERROR_MASK 0x00400000
110 #define DISTANCE_REG_DETECTOR_STATUS_FIELD_CONFIG_APPLY_ERROR_POS 23U
111 #define DISTANCE_REG_DETECTOR_STATUS_FIELD_CONFIG_APPLY_ERROR_MASK 0x00800000
112 #define DISTANCE_REG_DETECTOR_STATUS_FIELD_SENSOR_CALIBRATE_ERROR_POS 24U
113 #define DISTANCE_REG_DETECTOR_STATUS_FIELD_SENSOR_CALIBRATE_ERROR_MASK 0x01000000
114 #define DISTANCE_REG_DETECTOR_STATUS_FIELD_DETECTOR_CALIBRATE_ERROR_POS 25U
115 #define DISTANCE_REG_DETECTOR_STATUS_FIELD_DETECTOR_CALIBRATE_ERROR_MASK 0x02000000
116 #define DISTANCE_REG_DETECTOR_STATUS_FIELD_DETECTOR_ERROR_POS 28U
117 #define DISTANCE_REG_DETECTOR_STATUS_FIELD_DETECTOR_ERROR_MASK 0x10000000
118 #define DISTANCE_REG_DETECTOR_STATUS_FIELD_BUSY_POS 31U
119 #define DISTANCE_REG_DETECTOR_STATUS_FIELD_BUSY_MASK 0x80000000
120
121 // The defines for distance_result fields (masks ans bit-positions)
122 #define DISTANCE_REG_DISTANCE_RESULT_FIELD_NUM_DISTANCES_POS 0U
123 #define DISTANCE_REG_DISTANCE_RESULT_FIELD_NUM_DISTANCES_MASK 0x0000000f
124 #define DISTANCE_REG_DISTANCE_RESULT_FIELD_NEAR_START_EDGE_POS 8U
125 #define DISTANCE_REG_DISTANCE_RESULT_FIELD_NEAR_START_EDGE_MASK 0x00000100
126 #define DISTANCE_REG_DISTANCE_RESULT_FIELD_CALIBRATION_NEEDED_POS 9U
127 #define DISTANCE_REG_DISTANCE_RESULT_FIELD_CALIBRATION_NEEDED_MASK 0x00000200
128 #define DISTANCE_REG_DISTANCE_RESULT_FIELD_MEASURE_DISTANCE_ERROR_POS 10U
129 #define DISTANCE_REG_DISTANCE_RESULT_FIELD_MEASURE_DISTANCE_ERROR_MASK 0x00000400
130 #define DISTANCE_REG_DISTANCE_RESULT_FIELD_TEMPERATURE_POS 16U
131 #define DISTANCE_REG_DISTANCE_RESULT_FIELD_TEMPERATURE_MASK 0xffff0000
132
133 // The defines for max_profile enum values
134 #define DISTANCE_REG_MAX_PROFILE_ENUM_PROFILE1 1U
135 #define DISTANCE_REG_MAX_PROFILE_ENUM_PROFILE2 2U
136 #define DISTANCE_REG_MAX_PROFILE_ENUM_PROFILE3 3U
137 #define DISTANCE_REG_MAX_PROFILE_ENUM_PROFILE4 4U
138 #define DISTANCE_REG_MAX_PROFILE_ENUM_PROFILE5 5U
139
140 // The defines for threshold_method enum values
141 #define DISTANCE_REG_THRESHOLD_METHOD_ENUM_FIXED_AMPLITUDE 1U
142 #define DISTANCE_REG_THRESHOLD_METHOD_ENUM_RECORDED 2U
143 #define DISTANCE_REG_THRESHOLD_METHOD_ENUM_CFAR 3U
144 #define DISTANCE_REG_THRESHOLD_METHOD_ENUM_FIXED_STRENGTH 4U
145
146 // The defines for peak_sorting enum values
147 #define DISTANCE_REG_PEAK_SORTING_ENUM_CLOSEST 1U
148 #define DISTANCE_REG_PEAK_SORTING_ENUM_STRONGEST 2U
149
150 // The defines for reflector_shape enum values
151 #define DISTANCE_REG_REFLECTOR_SHAPE_ENUM_GENERIC 1U
152 #define DISTANCE_REG_REFLECTOR_SHAPE_ENUM_PLANAR 2U
153
154 // The defines for command enum values
155 #define DISTANCE_REG_COMMAND_ENUM_APPLY_CONFIG_AND_CALIBRATE 1U
156 #define DISTANCE_REG_COMMAND_ENUM_MEASURE_DISTANCE 2U
157 #define DISTANCE_REG_COMMAND_ENUM_APPLY_CONFIGURATION 3U
158 #define DISTANCE_REG_COMMAND_ENUM_CALIBRATE 4U
159 #define DISTANCE_REG_COMMAND_ENUM_RECALIBRATE 5U
160 #define DISTANCE_REG_COMMAND_ENUM_ENABLE_UART_LOGS 32U
161 #define DISTANCE_REG_COMMAND_ENUM_DISABLE_UART_LOGS 33U
162 #define DISTANCE_REG_COMMAND_ENUM_LOG_CONFIGURATION 34U
163 #define DISTANCE_REG_COMMAND_ENUM_RESET_MODULE 0x52535421
164
165 // The config default defines
166 #define DISTANCE_REG_START_DEFAULT_VALUE 250U
167 #define DISTANCE_REG_END_DEFAULT_VALUE 3000U
168 #define DISTANCE_REG_MAX_STEP_LENGTH_DEFAULT_VALUE 0U
169 #define DISTANCE_REG_CLOSE_RANGE_LEAKAGE_CANCELLATION_DEFAULT_VALUE 1U
170 #define DISTANCE_REG_SIGNAL_QUALITY_DEFAULT_VALUE 15000U
171 #define DISTANCE_REG_MAX_PROFILE_DEFAULT_VALUE DISTANCE_REG_MAX_PROFILE_ENUM_PROFILE5
172 #define DISTANCE_REG_THRESHOLD_METHOD_DEFAULT_VALUE DISTANCE_REG_THRESHOLD_METHOD_ENUM_CFAR
173 #define DISTANCE_REG_PEAK_SORTING_DEFAULT_VALUE DISTANCE_REG_PEAK_SORTING_ENUM_STRONGEST
174 #define DISTANCE_REG_NUM_FRAMES_RECORDED_THRESHOLD_DEFAULT_VALUE 100U
175 #define DISTANCE_REG_FIXED_AMPLITUDE_THRESHOLD_VALUE_DEFAULT_VALUE 100000U
176 #define DISTANCE_REG_THRESHOLD_SENSITIVITY_DEFAULT_VALUE 500U
177 #define DISTANCE_REG_REFLECTOR_SHAPE_DEFAULT_VALUE DISTANCE_REG_REFLECTOR_SHAPE_ENUM_GENERIC
178 #define DISTANCE_REG_FIXED_STRENGTH_THRESHOLD_VALUE_DEFAULT_VALUE 0U
179 #define DISTANCE_REG_MEASURE_ON_WAKEUP_DEFAULT_VALUE 0U
180
181
182 /**
183 * The distance protocol setup function.
184 */
185 void distance_reg_protocol_setup(void);
186
187
188 /**
189 * The distance protocol write default register value function.
190 */
191 void distance_reg_protocol_write_default(void);
192
193
194 /**
195 * Read:
196 * Get the RSS version.
197 */
198 void distance_reg_read_version(uint32_t *value);
199
200
201 /**
202 * Read:
203 * Get protocol error flags.
204 */
205 void distance_reg_read_protocol_status(uint32_t *value);
206
207
208 /**
209 * Read:
210 * Get the measure counter, the number of measurements performed since
211 * restart.
212 */
213 void distance_reg_read_measure_counter(uint32_t *value);
214
215
216 /**
217 * Read:
218 * Get detector status flags.
219 */
220 void distance_reg_read_detector_status(uint32_t *value);
221
222
223 /**
224 * Read:
225 * The result from the distance detector.
226 */
227 void distance_reg_read_distance_result(uint32_t *value);
228
229
230 /**
231 * Read:
232 * The distance to peak 0. Note: This value is a factor 1000 larger
233 * than the RSS value.
234 */
235 void distance_reg_read_peak0_distance(uint32_t *value);
236
237
238 /**
239 * Read:
240 * The distance to peak 1. Note: This value is a factor 1000 larger
241 * than the RSS value.
242 */
243 void distance_reg_read_peak1_distance(uint32_t *value);
244
245
246 /**
247 * Read:
248 * The distance to peak 2. Note: This value is a factor 1000 larger
249 * than the RSS value.
250 */
251 void distance_reg_read_peak2_distance(uint32_t *value);
252
253
254 /**
255 * Read:
256 * The distance to peak 3. Note: This value is a factor 1000 larger
257 * than the RSS value.
258 */
259 void distance_reg_read_peak3_distance(uint32_t *value);
260
261
262 /**
263 * Read:
264 * The distance to peak 4. Note: This value is a factor 1000 larger
265 * than the RSS value.
266 */
267 void distance_reg_read_peak4_distance(uint32_t *value);
268
269
270 /**
271 * Read:
272 * The distance to peak 5. Note: This value is a factor 1000 larger
273 * than the RSS value.
274 */
275 void distance_reg_read_peak5_distance(uint32_t *value);
276
277
278 /**
279 * Read:
280 * The distance to peak 6. Note: This value is a factor 1000 larger
281 * than the RSS value.
282 */
283 void distance_reg_read_peak6_distance(uint32_t *value);
284
285
286 /**
287 * Read:
288 * The distance to peak 7. Note: This value is a factor 1000 larger
289 * than the RSS value.
290 */
291 void distance_reg_read_peak7_distance(uint32_t *value);
292
293
294 /**
295 * Read:
296 * The distance to peak 8. Note: This value is a factor 1000 larger
297 * than the RSS value.
298 */
299 void distance_reg_read_peak8_distance(uint32_t *value);
300
301
302 /**
303 * Read:
304 * The distance to peak 9. Note: This value is a factor 1000 larger
305 * than the RSS value.
306 */
307 void distance_reg_read_peak9_distance(uint32_t *value);
308
309
310 /**
311 * Read:
312 * The reflective strength of peak 0. Note: This value is a factor
313 * 1000 larger than the RSS value.
314 */
315 void distance_reg_read_peak0_strength(uint32_t *value);
316
317
318 /**
319 * Read:
320 * The reflective strength of peak 1. Note: This value is a factor
321 * 1000 larger than the RSS value.
322 */
323 void distance_reg_read_peak1_strength(uint32_t *value);
324
325
326 /**
327 * Read:
328 * The reflective strength of peak 2. Note: This value is a factor
329 * 1000 larger than the RSS value.
330 */
331 void distance_reg_read_peak2_strength(uint32_t *value);
332
333
334 /**
335 * Read:
336 * The reflective strength of peak 3. Note: This value is a factor
337 * 1000 larger than the RSS value.
338 */
339 void distance_reg_read_peak3_strength(uint32_t *value);
340
341
342 /**
343 * Read:
344 * The reflective strength of peak 4. Note: This value is a factor
345 * 1000 larger than the RSS value.
346 */
347 void distance_reg_read_peak4_strength(uint32_t *value);
348
349
350 /**
351 * Read:
352 * The reflective strength of peak 5. Note: This value is a factor
353 * 1000 larger than the RSS value.
354 */
355 void distance_reg_read_peak5_strength(uint32_t *value);
356
357
358 /**
359 * Read:
360 * The reflective strength of peak 6. Note: This value is a factor
361 * 1000 larger than the RSS value.
362 */
363 void distance_reg_read_peak6_strength(uint32_t *value);
364
365
366 /**
367 * Read:
368 * The reflective strength of peak 7. Note: This value is a factor
369 * 1000 larger than the RSS value.
370 */
371 void distance_reg_read_peak7_strength(uint32_t *value);
372
373
374 /**
375 * Read:
376 * The reflective strength of peak 8. Note: This value is a factor
377 * 1000 larger than the RSS value.
378 */
379 void distance_reg_read_peak8_strength(uint32_t *value);
380
381
382 /**
383 * Read:
384 * The reflective strength of peak 9. Note: This value is a factor
385 * 1000 larger than the RSS value.
386 */
387 void distance_reg_read_peak9_strength(uint32_t *value);
388
389
390 /**
391 * Read:
392 * The start of measured interval in millimeters. Note: This value is
393 * a factor 1000 larger than the RSS value.
394 */
395 void distance_reg_read_start(uint32_t *value);
396
397
398 /**
399 * Write:
400 * The start of measured interval in millimeters. Note: This value is
401 * a factor 1000 larger than the RSS value.
402 */
403 bool distance_reg_write_start(const uint32_t value);
404
405
406 /**
407 * Read:
408 * The end of measured interval in millimeters. Note: This value is a
409 * factor 1000 larger than the RSS value.
410 */
411 void distance_reg_read_end(uint32_t *value);
412
413
414 /**
415 * Write:
416 * The end of measured interval in millimeters. Note: This value is a
417 * factor 1000 larger than the RSS value.
418 */
419 bool distance_reg_write_end(const uint32_t value);
420
421
422 /**
423 * Read:
424 * Used to limit step length. If set to 0 (default), the step length
425 * is calculated based on profile.
426 */
427 void distance_reg_read_max_step_length(uint32_t *value);
428
429
430 /**
431 * Write:
432 * Used to limit step length. If set to 0 (default), the step length
433 * is calculated based on profile.
434 */
435 bool distance_reg_write_max_step_length(const uint32_t value);
436
437
438 /**
439 * Read:
440 * Enable the close range leakage cancellation logic.
441 */
442 void distance_reg_read_close_range_leakage_cancellation(uint32_t *value);
443
444
445 /**
446 * Write:
447 * Enable the close range leakage cancellation logic.
448 */
449 bool distance_reg_write_close_range_leakage_cancellation(const uint32_t value);
450
451
452 /**
453 * Read:
454 * High signal quality results in a better SNR (because of higher
455 * HWAAS) and higher power consumption. Note:This value is a factor
456 * 1000 larger than the RSS value.
457 */
458 void distance_reg_read_signal_quality(uint32_t *value);
459
460
461 /**
462 * Write:
463 * High signal quality results in a better SNR (because of higher
464 * HWAAS) and higher power consumption. Note:This value is a factor
465 * 1000 larger than the RSS value.
466 */
467 bool distance_reg_write_signal_quality(const uint32_t value);
468
469
470 /**
471 * Read:
472 * Max profile.
473 */
474 void distance_reg_read_max_profile(uint32_t *value);
475
476
477 /**
478 * Write:
479 * Max profile.
480 */
481 bool distance_reg_write_max_profile(const uint32_t value);
482
483
484 /**
485 * Read:
486 * Threshold method.
487 */
488 void distance_reg_read_threshold_method(uint32_t *value);
489
490
491 /**
492 * Write:
493 * Threshold method.
494 */
495 bool distance_reg_write_threshold_method(const uint32_t value);
496
497
498 /**
499 * Read:
500 * Peak sorting method.
501 */
502 void distance_reg_read_peak_sorting(uint32_t *value);
503
504
505 /**
506 * Write:
507 * Peak sorting method.
508 */
509 bool distance_reg_write_peak_sorting(const uint32_t value);
510
511
512 /**
513 * Read:
514 * The number frames to use for recorded threshold.
515 */
516 void distance_reg_read_num_frames_recorded_threshold(uint32_t *value);
517
518
519 /**
520 * Write:
521 * The number frames to use for recorded threshold.
522 */
523 bool distance_reg_write_num_frames_recorded_threshold(const uint32_t value);
524
525
526 /**
527 * Read:
528 * Fixed amplitude threshold value Note: This value is a factor 1000
529 * larger than the RSS value.
530 */
531 void distance_reg_read_fixed_amplitude_threshold_value(uint32_t *value);
532
533
534 /**
535 * Write:
536 * Fixed amplitude threshold value Note: This value is a factor 1000
537 * larger than the RSS value.
538 */
539 bool distance_reg_write_fixed_amplitude_threshold_value(const uint32_t value);
540
541
542 /**
543 * Read:
544 * Threshold sensitivity (0 <= sensitivity <= 1000) Note: This value
545 * is a factor 1000 larger than the RSS value.
546 */
547 void distance_reg_read_threshold_sensitivity(uint32_t *value);
548
549
550 /**
551 * Write:
552 * Threshold sensitivity (0 <= sensitivity <= 1000) Note: This value
553 * is a factor 1000 larger than the RSS value.
554 */
555 bool distance_reg_write_threshold_sensitivity(const uint32_t value);
556
557
558 /**
559 * Read:
560 * Reflector shape.
561 */
562 void distance_reg_read_reflector_shape(uint32_t *value);
563
564
565 /**
566 * Write:
567 * Reflector shape.
568 */
569 bool distance_reg_write_reflector_shape(const uint32_t value);
570
571
572 /**
573 * Read:
574 * Fixed strength threshold value Note: This value is a factor 1000
575 * larger than the RSS value.
576 */
577 void distance_reg_read_fixed_strength_threshold_value(uint32_t *value);
578
579
580 /**
581 * Write:
582 * Fixed strength threshold value Note: This value is a factor 1000
583 * larger than the RSS value.
584 */
585 bool distance_reg_write_fixed_strength_threshold_value(const uint32_t value);
586
587
588 /**
589 * Read:
590 * Perform measure on wake up.
591 */
592 void distance_reg_read_measure_on_wakeup(uint32_t *value);
593
594
595 /**
596 * Write:
597 * Perform measure on wake up.
598 */
599 bool distance_reg_write_measure_on_wakeup(const uint32_t value);
600
601
602 /**
603 * Write:
604 * Execute command.
605 */
606 bool distance_reg_write_command(const uint32_t value);
607
608
609 #endif
distance_reg_read_end
void distance_reg_read_end(uint32_t *value)
Definition: distance_reg_protocol_access.c:258
distance_reg_read_fixed_amplitude_threshold_value
void distance_reg_read_fixed_amplitude_threshold_value(uint32_t *value)
Definition: distance_reg_protocol_access.c:572
distance_reg_read_peak4_strength
void distance_reg_read_peak4_strength(uint32_t *value)
Definition: distance_reg_protocol_access.c:197
distance_reg_read_version
void distance_reg_read_version(uint32_t *value)
Definition: distance_reg_protocol_access.c:55
distance_reg_write_measure_on_wakeup
bool distance_reg_write_measure_on_wakeup(const uint32_t value)
Definition: distance_reg_protocol_access.c:715
distance_reg_read_peak_sorting
void distance_reg_read_peak_sorting(uint32_t *value)
Definition: distance_reg_protocol_access.c:494
distance_reg_read_peak5_strength
void distance_reg_read_peak5_strength(uint32_t *value)
Definition: distance_reg_protocol_access.c:203
distance_reg_write_max_step_length
bool distance_reg_write_max_step_length(const uint32_t value)
Definition: distance_reg_protocol_access.c:291
distance_reg_read_peak7_strength
void distance_reg_read_peak7_strength(uint32_t *value)
Definition: distance_reg_protocol_access.c:215
distance_reg_read_peak9_distance
void distance_reg_read_peak9_distance(uint32_t *value)
Definition: distance_reg_protocol_access.c:167
distance_reg_read_fixed_strength_threshold_value
void distance_reg_read_fixed_strength_threshold_value(uint32_t *value)
Definition: distance_reg_protocol_access.c:597
distance_reg_read_peak4_distance
void distance_reg_read_peak4_distance(uint32_t *value)
Definition: distance_reg_protocol_access.c:137
distance_reg_read_detector_status
void distance_reg_read_detector_status(uint32_t *value)
Definition: distance_reg_protocol_access.c:101
distance_reg_write_reflector_shape
bool distance_reg_write_reflector_shape(const uint32_t value)
Definition: distance_reg_protocol_access.c:669
distance_reg_read_num_frames_recorded_threshold
void distance_reg_read_num_frames_recorded_threshold(uint32_t *value)
Definition: distance_reg_protocol_access.c:549
distance_reg_write_threshold_sensitivity
bool distance_reg_write_threshold_sensitivity(const uint32_t value)
Definition: distance_reg_protocol_access.c:631
distance_reg_read_protocol_status
void distance_reg_read_protocol_status(uint32_t *value)
Definition: distance_reg_protocol_access.c:61
distance_reg_write_fixed_strength_threshold_value
bool distance_reg_write_fixed_strength_threshold_value(const uint32_t value)
Definition: distance_reg_protocol_access.c:606
distance_reg_write_signal_quality
bool distance_reg_write_signal_quality(const uint32_t value)
Definition: distance_reg_protocol_access.c:338
distance_reg_read_distance_result
void distance_reg_read_distance_result(uint32_t *value)
Definition: distance_reg_protocol_access.c:107
distance_reg_read_max_profile
void distance_reg_read_max_profile(uint32_t *value)
Definition: distance_reg_protocol_access.c:354
distance_reg_read_max_step_length
void distance_reg_read_max_step_length(uint32_t *value)
Definition: distance_reg_protocol_access.c:283
distance_reg_read_peak1_distance
void distance_reg_read_peak1_distance(uint32_t *value)
Definition: distance_reg_protocol_access.c:119
distance_reg_read_peak1_strength
void distance_reg_read_peak1_strength(uint32_t *value)
Definition: distance_reg_protocol_access.c:179
distance_reg_read_measure_counter
void distance_reg_read_measure_counter(uint32_t *value)
Definition: distance_reg_protocol_access.c:95
distance_reg_protocol_write_default
void distance_reg_protocol_write_default(void)
Definition: distance_reg_protocol.c:228
distance_reg_read_measure_on_wakeup
void distance_reg_read_measure_on_wakeup(uint32_t *value)
Definition: distance_reg_protocol_access.c:702
distance_reg_read_peak2_strength
void distance_reg_read_peak2_strength(uint32_t *value)
Definition: distance_reg_protocol_access.c:185
distance_reg_read_peak6_strength
void distance_reg_read_peak6_strength(uint32_t *value)
Definition: distance_reg_protocol_access.c:209
distance_reg_read_threshold_sensitivity
void distance_reg_read_threshold_sensitivity(uint32_t *value)
Definition: distance_reg_protocol_access.c:622
distance_reg_write_max_profile
bool distance_reg_write_max_profile(const uint32_t value)
Definition: distance_reg_protocol_access.c:385
distance_reg_read_peak7_distance
void distance_reg_read_peak7_distance(uint32_t *value)
Definition: distance_reg_protocol_access.c:155
distance_reg_read_peak8_strength
void distance_reg_read_peak8_strength(uint32_t *value)
Definition: distance_reg_protocol_access.c:221
distance_reg_read_peak6_distance
void distance_reg_read_peak6_distance(uint32_t *value)
Definition: distance_reg_protocol_access.c:149
distance_reg_read_threshold_method
void distance_reg_read_threshold_method(uint32_t *value)
Definition: distance_reg_protocol_access.c:427
distance_reg_write_end
bool distance_reg_write_end(const uint32_t value)
Definition: distance_reg_protocol_access.c:267
distance_reg_protocol_setup
void distance_reg_protocol_setup(void)
Definition: distance_reg_protocol.c:222
distance_reg_write_close_range_leakage_cancellation
bool distance_reg_write_close_range_leakage_cancellation(const uint32_t value)
Definition: distance_reg_protocol_access.c:314
distance_reg_write_command
bool distance_reg_write_command(const uint32_t value)
Definition: distance_reg_protocol_access.c:725
distance_reg_read_peak0_distance
void distance_reg_read_peak0_distance(uint32_t *value)
Definition: distance_reg_protocol_access.c:113
distance_reg_read_reflector_shape
void distance_reg_read_reflector_shape(uint32_t *value)
Definition: distance_reg_protocol_access.c:647
distance_reg_write_start
bool distance_reg_write_start(const uint32_t value)
Definition: distance_reg_protocol_access.c:242
distance_reg_read_peak3_distance
void distance_reg_read_peak3_distance(uint32_t *value)
Definition: distance_reg_protocol_access.c:131
distance_reg_write_peak_sorting
bool distance_reg_write_peak_sorting(const uint32_t value)
Definition: distance_reg_protocol_access.c:516
distance_reg_read_close_range_leakage_cancellation
void distance_reg_read_close_range_leakage_cancellation(uint32_t *value)
Definition: distance_reg_protocol_access.c:306
distance_reg_read_signal_quality
void distance_reg_read_signal_quality(uint32_t *value)
Definition: distance_reg_protocol_access.c:329
distance_reg_write_num_frames_recorded_threshold
bool distance_reg_write_num_frames_recorded_threshold(const uint32_t value)
Definition: distance_reg_protocol_access.c:557
distance_reg_read_start
void distance_reg_read_start(uint32_t *value)
Definition: distance_reg_protocol_access.c:233
distance_reg_read_peak3_strength
void distance_reg_read_peak3_strength(uint32_t *value)
Definition: distance_reg_protocol_access.c:191
distance_reg_read_peak2_distance
void distance_reg_read_peak2_distance(uint32_t *value)
Definition: distance_reg_protocol_access.c:125
distance_reg_write_threshold_method
bool distance_reg_write_threshold_method(const uint32_t value)
Definition: distance_reg_protocol_access.c:455
distance_reg_write_fixed_amplitude_threshold_value
bool distance_reg_write_fixed_amplitude_threshold_value(const uint32_t value)
Definition: distance_reg_protocol_access.c:581
distance_reg_read_peak9_strength
void distance_reg_read_peak9_strength(uint32_t *value)
Definition: distance_reg_protocol_access.c:227
distance_reg_read_peak8_distance
void distance_reg_read_peak8_distance(uint32_t *value)
Definition: distance_reg_protocol_access.c:161
distance_reg_read_peak0_strength
void distance_reg_read_peak0_strength(uint32_t *value)
Definition: distance_reg_protocol_access.c:173
distance_reg_read_peak5_distance
void distance_reg_read_peak5_distance(uint32_t *value)
Definition: distance_reg_protocol_access.c:143