nrfxlib API 0.1.0
Loading...
Searching...
No Matches
nrf_802154_callouts.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2017, 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
47#ifndef NRF_802154_CALLOUTS_H_
48#define NRF_802154_CALLOUTS_H_
49
50#include <stdint.h>
51#include <stdbool.h>
52
53#include "nrf_802154_config.h"
54#include "nrf_802154_types.h"
55
61extern void nrf_802154_cca_done(bool channel_free);
62
69
77
84
99extern void nrf_802154_tx_ack_started(const uint8_t * p_data);
100
101#if NRF_802154_USE_RAW_API || defined(DOXYGEN)
102
103#if !NRF_802154_SERIALIZATION_HOST || defined(DOXYGEN)
134extern void nrf_802154_received_raw(uint8_t * p_data, int8_t power, uint8_t lqi);
135
136#endif // !NRF_802154_SERIALIZATION_HOST
137
158extern void nrf_802154_received_timestamp_raw(uint8_t * p_data,
159 int8_t power,
160 uint8_t lqi,
161 uint64_t time);
162
163#endif // NRF_802154_USE_RAW_API
164
165#if !NRF_802154_USE_RAW_API || defined(DOXYGEN)
166#if !NRF_802154_SERIALIZATION_HOST || defined(DOXYGEN)
194extern void nrf_802154_received(uint8_t * p_data, uint8_t length, int8_t power, uint8_t lqi);
195
215extern void nrf_802154_received_timestamp(uint8_t * p_data,
216 uint8_t length,
217 int8_t power,
218 uint8_t lqi,
219 uint32_t time);
220
221#endif // !NRF_802154_SERIALIZATION_HOST
222#endif // !NRF_802154_USE_RAW_API
223
234extern void nrf_802154_receive_failed(nrf_802154_rx_error_t error, uint32_t id);
235
236#if NRF_802154_USE_RAW_API || defined(DOXYGEN)
258extern void nrf_802154_transmitted_raw(uint8_t * p_frame,
259 const nrf_802154_transmit_done_metadata_t * p_metadata);
260
261#endif // NRF_802154_USE_RAW_API
262
263#if !NRF_802154_USE_RAW_API || defined(DOXYGEN)
288extern void nrf_802154_transmitted(uint8_t * p_frame,
289 const nrf_802154_transmit_done_metadata_t * p_metadata);
290
291#endif // !NRF_802154_USE_RAW_API
292
306extern void nrf_802154_transmit_failed(uint8_t * p_frame,
308 const nrf_802154_transmit_done_metadata_t * p_metadata);
309
310#if !NRF_802154_SERIALIZATION_HOST || defined(DOXYGEN)
324extern void nrf_802154_tx_started(const uint8_t * p_frame);
325
334
335#endif // !NRF_802154_SERIALIZATION_HOST
336
337#endif /* NRF_802154_CALLOUTS_H_ */
338
void nrf_802154_cca_failed(nrf_802154_cca_error_t error)
Notifies that the CCA procedure failed.
void nrf_802154_receive_failed(nrf_802154_rx_error_t error, uint32_t id)
Notifies that the reception of a frame failed.
void nrf_802154_received_raw(uint8_t *p_data, int8_t power, uint8_t lqi)
Notifies that a frame was received.
void nrf_802154_cca_done(bool channel_free)
Notifies that the CCA procedure has finished.
void nrf_802154_energy_detected(const nrf_802154_energy_detected_t *p_result)
Notifies that the energy detection procedure finished.
void nrf_802154_energy_detection_failed(nrf_802154_ed_error_t error)
Notifies that the energy detection procedure failed.
void nrf_802154_transmitted(uint8_t *p_frame, const nrf_802154_transmit_done_metadata_t *p_metadata)
Notifies that a frame was transmitted.
void nrf_802154_received_timestamp(uint8_t *p_data, uint8_t length, int8_t power, uint8_t lqi, uint32_t time)
Notifies that a frame was received at a given time.
void nrf_802154_transmit_failed(uint8_t *p_frame, nrf_802154_tx_error_t error, const nrf_802154_transmit_done_metadata_t *p_metadata)
Notifies that a frame was not transmitted due to a busy channel.
void nrf_802154_tx_started(const uint8_t *p_frame)
Notifies that transmitting a frame has started.
void nrf_802154_custom_part_of_radio_init(void)
Perform some additional operations during initialization of the RADIO peripheral.
void nrf_802154_transmitted_raw(uint8_t *p_frame, const nrf_802154_transmit_done_metadata_t *p_metadata)
Notifies that a frame was transmitted.
void nrf_802154_received_timestamp_raw(uint8_t *p_data, int8_t power, uint8_t lqi, uint64_t time)
Notifies that a frame was received at a given time.
void nrf_802154_tx_ack_started(const uint8_t *p_data)
Notifies about the start of the ACK frame transmission.
void nrf_802154_received(uint8_t *p_data, uint8_t length, int8_t power, uint8_t lqi)
Notifies that a frame was received.
uint8_t nrf_802154_ed_error_t
Possible errors during the energy detection.
Definition: nrf_802154_types.h:116
uint8_t nrf_802154_cca_error_t
Possible errors during the CCA procedure.
Definition: nrf_802154_types.h:123
uint8_t nrf_802154_rx_error_t
Possible errors during the frame reception.
Definition: nrf_802154_types.h:98
uint8_t nrf_802154_tx_error_t
Errors reported during the frame transmission.
Definition: nrf_802154_types.h:82
Structure that holds results of energy detection procedure.
Definition: nrf_802154_types.h:505
Structure that holds transmission result metadata.
Definition: nrf_802154_types.h:473