acc_config_subsweep.h
Go to the documentation of this file.
1 // Copyright (c) Acconeer AB, 2021-2025
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  * @brief Get the number of subsweeps to use
31  *
32  * @param[in] config The configuration
33  * @return The number of subsweeps
34  */
36 
37 /**
38  * @brief Set the starting point of the sweep
39  *
40  * See @ref acc_config_start_point_set
41  *
42  * @param[in] config The configuration
43  * @param[in] start_point The starting point of the sweep
44  * @param[in] index The subsweep index
45  */
46 void acc_config_subsweep_start_point_set(acc_config_t *config, int32_t start_point, uint8_t index);
47 
48 /**
49  * @brief Get the starting point of the sweep
50  *
51  * See @ref acc_config_start_point_get
52  *
53  * @param[in] config The configuration
54  * @param[in] index The subsweep index
55  * @return The starting point of the sweep
56  */
57 int32_t acc_config_subsweep_start_point_get(const acc_config_t *config, uint8_t index);
58 
59 /**
60  * @brief Set the number of data points to measure
61  *
62  * See @ref acc_config_num_points_set
63  *
64  * @param[in] config The configuration
65  * @param[in] num_points Number of data points to measure
66  * @param[in] index The subsweep index
67  */
68 void acc_config_subsweep_num_points_set(acc_config_t *config, uint16_t num_points, uint8_t index);
69 
70 /**
71  * @brief Get the number of data points to measure
72  *
73  * See @ref acc_config_num_points_get
74  *
75  * @param[in] config The configuration
76  * @param[in] index The subsweep index
77  * @return Number of data points to measure
78  */
79 uint16_t acc_config_subsweep_num_points_get(const acc_config_t *config, uint8_t index);
80 
81 /**
82  * @brief Set the step length in a sweep
83  *
84  * See @ref acc_config_step_length_set
85  *
86  * @param[in] config The configuration
87  * @param[in] step_length The step length
88  * @param[in] index The subsweep index
89  */
90 void acc_config_subsweep_step_length_set(acc_config_t *config, uint16_t step_length, uint8_t index);
91 
92 /**
93  * @brief Get the step length in a sweep
94  *
95  * See @ref acc_config_step_length_get
96  *
97  * @param[in] config The configuration
98  * @param[in] index The subsweep index
99  * @return The step length
100  */
101 uint16_t acc_config_subsweep_step_length_get(const acc_config_t *config, uint8_t index);
102 
103 /**
104  * @brief Set a profile
105  *
106  * See @ref acc_config_profile_set
107  *
108  * @param[in] config The config to set a profile for
109  * @param[in] profile The profile to set
110  * @param[in] index The subsweep index
111  */
113 
114 /**
115  * @brief Get the currently used profile
116  *
117  * See @ref acc_config_profile_get
118  *
119  * @param[in] config The config to get a profile for
120  * @param[in] index The subsweep index
121  * @return The current profile, 0 if config is invalid
122  */
124 
125 /**
126  * @brief Set the hardware accelerated average samples (HWAAS)
127  *
128  * See @ref acc_config_hwaas_set
129  *
130  * @param[in] config The config to set hwaas for
131  * @param[in] hwaas Hardware accelerated average samples
132  * @param[in] index The subsweep index
133  */
134 void acc_config_subsweep_hwaas_set(acc_config_t *config, uint16_t hwaas, uint8_t index);
135 
136 /**
137  * @brief Get the hardware accelerated average samples (HWAAS)
138  *
139  * See @ref acc_config_hwaas_get
140  *
141  * @param[in] config The config to get hwaas from
142  * @param[in] index The subsweep index
143  * @return Hardware accelerated average samples
144  */
145 uint16_t acc_config_subsweep_hwaas_get(const acc_config_t *config, uint8_t index);
146 
147 /**
148  * @brief Set receiver gain setting
149  *
150  * See @ref acc_config_receiver_gain_set
151  *
152  * @param[in] config The configuration
153  * @param[in] gain Receiver gain setting
154  * @param[in] index The subsweep index
155  */
156 void acc_config_subsweep_receiver_gain_set(acc_config_t *config, uint8_t gain, uint8_t index);
157 
158 /**
159  * @brief Get receiver gain setting
160  *
161  * See @ref acc_config_receiver_gain_get
162  *
163  * @param[in] config The configuration
164  * @param[in] index The subsweep index
165  * @return Receiver gain setting
166  */
167 uint8_t acc_config_subsweep_receiver_gain_get(const acc_config_t *config, uint8_t index);
168 
169 /**
170  * @brief Enable or disable the transmitter
171  *
172  * See @ref acc_config_enable_tx_set
173  *
174  * @param[in] config The configuration
175  * @param[in] enable true to enable the transmitter
176  * @param[in] index The subsweep index
177  */
178 void acc_config_subsweep_enable_tx_set(acc_config_t *config, bool enable, uint8_t index);
179 
180 /**
181  * @brief Get transmitter enable mode
182  *
183  * See @ref acc_config_enable_tx_get
184  *
185  * @param[in] config The configuration
186  * @param[in] index The subsweep index
187  * @return true if the transmitter is enabled
188  */
189 bool acc_config_subsweep_enable_tx_get(const acc_config_t *config, uint8_t index);
190 
191 /**
192  * @brief Set Pulse Repetition Frequency
193  *
194  * See @ref acc_config_prf_t for details.
195  *
196  * @param[in] config The configuration
197  * @param[in] prf The Pulse Repetition Frequency to use
198  * @param[in] index The subsweep index
199  */
201 
202 /**
203  * @brief Get Pulse Repetition Frequency
204  *
205  * See @ref acc_config_prf_t for details.
206  *
207  * @param[in] config The configuration
208  * @return Pulse Repetition Frequency
209  * @param[in] index The subsweep index
210  */
212 
213 /**
214  * @brief Set the phase enhancement enabled configuration
215  *
216  * See @ref acc_config_phase_enhancement_set
217  *
218  * @param[in] config The configuration
219  * @param[in] enable true if phase enhancement to be enabled, false otherwise
220  * @param[in] index The subsweep index
221  */
222 void acc_config_subsweep_phase_enhancement_set(acc_config_t *config, bool enable, uint8_t index);
223 
224 /**
225  * @brief Get the phase enhancement enabled configuration
226  *
227  * See @ref acc_config_phase_enhancement_get
228  *
229  * @param[in] config The configuration
230  * @param[in] index The subsweep index
231  * @return true if phase enhancement is enabled, false otherwise
232  */
234 
235 /**
236  * @brief Enable or disable the IQ imbalance compensation
237  *
238  * @param[in] config The configuration
239  * @param[in] enable true if IQ imbalance compensation should be enabled, false otherwise
240  * @param[in] index The subsweep index
241  */
243 
244 /**
245  * @brief Get the IQ imbalance compensation configuration
246  *
247  * See @ref acc_config_iq_imbalance_compensation_set
248  *
249  * @param[in] config The configuration
250  * @param[in] index The subsweep index
251  * @return true if IQ imbalance compensation is enabled, false otherwise
252  */
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  * @brief Get the enable loopback configuration
268  *
269  * See @ref acc_config_enable_loopback_get
270  *
271  * @param[in] config The configuration
272  * @param[in] index The subsweep index
273  * @return true if loopback is enabled, false otherwise
274  */
276 
277 /**
278  * @}
279  */
280 
281 #endif
acc_config_subsweep_iq_imbalance_compensation_set
void acc_config_subsweep_iq_imbalance_compensation_set(acc_config_t *config, bool enable, uint8_t index)
Enable or disable the IQ imbalance compensation.
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.
config
cargo_config_t config
Definition: i2c_example_cargo.c:34
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_subsweep_iq_imbalance_compensation_get
bool acc_config_subsweep_iq_imbalance_compensation_get(const acc_config_t *config, uint8_t index)
Get the IQ imbalance compensation configuration.
acc_config_prf_t
acc_config_prf_t
Pulse Repetition Frequency.
Definition: acc_definitions_a121.h:111
acc_config_t
struct acc_config acc_config_t
Definition: acc_config.h:24
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:49
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