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_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_inter_phase_boost_enabled (uint32_t *value)
bool | presence_reg_write_inter_phase_boost_enabled (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_detection_on_gpio (uint32_t *value)
bool | presence_reg_write_detection_on_gpio (const 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 744 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 463 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 489 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 710 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 78 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 636 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 238 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 687 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 212 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 288 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 313 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 338 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 137 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 363 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 438 of file presence_reg_protocol_access.c.

## ◆ presence_reg_read_inter_phase_boost_enabled()

void presence_reg_read_inter_phase_boost_enabled | ( | uint32_t * | value | ) |

Read: Enable to increase detection of slow motions by utilizing the phase information in the Sparse IQ data.

Definition at line 160 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.

Definition at line 106 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 186 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 263 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 388 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 413 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.

Definition at line 98 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 515 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 588 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_distance()

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

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

Definition at line 90 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 84 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 38 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 661 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 611 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 114 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 32 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 473 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 499 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 733 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 723 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 645 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 247 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 695 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 222 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 297 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 322 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 347 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 145 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 372 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 447 of file presence_reg_protocol_access.c.

## ◆ presence_reg_write_inter_phase_boost_enabled()

bool presence_reg_write_inter_phase_boost_enabled | ( | const uint32_t | value | ) |

Write: Enable to increase detection of slow motions by utilizing the phase information in the Sparse IQ data.

Definition at line 170 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 196 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 272 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 397 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 422 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 546 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 596 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 671 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 620 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 122 of file presence_reg_protocol_access.c.