conn_mw_ant.h 43 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793
  1. /**
  2. * Copyright (c) 2017 - 2020, Nordic Semiconductor ASA
  3. *
  4. * All rights reserved.
  5. *
  6. * Redistribution and use in source and binary forms, with or without modification,
  7. * are permitted provided that the following conditions are met:
  8. *
  9. * 1. Redistributions of source code must retain the above copyright notice, this
  10. * list of conditions and the following disclaimer.
  11. *
  12. * 2. Redistributions in binary form, except as embedded into a Nordic
  13. * Semiconductor ASA integrated circuit in a product or a software update for
  14. * such product, must reproduce the above copyright notice, this list of
  15. * conditions and the following disclaimer in the documentation and/or other
  16. * materials provided with the distribution.
  17. *
  18. * 3. Neither the name of Nordic Semiconductor ASA nor the names of its
  19. * contributors may be used to endorse or promote products derived from this
  20. * software without specific prior written permission.
  21. *
  22. * 4. This software, with or without modification, must only be used with a
  23. * Nordic Semiconductor ASA integrated circuit.
  24. *
  25. * 5. Any software provided in binary form under this license must not be reverse
  26. * engineered, decompiled, modified and/or disassembled.
  27. *
  28. * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS
  29. * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  30. * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
  31. * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE
  32. * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  33. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
  34. * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  35. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  36. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  37. * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  38. *
  39. */
  40. #ifndef _CONN_MW_ANT_H
  41. #define _CONN_MW_ANT_H
  42. #include <stdint.h>
  43. /**
  44. * @addtogroup sercon_mw_ant Connectivity middleware codecs for S212 (connectivity side)
  45. * @{
  46. * @ingroup ser_codecs_mw
  47. */
  48. /**@brief Handles @ref sd_ant_enable command and prepares response.
  49. *
  50. * @param[in] p_rx_buf Pointer to input buffer.
  51. * @param[in] rx_buf_len Size of @p p_rx_buf.
  52. * @param[out] p_tx_buf Pointer to output buffer.
  53. * @param[in,out] p_tx_buf_len \c in: Size of \p p_tx_buf buffer.
  54. * \c out: Length of valid data in \p p_tx_buf.
  55. *
  56. * @retval NRF_SUCCESS Handler success.
  57. * @retval NRF_ERROR_NULL Handler failure. NULL pointer supplied.
  58. * @retval NRF_ERROR_INVALID_LENGTH Handler failure. Incorrect buffer length.
  59. * @retval NRF_ERROR_INVALID_PARAM Handler failure. Invalid operation type.
  60. */
  61. uint32_t conn_mw_ant_enable(uint8_t const * const p_rx_buf,
  62. uint32_t rx_buf_len,
  63. uint8_t * const p_tx_buf,
  64. uint32_t * const p_tx_buf_len);
  65. /**@brief Handles @ref sd_ant_channel_assign command and prepares response.
  66. *
  67. * @param[in] p_rx_buf Pointer to input buffer.
  68. * @param[in] rx_buf_len Size of @p p_rx_buf.
  69. * @param[out] p_tx_buf Pointer to output buffer.
  70. * @param[in,out] p_tx_buf_len \c in: Size of \p p_tx_buf buffer.
  71. * \c out: Length of valid data in \p p_tx_buf.
  72. *
  73. * @retval NRF_SUCCESS Handler success.
  74. * @retval NRF_ERROR_NULL Handler failure. NULL pointer supplied.
  75. * @retval NRF_ERROR_INVALID_LENGTH Handler failure. Incorrect buffer length.
  76. * @retval NRF_ERROR_INVALID_PARAM Handler failure. Invalid operation type.
  77. */
  78. uint32_t conn_ant_channel_assign(uint8_t const * const p_rx_buf,
  79. uint32_t rx_buf_len,
  80. uint8_t * const p_tx_buf,
  81. uint32_t * const p_tx_buf_len);
  82. /**@brief Handles @ref sd_ant_channel_open command and prepares response.
  83. *
  84. * @param[in] p_rx_buf Pointer to input buffer.
  85. * @param[in] rx_buf_len Size of @p p_rx_buf.
  86. * @param[out] p_tx_buf Pointer to output buffer.
  87. * @param[in,out] p_tx_buf_len \c in: Size of \p p_tx_buf buffer.
  88. * \c out: Length of valid data in \p p_tx_buf.
  89. *
  90. * @retval NRF_SUCCESS Handler success.
  91. * @retval NRF_ERROR_NULL Handler failure. NULL pointer supplied.
  92. * @retval NRF_ERROR_INVALID_LENGTH Handler failure. Incorrect buffer length.
  93. * @retval NRF_ERROR_INVALID_PARAM Handler failure. Invalid operation type.
  94. */
  95. uint32_t conn_ant_channel_open_with_offset(uint8_t const * const p_rx_buf,
  96. uint32_t rx_buf_len,
  97. uint8_t * const p_tx_buf,
  98. uint32_t * const p_tx_buf_len);
  99. /**@brief Handles @ref sd_ant_channel_id_set command and prepares response.
  100. *
  101. * @param[in] p_rx_buf Pointer to input buffer.
  102. * @param[in] rx_buf_len Size of @p p_rx_buf.
  103. * @param[out] p_tx_buf Pointer to output buffer.
  104. * @param[in,out] p_tx_buf_len \c in: Size of \p p_tx_buf buffer.
  105. * \c out: Length of valid data in \p p_tx_buf.
  106. *
  107. * @retval NRF_SUCCESS Handler success.
  108. * @retval NRF_ERROR_NULL Handler failure. NULL pointer supplied.
  109. * @retval NRF_ERROR_INVALID_LENGTH Handler failure. Incorrect buffer length.
  110. * @retval NRF_ERROR_INVALID_PARAM Handler failure. Invalid operation type.
  111. */
  112. uint32_t conn_ant_channel_id_set(uint8_t const * const p_rx_buf,
  113. uint32_t rx_buf_len,
  114. uint8_t * const p_tx_buf,
  115. uint32_t * const p_tx_buf_len);
  116. /**@brief Handles @ref sd_ant_channel_period_set command and prepares response.
  117. *
  118. * @param[in] p_rx_buf Pointer to input buffer.
  119. * @param[in] rx_buf_len Size of @p p_rx_buf.
  120. * @param[out] p_tx_buf Pointer to output buffer.
  121. * @param[in,out] p_tx_buf_len \c in: Size of \p p_tx_buf buffer.
  122. * \c out: Length of valid data in \p p_tx_buf.
  123. *
  124. * @retval NRF_SUCCESS Handler success.
  125. * @retval NRF_ERROR_NULL Handler failure. NULL pointer supplied.
  126. * @retval NRF_ERROR_INVALID_LENGTH Handler failure. Incorrect buffer length.
  127. * @retval NRF_ERROR_INVALID_PARAM Handler failure. Invalid operation type.
  128. */
  129. uint32_t conn_ant_channel_period_set(uint8_t const * const p_rx_buf,
  130. uint32_t rx_buf_len,
  131. uint8_t * const p_tx_buf,
  132. uint32_t * const p_tx_buf_len);
  133. /**@brief Handles @ref sd_ant_channel_radio_freq_set command and prepares response.
  134. *
  135. * @param[in] p_rx_buf Pointer to input buffer.
  136. * @param[in] rx_buf_len Size of @p p_rx_buf.
  137. * @param[out] p_tx_buf Pointer to output buffer.
  138. * @param[in,out] p_tx_buf_len \c in: Size of \p p_tx_buf buffer.
  139. * \c out: Length of valid data in \p p_tx_buf.
  140. *
  141. * @retval NRF_SUCCESS Handler success.
  142. * @retval NRF_ERROR_NULL Handler failure. NULL pointer supplied.
  143. * @retval NRF_ERROR_INVALID_LENGTH Handler failure. Incorrect buffer length.
  144. * @retval NRF_ERROR_INVALID_PARAM Handler failure. Invalid operation type.
  145. */
  146. uint32_t conn_ant_channel_radio_freq_set(uint8_t const * const p_rx_buf,
  147. uint32_t rx_buf_len,
  148. uint8_t * const p_tx_buf,
  149. uint32_t * const p_tx_buf_len);
  150. /**@brief Handles @ref sd_ant_broadcast_message_tx command and prepares response.
  151. *
  152. * @param[in] p_rx_buf Pointer to input buffer.
  153. * @param[in] rx_buf_len Size of @p p_rx_buf.
  154. * @param[out] p_tx_buf Pointer to output buffer.
  155. * @param[in,out] p_tx_buf_len \c in: Size of \p p_tx_buf buffer.
  156. * \c out: Length of valid data in \p p_tx_buf.
  157. *
  158. * @retval NRF_SUCCESS Handler success.
  159. * @retval NRF_ERROR_NULL Handler failure. NULL pointer supplied.
  160. * @retval NRF_ERROR_INVALID_LENGTH Handler failure. Incorrect buffer length.
  161. * @retval NRF_ERROR_INVALID_PARAM Handler failure. Invalid operation type.
  162. */
  163. uint32_t conn_ant_broadcast_message_tx(uint8_t const * const p_rx_buf,
  164. uint32_t rx_buf_len,
  165. uint8_t * const p_tx_buf,
  166. uint32_t * const p_tx_buf_len);
  167. /**@brief Handles @ref sd_ant_acknowledge_message_tx command and prepares response.
  168. *
  169. * @param[in] p_rx_buf Pointer to input buffer.
  170. * @param[in] rx_buf_len Size of @p p_rx_buf.
  171. * @param[out] p_tx_buf Pointer to output buffer.
  172. * @param[in,out] p_tx_buf_len \c in: Size of \p p_tx_buf buffer.
  173. * \c out: Length of valid data in \p p_tx_buf.
  174. *
  175. * @retval NRF_SUCCESS Handler success.
  176. * @retval NRF_ERROR_NULL Handler failure. NULL pointer supplied.
  177. * @retval NRF_ERROR_INVALID_LENGTH Handler failure. Incorrect buffer length.
  178. * @retval NRF_ERROR_INVALID_PARAM Handler failure. Invalid operation type.
  179. */
  180. uint32_t conn_ant_acknowledge_message_tx(uint8_t const * const p_rx_buf,
  181. uint32_t rx_buf_len,
  182. uint8_t * const p_tx_buf,
  183. uint32_t * const p_tx_buf_len);
  184. /**@brief Handles @ref sd_ant_channel_unassign command and prepares response.
  185. *
  186. * @param[in] p_rx_buf Pointer to input buffer.
  187. * @param[in] rx_buf_len Size of @p p_rx_buf.
  188. * @param[out] p_tx_buf Pointer to output buffer.
  189. * @param[in,out] p_tx_buf_len \c in: Size of \p p_tx_buf buffer.
  190. * \c out: Length of valid data in \p p_tx_buf.
  191. *
  192. * @retval NRF_SUCCESS Handler success.
  193. * @retval NRF_ERROR_NULL Handler failure. NULL pointer supplied.
  194. * @retval NRF_ERROR_INVALID_LENGTH Handler failure. Incorrect buffer length.
  195. * @retval NRF_ERROR_INVALID_PARAM Handler failure. Invalid operation type.
  196. */
  197. uint32_t conn_ant_channel_unassign(uint8_t const * const p_rx_buf,
  198. uint32_t rx_buf_len,
  199. uint8_t * const p_tx_buf,
  200. uint32_t * const p_tx_buf_len);
  201. /**@brief Handles @ref sd_ant_channel_close command and prepares response.
  202. *
  203. * @param[in] p_rx_buf Pointer to input buffer.
  204. * @param[in] rx_buf_len Size of @p p_rx_buf.
  205. * @param[out] p_tx_buf Pointer to output buffer.
  206. * @param[in,out] p_tx_buf_len \c in: Size of \p p_tx_buf buffer.
  207. * \c out: Length of valid data in \p p_tx_buf.
  208. *
  209. * @retval NRF_SUCCESS Handler success.
  210. * @retval NRF_ERROR_NULL Handler failure. NULL pointer supplied.
  211. * @retval NRF_ERROR_INVALID_LENGTH Handler failure. Incorrect buffer length.
  212. * @retval NRF_ERROR_INVALID_PARAM Handler failure. Invalid operation type.
  213. */
  214. uint32_t conn_ant_channel_close(uint8_t const * const p_rx_buf,
  215. uint32_t rx_buf_len,
  216. uint8_t * const p_tx_buf,
  217. uint32_t * const p_tx_buf_len);
  218. /**@brief Handles @ref sd_ant_network_address_set command and prepares response.
  219. *
  220. * @param[in] p_rx_buf Pointer to input buffer.
  221. * @param[in] rx_buf_len Size of @p p_rx_buf.
  222. * @param[out] p_tx_buf Pointer to output buffer.
  223. * @param[in,out] p_tx_buf_len \c in: Size of \p p_tx_buf buffer.
  224. * \c out: Length of valid data in \p p_tx_buf.
  225. *
  226. * @retval NRF_SUCCESS Handler success.
  227. * @retval NRF_ERROR_NULL Handler failure. NULL pointer supplied.
  228. * @retval NRF_ERROR_INVALID_LENGTH Handler failure. Incorrect buffer length.
  229. * @retval NRF_ERROR_INVALID_PARAM Handler failure. Invalid operation type.
  230. */
  231. uint32_t conn_ant_network_address_set(uint8_t const * const p_rx_buf,
  232. uint32_t rx_buf_len,
  233. uint8_t * const p_tx_buf,
  234. uint32_t * const p_tx_buf_len);
  235. /**@brief Handles @ref sd_ant_channel_radio_tx_power_set command and prepares response.
  236. *
  237. * @param[in] p_rx_buf Pointer to input buffer.
  238. * @param[in] rx_buf_len Size of @p p_rx_buf.
  239. * @param[out] p_tx_buf Pointer to output buffer.
  240. * @param[in,out] p_tx_buf_len \c in: Size of \p p_tx_buf buffer.
  241. * \c out: Length of valid data in \p p_tx_buf.
  242. *
  243. * @retval NRF_SUCCESS Handler success.
  244. * @retval NRF_ERROR_NULL Handler failure. NULL pointer supplied.
  245. * @retval NRF_ERROR_INVALID_LENGTH Handler failure. Incorrect buffer length.
  246. * @retval NRF_ERROR_INVALID_PARAM Handler failure. Invalid operation type.
  247. */
  248. uint32_t conn_ant_channel_radio_tx_power_set(uint8_t const * const p_rx_buf,
  249. uint32_t rx_buf_len,
  250. uint8_t * const p_tx_buf,
  251. uint32_t * const p_tx_buf_len);
  252. /**@brief Handles @ref sd_ant_channel_rx_search_timeout_set command and prepares response.
  253. *
  254. * @param[in] p_rx_buf Pointer to input buffer.
  255. * @param[in] rx_buf_len Size of @p p_rx_buf.
  256. * @param[out] p_tx_buf Pointer to output buffer.
  257. * @param[in,out] p_tx_buf_len \c in: Size of \p p_tx_buf buffer.
  258. * \c out: Length of valid data in \p p_tx_buf.
  259. *
  260. * @retval NRF_SUCCESS Handler success.
  261. * @retval NRF_ERROR_NULL Handler failure. NULL pointer supplied.
  262. * @retval NRF_ERROR_INVALID_LENGTH Handler failure. Incorrect buffer length.
  263. * @retval NRF_ERROR_INVALID_PARAM Handler failure. Invalid operation type.
  264. */
  265. uint32_t conn_ant_channel_rx_search_timeout_set(uint8_t const * const p_rx_buf,
  266. uint32_t rx_buf_len,
  267. uint8_t * const p_tx_buf,
  268. uint32_t * const p_tx_buf_len);
  269. /**@brief Handles @ref sd_ant_channel_low_priority_rx_search_timeout_set command and prepares response.
  270. *
  271. * @param[in] p_rx_buf Pointer to input buffer.
  272. * @param[in] rx_buf_len Size of @p p_rx_buf.
  273. * @param[out] p_tx_buf Pointer to output buffer.
  274. * @param[in,out] p_tx_buf_len \c in: Size of \p p_tx_buf buffer.
  275. * \c out: Length of valid data in \p p_tx_buf.
  276. *
  277. * @retval NRF_SUCCESS Handler success.
  278. * @retval NRF_ERROR_NULL Handler failure. NULL pointer supplied.
  279. * @retval NRF_ERROR_INVALID_LENGTH Handler failure. Incorrect buffer length.
  280. * @retval NRF_ERROR_INVALID_PARAM Handler failure. Invalid operation type.
  281. */
  282. uint32_t conn_ant_channel_low_priority_rx_search_timeout_set(uint8_t const * const p_rx_buf,
  283. uint32_t rx_buf_len,
  284. uint8_t * const p_tx_buf,
  285. uint32_t * const p_tx_buf_len);
  286. /**@brief Handles @ref sd_ant_prox_search_set command and prepares response.
  287. *
  288. * @param[in] p_rx_buf Pointer to input buffer.
  289. * @param[in] rx_buf_len Size of @p p_rx_buf.
  290. * @param[out] p_tx_buf Pointer to output buffer.
  291. * @param[in,out] p_tx_buf_len \c in: Size of \p p_tx_buf buffer.
  292. * \c out: Length of valid data in \p p_tx_buf.
  293. *
  294. * @retval NRF_SUCCESS Handler success.
  295. * @retval NRF_ERROR_NULL Handler failure. NULL pointer supplied.
  296. * @retval NRF_ERROR_INVALID_LENGTH Handler failure. Incorrect buffer length.
  297. * @retval NRF_ERROR_INVALID_PARAM Handler failure. Invalid operation type.
  298. */
  299. uint32_t conn_ant_prox_search_set(uint8_t const * const p_rx_buf,
  300. uint32_t rx_buf_len,
  301. uint8_t * const p_tx_buf,
  302. uint32_t * const p_tx_buf_len);
  303. /**@brief Handles @ref sd_ant_search_waveform_set command and prepares response.
  304. *
  305. * @param[in] p_rx_buf Pointer to input buffer.
  306. * @param[in] rx_buf_len Size of @p p_rx_buf.
  307. * @param[out] p_tx_buf Pointer to output buffer.
  308. * @param[in,out] p_tx_buf_len \c in: Size of \p p_tx_buf buffer.
  309. * \c out: Length of valid data in \p p_tx_buf.
  310. *
  311. * @retval NRF_SUCCESS Handler success.
  312. * @retval NRF_ERROR_NULL Handler failure. NULL pointer supplied.
  313. * @retval NRF_ERROR_INVALID_LENGTH Handler failure. Incorrect buffer length.
  314. * @retval NRF_ERROR_INVALID_PARAM Handler failure. Invalid operation type.
  315. */
  316. uint32_t conn_ant_search_waveform_set(uint8_t const * const p_rx_buf,
  317. uint32_t rx_buf_len,
  318. uint8_t * const p_tx_buf,
  319. uint32_t * const p_tx_buf_len);
  320. /**@brief Handles @ref sd_ant_channel_id_get command and prepares response.
  321. *
  322. * @param[in] p_rx_buf Pointer to input buffer.
  323. * @param[in] rx_buf_len Size of @p p_rx_buf.
  324. * @param[out] p_tx_buf Pointer to output buffer.
  325. * @param[in,out] p_tx_buf_len \c in: Size of \p p_tx_buf buffer.
  326. * \c out: Length of valid data in \p p_tx_buf.
  327. *
  328. * @retval NRF_SUCCESS Handler success.
  329. * @retval NRF_ERROR_NULL Handler failure. NULL pointer supplied.
  330. * @retval NRF_ERROR_INVALID_LENGTH Handler failure. Incorrect buffer length.
  331. * @retval NRF_ERROR_INVALID_PARAM Handler failure. Invalid operation type.
  332. */
  333. uint32_t conn_ant_channel_id_get(uint8_t const * const p_rx_buf,
  334. uint32_t rx_buf_len,
  335. uint8_t * const p_tx_buf,
  336. uint32_t * const p_tx_buf_len);
  337. /**@brief Handles @ref sd_ant_channel_radio_freq_get command and prepares response.
  338. *
  339. * @param[in] p_rx_buf Pointer to input buffer.
  340. * @param[in] rx_buf_len Size of @p p_rx_buf.
  341. * @param[out] p_tx_buf Pointer to output buffer.
  342. * @param[in,out] p_tx_buf_len \c in: Size of \p p_tx_buf buffer.
  343. * \c out: Length of valid data in \p p_tx_buf.
  344. *
  345. * @retval NRF_SUCCESS Handler success.
  346. * @retval NRF_ERROR_NULL Handler failure. NULL pointer supplied.
  347. * @retval NRF_ERROR_INVALID_LENGTH Handler failure. Incorrect buffer length.
  348. * @retval NRF_ERROR_INVALID_PARAM Handler failure. Invalid operation type.
  349. */
  350. uint32_t conn_ant_channel_radio_freq_get(uint8_t const * const p_rx_buf,
  351. uint32_t rx_buf_len,
  352. uint8_t * const p_tx_buf,
  353. uint32_t * const p_tx_buf_len);
  354. /**@brief Handles @ref sd_ant_channel_period_get command and prepares response.
  355. *
  356. * @param[in] p_rx_buf Pointer to input buffer.
  357. * @param[in] rx_buf_len Size of @p p_rx_buf.
  358. * @param[out] p_tx_buf Pointer to output buffer.
  359. * @param[in,out] p_tx_buf_len \c in: Size of \p p_tx_buf buffer.
  360. * \c out: Length of valid data in \p p_tx_buf.
  361. *
  362. * @retval NRF_SUCCESS Handler success.
  363. * @retval NRF_ERROR_NULL Handler failure. NULL pointer supplied.
  364. * @retval NRF_ERROR_INVALID_LENGTH Handler failure. Incorrect buffer length.
  365. * @retval NRF_ERROR_INVALID_PARAM Handler failure. Invalid operation type.
  366. */
  367. uint32_t conn_ant_channel_period_get(uint8_t const * const p_rx_buf,
  368. uint32_t rx_buf_len,
  369. uint8_t * const p_tx_buf,
  370. uint32_t * const p_tx_buf_len);
  371. /**@brief Handles @ref sd_ant_search_channel_priority_set command and prepares response.
  372. *
  373. * @param[in] p_rx_buf Pointer to input buffer.
  374. * @param[in] rx_buf_len Size of @p p_rx_buf.
  375. * @param[out] p_tx_buf Pointer to output buffer.
  376. * @param[in,out] p_tx_buf_len \c in: Size of \p p_tx_buf buffer.
  377. * \c out: Length of valid data in \p p_tx_buf.
  378. *
  379. * @retval NRF_SUCCESS Handler success.
  380. * @retval NRF_ERROR_NULL Handler failure. NULL pointer supplied.
  381. * @retval NRF_ERROR_INVALID_LENGTH Handler failure. Incorrect buffer length.
  382. * @retval NRF_ERROR_INVALID_PARAM Handler failure. Invalid operation type.
  383. */
  384. uint32_t conn_ant_search_channel_priority_set(uint8_t const * const p_rx_buf,
  385. uint32_t rx_buf_len,
  386. uint8_t * const p_tx_buf,
  387. uint32_t * const p_tx_buf_len);
  388. /**@brief Handles @ref sd_ant_active_search_sharing_cycles_set command and prepares response.
  389. *
  390. * @param[in] p_rx_buf Pointer to input buffer.
  391. * @param[in] rx_buf_len Size of @p p_rx_buf.
  392. * @param[out] p_tx_buf Pointer to output buffer.
  393. * @param[in,out] p_tx_buf_len \c in: Size of \p p_tx_buf buffer.
  394. * \c out: Length of valid data in \p p_tx_buf.
  395. *
  396. * @retval NRF_SUCCESS Handler success.
  397. * @retval NRF_ERROR_NULL Handler failure. NULL pointer supplied.
  398. * @retval NRF_ERROR_INVALID_LENGTH Handler failure. Incorrect buffer length.
  399. * @retval NRF_ERROR_INVALID_PARAM Handler failure. Invalid operation type.
  400. */
  401. uint32_t conn_ant_active_search_sharing_cycles_set(uint8_t const * const p_rx_buf,
  402. uint32_t rx_buf_len,
  403. uint8_t * const p_tx_buf,
  404. uint32_t * const p_tx_buf_len);
  405. /**@brief Handles @ref sd_ant_lib_config_set command and prepares response.
  406. *
  407. * @param[in] p_rx_buf Pointer to input buffer.
  408. * @param[in] rx_buf_len Size of @p p_rx_buf.
  409. * @param[out] p_tx_buf Pointer to output buffer.
  410. * @param[in,out] p_tx_buf_len \c in: Size of \p p_tx_buf buffer.
  411. * \c out: Length of valid data in \p p_tx_buf.
  412. *
  413. * @retval NRF_SUCCESS Handler success.
  414. * @retval NRF_ERROR_NULL Handler failure. NULL pointer supplied.
  415. * @retval NRF_ERROR_INVALID_LENGTH Handler failure. Incorrect buffer length.
  416. * @retval NRF_ERROR_INVALID_PARAM Handler failure. Invalid operation type.
  417. */
  418. uint32_t conn_ant_lib_config_set(uint8_t const * const p_rx_buf,
  419. uint32_t rx_buf_len,
  420. uint8_t * const p_tx_buf,
  421. uint32_t * const p_tx_buf_len);
  422. /**@brief Handles @ref sd_ant_active_search_sharing_cycles_get command and prepares response.
  423. *
  424. * @param[in] p_rx_buf Pointer to input buffer.
  425. * @param[in] rx_buf_len Size of @p p_rx_buf.
  426. * @param[out] p_tx_buf Pointer to output buffer.
  427. * @param[in,out] p_tx_buf_len \c in: Size of \p p_tx_buf buffer.
  428. * \c out: Length of valid data in \p p_tx_buf.
  429. *
  430. * @retval NRF_SUCCESS Handler success.
  431. * @retval NRF_ERROR_NULL Handler failure. NULL pointer supplied.
  432. * @retval NRF_ERROR_INVALID_LENGTH Handler failure. Incorrect buffer length.
  433. * @retval NRF_ERROR_INVALID_PARAM Handler failure. Invalid operation type.
  434. */
  435. uint32_t conn_ant_active_search_sharing_cycles_get(uint8_t const * const p_rx_buf,
  436. uint32_t rx_buf_len,
  437. uint8_t * const p_tx_buf,
  438. uint32_t * const p_tx_buf_len);
  439. /**@brief Handles @ref sd_ant_lib_config_get command and prepares response.
  440. *
  441. * @param[in] p_rx_buf Pointer to input buffer.
  442. * @param[in] rx_buf_len Size of @p p_rx_buf.
  443. * @param[out] p_tx_buf Pointer to output buffer.
  444. * @param[in,out] p_tx_buf_len \c in: Size of \p p_tx_buf buffer.
  445. * \c out: Length of valid data in \p p_tx_buf.
  446. *
  447. * @retval NRF_SUCCESS Handler success.
  448. * @retval NRF_ERROR_NULL Handler failure. NULL pointer supplied.
  449. * @retval NRF_ERROR_INVALID_LENGTH Handler failure. Incorrect buffer length.
  450. * @retval NRF_ERROR_INVALID_PARAM Handler failure. Invalid operation type.
  451. */
  452. uint32_t conn_ant_lib_config_get(uint8_t const * const p_rx_buf,
  453. uint32_t rx_buf_len,
  454. uint8_t * const p_tx_buf,
  455. uint32_t * const p_tx_buf_len);
  456. /**@brief Handles @ref sd_ant_lib_config_clear command and prepares response.
  457. *
  458. * @param[in] p_rx_buf Pointer to input buffer.
  459. * @param[in] rx_buf_len Size of @p p_rx_buf.
  460. * @param[out] p_tx_buf Pointer to output buffer.
  461. * @param[in,out] p_tx_buf_len \c in: Size of \p p_tx_buf buffer.
  462. * \c out: Length of valid data in \p p_tx_buf.
  463. *
  464. * @retval NRF_SUCCESS Handler success.
  465. * @retval NRF_ERROR_NULL Handler failure. NULL pointer supplied.
  466. * @retval NRF_ERROR_INVALID_LENGTH Handler failure. Incorrect buffer length.
  467. * @retval NRF_ERROR_INVALID_PARAM Handler failure. Invalid operation type.
  468. */
  469. uint32_t conn_ant_lib_config_clear(uint8_t const * const p_rx_buf,
  470. uint32_t rx_buf_len,
  471. uint8_t * const p_tx_buf,
  472. uint32_t * const p_tx_buf_len);
  473. /**@brief Handles @ref sd_ant_stack_reset command and prepares response.
  474. *
  475. * @param[in] p_rx_buf Pointer to input buffer.
  476. * @param[in] rx_buf_len Size of @p p_rx_buf.
  477. * @param[out] p_tx_buf Pointer to output buffer.
  478. * @param[in,out] p_tx_buf_len \c in: Size of \p p_tx_buf buffer.
  479. * \c out: Length of valid data in \p p_tx_buf.
  480. *
  481. * @retval NRF_SUCCESS Handler success.
  482. * @retval NRF_ERROR_NULL Handler failure. NULL pointer supplied.
  483. * @retval NRF_ERROR_INVALID_LENGTH Handler failure. Incorrect buffer length.
  484. * @retval NRF_ERROR_INVALID_PARAM Handler failure. Invalid operation type.
  485. */
  486. uint32_t conn_ant_stack_reset(uint8_t const * const p_rx_buf,
  487. uint32_t rx_buf_len,
  488. uint8_t * const p_tx_buf,
  489. uint32_t * const p_tx_buf_len);
  490. /**@brief Handles @ref sd_ant_rx_scan_mode_start command and prepares response.
  491. *
  492. * @param[in] p_rx_buf Pointer to input buffer.
  493. * @param[in] rx_buf_len Size of @p p_rx_buf.
  494. * @param[out] p_tx_buf Pointer to output buffer.
  495. * @param[in,out] p_tx_buf_len \c in: Size of \p p_tx_buf buffer.
  496. * \c out: Length of valid data in \p p_tx_buf.
  497. *
  498. * @retval NRF_SUCCESS Handler success.
  499. * @retval NRF_ERROR_NULL Handler failure. NULL pointer supplied.
  500. * @retval NRF_ERROR_INVALID_LENGTH Handler failure. Incorrect buffer length.
  501. * @retval NRF_ERROR_INVALID_PARAM Handler failure. Invalid operation type.
  502. */
  503. uint32_t conn_ant_rx_scan_mode_start(uint8_t const * const p_rx_buf,
  504. uint32_t rx_buf_len,
  505. uint8_t * const p_tx_buf,
  506. uint32_t * const p_tx_buf_len);
  507. /**@brief Handles @ref sd_ant_id_list_add command and prepares response.
  508. *
  509. * @param[in] p_rx_buf Pointer to input buffer.
  510. * @param[in] rx_buf_len Size of @p p_rx_buf.
  511. * @param[out] p_tx_buf Pointer to output buffer.
  512. * @param[in,out] p_tx_buf_len \c in: Size of \p p_tx_buf buffer.
  513. * \c out: Length of valid data in \p p_tx_buf.
  514. *
  515. * @retval NRF_SUCCESS Handler success.
  516. * @retval NRF_ERROR_NULL Handler failure. NULL pointer supplied.
  517. * @retval NRF_ERROR_INVALID_LENGTH Handler failure. Incorrect buffer length.
  518. * @retval NRF_ERROR_INVALID_PARAM Handler failure. Invalid operation type.
  519. */
  520. uint32_t conn_ant_id_list_add(uint8_t const * const p_rx_buf,
  521. uint32_t rx_buf_len,
  522. uint8_t * const p_tx_buf,
  523. uint32_t * const p_tx_buf_len);
  524. /**@brief Handles @ref sd_ant_id_list_config command and prepares response.
  525. *
  526. * @param[in] p_rx_buf Pointer to input buffer.
  527. * @param[in] rx_buf_len Size of @p p_rx_buf.
  528. * @param[out] p_tx_buf Pointer to output buffer.
  529. * @param[in,out] p_tx_buf_len \c in: Size of \p p_tx_buf buffer.
  530. * \c out: Length of valid data in \p p_tx_buf.
  531. *
  532. * @retval NRF_SUCCESS Handler success.
  533. * @retval NRF_ERROR_NULL Handler failure. NULL pointer supplied.
  534. * @retval NRF_ERROR_INVALID_LENGTH Handler failure. Incorrect buffer length.
  535. * @retval NRF_ERROR_INVALID_PARAM Handler failure. Invalid operation type.
  536. */
  537. uint32_t conn_ant_id_list_config(uint8_t const * const p_rx_buf,
  538. uint32_t rx_buf_len,
  539. uint8_t * const p_tx_buf,
  540. uint32_t * const p_tx_buf_len);
  541. /**@brief Handles @ref sd_ant_channel_status_get command and prepares response.
  542. *
  543. * @param[in] p_rx_buf Pointer to input buffer.
  544. * @param[in] rx_buf_len Size of @p p_rx_buf.
  545. * @param[out] p_tx_buf Pointer to output buffer.
  546. * @param[in,out] p_tx_buf_len \c in: Size of \p p_tx_buf buffer.
  547. * \c out: Length of valid data in \p p_tx_buf.
  548. *
  549. * @retval NRF_SUCCESS Handler success.
  550. * @retval NRF_ERROR_NULL Handler failure. NULL pointer supplied.
  551. * @retval NRF_ERROR_INVALID_LENGTH Handler failure. Incorrect buffer length.
  552. * @retval NRF_ERROR_INVALID_PARAM Handler failure. Invalid operation type.
  553. */
  554. uint32_t conn_ant_channel_status_get(uint8_t const * const p_rx_buf,
  555. uint32_t rx_buf_len,
  556. uint8_t * const p_tx_buf,
  557. uint32_t * const p_tx_buf_len);
  558. /**@brief Handles @ref sd_ant_cw_test_mode_init command and prepares response.
  559. *
  560. * @param[in] p_rx_buf Pointer to input buffer.
  561. * @param[in] rx_buf_len Size of @p p_rx_buf.
  562. * @param[out] p_tx_buf Pointer to output buffer.
  563. * @param[in,out] p_tx_buf_len \c in: Size of \p p_tx_buf buffer.
  564. * \c out: Length of valid data in \p p_tx_buf.
  565. *
  566. * @retval NRF_SUCCESS Handler success.
  567. * @retval NRF_ERROR_NULL Handler failure. NULL pointer supplied.
  568. * @retval NRF_ERROR_INVALID_LENGTH Handler failure. Incorrect buffer length.
  569. * @retval NRF_ERROR_INVALID_PARAM Handler failure. Invalid operation type.
  570. */
  571. uint32_t conn_ant_cw_test_mode_init(uint8_t const * const p_rx_buf,
  572. uint32_t rx_buf_len,
  573. uint8_t * const p_tx_buf,
  574. uint32_t * const p_tx_buf_len);
  575. /**@brief Handles @ref sd_ant_cw_test_mode command and prepares response.
  576. *
  577. * @param[in] p_rx_buf Pointer to input buffer.
  578. * @param[in] rx_buf_len Size of @p p_rx_buf.
  579. * @param[out] p_tx_buf Pointer to output buffer.
  580. * @param[in,out] p_tx_buf_len \c in: Size of \p p_tx_buf buffer.
  581. * \c out: Length of valid data in \p p_tx_buf.
  582. *
  583. * @retval NRF_SUCCESS Handler success.
  584. * @retval NRF_ERROR_NULL Handler failure. NULL pointer supplied.
  585. * @retval NRF_ERROR_INVALID_LENGTH Handler failure. Incorrect buffer length.
  586. * @retval NRF_ERROR_INVALID_PARAM Handler failure. Invalid operation type.
  587. */
  588. uint32_t conn_ant_cw_test_mode(uint8_t const * const p_rx_buf,
  589. uint32_t rx_buf_len,
  590. uint8_t * const p_tx_buf,
  591. uint32_t * const p_tx_buf_len);
  592. /**@brief Handles @ref sd_ant_version_get command and prepares response.
  593. *
  594. * @param[in] p_rx_buf Pointer to input buffer.
  595. * @param[in] rx_buf_len Size of @p p_rx_buf.
  596. * @param[out] p_tx_buf Pointer to output buffer.
  597. * @param[in,out] p_tx_buf_len \c in: Size of \p p_tx_buf buffer.
  598. * \c out: Length of valid data in \p p_tx_buf.
  599. *
  600. * @retval NRF_SUCCESS Handler success.
  601. * @retval NRF_ERROR_NULL Handler failure. NULL pointer supplied.
  602. * @retval NRF_ERROR_INVALID_LENGTH Handler failure. Incorrect buffer length.
  603. * @retval NRF_ERROR_INVALID_PARAM Handler failure. Invalid operation type.
  604. */
  605. uint32_t conn_ant_version_get(uint8_t const * const p_rx_buf,
  606. uint32_t rx_buf_len,
  607. uint8_t * const p_tx_buf,
  608. uint32_t * const p_tx_buf_len);
  609. /**@brief Handles @ref sd_ant_capabilities_get command and prepares response.
  610. *
  611. * @param[in] p_rx_buf Pointer to input buffer.
  612. * @param[in] rx_buf_len Size of @p p_rx_buf.
  613. * @param[out] p_tx_buf Pointer to output buffer.
  614. * @param[in,out] p_tx_buf_len \c in: Size of \p p_tx_buf buffer.
  615. * \c out: Length of valid data in \p p_tx_buf.
  616. *
  617. * @retval NRF_SUCCESS Handler success.
  618. * @retval NRF_ERROR_NULL Handler failure. NULL pointer supplied.
  619. * @retval NRF_ERROR_INVALID_LENGTH Handler failure. Incorrect buffer length.
  620. * @retval NRF_ERROR_INVALID_PARAM Handler failure. Invalid operation type.
  621. */
  622. uint32_t conn_ant_capabilities_get(uint8_t const * const p_rx_buf,
  623. uint32_t rx_buf_len,
  624. uint8_t * const p_tx_buf,
  625. uint32_t * const p_tx_buf_len);
  626. /**@brief Handles @ref sd_ant_crypto_channel_enable command and prepares response.
  627. *
  628. * @param[in] p_rx_buf Pointer to input buffer.
  629. * @param[in] rx_buf_len Size of @p p_rx_buf.
  630. * @param[out] p_tx_buf Pointer to output buffer.
  631. * @param[in,out] p_tx_buf_len \c in: Size of \p p_tx_buf buffer.
  632. * \c out: Length of valid data in \p p_tx_buf.
  633. *
  634. * @retval NRF_SUCCESS Handler success.
  635. * @retval NRF_ERROR_NULL Handler failure. NULL pointer supplied.
  636. * @retval NRF_ERROR_INVALID_LENGTH Handler failure. Incorrect buffer length.
  637. * @retval NRF_ERROR_INVALID_PARAM Handler failure. Invalid operation type.
  638. */
  639. uint32_t conn_ant_crypto_channel_enable(uint8_t const * const p_rx_buf,
  640. uint32_t rx_buf_len,
  641. uint8_t * const p_tx_buf,
  642. uint32_t * const p_tx_buf_len);
  643. /**@brief Handles @ref sd_ant_adv_burst_config_set command and prepares response.
  644. *
  645. * @param[in] p_rx_buf Pointer to input buffer.
  646. * @param[in] rx_buf_len Size of @p p_rx_buf.
  647. * @param[out] p_tx_buf Pointer to output buffer.
  648. * @param[in,out] p_tx_buf_len \c in: Size of \p p_tx_buf buffer.
  649. * \c out: Length of valid data in \p p_tx_buf.
  650. *
  651. * @retval NRF_SUCCESS Handler success.
  652. * @retval NRF_ERROR_NULL Handler failure. NULL pointer supplied.
  653. * @retval NRF_ERROR_INVALID_LENGTH Handler failure. Incorrect buffer length.
  654. * @retval NRF_ERROR_INVALID_PARAM Handler failure. Invalid operation type.
  655. */
  656. uint32_t conn_ant_adv_burst_config_set(uint8_t const * const p_rx_buf,
  657. uint32_t rx_buf_len,
  658. uint8_t * const p_tx_buf,
  659. uint32_t * const p_tx_buf_len);
  660. /**@brief Handles @ref sd_ant_crypto_key_set command and prepares response.
  661. *
  662. * @param[in] p_rx_buf Pointer to input buffer.
  663. * @param[in] rx_buf_len Size of @p p_rx_buf.
  664. * @param[out] p_tx_buf Pointer to output buffer.
  665. * @param[in,out] p_tx_buf_len \c in: Size of \p p_tx_buf buffer.
  666. * \c out: Length of valid data in \p p_tx_buf.
  667. *
  668. * @retval NRF_SUCCESS Handler success.
  669. * @retval NRF_ERROR_NULL Handler failure. NULL pointer supplied.
  670. * @retval NRF_ERROR_INVALID_LENGTH Handler failure. Incorrect buffer length.
  671. * @retval NRF_ERROR_INVALID_PARAM Handler failure. Invalid operation type.
  672. */
  673. uint32_t conn_ant_crypto_key_set(uint8_t const * const p_rx_buf,
  674. uint32_t rx_buf_len,
  675. uint8_t * const p_tx_buf,
  676. uint32_t * const p_tx_buf_len);
  677. /**@brief Handles @ref sd_ant_crypto_info_set command and prepares response.
  678. *
  679. * @param[in] p_rx_buf Pointer to input buffer.
  680. * @param[in] rx_buf_len Size of @p p_rx_buf.
  681. * @param[out] p_tx_buf Pointer to output buffer.
  682. * @param[in,out] p_tx_buf_len \c in: Size of \p p_tx_buf buffer.
  683. * \c out: Length of valid data in \p p_tx_buf.
  684. *
  685. * @retval NRF_SUCCESS Handler success.
  686. * @retval NRF_ERROR_NULL Handler failure. NULL pointer supplied.
  687. * @retval NRF_ERROR_INVALID_LENGTH Handler failure. Incorrect buffer length.
  688. * @retval NRF_ERROR_INVALID_PARAM Handler failure. Invalid operation type.
  689. */
  690. uint32_t conn_ant_crypto_info_set(uint8_t const * const p_rx_buf,
  691. uint32_t rx_buf_len,
  692. uint8_t * const p_tx_buf,
  693. uint32_t * const p_tx_buf_len);
  694. /**@brief Handles @ref sd_ant_crypto_info_get command and prepares response.
  695. *
  696. * @param[in] p_rx_buf Pointer to input buffer.
  697. * @param[in] rx_buf_len Size of @p p_rx_buf.
  698. * @param[out] p_tx_buf Pointer to output buffer.
  699. * @param[in,out] p_tx_buf_len \c in: Size of \p p_tx_buf buffer.
  700. * \c out: Length of valid data in \p p_tx_buf.
  701. *
  702. * @retval NRF_SUCCESS Handler success.
  703. * @retval NRF_ERROR_NULL Handler failure. NULL pointer supplied.
  704. * @retval NRF_ERROR_INVALID_LENGTH Handler failure. Incorrect buffer length.
  705. * @retval NRF_ERROR_INVALID_PARAM Handler failure. Invalid operation type.
  706. */
  707. uint32_t conn_ant_crypto_info_get(uint8_t const * const p_rx_buf,
  708. uint32_t rx_buf_len,
  709. uint8_t * const p_tx_buf,
  710. uint32_t * const p_tx_buf_len);
  711. /**@brief Handles @ref sd_ant_coex_config_set command and prepares response.
  712. *
  713. * @param[in] p_rx_buf Pointer to input buffer.
  714. * @param[in] rx_buf_len Size of @p p_rx_buf.
  715. * @param[out] p_tx_buf Pointer to output buffer.
  716. * @param[in,out] p_tx_buf_len \c in: Size of \p p_tx_buf buffer.
  717. * \c out: Length of valid data in \p p_tx_buf.
  718. *
  719. * @retval NRF_SUCCESS Handler success.
  720. * @retval NRF_ERROR_NULL Handler failure. NULL pointer supplied.
  721. * @retval NRF_ERROR_INVALID_LENGTH Handler failure. Incorrect buffer length.
  722. * @retval NRF_ERROR_INVALID_PARAM Handler failure. Invalid operation type.
  723. */
  724. uint32_t conn_ant_coex_config_set(uint8_t const * const p_rx_buf,
  725. uint32_t rx_buf_len,
  726. uint8_t * const p_tx_buf,
  727. uint32_t * const p_tx_buf_len);
  728. /**@brief Handles @ref sd_ant_coex_config_get command and prepares response.
  729. *
  730. * @param[in] p_rx_buf Pointer to input buffer.
  731. * @param[in] rx_buf_len Size of @p p_rx_buf.
  732. * @param[out] p_tx_buf Pointer to output buffer.
  733. * @param[in,out] p_tx_buf_len \c in: Size of \p p_tx_buf buffer.
  734. * \c out: Length of valid data in \p p_tx_buf.
  735. *
  736. * @retval NRF_SUCCESS Handler success.
  737. * @retval NRF_ERROR_NULL Handler failure. NULL pointer supplied.
  738. * @retval NRF_ERROR_INVALID_LENGTH Handler failure. Incorrect buffer length.
  739. * @retval NRF_ERROR_INVALID_PARAM Handler failure. Invalid operation type.
  740. */
  741. uint32_t conn_ant_coex_config_get(uint8_t const * const p_rx_buf,
  742. uint32_t rx_buf_len,
  743. uint8_t * const p_tx_buf,
  744. uint32_t * const p_tx_buf_len);
  745. /** @} */
  746. #endif //_CONN_MW_ANT_H