Functions
presence_reg_protocol_access.c File Reference
`#include <stdbool.h>`
`#include <stdint.h>`
`#include "acc_detector_presence.h"`
`#include "acc_integration.h"`
`#include "acc_version.h"`
`#include "acc_reg_protocol.h"`
`#include "i2c_presence_detector.h"`
`#include "presence_reg_protocol.h"`

Go to the source code of this file.

## Functions
static uint32_t | get_protocol_error_flags (void)
| Get the protocol error status flags. More...
void | presence_reg_read_application_id (uint32_t *value)
void | presence_reg_read_version (uint32_t *value)
void | presence_reg_read_protocol_status (uint32_t *value)
void | presence_reg_read_measure_counter (uint32_t *value)
void | presence_reg_read_detector_status (uint32_t *value)
void | presence_reg_read_presence_result (uint32_t *value)
void | presence_reg_read_presence_distance (uint32_t *value)
void | presence_reg_read_intra_presence_score (uint32_t *value)
void | presence_reg_read_inter_presence_score (uint32_t *value)
void | presence_reg_read_sweeps_per_frame (uint32_t *value)
bool | presence_reg_write_sweeps_per_frame (const uint32_t value)
void | presence_reg_read_inter_frame_presence_timeout (uint32_t *value)
bool | presence_reg_write_inter_frame_presence_timeout (const uint32_t value)
void | presence_reg_read_intra_detection_enabled (uint32_t *value)
bool | presence_reg_write_intra_detection_enabled (const uint32_t value)
void | presence_reg_read_inter_detection_enabled (uint32_t *value)
bool | presence_reg_write_inter_detection_enabled (const uint32_t value)
void | presence_reg_read_frame_rate (uint32_t *value)
bool | presence_reg_write_frame_rate (const uint32_t value)
void | presence_reg_read_intra_detection_threshold (uint32_t *value)
bool | presence_reg_write_intra_detection_threshold (const uint32_t value)
void | presence_reg_read_inter_detection_threshold (uint32_t *value)
bool | presence_reg_write_inter_detection_threshold (const uint32_t value)
void | presence_reg_read_inter_frame_deviation_time_const (uint32_t *value)
bool | presence_reg_write_inter_frame_deviation_time_const (const uint32_t value)
void | presence_reg_read_inter_frame_fast_cutoff (uint32_t *value)
bool | presence_reg_write_inter_frame_fast_cutoff (const uint32_t value)
void | presence_reg_read_inter_frame_slow_cutoff (uint32_t *value)
bool | presence_reg_write_inter_frame_slow_cutoff (const uint32_t value)
void | presence_reg_read_intra_frame_time_const (uint32_t *value)
bool | presence_reg_write_intra_frame_time_const (const uint32_t value)
void | presence_reg_read_intra_output_time_const (uint32_t *value)
bool | presence_reg_write_intra_output_time_const (const uint32_t value)
void | presence_reg_read_inter_output_time_const (uint32_t *value)
bool | presence_reg_write_inter_output_time_const (const uint32_t value)
void | presence_reg_read_auto_profile_enabled (uint32_t *value)
bool | presence_reg_write_auto_profile_enabled (const uint32_t value)
void | presence_reg_read_auto_step_length_enabled (uint32_t *value)
bool | presence_reg_write_auto_step_length_enabled (const uint32_t value)
void | presence_reg_read_manual_profile (uint32_t *value)
bool | presence_reg_write_manual_profile (const uint32_t value)
void | presence_reg_read_manual_step_length (uint32_t *value)
bool | presence_reg_write_manual_step_length (const uint32_t value)
void | presence_reg_read_start (uint32_t *value)
bool | presence_reg_write_start (const uint32_t value)
void | presence_reg_read_end (uint32_t *value)
bool | presence_reg_write_end (const uint32_t value)
void | presence_reg_read_reset_filters_on_prepare (uint32_t *value)
bool | presence_reg_write_reset_filters_on_prepare (const uint32_t value)
void | presence_reg_read_hwaas (uint32_t *value)
bool | presence_reg_write_hwaas (uint32_t value)
void | presence_reg_read_automatic_subsweeps (uint32_t *value)
bool | presence_reg_write_automatic_subsweeps (const uint32_t value)
void | presence_reg_read_signal_quality (uint32_t *value)
bool | presence_reg_write_signal_quality (const uint32_t value)
void | presence_reg_read_detection_on_gpio (uint32_t *value)
bool | presence_reg_write_detection_on_gpio (const uint32_t value)
void | presence_reg_read_presence_actual_frame_rate (uint32_t *value)
bool | presence_reg_write_command (const uint32_t value)

