Go to the documentation of this file.
64 uint32_t protocol_status = 0;
91 *value = protocol_status;
358 uint32_t profile_value = 0;
381 *value = profile_value;
431 uint32_t threshold_method_value = 0;
433 switch (threshold_method)
451 *value = threshold_method_value;
498 uint32_t peak_sorting_value = 0;
500 switch (peak_sorting)
512 *value = peak_sorting_value;
651 uint32_t reflector_shape_value = 0;
653 switch (reflector_shape)
665 *value = reflector_shape_value;
717 bool enable = (value != 0);
void distance_reg_read_reflector_shape(uint32_t *value)
void distance_reg_read_peak9_distance(uint32_t *value)
@ ACC_DETECTOR_DISTANCE_REFLECTOR_SHAPE_GENERIC
float acc_detector_distance_config_fixed_amplitude_threshold_value_get(const acc_detector_distance_config_t *config)
Get fixed amplitude threshold value.
uint32_t acc_reg_protocol_float_to_uint32_milli(float value)
Convert 1000 * float to uint32.
#define DISTANCE_REG_PROTOCOL_STATUS_FIELD_WRITE_TO_READ_ONLY_MASK
void acc_detector_distance_config_peak_sorting_set(acc_detector_distance_config_t *config, acc_detector_distance_peak_sorting_t peak_sorting)
Set the peak sorting method.
void distance_reg_read_peak0_strength(uint32_t *value)
void distance_reg_read_peak7_distance(uint32_t *value)
bool distance_reg_write_fixed_strength_threshold_value(const uint32_t value)
#define DISTANCE_REG_MAX_PROFILE_ENUM_PROFILE1
bool acc_detector_distance_config_close_range_leakage_cancellation_get(const acc_detector_distance_config_t *config)
Get if the close range leakage cancellation logic is enabled.
uint32_t acc_reg_protocol_get_error_flags(void)
Get the error flags for the register protocol.
#define ACC_REG_ERROR_FLAG_PACKET_LENGTH_ERROR
void distance_reg_read_end(uint32_t *value)
#define DISTANCE_REG_THRESHOLD_METHOD_ENUM_FIXED_AMPLITUDE
acc_config_profile_t
Profile.
void distance_reg_read_distance_result(uint32_t *value)
void distance_reg_read_num_frames_recorded_threshold(uint32_t *value)
@ ACC_DETECTOR_DISTANCE_PEAK_SORTING_STRONGEST
bool distance_reg_write_close_range_leakage_cancellation(const uint32_t value)
void distance_reg_read_peak9_strength(uint32_t *value)
#define DISTANCE_REG_THRESHOLD_METHOD_ENUM_FIXED_STRENGTH
void distance_reg_read_peak5_distance(uint32_t *value)
#define ACC_REG_ERROR_FLAG_ADDRESS_ERROR
void acc_detector_distance_config_threshold_method_set(acc_detector_distance_config_t *config, acc_detector_distance_threshold_method_t threshold_method)
Set the threshold method.
void distance_reg_read_peak2_strength(uint32_t *value)
void distance_reg_read_measure_on_wakeup(uint32_t *value)
void distance_reg_read_max_profile(uint32_t *value)
void acc_detector_distance_config_start_set(acc_detector_distance_config_t *config, float start_m)
Set the start of measured interval in meters.
void acc_detector_distance_config_fixed_amplitude_threshold_value_set(acc_detector_distance_config_t *config, float fixed_threshold_value)
Set fixed amplitude threshold value.
acc_detector_distance_peak_sorting_t
Enum for peak sorting algorithms.
void acc_integration_critical_section_exit(void)
void distance_reg_read_peak3_distance(uint32_t *value)
acc_detector_distance_peak_sorting_t acc_detector_distance_config_peak_sorting_get(const acc_detector_distance_config_t *config)
Get the peak sorting method.
bool distance_reg_write_peak_sorting(const uint32_t value)
uint16_t acc_detector_distance_config_num_frames_recorded_threshold_get(const acc_detector_distance_config_t *config)
Get the number of frames to use for recorded threshold.
void distance_reg_read_max_step_length(uint32_t *value)
void distance_reg_read_peak6_strength(uint32_t *value)
bool distance_reg_write_start(const uint32_t value)
float acc_detector_distance_config_threshold_sensitivity_get(const acc_detector_distance_config_t *config)
Get threshold sensitivity.
uint32_t acc_version_get_hex(void)
Get the version of the Acconeer software as a hex number.
@ ACC_DETECTOR_DISTANCE_THRESHOLD_METHOD_CFAR
bool i2c_distance_detector_get_measure_on_wakeup(void)
Get measure on wake up state.
void distance_reg_read_peak4_strength(uint32_t *value)
#define DISTANCE_REG_MAX_PROFILE_ENUM_PROFILE3
void distance_reg_read_detector_status(uint32_t *value)
bool distance_reg_write_max_profile(const uint32_t value)
@ ACC_DETECTOR_DISTANCE_THRESHOLD_METHOD_RECORDED
void distance_reg_read_peak8_distance(uint32_t *value)
uint16_t acc_detector_distance_config_max_step_length_get(const acc_detector_distance_config_t *config)
Get the maximum step length.
#define DISTANCE_REG_MAX_PROFILE_ENUM_PROFILE4
#define ACC_REG_ERROR_FLAG_WRITE_FAILED
uint32_t i2c_distance_detector_get_status(void)
Get distance detector status.
void acc_detector_distance_config_close_range_leakage_cancellation_set(acc_detector_distance_config_t *config, bool enable)
Enable the close range leakage cancellation logic.
bool distance_reg_write_command(const uint32_t value)
float acc_detector_distance_config_end_get(const acc_detector_distance_config_t *config)
Get the end of measured interval in meters.
void distance_reg_read_fixed_strength_threshold_value(uint32_t *value)
bool distance_reg_write_max_step_length(const uint32_t value)
void distance_reg_read_peak1_strength(uint32_t *value)
void acc_detector_distance_config_max_profile_set(acc_detector_distance_config_t *config, acc_config_profile_t max_profile)
Set the max profile.
acc_config_profile_t acc_detector_distance_config_max_profile_get(const acc_detector_distance_config_t *config)
Get the max profile.
@ ACC_DETECTOR_DISTANCE_THRESHOLD_METHOD_FIXED_STRENGTH
#define DISTANCE_REG_PROTOCOL_STATUS_FIELD_ADDRESS_ERROR_MASK
uint32_t i2c_distance_detector_get_result(void)
Get distance detector result.
static uint32_t get_protocol_error_flags(void)
Get the protocol error status flags.
void distance_reg_read_signal_quality(uint32_t *value)
bool distance_reg_write_measure_on_wakeup(const uint32_t value)
static uint32_t get_peak_distance(uint16_t peak_id)
Get peak distance.
float i2c_distance_detector_get_peak_distance(uint16_t peak_id)
Get the peak distance for a specific peak id.
void acc_detector_distance_config_signal_quality_set(acc_detector_distance_config_t *config, float signal_quality)
Set the signal quality.
#define DISTANCE_REG_MAX_PROFILE_ENUM_PROFILE5
uint32_t i2c_distance_detector_get_counter(void)
Get distance detector measure counter.
#define DISTANCE_REG_PEAK_SORTING_ENUM_CLOSEST
#define DISTANCE_REG_THRESHOLD_METHOD_ENUM_CFAR
int32_t acc_reg_protocol_float_to_int32_milli(float value)
Convert 1000 * float to int32.
void distance_reg_read_protocol_status(uint32_t *value)
void distance_reg_read_threshold_method(uint32_t *value)
void distance_reg_read_version(uint32_t *value)
bool distance_reg_write_num_frames_recorded_threshold(const uint32_t value)
void distance_reg_read_start(uint32_t *value)
float acc_reg_protocol_uint32_milli_to_float(uint32_t value)
Convert uint32 / 1000 to float.
float acc_detector_distance_config_fixed_strength_threshold_value_get(const acc_detector_distance_config_t *config)
Get fixed strength threshold value.
void distance_reg_read_peak0_distance(uint32_t *value)
void distance_reg_read_peak5_strength(uint32_t *value)
acc_detector_distance_config_t * i2c_distance_detector_get_config(void)
Get distance detector configuration handle.
@ ACC_DETECTOR_DISTANCE_THRESHOLD_METHOD_FIXED_AMPLITUDE
void distance_reg_read_peak4_distance(uint32_t *value)
#define DISTANCE_REG_REFLECTOR_SHAPE_ENUM_GENERIC
float acc_reg_protocol_int32_milli_to_float(int32_t value)
Convert int32 / 1000 to float.
#define ACC_REG_ERROR_FLAG_PROTOCOL_STATE_ERROR
#define DISTANCE_REG_PROTOCOL_STATUS_FIELD_PACKET_LENGTH_ERROR_MASK
void acc_detector_distance_config_end_set(acc_detector_distance_config_t *config, float end_m)
Set the end of measured interval in meters.
#define DISTANCE_REG_PROTOCOL_STATUS_FIELD_PROTOCOL_STATE_ERROR_MASK
void acc_detector_distance_config_num_frames_recorded_threshold_set(acc_detector_distance_config_t *config, uint16_t num_frames)
Set the number frames to use for recorded threshold.
bool distance_reg_write_threshold_method(const uint32_t value)
void distance_reg_read_peak1_distance(uint32_t *value)
bool distance_reg_write_signal_quality(const uint32_t value)
acc_detector_distance_reflector_shape_t
Enum for reflector shapes.
#define ACC_REG_ERROR_FLAG_WRITE_TO_READ_ONLY
void distance_reg_read_peak8_strength(uint32_t *value)
void distance_reg_read_peak2_distance(uint32_t *value)
#define DISTANCE_REG_PEAK_SORTING_ENUM_STRONGEST
float acc_detector_distance_config_signal_quality_get(const acc_detector_distance_config_t *config)
Get the signal quality.
acc_detector_distance_threshold_method_t
Enum for threshold methods.
bool distance_reg_write_reflector_shape(const uint32_t value)
#define DISTANCE_REG_MAX_PROFILE_ENUM_PROFILE2
void acc_integration_critical_section_enter(void)
acc_detector_distance_threshold_method_t acc_detector_distance_config_threshold_method_get(const acc_detector_distance_config_t *config)
Get the threshold method.
void acc_detector_distance_config_reflector_shape_set(acc_detector_distance_config_t *config, acc_detector_distance_reflector_shape_t reflector_shape)
Set reflector shape.
void distance_reg_read_measure_counter(uint32_t *value)
#define DISTANCE_REG_PROTOCOL_STATUS_FIELD_WRITE_FAILED_MASK
void acc_detector_distance_config_threshold_sensitivity_set(acc_detector_distance_config_t *config, float threshold_sensitivity)
Set threshold sensitivity.
void distance_reg_read_threshold_sensitivity(uint32_t *value)
void acc_detector_distance_config_fixed_strength_threshold_value_set(acc_detector_distance_config_t *config, float fixed_threshold_value)
Set fixed strength threshold value.
void i2c_distance_detector_measure_on_wakeup(bool enable)
Enable/Disable measure on wake up.
float acc_detector_distance_config_start_get(const acc_detector_distance_config_t *config)
Get the start of measured interval in meters.
@ ACC_DETECTOR_DISTANCE_PEAK_SORTING_CLOSEST
void distance_reg_read_peak_sorting(uint32_t *value)
bool i2c_distance_detector_command(uint32_t command)
Send command to be executed to i2c distance detector.
float i2c_distance_detector_get_peak_strength(uint16_t peak_id)
Get the peak strength for a specific peak id.
@ ACC_DETECTOR_DISTANCE_REFLECTOR_SHAPE_PLANAR
bool distance_reg_write_threshold_sensitivity(const uint32_t value)
void distance_reg_read_peak7_strength(uint32_t *value)
struct acc_detector_distance_config acc_detector_distance_config_t
void acc_detector_distance_config_max_step_length_set(acc_detector_distance_config_t *config, uint16_t max_step_length)
Set the maximum step length.
bool distance_reg_write_fixed_amplitude_threshold_value(const uint32_t value)
bool distance_reg_write_end(const uint32_t value)
#define DISTANCE_REG_THRESHOLD_METHOD_ENUM_RECORDED
void distance_reg_read_peak6_distance(uint32_t *value)
static uint32_t get_peak_strength(uint16_t peak_id)
Get peak strength.
void distance_reg_read_fixed_amplitude_threshold_value(uint32_t *value)
acc_detector_distance_reflector_shape_t acc_detector_distance_config_reflector_shape_get(const acc_detector_distance_config_t *config)
Get reflector shape.
void distance_reg_read_peak3_strength(uint32_t *value)
#define DISTANCE_REG_REFLECTOR_SHAPE_ENUM_PLANAR
void distance_reg_read_close_range_leakage_cancellation(uint32_t *value)