Skip to content

Commit f66f331

Browse files
MirkoCovizzinordic-piks
authored andcommitted
include: modem: at_params: disable __deprecated for tests
Deprecates function signatures only outside of tests. This addresses some related CI failures. Signed-off-by: Mirko Covizzi <mirko.covizzi@nordicsemi.no>
1 parent 444b6e0 commit f66f331

File tree

1 file changed

+82
-0
lines changed

1 file changed

+82
-0
lines changed

include/modem/at_params.h

+82
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,11 @@ struct at_param_list {
102102
* @retval 0 If the operation was successful.
103103
* Otherwise, a (negative) error code is returned.
104104
*/
105+
#if CONFIG_UNITY || CONFIG_ZTEST
106+
int at_params_list_init(struct at_param_list *list, size_t max_params_count);
107+
#else
105108
__deprecated int at_params_list_init(struct at_param_list *list, size_t max_params_count);
109+
#endif
106110

107111
/**
108112
* @deprecated
@@ -112,7 +116,11 @@ __deprecated int at_params_list_init(struct at_param_list *list, size_t max_para
112116
*
113117
* @param[in] list Parameter list to clear.
114118
*/
119+
#if CONFIG_UNITY || CONFIG_ZTEST
120+
void at_params_list_clear(struct at_param_list *list);
121+
#else
115122
__deprecated void at_params_list_clear(struct at_param_list *list);
123+
#endif
116124

117125
/**
118126
* @deprecated
@@ -122,7 +130,11 @@ __deprecated void at_params_list_clear(struct at_param_list *list);
122130
*
123131
* @param[in] list Parameter list to free.
124132
*/
133+
#if CONFIG_UNITY || CONFIG_ZTEST
134+
void at_params_list_free(struct at_param_list *list);
135+
#else
125136
__deprecated void at_params_list_free(struct at_param_list *list);
137+
#endif
126138

127139
/**
128140
* @deprecated
@@ -138,7 +150,11 @@ __deprecated void at_params_list_free(struct at_param_list *list);
138150
* @retval 0 If the operation was successful.
139151
* Otherwise, a (negative) error code is returned.
140152
*/
153+
#if CONFIG_UNITY || CONFIG_ZTEST
154+
int at_params_int_put(const struct at_param_list *list, size_t index, int64_t value);
155+
#else
141156
__deprecated int at_params_int_put(const struct at_param_list *list, size_t index, int64_t value);
157+
#endif
142158

143159
/**
144160
* @deprecated
@@ -156,8 +172,13 @@ __deprecated int at_params_int_put(const struct at_param_list *list, size_t inde
156172
* @retval 0 If the operation was successful.
157173
* Otherwise, a (negative) error code is returned.
158174
*/
175+
#if CONFIG_UNITY || CONFIG_ZTEST
176+
int at_params_string_put(const struct at_param_list *list, size_t index,
177+
const char *str, size_t str_len);
178+
#else
159179
__deprecated int at_params_string_put(const struct at_param_list *list, size_t index,
160180
const char *str, size_t str_len);
181+
#endif
161182

162183
/**
163184
* @deprecated
@@ -179,8 +200,13 @@ __deprecated int at_params_string_put(const struct at_param_list *list, size_t i
179200
* @retval 0 If the operation was successful.
180201
* Otherwise, a (negative) error code is returned.
181202
*/
203+
#if CONFIG_UNITY || CONFIG_ZTEST
204+
int at_params_array_put(const struct at_param_list *list, size_t index,
205+
const uint32_t *array, size_t array_len);
206+
#else
182207
__deprecated int at_params_array_put(const struct at_param_list *list, size_t index,
183208
const uint32_t *array, size_t array_len);
209+
#endif
184210

185211
/**
186212
* @deprecated
@@ -196,7 +222,11 @@ __deprecated int at_params_array_put(const struct at_param_list *list, size_t in
196222
* @retval 0 If the operation was successful.
197223
* Otherwise, a (negative) error code is returned.
198224
*/
225+
#if CONFIG_UNITY || CONFIG_ZTEST
226+
int at_params_empty_put(const struct at_param_list *list, size_t index);
227+
#else
199228
__deprecated int at_params_empty_put(const struct at_param_list *list, size_t index);
229+
#endif
200230

201231
/**
202232
* @deprecated
@@ -211,7 +241,11 @@ __deprecated int at_params_empty_put(const struct at_param_list *list, size_t in
211241
* @retval 0 If the operation was successful.
212242
* Otherwise, a (negative) error code is returned.
213243
*/
244+
#if CONFIG_UNITY || CONFIG_ZTEST
245+
int at_params_size_get(const struct at_param_list *list, size_t index, size_t *len);
246+
#else
214247
__deprecated int at_params_size_get(const struct at_param_list *list, size_t index, size_t *len);
248+
#endif
215249

216250
/**
217251
* @deprecated
@@ -224,8 +258,13 @@ __deprecated int at_params_size_get(const struct at_param_list *list, size_t ind
224258
* @retval 0 If the operation was successful.
225259
* Otherwise, a (negative) error code is returned.
226260
*/
261+
#if CONFIG_UNITY || CONFIG_ZTEST
262+
int at_params_short_get(const struct at_param_list *list, size_t index,
263+
int16_t *value);
264+
#else
227265
__deprecated int at_params_short_get(const struct at_param_list *list, size_t index,
228266
int16_t *value);
267+
#endif
229268

230269
/**
231270
* @deprecated
@@ -238,8 +277,13 @@ __deprecated int at_params_short_get(const struct at_param_list *list, size_t in
238277
* @retval 0 If the operation was successful.
239278
* Otherwise, a (negative) error code is returned.
240279
*/
280+
#if CONFIG_UNITY || CONFIG_ZTEST
281+
int at_params_unsigned_short_get(const struct at_param_list *list, size_t index,
282+
uint16_t *value);
283+
#else
241284
__deprecated int at_params_unsigned_short_get(const struct at_param_list *list, size_t index,
242285
uint16_t *value);
286+
#endif
243287

244288
/**
245289
* @deprecated
@@ -252,8 +296,13 @@ __deprecated int at_params_unsigned_short_get(const struct at_param_list *list,
252296
* @retval 0 If the operation was successful.
253297
* Otherwise, a (negative) error code is returned.
254298
*/
299+
#if CONFIG_UNITY || CONFIG_ZTEST
300+
int at_params_int_get(const struct at_param_list *list, size_t index,
301+
int32_t *value);
302+
#else
255303
__deprecated int at_params_int_get(const struct at_param_list *list, size_t index,
256304
int32_t *value);
305+
#endif
257306

258307
/**
259308
* @deprecated
@@ -266,8 +315,13 @@ __deprecated int at_params_int_get(const struct at_param_list *list, size_t inde
266315
* @retval 0 If the operation was successful.
267316
* Otherwise, a (negative) error code is returned.
268317
*/
318+
#if CONFIG_UNITY || CONFIG_ZTEST
319+
int at_params_unsigned_int_get(const struct at_param_list *list, size_t index,
320+
uint32_t *value);
321+
#else
269322
__deprecated int at_params_unsigned_int_get(const struct at_param_list *list, size_t index,
270323
uint32_t *value);
324+
#endif
271325

272326
/**
273327
* @deprecated
@@ -280,8 +334,13 @@ __deprecated int at_params_unsigned_int_get(const struct at_param_list *list, si
280334
* @retval 0 If the operation was successful.
281335
* Otherwise, a (negative) error code is returned.
282336
*/
337+
#if CONFIG_UNITY || CONFIG_ZTEST
338+
int at_params_int64_get(const struct at_param_list *list, size_t index,
339+
int64_t *value);
340+
#else
283341
__deprecated int at_params_int64_get(const struct at_param_list *list, size_t index,
284342
int64_t *value);
343+
#endif
285344

286345
/**
287346
* @deprecated
@@ -301,8 +360,13 @@ __deprecated int at_params_int64_get(const struct at_param_list *list, size_t in
301360
* @retval 0 If the operation was successful.
302361
* Otherwise, a (negative) error code is returned.
303362
*/
363+
#if CONFIG_UNITY || CONFIG_ZTEST
364+
int at_params_string_get(const struct at_param_list *list, size_t index,
365+
char *value, size_t *len);
366+
#else
304367
__deprecated int at_params_string_get(const struct at_param_list *list, size_t index,
305368
char *value, size_t *len);
369+
#endif
306370

307371
/**
308372
* @deprecated
@@ -320,8 +384,13 @@ __deprecated int at_params_string_get(const struct at_param_list *list, size_t i
320384
* @retval 0 If the operation was successful.
321385
* Otherwise, a (negative) error code is returned.
322386
*/
387+
#if CONFIG_UNITY || CONFIG_ZTEST
388+
int at_params_string_ptr_get(const struct at_param_list *list, size_t index,
389+
const char **at_param, size_t *len);
390+
#else
323391
__deprecated int at_params_string_ptr_get(const struct at_param_list *list, size_t index,
324392
const char **at_param, size_t *len);
393+
#endif
325394

326395
/**
327396
* @deprecated
@@ -341,8 +410,13 @@ __deprecated int at_params_string_ptr_get(const struct at_param_list *list, size
341410
* @retval 0 If the operation was successful.
342411
* Otherwise, a (negative) error code is returned.
343412
*/
413+
#if CONFIG_UNITY || CONFIG_ZTEST
414+
int at_params_array_get(const struct at_param_list *list, size_t index,
415+
uint32_t *array, size_t *len);
416+
#else
344417
__deprecated int at_params_array_get(const struct at_param_list *list, size_t index,
345418
uint32_t *array, size_t *len);
419+
#endif
346420

347421
/**
348422
* @deprecated
@@ -352,7 +426,11 @@ __deprecated int at_params_array_get(const struct at_param_list *list, size_t in
352426
*
353427
* @return The number of valid parameters until an empty parameter is found.
354428
*/
429+
#if CONFIG_UNITY || CONFIG_ZTEST
430+
uint32_t at_params_valid_count_get(const struct at_param_list *list);
431+
#else
355432
__deprecated uint32_t at_params_valid_count_get(const struct at_param_list *list);
433+
#endif
356434

357435
/**
358436
* @deprecated
@@ -363,7 +441,11 @@ __deprecated uint32_t at_params_valid_count_get(const struct at_param_list *list
363441
*
364442
* @return Return parameter type of @ref at_param_type.
365443
*/
444+
#if CONFIG_UNITY || CONFIG_ZTEST
445+
enum at_param_type at_params_type_get(const struct at_param_list *list, size_t index);
446+
#else
366447
__deprecated enum at_param_type at_params_type_get(const struct at_param_list *list, size_t index);
448+
#endif
367449

368450
/** @} */
369451

0 commit comments

Comments
 (0)