## Function Documentation

## ◆ get_protocol_error_flags()

static uint32_t get_protocol_error_flags | ( | void |  | ) |
| static

Get the protocol error status flags.

Returns
  error flags as uint32 register value

Definition at line 718 of file presence_reg_protocol_access.c.

## ◆ presence_reg_read_application_id()

void presence_reg_read_application_id | ( | uint32_t * | value | ) |

Read: The application id register.

Definition at line 29 of file presence_reg_protocol_access.c.

## ◆ presence_reg_read_auto_profile_enabled()

void presence_reg_read_auto_profile_enabled | ( | uint32_t * | value | ) |

Read: Enable/Disable automatic selection of profile based on start point of measurement.

Definition at line 405 of file presence_reg_protocol_access.c.

## ◆ presence_reg_read_auto_step_length_enabled()

void presence_reg_read_auto_step_length_enabled | ( | uint32_t * | value | ) |

Read: Enable/Disable automatic selection of step length based on the profile.

Definition at line 429 of file presence_reg_protocol_access.c.

## ◆ presence_reg_read_automatic_subsweeps()

void presence_reg_read_automatic_subsweeps | ( | uint32_t * | value | ) |

Read: Enable/Disable use of subsweeps.

Definition at line 636 of file presence_reg_protocol_access.c.

## ◆ presence_reg_read_detection_on_gpio()

void presence_reg_read_detection_on_gpio | ( | uint32_t * | value | ) |

Read: Output presence detection on generic gpio

Definition at line 683 of file presence_reg_protocol_access.c.

## ◆ presence_reg_read_detector_status()

void presence_reg_read_detector_status | ( | uint32_t * | value | ) |

Read: Get detector status flags.

Definition at line 77 of file presence_reg_protocol_access.c.

## ◆ presence_reg_read_end()

void presence_reg_read_end | ( | uint32_t * | value | ) |

Read: The end point of measurement interval in millimeters. Note: This value is a factor 1000 larger than the RSS value.

Definition at line 568 of file presence_reg_protocol_access.c.

## ◆ presence_reg_read_frame_rate()

void presence_reg_read_frame_rate | ( | uint32_t * | value | ) |

Read: The presence detector frame rate. Note: This value is a factor 1000 larger than the RSS value.

Definition at line 198 of file presence_reg_protocol_access.c.

## ◆ presence_reg_read_hwaas()

void presence_reg_read_hwaas | ( | uint32_t * | value | ) |

Read: The hardware accelerated average samples (HWAAS).

Definition at line 615 of file presence_reg_protocol_access.c.

## ◆ presence_reg_read_inter_detection_enabled()

void presence_reg_read_inter_detection_enabled | ( | uint32_t * | value | ) |

Read: Enable to detect slower movements between frames.

Definition at line 174 of file presence_reg_protocol_access.c.

## ◆ presence_reg_read_inter_detection_threshold()

void presence_reg_read_inter_detection_threshold | ( | uint32_t * | value | ) |

Read: This is the threshold for detecting slower movements between frames. Note: This value is a factor 1000 larger than the RSS value.

Definition at line 244 of file presence_reg_protocol_access.c.

## ◆ presence_reg_read_inter_frame_deviation_time_const()

void presence_reg_read_inter_frame_deviation_time_const | ( | uint32_t * | value | ) |

Read: The time constant of the low pass filter for the inter-frame deviation between fast and slow. Note: This value is a factor 1000 larger than the RSS value.

Definition at line 267 of file presence_reg_protocol_access.c.

## ◆ presence_reg_read_inter_frame_fast_cutoff()

void presence_reg_read_inter_frame_fast_cutoff | ( | uint32_t * | value | ) |

Read: The cutoff frequency of the low pass filter for the fast filtered absolute sweep mean. Note: This value is a factor 1000 larger than the RSS value.

Definition at line 290 of file presence_reg_protocol_access.c.

## ◆ presence_reg_read_inter_frame_presence_timeout()

void presence_reg_read_inter_frame_presence_timeout | ( | uint32_t * | value | ) |

