acc_config_subsweep.h
Go to the documentation of this file.
1 // Copyright (c) Acconeer AB, 2021-2023
2 // All rights reserved
3 
4 #ifndef ACC_CONFIG_SUBSWEEP_H_
5 #define ACC_CONFIG_SUBSWEEP_H_
6 
7 #include <stdint.h>
8 
9 #include "acc_config.h"
10 #include "acc_definitions_a121.h"
11 
12 /**
13  * @defgroup subsweep Subsweep
14  * @ingroup config
15  *
16  * @brief Module to configure subsweeps
17  *
18  * @{
19  */
20 
21 /**
22  * @brief Set the number of subsweeps to use
23  *
24  * @param[in] config The configuration
25  * @param[in] num_subsweeps The number of subsweeps
26  */
27 void acc_config_num_subsweeps_set(acc_config_t *config, uint8_t num_subsweeps);
28 
29 
30 /**
31  * @brief Get the number of subsweeps to use
32  *
33  * @param[in] config The configuration
34  * @return The number of subsweeps
35  */
36 uint8_t acc_config_num_subsweeps_get(const acc_config_t *config);
37 
38 
39 /**
40  * @brief Set the starting point of the sweep
41  *
42  * See @ref acc_config_start_point_set
43  *
44  * @param[in] config The configuration
45  * @param[in] start_point The starting point of the sweep
46  * @param[in] index The subsweep index
47  */
48 void acc_config_subsweep_start_point_set(acc_config_t *config, int32_t start_point, uint8_t index);
49 
50 
51 /**
52  * @brief Get the starting point of the sweep
53  *
54  * See @ref acc_config_start_point_get
55  *
56  * @param[in] config The configuration
57  * @param[in] index The subsweep index
58  * @return The starting point of the sweep
59  */
60 int32_t acc_config_subsweep_start_point_get(const acc_config_t *config, uint8_t index);
61 
62 
63 /**
64  * @brief Set the number of data points to measure
65  *
66  * See @ref acc_config_num_points_set
67  *
68  * @param[in] config The configuration
69  * @param[in] num_points Number of data points to measure
70  * @param[in] index The subsweep index
71  */
72 void acc_config_subsweep_num_points_set(acc_config_t *config, uint16_t num_points, uint8_t index);
73 
74 
75 /**
76  * @brief Get the number of data points to measure
77  *
78  * See @ref acc_config_num_points_get
79  *
80  * @param[in] config The configuration
81  * @param[in] index The subsweep index
82  * @return Number of data points to measure
83  */
84 uint16_t acc_config_subsweep_num_points_get(const acc_config_t *config, uint8_t index);
85 
86 
87 /**
88  * @brief Set the step length in a sweep
89  *
90  * See @ref acc_config_step_length_set
91  *
92  * @param[in] config The configuration
93  * @param[in] step_length The step length
94  * @param[in] index The subsweep index
95  */
96 void acc_config_subsweep_step_length_set(acc_config_t *config, uint16_t step_length, uint8_t index);
97 
98 
99 /**
100  * @brief Get the step length in a sweep
101  *
102  * See @ref acc_config_step_length_get
103  *
104  * @param[in] config The configuration
105  * @param[in] index The subsweep index
106  * @return The step length
107  */
108 uint16_t acc_config_subsweep_step_length_get(const acc_config_t *config, uint8_t index);
109 
110 
111 /**
112  * @brief Set a profile
113  *
114  * See @ref acc_config_profile_set
115  *
116  * @param[in] config The config to set a profile for
117  * @param[in] profile The profile to set
118  * @param[in] index The subsweep index
119  */
120 void acc_config_subsweep_profile_set(acc_config_t *config, acc_config_profile_t profile, uint8_t index);
121 
122 
123 /**
124  * @brief Get the currently used profile
125  *
126  * See @ref acc_config_profile_get
127  *
128  * @param[in] config The config to get a profile for
129  * @param[in] index The subsweep index
130  * @return The current profile, 0 if config is invalid
131  */
133 
134 
135 /**
136  * @brief Set the hardware accelerated average samples (HWAAS)
137  *
138  * See @ref acc_config_hwaas_set
139  *
140  * @param[in] config The config to set hwaas for
141  * @param[in] hwaas Hardware accelerated average samples
142  * @param[in] index The subsweep index
143  */
144 void acc_config_subsweep_hwaas_set(acc_config_t *config, uint16_t hwaas, uint8_t index);
145 
146 
147 /**
148  * @brief Get the hardware accelerated average samples (HWAAS)
149  *
150  * See @ref acc_config_hwaas_get
151  *
152  * @param[in] config The config to get hwaas from
153  * @param[in] index The subsweep index
154  * @return Hardware accelerated average samples
155  */
156 uint16_t acc_config_subsweep_hwaas_get(const acc_config_t *config, uint8_t index);
157 
158 
159 /**
160  * @brief Set receiver gain setting
161  *
162  * See @ref acc_config_receiver_gain_set
163  *
164  * @param[in] config The configuration
165  * @param[in] gain Receiver gain setting
166  * @param[in] index The subsweep index
167  */
168 void acc_config_subsweep_receiver_gain_set(acc_config_t *config, uint8_t gain, uint8_t index);
169 
170 
171 /**
172  * @brief Get receiver gain setting
173  *
174  * See @ref acc_config_receiver_gain_get
175  *
176  * @param[in] config The configuration
177  * @param[in] index The subsweep index
178  * @return Receiver gain setting
179  */
180 uint8_t acc_config_subsweep_receiver_gain_get(const acc_config_t *config, uint8_t index);
181 
182 
183 /**
184  * @brief Enable or disable the transmitter
185  *
186  * See @ref acc_config_enable_tx_set
187  *
188  * @param[in] config The configuration
189  * @param[in] enable true to enable the transmitter
190  * @param[in] index The subsweep index
191  */
192 void acc_config_subsweep_enable_tx_set(acc_config_t *config, bool enable, uint8_t index);
193 
194 
195 /**
196  * @brief Get transmitter enable mode
197  *
198  * See @ref acc_config_enable_tx_get
199  *
200  * @param[in] config The configuration
201  * @param[in] index The subsweep index
202  * @return true if the transmitter is enabled
203  */
204 bool acc_config_subsweep_enable_tx_get(const acc_config_t *config, uint8_t index);
205 
206 
207 /**
208  * @brief Set Pulse Repetition Frequency
209  *
210  * See @ref acc_config_prf_t for details.
211  *
212  * @param[in] config The configuration
213  * @param[in] prf The Pulse Repetition Frequency to use
214  * @param[in] index The subsweep index
215  */
216 void acc_config_subsweep_prf_set(acc_config_t *config, acc_config_prf_t prf, uint8_t index);
217 
218 
219 /**
220  * @brief Get Pulse Repetition Frequency
221  *
222  * See @ref acc_config_prf_t for details.
223  *
224  * @param[in] config The configuration
225  * @return Pulse Repetition Frequency
226  * @param[in] index The subsweep index
227  */
228 acc_config_prf_t acc_config_subsweep_prf_get(const acc_config_t *config, uint8_t index);
229 
230 
231 /**
232  * @brief Set the phase enhancement enabled configuration
233  *
234  * See @ref acc_config_phase_enhancement_set
235  *
236  * @param[in] config The configuration
237  * @param[in] enable true if phase enhancement to be enabled, false otherwise
238  * @param[in] index The subsweep index
239  */
240 void acc_config_subsweep_phase_enhancement_set(acc_config_t *config, bool enable, uint8_t index);
241 
242 
243 /**
244  * @brief Get the phase enhancement enabled configuration
245  *
246  * See @ref acc_config_phase_enhancement_get
247  *
248  * @param[in] config The configuration
249  * @param[in] index The subsweep index
250  * @return true if phase enhancement is enabled, false otherwise
251  */
252 bool acc_config_subsweep_phase_enhancement_get(const acc_config_t *config, uint8_t index);
253 
254 
255 /**
256  * @brief Set the loopback enabled configuration
257  *
258  * See @ref acc_config_enable_loopback_set
259  *
260  * @param[in] config The configuration
261  * @param[in] enable true if loopback to be enabled, false otherwise
262  * @param[in] index The subsweep index
263  */
264 void acc_config_subsweep_enable_loopback_set(acc_config_t *config, bool enable, uint8_t index);
265 
266 
267 /**
268  * @brief Get the enable loopback configuration
269  *
270  * See @ref acc_config_enable_loopback_get
271  *
272  * @param[in] config The configuration
273  * @param[in] index The subsweep index
274  * @return true if loopback is enabled, false otherwise
275  */
276 bool acc_config_subsweep_enable_loopback_get(const acc_config_t *config, uint8_t index);
277 
278 
279 /**
280  * @}
281  */
282 
283 
284 #endif
acc_config_subsweep_num_points_get
uint16_t acc_config_subsweep_num_points_get(const acc_config_t *config, uint8_t index)
Get the number of data points to measure.
acc_config_num_subsweeps_get
uint8_t acc_config_num_subsweeps_get(const acc_config_t *config)
Get the number of subsweeps to use.
acc_config_subsweep_receiver_gain_get
uint8_t acc_config_subsweep_receiver_gain_get(const acc_config_t *config, uint8_t index)
Get receiver gain setting.
acc_config_subsweep_hwaas_get
uint16_t acc_config_subsweep_hwaas_get(const acc_config_t *config, uint8_t index)
Get the hardware accelerated average samples (HWAAS)
acc_config_subsweep_phase_enhancement_set
void acc_config_subsweep_phase_enhancement_set(acc_config_t *config, bool enable, uint8_t index)
Set the phase enhancement enabled configuration.
acc_config_subsweep_prf_get
acc_config_prf_t acc_config_subsweep_prf_get(const acc_config_t *config, uint8_t index)
Get Pulse Repetition Frequency.
acc_config_prf_t
acc_config_prf_t
Pulse Repetition Frequency.
Definition: acc_definitions_a121.h:116
acc_config_t
struct acc_config acc_config_t
Definition: acc_config.h:26
acc_config_subsweep_step_length_get
uint16_t acc_config_subsweep_step_length_get(const acc_config_t *config, uint8_t index)
Get the step length in a sweep.
acc_config_num_subsweeps_set
void acc_config_num_subsweeps_set(acc_config_t *config, uint8_t num_subsweeps)
Set the number of subsweeps to use.
acc_config_subsweep_start_point_set
void acc_config_subsweep_start_point_set(acc_config_t *config, int32_t start_point, uint8_t index)
Set the starting point of the sweep.
acc_config_subsweep_profile_set
void acc_config_subsweep_profile_set(acc_config_t *config, acc_config_profile_t profile, uint8_t index)
Set a profile.
acc_config_subsweep_enable_tx_get
bool acc_config_subsweep_enable_tx_get(const acc_config_t *config, uint8_t index)
Get transmitter enable mode.
acc_config_subsweep_receiver_gain_set
void acc_config_subsweep_receiver_gain_set(acc_config_t *config, uint8_t gain, uint8_t index)
Set receiver gain setting.
acc_config_subsweep_phase_enhancement_get
bool acc_config_subsweep_phase_enhancement_get(const acc_config_t *config, uint8_t index)
Get the phase enhancement enabled configuration.
acc_config_profile_t
acc_config_profile_t
Profile.
Definition: acc_definitions_a121.h:52
acc_config_subsweep_enable_loopback_set
void acc_config_subsweep_enable_loopback_set(acc_config_t *config, bool enable, uint8_t index)
Set the loopback enabled configuration.
acc_config_subsweep_hwaas_set
void acc_config_subsweep_hwaas_set(acc_config_t *config, uint16_t hwaas, uint8_t index)
Set the hardware accelerated average samples (HWAAS)
acc_config_subsweep_step_length_set
void acc_config_subsweep_step_length_set(acc_config_t *config, uint16_t step_length, uint8_t index)
Set the step length in a sweep.
acc_config_subsweep_profile_get
acc_config_profile_t acc_config_subsweep_profile_get(const acc_config_t *config, uint8_t index)
Get the currently used profile.
acc_config.h
acc_config_subsweep_num_points_set
void acc_config_subsweep_num_points_set(acc_config_t *config, uint16_t num_points, uint8_t index)
Set the number of data points to measure.
acc_config_subsweep_enable_tx_set
void acc_config_subsweep_enable_tx_set(acc_config_t *config, bool enable, uint8_t index)
Enable or disable the transmitter.
acc_config_subsweep_start_point_get
int32_t acc_config_subsweep_start_point_get(const acc_config_t *config, uint8_t index)
Get the starting point of the sweep.
acc_config_subsweep_enable_loopback_get
bool acc_config_subsweep_enable_loopback_get(const acc_config_t *config, uint8_t index)
Get the enable loopback configuration.
acc_config_subsweep_prf_set
void acc_config_subsweep_prf_set(acc_config_t *config, acc_config_prf_t prf, uint8_t index)
Set Pulse Repetition Frequency.
acc_definitions_a121.h