Go to the documentation of this file.
4 #ifndef PRESENCE_REG_PROTOCOL_H_
5 #define PRESENCE_REG_PROTOCOL_H_
11 #define PRESENCE_REG_REGISTER_COUNT 32U
14 #define PRESENCE_REG_VERSION_ADDRESS 0U
15 #define PRESENCE_REG_PROTOCOL_STATUS_ADDRESS 1U
16 #define PRESENCE_REG_MEASURE_COUNTER_ADDRESS 2U
17 #define PRESENCE_REG_DETECTOR_STATUS_ADDRESS 3U
18 #define PRESENCE_REG_PRESENCE_RESULT_ADDRESS 16U
19 #define PRESENCE_REG_PRESENCE_DISTANCE_ADDRESS 17U
20 #define PRESENCE_REG_INTRA_PRESENCE_SCORE_ADDRESS 18U
21 #define PRESENCE_REG_INTER_PRESENCE_SCORE_ADDRESS 19U
22 #define PRESENCE_REG_SWEEPS_PER_FRAME_ADDRESS 64U
23 #define PRESENCE_REG_INTER_FRAME_PRESENCE_TIMEOUT_ADDRESS 65U
24 #define PRESENCE_REG_INTER_PHASE_BOOST_ENABLED_ADDRESS 66U
25 #define PRESENCE_REG_INTRA_DETECTION_ENABLED_ADDRESS 67U
26 #define PRESENCE_REG_INTER_DETECTION_ENABLED_ADDRESS 68U
27 #define PRESENCE_REG_FRAME_RATE_ADDRESS 69U
28 #define PRESENCE_REG_INTRA_DETECTION_THRESHOLD_ADDRESS 70U
29 #define PRESENCE_REG_INTER_DETECTION_THRESHOLD_ADDRESS 71U
30 #define PRESENCE_REG_INTER_FRAME_DEVIATION_TIME_CONST_ADDRESS 72U
31 #define PRESENCE_REG_INTER_FRAME_FAST_CUTOFF_ADDRESS 73U
32 #define PRESENCE_REG_INTER_FRAME_SLOW_CUTOFF_ADDRESS 74U
33 #define PRESENCE_REG_INTRA_FRAME_TIME_CONST_ADDRESS 75U
34 #define PRESENCE_REG_INTRA_OUTPUT_TIME_CONST_ADDRESS 76U
35 #define PRESENCE_REG_INTER_OUTPUT_TIME_CONST_ADDRESS 77U
36 #define PRESENCE_REG_AUTO_PROFILE_ENABLED_ADDRESS 78U
37 #define PRESENCE_REG_AUTO_STEP_LENGTH_ENABLED_ADDRESS 79U
38 #define PRESENCE_REG_MANUAL_PROFILE_ADDRESS 80U
39 #define PRESENCE_REG_MANUAL_STEP_LENGTH_ADDRESS 81U
40 #define PRESENCE_REG_START_ADDRESS 82U
41 #define PRESENCE_REG_END_ADDRESS 83U
42 #define PRESENCE_REG_RESET_FILTERS_ON_PREPARE_ADDRESS 84U
43 #define PRESENCE_REG_HWAAS_ADDRESS 85U
44 #define PRESENCE_REG_DETECTION_ON_GPIO_ADDRESS 128U
45 #define PRESENCE_REG_COMMAND_ADDRESS 256U
48 #define PRESENCE_REG_VERSION_FIELD_MAJOR_POS 16U
49 #define PRESENCE_REG_VERSION_FIELD_MAJOR_MASK 0xffff0000
50 #define PRESENCE_REG_VERSION_FIELD_MINOR_POS 8U
51 #define PRESENCE_REG_VERSION_FIELD_MINOR_MASK 0x0000ff00
52 #define PRESENCE_REG_VERSION_FIELD_PATCH_POS 0U
53 #define PRESENCE_REG_VERSION_FIELD_PATCH_MASK 0x000000ff
56 #define PRESENCE_REG_PROTOCOL_STATUS_FIELD_PROTOCOL_STATE_ERROR_POS 0U
57 #define PRESENCE_REG_PROTOCOL_STATUS_FIELD_PROTOCOL_STATE_ERROR_MASK 0x00000001
58 #define PRESENCE_REG_PROTOCOL_STATUS_FIELD_PACKET_LENGTH_ERROR_POS 1U
59 #define PRESENCE_REG_PROTOCOL_STATUS_FIELD_PACKET_LENGTH_ERROR_MASK 0x00000002
60 #define PRESENCE_REG_PROTOCOL_STATUS_FIELD_ADDRESS_ERROR_POS 2U
61 #define PRESENCE_REG_PROTOCOL_STATUS_FIELD_ADDRESS_ERROR_MASK 0x00000004
62 #define PRESENCE_REG_PROTOCOL_STATUS_FIELD_WRITE_FAILED_POS 3U
63 #define PRESENCE_REG_PROTOCOL_STATUS_FIELD_WRITE_FAILED_MASK 0x00000008
64 #define PRESENCE_REG_PROTOCOL_STATUS_FIELD_WRITE_TO_READ_ONLY_POS 4U
65 #define PRESENCE_REG_PROTOCOL_STATUS_FIELD_WRITE_TO_READ_ONLY_MASK 0x00000010
68 #define PRESENCE_REG_DETECTOR_STATUS_FIELD_RSS_REGISTER_OK_POS 0U
69 #define PRESENCE_REG_DETECTOR_STATUS_FIELD_RSS_REGISTER_OK_MASK 0x00000001
70 #define PRESENCE_REG_DETECTOR_STATUS_FIELD_CONFIG_CREATE_OK_POS 1U
71 #define PRESENCE_REG_DETECTOR_STATUS_FIELD_CONFIG_CREATE_OK_MASK 0x00000002
72 #define PRESENCE_REG_DETECTOR_STATUS_FIELD_SENSOR_CREATE_OK_POS 2U
73 #define PRESENCE_REG_DETECTOR_STATUS_FIELD_SENSOR_CREATE_OK_MASK 0x00000004
74 #define PRESENCE_REG_DETECTOR_STATUS_FIELD_SENSOR_CALIBRATE_OK_POS 3U
75 #define PRESENCE_REG_DETECTOR_STATUS_FIELD_SENSOR_CALIBRATE_OK_MASK 0x00000008
76 #define PRESENCE_REG_DETECTOR_STATUS_FIELD_DETECTOR_CREATE_OK_POS 4U
77 #define PRESENCE_REG_DETECTOR_STATUS_FIELD_DETECTOR_CREATE_OK_MASK 0x00000010
78 #define PRESENCE_REG_DETECTOR_STATUS_FIELD_DETECTOR_BUFFER_OK_POS 5U
79 #define PRESENCE_REG_DETECTOR_STATUS_FIELD_DETECTOR_BUFFER_OK_MASK 0x00000020
80 #define PRESENCE_REG_DETECTOR_STATUS_FIELD_SENSOR_BUFFER_OK_POS 6U
81 #define PRESENCE_REG_DETECTOR_STATUS_FIELD_SENSOR_BUFFER_OK_MASK 0x00000040
82 #define PRESENCE_REG_DETECTOR_STATUS_FIELD_CONFIG_APPLY_OK_POS 7U
83 #define PRESENCE_REG_DETECTOR_STATUS_FIELD_CONFIG_APPLY_OK_MASK 0x00000080
84 #define PRESENCE_REG_DETECTOR_STATUS_FIELD_RSS_REGISTER_ERROR_POS 16U
85 #define PRESENCE_REG_DETECTOR_STATUS_FIELD_RSS_REGISTER_ERROR_MASK 0x00010000
86 #define PRESENCE_REG_DETECTOR_STATUS_FIELD_CONFIG_CREATE_ERROR_POS 17U
87 #define PRESENCE_REG_DETECTOR_STATUS_FIELD_CONFIG_CREATE_ERROR_MASK 0x00020000
88 #define PRESENCE_REG_DETECTOR_STATUS_FIELD_SENSOR_CREATE_ERROR_POS 18U
89 #define PRESENCE_REG_DETECTOR_STATUS_FIELD_SENSOR_CREATE_ERROR_MASK 0x00040000
90 #define PRESENCE_REG_DETECTOR_STATUS_FIELD_SENSOR_CALIBRATE_ERROR_POS 19U
91 #define PRESENCE_REG_DETECTOR_STATUS_FIELD_SENSOR_CALIBRATE_ERROR_MASK 0x00080000
92 #define PRESENCE_REG_DETECTOR_STATUS_FIELD_DETECTOR_CREATE_ERROR_POS 20U
93 #define PRESENCE_REG_DETECTOR_STATUS_FIELD_DETECTOR_CREATE_ERROR_MASK 0x00100000
94 #define PRESENCE_REG_DETECTOR_STATUS_FIELD_DETECTOR_BUFFER_ERROR_POS 21U
95 #define PRESENCE_REG_DETECTOR_STATUS_FIELD_DETECTOR_BUFFER_ERROR_MASK 0x00200000
96 #define PRESENCE_REG_DETECTOR_STATUS_FIELD_SENSOR_BUFFER_ERROR_POS 22U
97 #define PRESENCE_REG_DETECTOR_STATUS_FIELD_SENSOR_BUFFER_ERROR_MASK 0x00400000
98 #define PRESENCE_REG_DETECTOR_STATUS_FIELD_CONFIG_APPLY_ERROR_POS 23U
99 #define PRESENCE_REG_DETECTOR_STATUS_FIELD_CONFIG_APPLY_ERROR_MASK 0x00800000
100 #define PRESENCE_REG_DETECTOR_STATUS_FIELD_DETECTOR_ERROR_POS 28U
101 #define PRESENCE_REG_DETECTOR_STATUS_FIELD_DETECTOR_ERROR_MASK 0x10000000
102 #define PRESENCE_REG_DETECTOR_STATUS_FIELD_BUSY_POS 31U
103 #define PRESENCE_REG_DETECTOR_STATUS_FIELD_BUSY_MASK 0x80000000
106 #define PRESENCE_REG_PRESENCE_RESULT_FIELD_PRESENCE_DETECTED_POS 0U
107 #define PRESENCE_REG_PRESENCE_RESULT_FIELD_PRESENCE_DETECTED_MASK 0x00000001
108 #define PRESENCE_REG_PRESENCE_RESULT_FIELD_PRESENCE_DETECTED_STICKY_POS 1U
109 #define PRESENCE_REG_PRESENCE_RESULT_FIELD_PRESENCE_DETECTED_STICKY_MASK 0x00000002
110 #define PRESENCE_REG_PRESENCE_RESULT_FIELD_DETECTOR_ERROR_POS 15U
111 #define PRESENCE_REG_PRESENCE_RESULT_FIELD_DETECTOR_ERROR_MASK 0x00008000
112 #define PRESENCE_REG_PRESENCE_RESULT_FIELD_TEMPERATURE_POS 16U
113 #define PRESENCE_REG_PRESENCE_RESULT_FIELD_TEMPERATURE_MASK 0xffff0000
116 #define PRESENCE_REG_MANUAL_PROFILE_ENUM_PROFILE1 1U
117 #define PRESENCE_REG_MANUAL_PROFILE_ENUM_PROFILE2 2U
118 #define PRESENCE_REG_MANUAL_PROFILE_ENUM_PROFILE3 3U
119 #define PRESENCE_REG_MANUAL_PROFILE_ENUM_PROFILE4 4U
120 #define PRESENCE_REG_MANUAL_PROFILE_ENUM_PROFILE5 5U
123 #define PRESENCE_REG_COMMAND_ENUM_APPLY_CONFIGURATION 1U
124 #define PRESENCE_REG_COMMAND_ENUM_START_DETECTOR 2U
125 #define PRESENCE_REG_COMMAND_ENUM_STOP_DETECTOR 3U
126 #define PRESENCE_REG_COMMAND_ENUM_ENABLE_UART_LOGS 32U
127 #define PRESENCE_REG_COMMAND_ENUM_DISABLE_UART_LOGS 33U
128 #define PRESENCE_REG_COMMAND_ENUM_LOG_CONFIGURATION 34U
129 #define PRESENCE_REG_COMMAND_ENUM_RESET_MODULE 0x52535421
132 #define PRESENCE_REG_SWEEPS_PER_FRAME_DEFAULT_VALUE 16U
133 #define PRESENCE_REG_INTER_FRAME_PRESENCE_TIMEOUT_DEFAULT_VALUE 3U
134 #define PRESENCE_REG_INTER_PHASE_BOOST_ENABLED_DEFAULT_VALUE 0U
135 #define PRESENCE_REG_INTRA_DETECTION_ENABLED_DEFAULT_VALUE 1U
136 #define PRESENCE_REG_INTER_DETECTION_ENABLED_DEFAULT_VALUE 1U
137 #define PRESENCE_REG_FRAME_RATE_DEFAULT_VALUE 12000U
138 #define PRESENCE_REG_INTRA_DETECTION_THRESHOLD_DEFAULT_VALUE 1300U
139 #define PRESENCE_REG_INTER_DETECTION_THRESHOLD_DEFAULT_VALUE 1000U
140 #define PRESENCE_REG_INTER_FRAME_DEVIATION_TIME_CONST_DEFAULT_VALUE 500U
141 #define PRESENCE_REG_INTER_FRAME_FAST_CUTOFF_DEFAULT_VALUE 6000U
142 #define PRESENCE_REG_INTER_FRAME_SLOW_CUTOFF_DEFAULT_VALUE 200U
143 #define PRESENCE_REG_INTRA_FRAME_TIME_CONST_DEFAULT_VALUE 150U
144 #define PRESENCE_REG_INTRA_OUTPUT_TIME_CONST_DEFAULT_VALUE 300U
145 #define PRESENCE_REG_INTER_OUTPUT_TIME_CONST_DEFAULT_VALUE 2000U
146 #define PRESENCE_REG_AUTO_PROFILE_ENABLED_DEFAULT_VALUE 1U
147 #define PRESENCE_REG_AUTO_STEP_LENGTH_ENABLED_DEFAULT_VALUE 1U
148 #define PRESENCE_REG_MANUAL_PROFILE_DEFAULT_VALUE PRESENCE_REG_MANUAL_PROFILE_ENUM_PROFILE4
149 #define PRESENCE_REG_MANUAL_STEP_LENGTH_DEFAULT_VALUE 72U
150 #define PRESENCE_REG_START_DEFAULT_VALUE 300U
151 #define PRESENCE_REG_END_DEFAULT_VALUE 2500U
152 #define PRESENCE_REG_RESET_FILTERS_ON_PREPARE_DEFAULT_VALUE 1U
153 #define PRESENCE_REG_HWAAS_DEFAULT_VALUE 32U
154 #define PRESENCE_REG_DETECTION_ON_GPIO_DEFAULT_VALUE 0U
bool presence_reg_write_inter_frame_slow_cutoff(const uint32_t value)
bool presence_reg_write_auto_profile_enabled(const uint32_t value)
void presence_reg_read_measure_counter(uint32_t *value)
bool presence_reg_write_inter_detection_threshold(const uint32_t value)
bool presence_reg_write_inter_output_time_const(const uint32_t value)
bool presence_reg_write_intra_detection_threshold(const uint32_t value)
bool presence_reg_write_intra_frame_time_const(const uint32_t value)
void presence_reg_read_inter_frame_slow_cutoff(uint32_t *value)
void presence_reg_read_presence_distance(uint32_t *value)
bool presence_reg_write_frame_rate(const uint32_t value)
bool presence_reg_write_start(const uint32_t value)
void presence_reg_read_protocol_status(uint32_t *value)
void presence_reg_read_intra_output_time_const(uint32_t *value)
void presence_reg_read_inter_frame_presence_timeout(uint32_t *value)
bool presence_reg_write_inter_frame_fast_cutoff(const uint32_t value)
void presence_reg_read_intra_detection_threshold(uint32_t *value)
void presence_reg_read_detector_status(uint32_t *value)
void presence_reg_read_hwaas(uint32_t *value)
void presence_reg_read_auto_step_length_enabled(uint32_t *value)
bool presence_reg_write_command(const uint32_t value)
void presence_reg_read_end(uint32_t *value)
bool presence_reg_write_inter_frame_deviation_time_const(const uint32_t value)
void presence_reg_read_inter_frame_deviation_time_const(uint32_t *value)
bool presence_reg_write_manual_step_length(const uint32_t value)
void presence_reg_read_auto_profile_enabled(uint32_t *value)
void presence_reg_read_inter_output_time_const(uint32_t *value)
void presence_reg_read_inter_presence_score(uint32_t *value)
bool presence_reg_write_detection_on_gpio(const uint32_t value)
void presence_reg_read_manual_step_length(uint32_t *value)
bool presence_reg_write_inter_detection_enabled(const 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)
void presence_reg_protocol_write_default(void)
void presence_reg_read_version(uint32_t *value)
bool presence_reg_write_hwaas(const uint32_t value)
bool presence_reg_write_auto_step_length_enabled(const uint32_t value)
void presence_reg_read_presence_result(uint32_t *value)
bool presence_reg_write_sweeps_per_frame(const uint32_t value)
void presence_reg_read_intra_frame_time_const(uint32_t *value)
void presence_reg_read_inter_detection_enabled(uint32_t *value)
void presence_reg_read_inter_detection_threshold(uint32_t *value)
void presence_reg_read_detection_on_gpio(uint32_t *value)
void presence_reg_read_reset_filters_on_prepare(uint32_t *value)
void presence_reg_read_frame_rate(uint32_t *value)
void presence_reg_read_inter_frame_fast_cutoff(uint32_t *value)
void presence_reg_read_start(uint32_t *value)
void presence_reg_read_sweeps_per_frame(uint32_t *value)
bool presence_reg_write_reset_filters_on_prepare(const uint32_t value)
void presence_reg_read_manual_profile(uint32_t *value)
bool presence_reg_write_intra_detection_enabled(const uint32_t value)
void presence_reg_read_intra_presence_score(uint32_t *value)
void presence_reg_read_intra_detection_enabled(uint32_t *value)
bool presence_reg_write_end(const uint32_t value)
bool presence_reg_write_intra_output_time_const(const uint32_t value)
void presence_reg_protocol_setup(void)
bool presence_reg_write_inter_phase_boost_enabled(const uint32_t value)
bool presence_reg_write_manual_profile(const uint32_t value)