Read: Number of seconds the inter-frame presence score needs to decrease before exponential scaling starts for faster decline. Should be between 0 and 30 where 0 means no timeout. Note:

Definition at line 129 of file presence_reg_protocol_access.c.

## ◆ presence_reg_read_inter_frame_slow_cutoff()

void presence_reg_read_inter_frame_slow_cutoff | ( | uint32_t * | value | ) |

Read: The cutoff frequency of the low pass filter for the slow filtered absolute sweep mean. Note: This value is a factor 1000 larger than the RSS value.

Definition at line 313 of file presence_reg_protocol_access.c.

## ◆ presence_reg_read_inter_output_time_const()

void presence_reg_read_inter_output_time_const | ( | uint32_t * | value | ) |

Read: The time constant for the output in the inter-frame part. Note: This value is a factor 1000 larger than the RSS value.

Definition at line 382 of file presence_reg_protocol_access.c.

## ◆ presence_reg_read_inter_presence_score()

void presence_reg_read_inter_presence_score | ( | uint32_t * | value | ) |

Read: A measure of the amount of slow motion detected. Just like the configuration register inter_detection_threshold, this field is a factor 1000 larger than the RSS value.

Definition at line 101 of file presence_reg_protocol_access.c.

## ◆ presence_reg_read_intra_detection_enabled()

void presence_reg_read_intra_detection_enabled | ( | uint32_t * | value | ) |

Read: Enable to detect faster movements inside frames.

Definition at line 150 of file presence_reg_protocol_access.c.

## ◆ presence_reg_read_intra_detection_threshold()

void presence_reg_read_intra_detection_threshold | ( | uint32_t * | value | ) |

Read: The threshold for detecting faster movements inside frames. Note: This value is a factor 1000 larger than the RSS value.

Definition at line 221 of file presence_reg_protocol_access.c.

## ◆ presence_reg_read_intra_frame_time_const()

void presence_reg_read_intra_frame_time_const | ( | uint32_t * | value | ) |

Read: The time constant for the depthwise filtering in the intra-frame part. Note: This value is a factor 1000 larger than the RSS value.

Definition at line 336 of file presence_reg_protocol_access.c.

## ◆ presence_reg_read_intra_output_time_const()

void presence_reg_read_intra_output_time_const | ( | uint32_t * | value | ) |

Read: The time constant for the output in the intra-frame part. Note: This value is a factor 1000 larger than the RSS value.

Definition at line 359 of file presence_reg_protocol_access.c.

## ◆ presence_reg_read_intra_presence_score()

void presence_reg_read_intra_presence_score | ( | uint32_t * | value | ) |

Read: A measure of the amount of fast motion detected. Just like the configuration register intra_detection_threshold, this field is a factor 1000 larger than the RSS value.

Definition at line 94 of file presence_reg_protocol_access.c.

## ◆ presence_reg_read_manual_profile()

void presence_reg_read_manual_profile | ( | uint32_t * | value | ) |

Read: The profile to use. The profile will only be used if profile auto selection was disabled.

Definition at line 453 of file presence_reg_protocol_access.c.

## ◆ presence_reg_read_manual_step_length()

void presence_reg_read_manual_step_length | ( | uint32_t * | value | ) |

Read: The number of steps between each data point. The manual step length will only be used if step length auto selection was disabled.

Definition at line 524 of file presence_reg_protocol_access.c.

## ◆ presence_reg_read_measure_counter()

void presence_reg_read_measure_counter | ( | uint32_t * | value | ) |

Read: Get the measure counter, the number of measurements performed since restart.

Definition at line 72 of file presence_reg_protocol_access.c.

## ◆ presence_reg_read_presence_actual_frame_rate()

void presence_reg_read_presence_actual_frame_rate | ( | uint32_t * | value | ) |

Read: The actual frame rate of the presence detector.

Definition at line 704 of file presence_reg_protocol_access.c.

## ◆ presence_reg_read_presence_distance()

void presence_reg_read_presence_distance | ( | uint32_t * | value | ) |

Read: The distance, in millimeters, for the detected presence

Definition at line 87 of file presence_reg_protocol_access.c.

## ◆ presence_reg_read_presence_result()

void presence_reg_read_presence_result | ( | uint32_t * | value | ) |

Read: The result from the presence detector.

Definition at line 82 of file presence_reg_protocol_access.c.

## ◆ presence_reg_read_protocol_status()

