1 /*
2  * Copyright (c) 2020 - 2023, Nordic Semiconductor ASA
3  * All rights reserved.
4  *
5  * SPDX-License-Identifier: BSD-3-Clause
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions are met:
9  *
10  * 1. Redistributions of source code must retain the above copyright notice, this
11  *    list of conditions and the following disclaimer.
12  *
13  * 2. Redistributions in binary form must reproduce the above copyright
14  *    notice, this list of conditions and the following disclaimer in the
15  *    documentation and/or other materials provided with the distribution.
16  *
17  * 3. Neither the name of Nordic Semiconductor ASA nor the names of its
18  *    contributors may be used to endorse or promote products derived from this
19  *    software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23  * IMPLIED WARRANTIES OF MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE
24  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
25  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31  * POSSIBILITY OF SUCH DAMAGE.
32  *
33  */
34 
35 /**
36  * @defgroup nrf_802154_spinel_serialization
37  * 802.15.4 radio driver spinel serialization
38  * @{
39  *
40  */
41 
42 #ifndef NRF_802154_SPINEL_DATATYPES_H_
43 #define NRF_802154_SPINEL_DATATYPES_H_
44 
45 #include "../spinel_base/spinel.h"
46 
47 #ifdef __cplusplus
48 extern "C" {
49 #endif
50 
51 /**
52  * @brief Enum containing spinel custom vendor properties for nrf_802154 serialization.
53  */
54 typedef enum
55 {
56     /**
57      * Vendor property group for Nordic begin.
58      */
59     SPINEL_PROP_VENDOR_NORDIC__BEGIN = SPINEL_PROP_VENDOR__BEGIN,
60 
61     /**
62      * Vendor property group for Nordic nrf_802154 begin.
63      */
64     SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN = SPINEL_PROP_VENDOR_NORDIC__BEGIN,
65 
66     /**
67      * Vendor property for nrf_802154_init serialization.
68      */
69     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_INIT =
70         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 0,
71 
72     /**
73      * Vendor property for nrf_802154_sleep serialization.
74      */
75     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_SLEEP =
76         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 1,
77 
78     /**
79      * Vendor property for nrf_802154_receive serialization.
80      */
81     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_RECEIVE =
82         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 2,
83 
84     /**
85      * Vendor property for nrf_802154_channel_get serialization.
86      */
87     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_CHANNEL_GET =
88         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 3,
89 
90     /**
91      * Vendor property for nrf_802154_channel_set serialization.
92      */
93     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_CHANNEL_SET =
94         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 4,
95 
96     /**
97      * Vendor property for nrf_802154_tx_power_get serialization.
98      */
99     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_TX_POWER_GET =
100         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 5,
101 
102     /**
103      * Vendor property for nrf_802154_tx_power_set serialization.
104      */
105     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_TX_POWER_SET =
106         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 6,
107 
108     /**
109      * Vendor property for nrf_802154_auto_pending_bit_set serialization.
110      */
111     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_AUTO_PENDING_BIT_SET =
112         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 7,
113 
114     /**
115      * Vendor property for nrf_802154_pending_bit_for_addr_set serialization.
116      */
117     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_PENDING_BIT_FOR_ADDR_SET =
118         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 8,
119 
120     /**
121      * Vendor property for nrf_802154_pending_bit_for_addr_clear serialization.
122      */
123     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_PENDING_BIT_FOR_ADDR_CLEAR =
124         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 9,
125 
126     /**
127      * Vendor property for nrf_802154_pending_bit_for_addr_reset serialization.
128      */
129     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_PENDING_BIT_FOR_ADDR_RESET =
130         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 10,
131 
132     /**
133      * Vendor property for nrf_802154_src_addr_matching_method_set serialization.
134      */
135     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_SRC_ADDR_MATCHING_METHOD_SET =
136         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 11,
137 
138     /**
139      * Vendor property for nrf_802154_pan_id_set serialization.
140      */
141     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_PAN_ID_SET =
142         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 12,
143 
144     /**
145      * Vendor property for nrf_802154_short_address_set serialization.
146      */
147     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_SHORT_ADDRESS_SET =
148         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 13,
149 
150     /**
151      * Vendor property for nrf_802154_extended_address_set serialization.
152      */
153     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_EXTENDED_ADDRESS_SET =
154         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 14,
155 
156     /**
157      * Vendor property for nrf_802154_pan_coord_set serialization.
158      */
159     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_PAN_COORD_SET =
160         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 15,
161 
162     /**
163      * Vendor property for nrf_802154_promiscuous_set serialization.
164      */
165     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_PROMISCUOUS_SET =
166         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 16,
167 
168     /**
169      * Vendor property for nrf_802154_cca serialization.
170      */
171     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_CCA =
172         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 17,
173 
174     /**
175      * Vendor property for nrf_802154_cca_done serialization.
176      */
177     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_CCA_DONE =
178         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 18,
179 
180     /**
181      * Vendor property for nrf_802154_cca_failed serialization.
182      */
183     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_CCA_FAILED =
184         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 19,
185 
186     /**
187      * Vendor property for nrf_802154_energy_detection serialization.
188      */
189     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_ENERGY_DETECTION =
190         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 20,
191 
192     /**
193      * Vendor property for nrf_802154_energy_detected serialization.
194      */
195     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_ENERGY_DETECTED =
196         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 21,
197 
198     /**
199      * Vendor property for nrf_802154_energy_detection_failed serialization.
200      */
201     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_ENERGY_DETECTION_FAILED =
202         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 22,
203 
204     /**
205      * Vendor property for nrf_802154_received_timestamp_raw serialization.
206      */
207     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_RECEIVED_TIMESTAMP_RAW =
208         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 23,
209 
210     /**
211      * Vendor property for nrf_802154_receive_failed serialization.
212      */
213     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_RECEIVE_FAILED =
214         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 24,
215 
216     /**
217      * Vendor property for nrf_802154_tx_ack_started serialization.
218      */
219     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_TX_ACK_STARTED =
220         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 25,
221 
222     /**
223      * Vendor property for nrf_802154_buffer_free_raw serialization.
224      */
225     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_BUFFER_FREE_RAW =
226         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 26,
227 
228     /**
229      * Vendor property for nrf_802154_transmit_raw serialization.
230      */
231     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_TRANSMIT_RAW =
232         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 27,
233 
234     /**
235      * Vendor property for nrf_802154_transmit_csma_ca_raw serialization.
236      */
237     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_TRANSMIT_CSMA_CA_RAW =
238         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 28,
239 
240     /**
241      * Vendor property for nrf_802154_transmitted_raw serialization.
242      */
243     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_TRANSMITTED_RAW =
244         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 29,
245 
246     /**
247      * Vendor property for nrf_802154_transmit_failed serialization.
248      */
249     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_TRANSMIT_FAILED =
250         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 30,
251 
252     /**
253      * Vendor property for nrf_802154_capabilities_get serialization.
254      */
255     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_CAPABILITIES_GET =
256         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 31,
257 
258     /**
259      * Vendor property for nrf_802154_ack_data_set serialization.
260      */
261     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_ACK_DATA_SET =
262         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 32,
263 
264     /**
265      * Vendor property for nrf_802154_ack_data_clear serialization.
266      */
267     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_ACK_DATA_CLEAR =
268         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 33,
269 
270     /**
271      * Vendor property for nrf_802154_time_get serialization.
272      */
273     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_TIME_GET =
274         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 34,
275 
276     /**
277      * Vendor property for nrf_802154_cca_cfg_get serialization.
278      */
279     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_CCA_CFG_GET =
280         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 35,
281 
282     /**
283      * Vendor property for nrf_802154_cca_cfg_set serialization.
284      */
285     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_CCA_CFG_SET =
286         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 36,
287 
288     /**
289      * Vendor property for nrf_802154_transmit_raw_at serialization.
290      */
291     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_TRANSMIT_RAW_AT =
292         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 37,
293 
294     /**
295      * Vendor property for nrf_802154_transmit_at_cancel serialization.
296      */
297     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_TRANSMIT_AT_CANCEL =
298         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 38,
299 
300     /**
301      * Vendor property for nrf_802154_receive_at serialization.
302      */
303     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_RECEIVE_AT =
304         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 39,
305 
306     /**
307      * Vendor property for nrf_802154_receive_at_cancel serialization.
308      */
309     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_RECEIVE_AT_CANCEL =
310         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 40,
311 
312     /**
313      * Vendor property for nrf_802154_security_global_frame_counter_set serialization.
314      */
315     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_SECURITY_GLOBAL_FRAME_COUNTER_SET =
316         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 41,
317 
318     /**
319      * Vendor property for nrf_802154_security_key_store serialization.
320      */
321     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_SECURITY_KEY_STORE =
322         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 42,
323 
324     /**
325      * Vendor property for nrf_802154_security_key_remove serialization.
326      */
327     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_SECURITY_KEY_REMOVE =
328         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 43,
329 
330     /**
331      * Vendor property for nrf_802154_csl_writer_period_set serialization.
332      */
333     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_CSL_WRITER_PERIOD_SET =
334         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 44,
335 
336     /**
337      * Vendor property for nrf_802154_csma_ca_min_be_set serialization.
338      */
339     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_CSMA_CA_MIN_BE_SET =
340         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 45,
341 
342     /**
343      * Vendor property for nrf_802154_csma_ca_min_be_get serialization.
344      */
345     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_CSMA_CA_MIN_BE_GET =
346         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 46,
347 
348     /**
349      * Vendor property for nrf_802154_csma_ca_max_be_set serialization.
350      */
351     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_CSMA_CA_MAX_BE_SET =
352         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 47,
353 
354     /**
355      * Vendor property for nrf_802154_csma_ca_max_be_get serialization.
356      */
357     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_CSMA_CA_MAX_BE_GET =
358         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 48,
359 
360     /**
361      * Vendor property for nrf_802154_csma_ca_max_backoffs_set serialization.
362      */
363     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_CSMA_CA_MAX_BACKOFFS_SET =
364         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 49,
365 
366     /**
367      * Vendor property for nrf_802154_csma_ca_max_backoffs_get serialization.
368      */
369     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_CSMA_CA_MAX_BACKOFFS_GET =
370         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 50,
371 
372     /**
373      * Vendor property for nrf_802154_stat_timestamps_get serialization.
374      */
375     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_STAT_TIMESTAMPS_GET =
376         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 51,
377 
378     /**
379      * Vendor property for nrf_802154_continuous_carrier serialization.
380      */
381     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_CONTINUOUS_CARRIER =
382         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 52,
383 
384     /**
385      * Vendor property for nrf_802154_modulated_carrier serialization.
386      */
387     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_MODULATED_CARRIER =
388         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 53,
389 
390     /**
391      * Vendor property for nrf_802154_sleep_if_idle serialization.
392      */
393     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_SLEEP_IF_IDLE =
394         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 54,
395 
396     /**
397      * Vendor property for nrf_802154_test_mode_csmaca_backoff_set serialization.
398      */
399     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_TEST_MODE_CSMACA_BACKOFF_SET =
400         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 55,
401 
402     /**
403      * Vendor property for nrf_802154_test_mode_csmaca_backoff_get serialization.
404      */
405     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_TEST_MODE_CSMACA_BACKOFF_GET =
406         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 56,
407 
408     /**
409      * Vendor property for nrf_802154_ifs_mode_set serialization.
410      */
411     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_IFS_MODE_SET =
412         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 57,
413 
414     /**
415      * Vendor property for nrf_802154_ifs_mode_get serialization.
416      */
417     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_IFS_MODE_GET =
418         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 58,
419 
420     /**
421      * Vendor property for nrf_802154_ifs_min_sifs_period_set serialization.
422      */
423     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_IFS_MIN_SIFS_PERIOD_SET =
424         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 59,
425 
426     /**
427      * Vendor property for nrf_802154_ifs_min_sifs_period_get serialization.
428      */
429     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_IFS_MIN_SIFS_PERIOD_GET =
430         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 60,
431 
432     /**
433      * Vendor property for nrf_802154_ifs_min_lifs_period_set serialization.
434      */
435     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_IFS_MIN_LIFS_PERIOD_SET =
436         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 61,
437 
438     /**
439      * Vendor property for nrf_802154_ifs_min_lifs_period_get serialization.
440      */
441     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_IFS_MIN_LIFS_PERIOD_GET =
442         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 62,
443 
444     /**
445      * Vendor property for nrf_802154_csl_writer_anchor_time_set serialization.
446      */
447     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_CSL_WRITER_ANCHOR_TIME_SET =
448         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 63,
449 
450     /**
451      * Vendor property for nrf_802154_security_global_frame_counter_set_if_larger serialization.
452      */
453     SPINEL_PROP_VENDOR_NORDIC_NRF_802154_SECURITY_GLOBAL_FRAME_COUNTER_SET_IF_LARGER =
454         SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 64,
455 
456 } spinel_prop_vendor_key_t;
457 
458 /**
459  * @brief Spinel data type description for nrf_802154_channel_get
460  */
461 #define SPINEL_DATATYPE_NRF_802154_CHANNEL_GET     SPINEL_DATATYPE_NULL_S
462 
463 /**
464  * @brief Spinel data type description for returning channel value.
465  */
466 #define SPINEL_DATATYPE_NRF_802154_CHANNEL_GET_RET SPINEL_DATATYPE_UINT8_S
467 
468 /**
469  * @brief Spinel data type description for nrf_802154_channel_set
470  */
471 #define SPINEL_DATATYPE_NRF_802154_CHANNEL_SET     SPINEL_DATATYPE_UINT8_S
472 
473 /**
474  * @brief Length of @ref SPINEL_DATATYPE_NRF_802154_HDATA_S data type.
475  */
476 #define NRF_802154_HDATA_LENGTH(data_len)          ((data_len) + sizeof(uint32_t))
477 
478 /**
479  * @brief Encodes an instance of @ref SPINEL_DATATYPE_NRF_802154_HDATA_S data type.
480  */
481 #define NRF_802154_HDATA_ENCODE(handle, data, length) \
482     handle, data, NRF_802154_HDATA_LENGTH(length)
483 
484 /**
485  * @brief Decodes an instance of @ref SPINEL_DATATYPE_NRF_802154_HDATA_S data type.
486  */
487 #define NRF_802154_HDATA_DECODE(handle, data, length) \
488     (&handle), &data, &length
489 
490 /**
491  * @brief Calculates length of data stored by @ref SPINEL_DATATYPE_NRF_802154_HDATA_S data type.
492  */
493 #define NRF_802154_DATA_LEN_FROM_HDATA_LEN(hdata_len) ((hdata_len) - sizeof(uint32_t))
494 
495 /**
496  * @brief Spinel data type description for a generic data with a handle.
497  *
498  * This type is used when data buffers are passed through serialization but
499  * still need to be referenced e.g. in response processing to match response
500  * data to a request. To serve this data handle field is used.
501  */
502 #define SPINEL_DATATYPE_NRF_802154_HDATA_S          \
503     SPINEL_DATATYPE_STRUCT_S(                       \
504         SPINEL_DATATYPE_UINT32_S /* Data handle */  \
505         SPINEL_DATATYPE_DATA_S   /* Data content */ \
506                             )
507 
508 /**
509  * @brief Spinel data type description for nrf_802154_transmitted_frame_props_t.
510  */
511 #define SPINEL_DATATYPE_NRF_802154_TRANSMITTED_FRAME_PROPS_S \
512     SPINEL_DATATYPE_BOOL_S /* is_secured */                  \
513     SPINEL_DATATYPE_BOOL_S /* dynamic_data_is_set */
514 
515 /**
516  * @brief Encodes an instance of @ref SPINEL_DATATYPE_NRF_802154_TRANSMITTED_FRAME_PROPS_S data type.
517  */
518 #define NRF_802154_TRANSMITTED_FRAME_PROPS_ENCODE(frame_props) \
519     ((frame_props).is_secured), ((frame_props).dynamic_data_is_set)
520 
521 /**
522  * @brief Decodes an instance of @ref SPINEL_DATATYPE_NRF_802154_TRANSMITTED_FRAME_PROPS_S data type.
523  */
524 #define NRF_802154_TRANSMITTED_FRAME_PROPS_DECODE(frame_props) \
525     (&(frame_props).is_secured), (&(frame_props).dynamic_data_is_set)
526 
527 /**
528  * @brief Spinel data type description for nrf_802154_tx_power_metadata_t.
529  */
530 #define SPINEL_DATATYPE_NRF_802154_TX_POWER_METADATA_S \
531     SPINEL_DATATYPE_BOOL_S /* use_metadata_value */    \
532     SPINEL_DATATYPE_INT8_S /* power */
533 
534 /**
535  * @brief Encodes an instance of @ref SPINEL_DATATYPE_NRF_802154_TX_POWER_METADATA_S data type.
536  */
537 #define NRF_802154_TX_POWER_METADATA_ENCODE(tx_power_metadata) \
538     ((tx_power_metadata).use_metadata_value), ((tx_power_metadata).power)
539 
540 /**
541  * @brief Decodes an instance of @ref SPINEL_DATATYPE_NRF_802154_TX_POWER_METADATA_S data type.
542  */
543 #define NRF_802154_TX_POWER_METADATA_DECODE(tx_power_metadata) \
544     (&(tx_power_metadata).use_metadata_value), (&(tx_power_metadata).power)
545 
546 /**
547  * @brief Spinel data type description for nrf_802154_transmit_metadata_t.
548  */
549 #define SPINEL_DATATYPE_NRF_802154_TRANSMIT_METADATA_S                     \
550     SPINEL_DATATYPE_NRF_802154_TRANSMITTED_FRAME_PROPS_S /* frame_props */ \
551     SPINEL_DATATYPE_BOOL_S                               /* cca */         \
552     SPINEL_DATATYPE_NRF_802154_TX_POWER_METADATA_S       /* tx_power */
553 
554 /**
555  * @brief Encodes an instance of @ref SPINEL_DATATYPE_NRF_802154_TRANSMIT_METADATA_S data type.
556  */
557 #define NRF_802154_TRANSMIT_METADATA_ENCODE(tx_metadata)                  \
558     NRF_802154_TRANSMITTED_FRAME_PROPS_ENCODE((tx_metadata).frame_props), \
559     ((tx_metadata).cca),                                                  \
560     NRF_802154_TX_POWER_METADATA_ENCODE((tx_metadata).tx_power)
561 
562 /**
563  * @brief Decodes an instance of @ref SPINEL_DATATYPE_NRF_802154_TRANSMIT_METADATA_S data type.
564  */
565 #define NRF_802154_TRANSMIT_METADATA_DECODE(tx_metadata)                  \
566     NRF_802154_TRANSMITTED_FRAME_PROPS_DECODE((tx_metadata).frame_props), \
567     (&(tx_metadata).cca),                                                 \
568     NRF_802154_TX_POWER_METADATA_DECODE((tx_metadata).tx_power)
569 
570 /**
571  * @brief Spinel data type description for nrf_802154_transmit_csma_ca_metadata_t.
572  */
573 #define SPINEL_DATATYPE_NRF_802154_TRANSMIT_CSMA_CA_METADATA_S             \
574     SPINEL_DATATYPE_NRF_802154_TRANSMITTED_FRAME_PROPS_S /* frame_props */ \
575     SPINEL_DATATYPE_NRF_802154_TX_POWER_METADATA_S       /* tx_power */
576 
577 /**
578  * @brief Encodes an instance of @ref SPINEL_DATATYPE_NRF_802154_TRANSMIT_CSMA_CA_METADATA_S data type.
579  */
580 #define NRF_802154_TRANSMIT_CSMA_CA_METADATA_ENCODE(tx_metadata)          \
581     NRF_802154_TRANSMITTED_FRAME_PROPS_ENCODE((tx_metadata).frame_props), \
582     NRF_802154_TX_POWER_METADATA_ENCODE((tx_metadata).tx_power)
583 
584 /**
585  * @brief Decodes an instance of @ref SPINEL_DATATYPE_NRF_802154_TRANSMIT_CSMA_CA_METADATA_S data type.
586  */
587 #define NRF_802154_TRANSMIT_CSMA_CA_METADATA_DECODE(tx_metadata)          \
588     NRF_802154_TRANSMITTED_FRAME_PROPS_DECODE((tx_metadata).frame_props), \
589     NRF_802154_TX_POWER_METADATA_DECODE((tx_metadata).tx_power)
590 
591 /**
592  * @brief Spinel data type description for nrf_802154_csma_ca_min_be_set.
593  */
594 #define SPINEL_DATATYPE_NRF_802154_CSMA_CA_MIN_BE_SET               SPINEL_DATATYPE_UINT8_S
595 
596 /**
597  * @brief Spinel data type description for nrf_802154_csma_ca_min_be_set result.
598  */
599 #define SPINEL_DATATYPE_NRF_802154_CSMA_CA_MIN_BE_SET_RET           SPINEL_DATATYPE_BOOL_S
600 
601 /**
602  * @brief Spinel data type description for nrf_802154_csma_ca_min_be_get.
603  */
604 #define SPINEL_DATATYPE_NRF_802154_CSMA_CA_MIN_BE_GET               SPINEL_DATATYPE_NULL_S
605 
606 /**
607  * @brief Spinel data type description for nrf_802154_csma_ca_min_be_get result.
608  */
609 #define SPINEL_DATATYPE_NRF_802154_CSMA_CA_MIN_BE_GET_RET           SPINEL_DATATYPE_UINT8_S
610 
611 /**
612  * @brief Spinel data type description for nrf_802154_csma_ca_max_be_set.
613  */
614 #define SPINEL_DATATYPE_NRF_802154_CSMA_CA_MAX_BE_SET               SPINEL_DATATYPE_UINT8_S
615 
616 /**
617  * @brief Spinel data type description for nrf_802154_csma_ca_max_be_set result.
618  */
619 #define SPINEL_DATATYPE_NRF_802154_CSMA_CA_MAX_BE_SET_RET           SPINEL_DATATYPE_BOOL_S
620 
621 /**
622  * @brief Spinel data type description for nrf_802154_csma_ca_max_be_get.
623  */
624 #define SPINEL_DATATYPE_NRF_802154_CSMA_CA_MAX_BE_GET               SPINEL_DATATYPE_NULL_S
625 
626 /**
627  * @brief Spinel data type description for nrf_802154_csma_ca_max_be_get result.
628  */
629 #define SPINEL_DATATYPE_NRF_802154_CSMA_CA_MAX_BE_GET_RET           SPINEL_DATATYPE_UINT8_S
630 
631 /**
632  * @brief Spinel data type description for nrf_802154_csma_ca_max_backoffs_set.
633  */
634 #define SPINEL_DATATYPE_NRF_802154_CSMA_CA_MAX_BACKOFFS_SET         SPINEL_DATATYPE_UINT8_S
635 
636 /**
637  * @brief Spinel data type description for nrf_802154_csma_ca_max_backoffs_get.
638  */
639 #define SPINEL_DATATYPE_NRF_802154_CSMA_CA_MAX_BACKOFFS_GET         SPINEL_DATATYPE_NULL_S
640 
641 /**
642  * @brief Spinel data type description for nrf_802154_csma_ca_max_backoffs_get result.
643  */
644 #define SPINEL_DATATYPE_NRF_802154_CSMA_CA_MAX_BACKOFFS_GET_RET     SPINEL_DATATYPE_UINT8_S
645 
646 /**
647  * @brief Spinel data type description for nrf_802154_test_mode_csmaca_backoff_set.
648  */
649 #define SPINEL_DATATYPE_NRF_802154_TEST_MODE_CSMACA_BACKOFF_SET     SPINEL_DATATYPE_UINT8_S
650 
651 /**
652  * @brief Spinel data type description for nrf_802154_test_mode_csmaca_backoff_get.
653  */
654 #define SPINEL_DATATYPE_NRF_802154_TEST_MODE_CSMACA_BACKOFF_GET     SPINEL_DATATYPE_NULL_S
655 
656 /**
657  * @brief Spinel data type description for nrf_802154_test_mode_csmaca_backoff_get result.
658  */
659 #define SPINEL_DATATYPE_NRF_802154_TEST_MODE_CSMACA_BACKOFF_GET_RET SPINEL_DATATYPE_UINT8_S
660 
661 /**
662  * @brief Spinel data type description for nrf_802154_transmit_at_metadata_t.
663  */
664 #define SPINEL_DATATYPE_NRF_802154_TRANSMIT_AT_METADATA_S                  \
665     SPINEL_DATATYPE_NRF_802154_TRANSMITTED_FRAME_PROPS_S /* frame_props */ \
666     SPINEL_DATATYPE_BOOL_S                               /* cca */         \
667     SPINEL_DATATYPE_UINT8_S                              /* channel */     \
668     SPINEL_DATATYPE_NRF_802154_TX_POWER_METADATA_S       /* tx_power */
669 
670 /**
671  * @brief Encodes an instance of @ref SPINEL_DATATYPE_NRF_802154_TRANSMIT_AT_METADATA_S data type.
672  */
673 #define NRF_802154_TRANSMIT_AT_METADATA_ENCODE(tx_at_metadata)               \
674     NRF_802154_TRANSMITTED_FRAME_PROPS_ENCODE((tx_at_metadata).frame_props), \
675     ((tx_at_metadata).cca),                                                  \
676     ((tx_at_metadata).channel),                                              \
677     NRF_802154_TX_POWER_METADATA_ENCODE((tx_at_metadata).tx_power)
678 
679 /**
680  * @brief Decodes an instance of @ref SPINEL_DATATYPE_NRF_802154_TRANSMIT_AT_METADATA_S data type.
681  */
682 #define NRF_802154_TRANSMIT_AT_METADATA_DECODE(tx_at_metadata)               \
683     NRF_802154_TRANSMITTED_FRAME_PROPS_DECODE((tx_at_metadata).frame_props), \
684     (&(tx_at_metadata).cca),                                                 \
685     (&(tx_at_metadata).channel),                                             \
686     NRF_802154_TX_POWER_METADATA_DECODE((tx_at_metadata).tx_power)
687 
688 /**
689  * @brief Spinel data type description for nrf_802154_cca_cfg_t.
690  */
691 #define SPINEL_DATATYPE_NRF_802154_CCA_CFG_S     \
692     SPINEL_DATATYPE_UINT8_S /* mode */           \
693     SPINEL_DATATYPE_UINT8_S /* ed_threshold */   \
694     SPINEL_DATATYPE_UINT8_S /* corr_threshold */ \
695     SPINEL_DATATYPE_UINT8_S /* corr_limit */
696 
697 /**
698  * @brief Encodes an instance of @ref SPINEL_DATATYPE_NRF_802154_CCA_CFG_S data type.
699  */
700 #define NRF_802154_CCA_CFG_ENCODE(cca_cfg) \
701     ((cca_cfg).mode), ((cca_cfg).ed_threshold), ((cca_cfg).corr_threshold), ((cca_cfg).corr_limit)
702 
703 /**
704  * @brief Decodes an instance of @ref SPINEL_DATATYPE_NRF_802154_CCA_CFG_S data type.
705  */
706 #define NRF_802154_CCA_CFG_DECODE(cca_cfg) \
707     (&(cca_cfg).mode),                     \
708     (&(cca_cfg).ed_threshold),             \
709     (&(cca_cfg).corr_threshold),           \
710     (&(cca_cfg).corr_limit)
711 
712 /**
713  * @brief Spinel data type description for nrf_802154_stat_timestamps_t
714  */
715 #define SPINEL_DATATYPE_NRF_802154_STAT_TIMESTAMPS_S \
716     SPINEL_DATATYPE_UINT64_S                         \
717     SPINEL_DATATYPE_UINT64_S                         \
718     SPINEL_DATATYPE_UINT64_S                         \
719     SPINEL_DATATYPE_UINT64_S                         \
720     SPINEL_DATATYPE_UINT64_S                         \
721     SPINEL_DATATYPE_UINT64_S
722 
723 /**
724  * @brief Encodes an instance of @ref SPINEL_DATATYPE_NRF_802154_STAT_TIMESTAMPS_S data type.
725  */
726 #define NRF_802154_STAT_TIMESTAMPS_ENCODE(stat_timestamps) \
727     ((stat_timestamps).last_csmaca_start_timestamp),       \
728     ((stat_timestamps).last_cca_start_timestamp),          \
729     ((stat_timestamps).last_cca_idle_timestamp),           \
730     ((stat_timestamps).last_tx_end_timestamp),             \
731     ((stat_timestamps).last_ack_end_timestamp),            \
732     ((stat_timestamps).last_rx_end_timestamp)
733 
734 /**
735  * @brief Decodes an instance of @ref SPINEL_DATATYPE_NRF_802154_STAT_TIMESTAMPS_S data type.
736  */
737 #define NRF_802154_STAT_TIMESTAMPS_DECODE(stat_timestamps) \
738     (&(stat_timestamps).last_csmaca_start_timestamp),      \
739     (&(stat_timestamps).last_cca_start_timestamp),         \
740     (&(stat_timestamps).last_cca_idle_timestamp),          \
741     (&(stat_timestamps).last_tx_end_timestamp),            \
742     (&(stat_timestamps).last_ack_end_timestamp),           \
743     (&(stat_timestamps).last_rx_end_timestamp)
744 
745 /**
746  * @brief Spinel data type description for SPINEL_PROP_LAST_STATUS.
747  */
748 #define SPINEL_DATATYPE_SPINEL_PROP_LAST_STATUS      SPINEL_DATATYPE_UINT_PACKED_S
749 
750 /**
751  * @brief Spinel data type description for nrf_802154_sleep.
752  */
753 #define SPINEL_DATATYPE_NRF_802154_SLEEP             SPINEL_DATATYPE_NULL_S
754 
755 /**
756  * @brief Spinel data type description for nrf_802154_sleep result.
757  */
758 #define SPINEL_DATATYPE_NRF_802154_SLEEP_RET         SPINEL_DATATYPE_BOOL_S
759 
760 /**
761  * @brief Spinel data type description for nrf_802154_sleep_if_idle.
762  */
763 #define SPINEL_DATATYPE_NRF_802154_SLEEP_IF_IDLE     SPINEL_DATATYPE_NULL_S
764 
765 /**
766  * @brief Spinel data type description for nrf_802154_sleep_if_idle result.
767  */
768 #define SPINEL_DATATYPE_NRF_802154_SLEEP_IF_IDLE_RET SPINEL_DATATYPE_UINT8_S
769 
770 /**
771  * @brief Spinel data type description for nrf_802154_receive.
772  */
773 #define SPINEL_DATATYPE_NRF_802154_RECEIVE           SPINEL_DATATYPE_NULL_S
774 
775 /**
776  * @brief Spinel data type description for nrf_802154_receive result.
777  */
778 #define SPINEL_DATATYPE_NRF_802154_RECEIVE_RET       SPINEL_DATATYPE_BOOL_S
779 
780 /**
781  * @brief Spinel data type description for nrf_802154_receive_at.
782  */
783 #define SPINEL_DATATYPE_NRF_802154_RECEIVE_AT \
784     SPINEL_DATATYPE_UINT64_S /* rx_time */    \
785     SPINEL_DATATYPE_UINT32_S /* timeout */    \
786     SPINEL_DATATYPE_UINT8_S  /* channel */    \
787     SPINEL_DATATYPE_UINT32_S /* window id */  \
788 
789 /**
790  * @brief Spinel data type description for nrf_802154_receive_at result.
791  */
792 #define SPINEL_DATATYPE_NRF_802154_RECEIVE_AT_RET          SPINEL_DATATYPE_BOOL_S
793 
794 /**
795  * @brief Spinel data type description for nrf_802154_receive_at_cancel.
796  */
797 #define SPINEL_DATATYPE_NRF_802154_RECEIVE_AT_CANCEL       SPINEL_DATATYPE_UINT32_S
798 
799 /**
800  * @brief Spinel data type description for nrf_802154_receive_at_cancel result.
801  */
802 #define SPINEL_DATATYPE_NRF_802154_RECEIVE_AT_CANCEL_RET   SPINEL_DATATYPE_BOOL_S
803 
804 /**
805  * @brief Spinel data type description for nrf_802154_pan_id_set.
806  */
807 #define SPINEL_DATATYPE_NRF_802154_PAN_ID_SET              SPINEL_DATATYPE_DATA_S
808 
809 /**
810  * @brief Spinel data type description for nrf_802154_short_address_set.
811  */
812 #define SPINEL_DATATYPE_NRF_802154_SHORT_ADDRESS_SET       SPINEL_DATATYPE_DATA_S
813 
814 /**
815  * @brief Spinel data type description for nrf_802154_extended_address_set.
816  */
817 #define SPINEL_DATATYPE_NRF_802154_EXTENDED_ADDRESS_SET    SPINEL_DATATYPE_DATA_S
818 
819 /**
820  * @brief Spinel data type description for nrf_802154_pan_coord_set.
821  */
822 #define SPINEL_DATATYPE_NRF_802154_PAN_COORD_SET           SPINEL_DATATYPE_BOOL_S
823 
824 /**
825  * @brief Spinel data type description for nrf_802154_promiscuous_set.
826  */
827 #define SPINEL_DATATYPE_NRF_802154_PROMISCUOUS_SET         SPINEL_DATATYPE_BOOL_S
828 
829 /**
830  * @brief Spinel data type description for nrf_802154_cca.
831  */
832 #define SPINEL_DATATYPE_NRF_802154_CCA                     SPINEL_DATATYPE_NULL_S
833 
834 /**
835  * @brief Spinel data type description for nrf_802154_cca result.
836  */
837 #define SPINEL_DATATYPE_NRF_802154_CCA_RET                 SPINEL_DATATYPE_BOOL_S
838 
839 /**
840  * @brief Spinel data type description for nrf_802154_cca_done.
841  */
842 #define SPINEL_DATATYPE_NRF_802154_CCA_DONE                SPINEL_DATATYPE_BOOL_S
843 
844 /**
845  * @brief Spinel data type description for nrf_802154_cca_failed.
846  */
847 #define SPINEL_DATATYPE_NRF_802154_CCA_FAILED              SPINEL_DATATYPE_UINT8_S
848 
849 /**
850  * @brief Spinel data type description for nrf_802154_energy_detection.
851  */
852 #define SPINEL_DATATYPE_NRF_802154_ENERGY_DETECTION        SPINEL_DATATYPE_UINT32_S
853 
854 /**
855  * @brief Spinel data type description for nrf_802154_energy_detection result.
856  */
857 #define SPINEL_DATATYPE_NRF_802154_ENERGY_DETECTION_RET    SPINEL_DATATYPE_BOOL_S
858 
859 /**
860  * @brief Spinel data type description for nrf_802154_energy_detected.
861  */
862 #define SPINEL_DATATYPE_NRF_802154_ENERGY_DETECTED         SPINEL_DATATYPE_UINT8_S
863 
864 /**
865  * @brief Spinel data type description for nrf_802154_energy_detection_failed.
866  */
867 #define SPINEL_DATATYPE_NRF_802154_ENERGY_DETECTION_FAILED SPINEL_DATATYPE_UINT8_S
868 
869 /**
870  * @brief Spinel data type description for nrf_802154_continuous_carrier.
871  */
872 #define SPINEL_DATATYPE_NRF_802154_CONTINUOUS_CARRIER      SPINEL_DATATYPE_NULL_S
873 
874 /**
875  * @brief Spinel data type description for nrf_802154_nrf_802154_continuous_carrier result.
876  */
877 #define SPINEL_DATATYPE_NRF_802154_CONTINUOUS_CARRIER_RET  SPINEL_DATATYPE_BOOL_S
878 
879 /**
880  * @brief Spinel data type description for nrf_802154_modulated_carrier.
881  */
882 #define SPINEL_DATATYPE_NRF_802154_MODULATED_CARRIER       SPINEL_DATATYPE_DATA_S
883 
884 /**
885  * @brief Spinel data type description for nrf_802154_nrf_802154_modulated_carrier result.
886  */
887 #define SPINEL_DATATYPE_NRF_802154_MODULATED_CARRIER_RET   SPINEL_DATATYPE_BOOL_S
888 
889 /**
890  * @brief Spinel data type description for nrf_802154_tx_power_get.
891  */
892 #define SPINEL_DATATYPE_NRF_802154_TX_POWER_GET            SPINEL_DATATYPE_NULL_S
893 
894 /**
895  * @brief Spinel data type description for nrf_802154_tx_power_get result.
896  */
897 #define SPINEL_DATATYPE_NRF_802154_TX_POWER_GET_RET        SPINEL_DATATYPE_INT8_S
898 
899 /**
900  * @brief Spinel data type description for nrf_802154_tx_power_set.
901  */
902 #define SPINEL_DATATYPE_NRF_802154_TX_POWER_SET            SPINEL_DATATYPE_INT8_S
903 
904 /**
905  * @brief Spinel data type description for nrf_802154_received_timestamp_raw
906  */
907 #define SPINEL_DATATYPE_NRF_802154_RECEIVED_TIMESTAMP_RAW   \
908     SPINEL_DATATYPE_NRF_802154_HDATA_S /* Received frame */ \
909     SPINEL_DATATYPE_INT8_S             /* Power */          \
910     SPINEL_DATATYPE_UINT8_S            /* lqi */            \
911     SPINEL_DATATYPE_UINT64_S           /* timestamp */
912 
913 /**
914  * @brief Spinel data type description for nrf_802154_receive_failed
915  */
916 #define SPINEL_DATATYPE_NRF_802154_RECEIVE_FAILED \
917     SPINEL_DATATYPE_UINT8_S  /* error */          \
918     SPINEL_DATATYPE_UINT32_S /* id */
919 
920 /**
921  * @brief Spinel data type description for nrf_802154_tx_ack_started
922  */
923 #define SPINEL_DATATYPE_NRF_802154_TX_ACK_STARTED \
924     SPINEL_DATATYPE_DATA_S /* Transmitted ACK */
925 
926 /**
927  * @brief Spinel data type description for nrf_802154_buffer_free_raw
928  */
929 #define SPINEL_DATATYPE_NRF_802154_BUFFER_FREE_RAW \
930     SPINEL_DATATYPE_UINT32_S /* Handle to buffer to free */
931 
932 /**
933  * @brief Spinel data type description for nrf_802154_transmit_raw
934  */
935 #define SPINEL_DATATYPE_NRF_802154_TRANSMIT_RAW    \
936     SPINEL_DATATYPE_NRF_802154_TRANSMIT_METADATA_S \
937     SPINEL_DATATYPE_NRF_802154_HDATA_S /* Frame to transmit with its handle */
938 
939 /**
940  * @brief Spinel data type description for return value of nrf_802154_transmit_raw
941  */
942 #define SPINEL_DATATYPE_NRF_802154_TRANSMIT_RAW_RET               SPINEL_DATATYPE_BOOL_S
943 
944 /**
945  * @brief Spinel data type description for return value of nrf_802154_transmit_csma_ca_raw
946  */
947 #define SPINEL_DATATYPE_NRF_802154_TRANSMIT_CSMA_CA_RAW_RET       SPINEL_DATATYPE_BOOL_S
948 
949 /**
950  * @brief Spinel data type description for return value of nrf_802154_transmit_raw_at
951  */
952 #define SPINEL_DATATYPE_NRF_802154_TRANSMIT_RAW_AT_RET            SPINEL_DATATYPE_BOOL_S
953 
954 /**
955  * @brief Spinel data type description for return value of nrf_802154_transmit_at_cancel
956  */
957 #define SPINEL_DATATYPE_NRF_802154_TRANSMIT_AT_CANCEL_RET         SPINEL_DATATYPE_BOOL_S
958 
959 /**
960  * @brief Spinel data type desription for nrf_802154_auto_pending_bit_set.
961  */
962 #define SPINEL_DATATYPE_NRF_802154_AUTO_PENDING_BIT_SET           SPINEL_DATATYPE_BOOL_S
963 
964 /**
965  * @brief Spinel data type desription for nrf_802154_pending_bit_for_addr_set.
966  *
967  * SPINEL_DATATYPE_ARRAY_S encoding is not implemented, SPINEL_DATATYPE_DATA_S has to be used instead.
968  */
969 #define SPINEL_DATATYPE_NRF_802154_PENDING_BIT_FOR_ADDR_SET       SPINEL_DATATYPE_DATA_S
970 
971 /**
972  * @brief Spinel data type desription for nrf_802154_pending_bit_for_addr_set return value.
973  */
974 #define SPINEL_DATATYPE_NRF_802154_PENDING_BIT_FOR_ADDR_SET_RET   SPINEL_DATATYPE_BOOL_S
975 
976 /**
977  * @brief Spinel data type desription for nrf_802154_pending_bit_for_addr_clear.
978  *
979  * SPINEL_DATATYPE_ARRAY_S encoding is not implemented, SPINEL_DATATYPE_DATA_S has to be used instead.
980  */
981 #define SPINEL_DATATYPE_NRF_802154_PENDING_BIT_FOR_ADDR_CLEAR     SPINEL_DATATYPE_DATA_S
982 
983 /**
984  * @brief Spinel data type desription for nrf_802154_pending_bit_for_addr_set return value.
985  */
986 #define SPINEL_DATATYPE_NRF_802154_PENDING_BIT_FOR_ADDR_CLEAR_RET SPINEL_DATATYPE_BOOL_S
987 
988 /**
989  * @brief Spinel data type desription for nrf_802154_pending_bit_for_addr_reset.
990  */
991 #define SPINEL_DATATYPE_NRF_802154_PENDING_BIT_FOR_ADDR_RESET     SPINEL_DATATYPE_BOOL_S
992 
993 /**
994  * @brief Spinel data type desription for nrf_802154_src_addr_matching_method_set.
995  */
996 #define SPINEL_DATATYPE_NRF_802154_SRC_ADDR_MATCHING_METHOD_SET   SPINEL_DATATYPE_UINT8_S
997 
998 /**
999  * @brief Spinel data type desription for nrf_802154_ack_data_set.
1000  *
1001  * SPINEL_DATATYPE_ARRAY_S encoding is not implemented, SPINEL_DATATYPE_DATA_S has to be used instead.
1002  */
1003 #define SPINEL_DATATYPE_NRF_802154_ACK_DATA_SET        \
1004     SPINEL_DATATYPE_DATA_WLEN_S /* Address */          \
1005     SPINEL_DATATYPE_DATA_WLEN_S /* Data to be set */   \
1006     SPINEL_DATATYPE_UINT8_S     /* Type of the data */ \
1007 
1008 /**
1009  * @brief Spinel data type desription for nrf_802154_ack_data_set return value.
1010  */
1011 #define SPINEL_DATATYPE_NRF_802154_ACK_DATA_SET_RET SPINEL_DATATYPE_BOOL_S
1012 
1013 /**
1014  * @brief Spinel data type desription for nrf_802154_ack_data_clear.
1015  *
1016  * SPINEL_DATATYPE_ARRAY_S encoding is not implemented, SPINEL_DATATYPE_DATA_S has to be used instead.
1017  */
1018 #define SPINEL_DATATYPE_NRF_802154_ACK_DATA_CLEAR \
1019     SPINEL_DATATYPE_DATA_WLEN_S /* Address */     \
1020     SPINEL_DATATYPE_UINT8_S     /* Type of the data */
1021 
1022 /**
1023  * @brief Spinel data type desription for nrf_802154_ack_data_clear return value.
1024  */
1025 #define SPINEL_DATATYPE_NRF_802154_ACK_DATA_CLEAR_RET SPINEL_DATATYPE_BOOL_S
1026 
1027 /**
1028  * @brief Spinel data type description for nrf_802154_transmit_csma_ca_raw.
1029  */
1030 #define SPINEL_DATATYPE_NRF_802154_TRANSMIT_CSMA_CA_RAW    \
1031     SPINEL_DATATYPE_NRF_802154_TRANSMIT_CSMA_CA_METADATA_S \
1032     SPINEL_DATATYPE_NRF_802154_HDATA_S /* Frame to transmit with its handle */
1033 
1034 /**
1035  * @brief Spinel data type description for nrf_802154_transmit_raw_at
1036  */
1037 #define SPINEL_DATATYPE_NRF_802154_TRANSMIT_RAW_AT    \
1038     SPINEL_DATATYPE_NRF_802154_TRANSMIT_AT_METADATA_S \
1039     SPINEL_DATATYPE_UINT64_S           /* tx_time */  \
1040     SPINEL_DATATYPE_NRF_802154_HDATA_S /* Frame to transmit with its handle */
1041 
1042 /**
1043  * @brief Spinel data type description for nrf_802154_sleep.
1044  */
1045 #define SPINEL_DATATYPE_NRF_802154_TRANSMIT_AT_CANCEL SPINEL_DATATYPE_NULL_S
1046 
1047 /**
1048  * @brief Spinel data type description for nrf_802154_transmit_done_metadata.
1049  */
1050 #define SPINEL_DATATYPE_NRF_802154_TRANSMIT_DONE_METADATA_S                \
1051     SPINEL_DATATYPE_NRF_802154_TRANSMITTED_FRAME_PROPS_S /* Frame props */ \
1052     SPINEL_DATATYPE_UINT8_S                              /* Length */      \
1053     SPINEL_DATATYPE_INT8_S                               /* Power */       \
1054     SPINEL_DATATYPE_UINT8_S                              /* LQI */         \
1055     SPINEL_DATATYPE_UINT64_S                             /* Timestamp */   \
1056     SPINEL_DATATYPE_NRF_802154_HDATA_S                   /* Ack frame with its handle */
1057 
1058 /**
1059  * @brief Encodes an instance of @ref SPINEL_DATATYPE_NRF_802154_TRANSMIT_DONE_METADATA_S data type.
1060  *
1061  * @param[in]  metadata    Transmit done metadata structure to be decoded.
1062  * @param[in]  ack_handle  Variable containing handle to remote ack frame.
1063  */
1064 #define NRF_802154_TRANSMIT_DONE_METADATA_ENCODE(metadata, ack_handle) \
1065     NRF_802154_TRANSMITTED_FRAME_PROPS_ENCODE((metadata).frame_props), \
1066     (metadata).data.transmitted.length,                                \
1067     (metadata).data.transmitted.power,                                 \
1068     (metadata).data.transmitted.lqi,                                   \
1069     (metadata).data.transmitted.time,                                  \
1070     NRF_802154_HDATA_ENCODE(ack_handle,                                \
1071                             (metadata).data.transmitted.p_ack,         \
1072                             ((metadata).data.transmitted.p_ack) ?      \
1073                             ((metadata).data.transmitted.p_ack)[0] + 1 : 0)
1074 
1075 /**
1076  * @brief Decodes an instance of @ref SPINEL_DATATYPE_NRF_802154_TRANSMIT_DONE_METADATA_S data type.
1077  *
1078  * @param[out]  metadata    Transmit done metadata structure to which store decoded data.
1079  * @param[out]  ack_handle  Pointer variable to which store handle of received ACK frame.
1080  * @param[out]  ack_length  Variable to which store length of the decoded ACK with a handle.
1081  */
1082 #define NRF_802154_TRANSMIT_DONE_METADATA_DECODE(metadata, ack_handle, ack_length) \
1083     NRF_802154_TRANSMITTED_FRAME_PROPS_DECODE((metadata).frame_props),             \
1084     &(metadata).data.transmitted.length,                                           \
1085     &(metadata).data.transmitted.power,                                            \
1086     &(metadata).data.transmitted.lqi,                                              \
1087     &(metadata).data.transmitted.time,                                             \
1088     NRF_802154_HDATA_DECODE(ack_handle, (metadata).data.transmitted.p_ack, ack_length)
1089 
1090 /**
1091  * @brief Spinel data type description for nrf_802154_transmit_failed_metadata.
1092  */
1093 #define SPINEL_DATATYPE_NRF_802154_TRANSMIT_FAILED_METADATA_S \
1094     SPINEL_DATATYPE_NRF_802154_TRANSMITTED_FRAME_PROPS_S /* Frame props */
1095 
1096 /**
1097  * @brief Encodes an instance of @ref SPINEL_DATATYPE_NRF_802154_TRANSMIT_FAILED_METADATA_S data type.
1098  *
1099  * @param[in]  metadata    Transmit failed metadata structure to be encoded.
1100  */
1101 #define NRF_802154_TRANSMIT_FAILED_METADATA_ENCODE(metadata) \
1102     NRF_802154_TRANSMITTED_FRAME_PROPS_ENCODE((metadata).frame_props)
1103 
1104 /**
1105  * @brief Decodes an instance of @ref SPINEL_DATATYPE_NRF_802154_TRANSMIT_FAILED_METADATA_S data type.
1106  *
1107  * @param[out]  metadata    Transmit failed metadata structure to which store decoded data.
1108  */
1109 #define NRF_802154_TRANSMIT_FAILED_METADATA_DECODE(metadata) \
1110     NRF_802154_TRANSMITTED_FRAME_PROPS_DECODE((metadata).frame_props)
1111 
1112 /**
1113  * @brief Spinel data type description for nrf_802154_transmitted_raw.
1114  */
1115 #define SPINEL_DATATYPE_NRF_802154_TRANSMITTED_RAW                                            \
1116     SPINEL_DATATYPE_NRF_802154_HDATA_S                  /* Transmitted frame and its handle*/ \
1117     SPINEL_DATATYPE_NRF_802154_TRANSMIT_DONE_METADATA_S /* Transmit done metadata */
1118 
1119 /**
1120  * @brief Encodes an instance of @ref SPINEL_DATATYPE_NRF_802154_TRANSMITTED_RAW data type.
1121  *
1122  * @param[in]  frame_handle Variable containing remote frame handle.
1123  * @param[in]  frame_data   Pointer to contents of frame.
1124  * @param[in]  metadata     Transmit done metadata structure to be encoded.
1125  * @param[in]  ack_handle   Variable containing handle to received Ack.
1126  */
1127 #define NRF_802154_TRANSMITTED_RAW_ENCODE(frame_handle, frame_data, metadata, ack_handle) \
1128     NRF_802154_HDATA_ENCODE(frame_handle, frame_data, frame_data[0] + 1),                 \
1129     NRF_802154_TRANSMIT_DONE_METADATA_ENCODE(metadata, ack_handle)
1130 
1131 /**
1132  * @brief Decodes an instance of @ref SPINEL_DATATYPE_NRF_802154_TRANSMITTED_RAW data type.
1133  *
1134  * @param[out]  frame_handle  Pointer variable to which store handle of transmitted frame.
1135  * @param[out]  frame_data    Pointer to memory to which store contents of transmitted frame.
1136  * @param[out]  frame_length  Variable to which store length of the decoded frame.
1137  * @param[out]  metadata      Transmit done metadata structure to which store decoded data.
1138  * @param[out]  ack_handle    Pointer variable to which store handle of ACK frame.
1139  * @param[out]  ack_length    Variable to which store length of the decoded ACK frame.
1140  */
1141 #define NRF_802154_TRANSMITTED_RAW_DECODE(frame_handle,              \
1142                                           frame_data,                \
1143                                           frame_length,              \
1144                                           metadata,                  \
1145                                           ack_handle,                \
1146                                           ack_length)                \
1147     NRF_802154_HDATA_DECODE(frame_handle, frame_data, frame_length), \
1148     NRF_802154_TRANSMIT_DONE_METADATA_DECODE(metadata, ack_handle, ack_length)
1149 
1150 /**
1151  * @brief Spinel data type description for nrf_802154_transmit_failed.
1152  */
1153 #define SPINEL_DATATYPE_NRF_802154_TRANSMIT_FAILED                                                                        \
1154     SPINEL_DATATYPE_NRF_802154_HDATA_S                    /* Frame that was attempted to be transmitted and its handle */ \
1155     SPINEL_DATATYPE_UINT8_S                               /* Error code */                                                \
1156     SPINEL_DATATYPE_NRF_802154_TRANSMIT_FAILED_METADATA_S /* Transmit failed metadata */
1157 
1158 /**
1159  * @brief Encodes an instance of @ref SPINEL_DATATYPE_NRF_802154_TRANSMIT_FAILED data type.
1160  *
1161  * @param[in]  frame_handle Variable containing remote frame handle.
1162  * @param[in]  frame_data   Pointer to contents of frame.
1163  * @param[in]  error_code   Error code to be encoded.
1164  * @param[in]  metadata     Transmit failed metadata structure to be encoded.
1165  */
1166 #define NRF_802154_TRANSMIT_FAILED_ENCODE(frame_handle, frame_data, error_code, metadata) \
1167     NRF_802154_HDATA_ENCODE(frame_handle, frame_data, frame_data[0] + 1),                 \
1168     error_code,                                                                           \
1169     NRF_802154_TRANSMIT_FAILED_METADATA_ENCODE(metadata)
1170 
1171 /**
1172  * @brief Decodes an instance of @ref SPINEL_DATATYPE_NRF_802154_TRANSMIT_FAILED data type.
1173  *
1174  * @param[out]  frame_handle    Pointer variable to which store handle of frame failed to transmit.
1175  * @param[out]  frame_data      Pointer to memory to which store contents of frame failed to transmit.
1176  * @param[out]  frame_length    Variable to which store length of the decoded frame.
1177  * @param[in]   error_code      Variable to which store decode error code.
1178  * @param[out]  metadata        Transmit failed metadata structure to which store decoded data.
1179  */
1180 #define NRF_802154_TRANSMIT_FAILED_DECODE(frame_handle,              \
1181                                           frame_data,                \
1182                                           frame_length,              \
1183                                           error_code,                \
1184                                           metadata)                  \
1185     NRF_802154_HDATA_DECODE(frame_handle, frame_data, frame_length), \
1186     &error_code,                                                     \
1187     NRF_802154_TRANSMIT_FAILED_METADATA_DECODE(metadata)
1188 
1189 /**
1190  * @brief Spinel data type description for nrf_802154_capabilities_get.
1191  */
1192 #define SPINEL_DATATYPE_NRF_802154_CAPABILITIES_GET     SPINEL_DATATYPE_NULL_S
1193 
1194 /**
1195  * @brief Spinel data type description for nrf_802154_capabilities_get_ret.
1196  */
1197 #define SPINEL_DATATYPE_NRF_802154_CAPABILITIES_GET_RET SPINEL_DATATYPE_UINT32_S
1198 
1199 /**
1200  * @brief Spinel data type description for nrf_802154_time_get.
1201  */
1202 #define SPINEL_DATATYPE_NRF_802154_TIME_GET             SPINEL_DATATYPE_NULL_S
1203 
1204 /**
1205  * @brief Spinel data type description for nrf_802154_time_get_ret.
1206  */
1207 #define SPINEL_DATATYPE_NRF_802154_TIME_GET_RET         SPINEL_DATATYPE_UINT64_S
1208 
1209 /**
1210  * @brief Spinel data type description for nrf_802154_cca_cfg_get.
1211  */
1212 #define SPINEL_DATATYPE_NRF_802154_CCA_CFG_GET          SPINEL_DATATYPE_NULL_S
1213 
1214 /**
1215  * @brief Spinel data type description for nrf_802154_cca_cfg_get_ret.
1216  */
1217 #define SPINEL_DATATYPE_NRF_802154_CCA_CFG_GET_RET \
1218     SPINEL_DATATYPE_NRF_802154_CCA_CFG_S
1219 
1220 /**
1221  * @brief Spinel data type description for nrf_802154_cca_cfg_get.
1222  */
1223 #define SPINEL_DATATYPE_NRF_802154_CCA_CFG_SET \
1224     SPINEL_DATATYPE_NRF_802154_CCA_CFG_S
1225 
1226 /**
1227  * @brief Spinel data type description for nrf_802154_security_global_frame_counter_set.
1228  */
1229 #define SPINEL_DATATYPE_NRF_802154_SECURITY_GLOBAL_FRAME_COUNTER_SET SPINEL_DATATYPE_UINT32_S
1230 
1231 /**
1232  * @brief Spinel data type description for nrf_802154_security_key_store.
1233  */
1234 #define SPINEL_DATATYPE_NRF_802154_SECURITY_KEY_STORE \
1235     SPINEL_DATATYPE_STRUCT_S(                         \
1236         SPINEL_DATATYPE_DATA_S  /* Key value */       \
1237                             )                         \
1238     SPINEL_DATATYPE_STRUCT_S(                         \
1239         SPINEL_DATATYPE_UINT8_S /* Key mode */        \
1240         SPINEL_DATATYPE_DATA_S  /* Key ID */          \
1241                             )                         \
1242     SPINEL_DATATYPE_UINT32_S    /* Key type */        \
1243     SPINEL_DATATYPE_UINT32_S    /* Frame counter */   \
1244     SPINEL_DATATYPE_BOOL_S      /* Whether to use global frame counter */
1245 
1246 /**
1247  * @brief Encodes an instance of @ref SPINEL_DATATYPE_NRF_802154_SECURITY_KEY_STORE data type.
1248  *
1249  * @param[in]  key          Key structure (of @ref nrf_802154_key_t type) to be encoded.
1250  * @param[in]  key_size     Size of the key data, i.e. cleartext size.
1251  * @param[in]  key_id_size  Size of the key id in @p key structure.
1252  */
1253 #define NRF_802154_SECURITY_KEY_STORE_ENCODE(key, key_size, key_id_size) \
1254     (key).value.p_cleartext_key,                                         \
1255     (key_size),                                                          \
1256     (key).id.mode,                                                       \
1257     (key).id.p_key_id,                                                   \
1258     (key_id_size),                                                       \
1259     (key).type,                                                          \
1260     (key).frame_counter,                                                 \
1261     (key).use_global_frame_counter
1262 
1263 /**
1264  * @brief Decodes an instance of @ref SPINEL_DATATYPE_NRF_802154_SECURITY_KEY_STORE data type.
1265  *
1266  * @param[out]  key          Key structure (of @ref nrf_802154_key_t type) to which store decoded data.
1267  * @param[out]  key_size     Variable to which store size of the decoded key, i.e. cleartext size.
1268  * @param[out]  key_id_size  Variable to which store size of the decoded key ID.
1269  */
1270 #define NRF_802154_SECURITY_KEY_STORE_DECODE(key, key_size, key_id_size) \
1271     & (key).value.p_cleartext_key,                                       \
1272     &(key_size),                                                         \
1273     &(key).id.mode,                                                      \
1274     &(key).id.p_key_id,                                                  \
1275     &(key_id_size),                                                      \
1276     &(key).type,                                                         \
1277     &(key).frame_counter,                                                \
1278     &(key).use_global_frame_counter
1279 
1280 /**
1281  * @brief Spinel data type description for nrf_802154_security_key_remove.
1282  */
1283 #define SPINEL_DATATYPE_NRF_802154_SECURITY_KEY_REMOVE \
1284     SPINEL_DATATYPE_STRUCT_S(                          \
1285         SPINEL_DATATYPE_UINT8_S /* Key mode */         \
1286         SPINEL_DATATYPE_DATA_S  /* Key ID */           \
1287                             )
1288 
1289 /**
1290  * @brief Encodes an instance of @ref SPINEL_DATATYPE_NRF_802154_SECURITY_KEY_REMOVE data type.
1291  *
1292  * @param[in]  key_id       Key ID structure (of @ref nrf_802154_key_id_t type) to be encoded.
1293  * @param[in]  key_id_size  Size of the key id in @p key_id structure.
1294  */
1295 #define NRF_802154_SECURITY_KEY_REMOVE_ENCODE(key_id, key_id_size) \
1296     (key_id).mode,                                                 \
1297     (key_id).p_key_id,                                             \
1298     (key_id_size)
1299 
1300 /**
1301  * @brief Decodes an instance of @ref SPINEL_DATATYPE_NRF_802154_SECURITY_KEY_STORE data type.
1302  *
1303  * @param[out]  key_id       Key ID structure (of @ref nrf_802154_key_id_t type) to which store decoded data.
1304  * @param[out]  key_id_size  Variable to which store size of the decoded key ID.
1305  */
1306 #define NRF_802154_SECURITY_KEY_REMOVE_DECODE(key_id, key_id_size) \
1307     & (key_id).mode,                                               \
1308     &(key_id).p_key_id,                                            \
1309     &(key_id_size)
1310 
1311 /**
1312  * @brief Spinel data type description for return type for security commands.
1313  */
1314 #define SPINEL_DATATYPE_NRF_802154_SECURITY_ERROR_RET         SPINEL_DATATYPE_UINT8_S
1315 
1316 /**
1317  * @brief Spinel data type description for nrf_802154_csl_writer_period_set.
1318  */
1319 #define SPINEL_DATATYPE_NRF_802154_CSL_WRITER_PERIOD_SET      SPINEL_DATATYPE_UINT16_S
1320 
1321 /**
1322  * @brief Spinel data type description for nrf_802154_csl_writer_anchor_time_set.
1323  */
1324 #define SPINEL_DATATYPE_NRF_802154_CSL_WRITER_ANCHOR_TIME_SET SPINEL_DATATYPE_UINT64_S
1325 
1326 /**
1327  * @brief Spinel data type description for nrf_802154_stat_timestamps_get
1328  */
1329 #define SPINEL_DATATYPE_NRF_802154_STAT_TIMESTAMPS_GET        SPINEL_DATATYPE_NULL_S
1330 
1331 /**
1332  * @brief Spinel data type description for nrf_802154_stat_timestamps_get_ret.
1333  */
1334 #define SPINEL_DATATYPE_NRF_802154_STAT_TIMESTAMPS_GET_RET \
1335     SPINEL_DATATYPE_NRF_802154_STAT_TIMESTAMPS_S
1336 
1337 /**
1338  * @brief Spinel data type description for nrf_802154_ifs_mode_get
1339  */
1340 #define SPINEL_DATATYPE_NRF_802154_IFS_MODE_GET                SPINEL_DATATYPE_NULL_S
1341 
1342 /**
1343  * @brief Spinel data type description for returning ifs_mode value.
1344  */
1345 #define SPINEL_DATATYPE_NRF_802154_IFS_MODE_GET_RET            SPINEL_DATATYPE_UINT8_S
1346 
1347 /**
1348  * @brief Spinel data type description for nrf_802154_ifs_mode_set
1349  */
1350 #define SPINEL_DATATYPE_NRF_802154_IFS_MODE_SET                SPINEL_DATATYPE_UINT8_S
1351 
1352 /**
1353  * @brief Spinel data type description for nrf_802154_ifs_mode_set result.
1354  */
1355 #define SPINEL_DATATYPE_NRF_802154_IFS_MODE_SET_RET            SPINEL_DATATYPE_BOOL_S
1356 
1357 /**
1358  * @brief Spinel data type description for nrf_802154_ifs_min_sifs_period_get
1359  */
1360 #define SPINEL_DATATYPE_NRF_802154_IFS_MIN_SIFS_PERIOD_GET     SPINEL_DATATYPE_NULL_S
1361 
1362 /**
1363  * @brief Spinel data type description for returning min_sifs_period value.
1364  */
1365 #define SPINEL_DATATYPE_NRF_802154_IFS_MIN_SIFS_PERIOD_GET_RET SPINEL_DATATYPE_UINT16_S
1366 
1367 /**
1368  * @brief Spinel data type description for nrf_802154_ifs_min_sifs_period_set
1369  */
1370 #define SPINEL_DATATYPE_NRF_802154_IFS_MIN_SIFS_PERIOD_SET     SPINEL_DATATYPE_UINT16_S
1371 
1372 /**
1373  * @brief Spinel data type description for nrf_802154_ifs_min_lifs_period_get
1374  */
1375 #define SPINEL_DATATYPE_NRF_802154_IFS_MIN_LIFS_PERIOD_GET     SPINEL_DATATYPE_NULL_S
1376 
1377 /**
1378  * @brief Spinel data type description for returning min_lifs_period value.
1379  */
1380 #define SPINEL_DATATYPE_NRF_802154_IFS_MIN_LIFS_PERIOD_GET_RET SPINEL_DATATYPE_UINT16_S
1381 
1382 /**
1383  * @brief Spinel data type description for nrf_802154_ifs_min_lifs_period_set
1384  */
1385 #define SPINEL_DATATYPE_NRF_802154_IFS_MIN_LIFS_PERIOD_SET     SPINEL_DATATYPE_UINT16_S
1386 
1387 #ifdef __cplusplus
1388 }
1389 #endif
1390 
1391 #endif /* NRF_802154_SPINEL_DATATYPES_H_ */
1392 
1393 /** @} */
1394