void presence_reg_read_protocol_status | ( | uint32_t * | value | ) |

Read: Get protocol error flags.

Definition at line 39 of file presence_reg_protocol_access.c.

## ◆ presence_reg_read_reset_filters_on_prepare()

void presence_reg_read_reset_filters_on_prepare | ( | uint32_t * | value | ) |

Read: Enable/Disable reset of the presence filters during start/restart.

Definition at line 591 of file presence_reg_protocol_access.c.

## ◆ presence_reg_read_signal_quality()

void presence_reg_read_signal_quality | ( | uint32_t * | value | ) |

Read: Signal quality.

Definition at line 660 of file presence_reg_protocol_access.c.

## ◆ presence_reg_read_start()

void presence_reg_read_start | ( | uint32_t * | value | ) |

Read: The start point of measurement interval in millimeters. Note: This value is a factor 1000 larger than the RSS value.

Definition at line 545 of file presence_reg_protocol_access.c.

## ◆ presence_reg_read_sweeps_per_frame()

void presence_reg_read_sweeps_per_frame | ( | uint32_t * | value | ) |

Read: The number of sweeps that will be captured in each frame (measurement).

Definition at line 108 of file presence_reg_protocol_access.c.

## ◆ presence_reg_read_version()

void presence_reg_read_version | ( | uint32_t * | value | ) |

Read: Get the RSS version.

Definition at line 34 of file presence_reg_protocol_access.c.

## ◆ presence_reg_write_auto_profile_enabled()

bool presence_reg_write_auto_profile_enabled | ( | const uint32_t | value | ) |

Write: Enable/Disable automatic selection of profile based on start point of measurement.

Definition at line 414 of file presence_reg_protocol_access.c.

## ◆ presence_reg_write_auto_step_length_enabled()

bool presence_reg_write_auto_step_length_enabled | ( | const uint32_t | value | ) |

Write: Enable/Disable automatic selection of step length based on the profile.

Definition at line 438 of file presence_reg_protocol_access.c.

## ◆ presence_reg_write_automatic_subsweeps()

bool presence_reg_write_automatic_subsweeps | ( | const uint32_t | value | ) |

Write: Enable/Disable use of subsweeps.

Definition at line 645 of file presence_reg_protocol_access.c.

## ◆ presence_reg_write_command()

bool presence_reg_write_command | ( | const uint32_t | value | ) |

Write: Execute command.

Definition at line 709 of file presence_reg_protocol_access.c.

## ◆ presence_reg_write_detection_on_gpio()

bool presence_reg_write_detection_on_gpio | ( | const uint32_t | value | ) |

Write: Output presence detection on generic gpio

Definition at line 695 of file presence_reg_protocol_access.c.

## ◆ presence_reg_write_end()

bool presence_reg_write_end | ( | const uint32_t | value | ) |

Write: The end point of measurement interval in millimeters. Note: This value is a factor 1000 larger than the RSS value.

Definition at line 576 of file presence_reg_protocol_access.c.

## ◆ presence_reg_write_frame_rate()

bool presence_reg_write_frame_rate | ( | const uint32_t | value | ) |

Write: The presence detector frame rate. Note: This value is a factor 1000 larger than the RSS value.

Definition at line 206 of file presence_reg_protocol_access.c.

## ◆ presence_reg_write_hwaas()

bool presence_reg_write_hwaas | ( | const uint32_t | value | ) |

Write: The hardware accelerated average samples (HWAAS).

Definition at line 622 of file presence_reg_protocol_access.c.

## ◆ presence_reg_write_inter_detection_enabled()

bool presence_reg_write_inter_detection_enabled | ( | const uint32_t | value | ) |

Write: Enable to detect slower movements between frames.

Definition at line 183 of file presence_reg_protocol_access.c.

## ◆ presence_reg_write_inter_detection_threshold()

bool presence_reg_write_inter_detection_threshold | ( | const uint32_t | value | ) |

Write: This is the threshold for detecting slower movements between frames. Note: This value is a factor 1000 larger than the RSS value.

Definition at line 252 of file presence_reg_protocol_access.c.

## ◆ presence_reg_write_inter_frame_deviation_time_const()

bool presence_reg_write_inter_frame_deviation_time_const | ( | const uint32_t | value | ) |

Write: The time constant of the low pass filter for the inter-frame deviation between fast and slow. Note: This value is a factor 1000 larger than the RSS value.

Definition at line 275 of file presence_reg_protocol_access.c.

## ◆ presence_reg_write_inter_frame_fast_cutoff()

bool presence_reg_write_inter_frame_fast_cutoff | ( | const uint32_t | value | ) |

Write: The cutoff frequency of the low pass filter for the fast filtered absolute sweep mean. Note: This value is a factor 1000 larger than the RSS value.

Definition at line 298 of file presence_reg_protocol_access.c.

## ◆ presence_reg_write_inter_frame_presence_timeout()

bool presence_reg_write_inter_frame_presence_timeout | ( | const uint32_t | value | ) |

Write: Number of seconds the inter-frame presence score needs to decrease before exponential scaling starts for faster decline. Should be between 0 and 30 where 0 means no timeout. Note:

Definition at line 136 of file presence_reg_protocol_access.c.

## ◆ presence_reg_write_inter_frame_slow_cutoff()

bool presence_reg_write_inter_frame_slow_cutoff | ( | const uint32_t | value | ) |

Write: The cutoff frequency of the low pass filter for the slow filtered absolute sweep mean. Note: This value is a factor 1000 larger than the RSS value.

Definition at line 321 of file presence_reg_protocol_access.c.

## ◆ presence_reg_write_inter_output_time_const()

bool presence_reg_write_inter_output_time_const | ( | const uint32_t | value | ) |

Write: The time constant for the output in the inter-frame part. Note: This value is a factor 1000 larger than the RSS value.

Definition at line 390 of file presence_reg_protocol_access.c.

## ◆ presence_reg_write_intra_detection_enabled()

bool presence_reg_write_intra_detection_enabled | ( | const uint32_t | value | ) |

Write: Enable to detect faster movements inside frames.

Definition at line 159 of file presence_reg_protocol_access.c.

## ◆ presence_reg_write_intra_detection_threshold()

bool presence_reg_write_intra_detection_threshold | ( | const uint32_t | value | ) |

Write: The threshold for detecting faster movements inside frames. Note: This value is a factor 1000 larger than the RSS value.

Definition at line 229 of file presence_reg_protocol_access.c.

## ◆ presence_reg_write_intra_frame_time_const()

bool presence_reg_write_intra_frame_time_const | ( | const uint32_t | value | ) |

Write: The time constant for the depthwise filtering in the intra-frame part. Note: This value is a factor 1000 larger than the RSS value.

Definition at line 344 of file presence_reg_protocol_access.c.

## ◆ presence_reg_write_intra_output_time_const()

bool presence_reg_write_intra_output_time_const | ( | const uint32_t | value | ) |

Write: The time constant for the output in the intra-frame part. Note: This value is a factor 1000 larger than the RSS value.

Definition at line 367 of file presence_reg_protocol_access.c.

## ◆ presence_reg_write_manual_profile()

bool presence_reg_write_manual_profile | ( | const uint32_t | value | ) |

Write: The profile to use. The profile will only be used if profile auto selection was disabled.

Definition at line 483 of file presence_reg_protocol_access.c.

## ◆ presence_reg_write_manual_step_length()

bool presence_reg_write_manual_step_length | ( | const uint32_t | value | ) |

Write: The number of steps between each data point. The manual step length will only be used if step length auto selection was disabled.

Definition at line 531 of file presence_reg_protocol_access.c.

## ◆ presence_reg_write_reset_filters_on_prepare()

bool presence_reg_write_reset_filters_on_prepare | ( | const uint32_t | value | ) |

Write: Enable/Disable reset of the presence filters during start/restart.

Definition at line 600 of file presence_reg_protocol_access.c.

## ◆ presence_reg_write_signal_quality()

bool presence_reg_write_signal_quality | ( | const uint32_t | value | ) |

Write: Signal quality.

Definition at line 668 of file presence_reg_protocol_access.c.

## ◆ presence_reg_write_start()

bool presence_reg_write_start | ( | const uint32_t | value | ) |

Write: The start point of measurement interval in millimeters. Note: This value is a factor 1000 larger than the RSS value.

Definition at line 553 of file presence_reg_protocol_access.c.

## ◆ presence_reg_write_sweeps_per_frame()

bool presence_reg_write_sweeps_per_frame | ( | const uint32_t | value | ) |

Write: The number of sweeps that will be captured in each frame (measurement).

Definition at line 115 of file presence_reg_protocol_access.c.