1 /* 2 * Copyright (c) 2024, 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 * @file 37 * This file defines an interface for final exit points for calling callouts of an application. 38 * 39 */ 40 41 #include "nrf_802154_callouts.h" 42 #include "nrf_802154_types.h" 43 44 /** @brief Calls @ref nrf_802154_cca_done. 45 * @note See @ref nrf_802154_cca_done for documentation of parameters. 46 */ 47 void nrf_802154_co_cca_done(bool channel_free); 48 49 /** @brief Calls @ref nrf_802154_cca_failed. 50 * @note See @ref nrf_802154_cca_failed for documentation of parameters. 51 */ 52 void nrf_802154_co_cca_failed(nrf_802154_cca_error_t error); 53 54 /** @brief Calls @ref nrf_802154_energy_detected. 55 * @note See @ref nrf_802154_energy_detected for documentation of parameters. 56 */ 57 void nrf_802154_co_energy_detected(const nrf_802154_energy_detected_t * p_result); 58 59 /** @brief Calls @ref nrf_802154_energy_detection_failed. 60 * @note See @ref nrf_802154_energy_detection_failed for documentation of parameters. 61 */ 62 void nrf_802154_co_energy_detection_failed(nrf_802154_ed_error_t error); 63 64 /** @brief Calls @ref nrf_802154_tx_ack_started. 65 * @note See @ref nrf_802154_tx_ack_started for documentation of parameters. 66 */ 67 void nrf_802154_co_tx_ack_started(const uint8_t * p_data); 68 69 #if !NRF_802154_SERIALIZATION_HOST || defined(DOXYGEN) 70 71 /** @brief Calls @ref nrf_802154_received_raw. 72 * @note See @ref nrf_802154_received_raw for documentation of parameters. 73 */ 74 void nrf_802154_co_received_raw(uint8_t * p_data, int8_t power, uint8_t lqi); 75 76 #endif // !NRF_802154_SERIALIZATION_HOST 77 78 /** @brief Calls @ref nrf_802154_receive_failed. 79 * @note See @ref nrf_802154_receive_failed for documentation of parameters. 80 */ 81 void nrf_802154_co_receive_failed(nrf_802154_rx_error_t error, uint32_t id); 82 83 /** @brief Calls @ref nrf_802154_transmitted_raw. 84 * @note See @ref nrf_802154_transmitted_raw for documentation of parameters. 85 */ 86 void nrf_802154_co_transmitted_raw(uint8_t * p_frame, 87 const nrf_802154_transmit_done_metadata_t * p_metadata); 88 89 /** @brief Calls @ref nrf_802154_transmit_failed. 90 * @note See @ref nrf_802154_transmit_failed for documentation of parameters. 91 */ 92 void nrf_802154_co_transmit_failed(uint8_t * p_frame, 93 nrf_802154_tx_error_t error, 94 const nrf_802154_transmit_done_metadata_t * p_metadata); 95 96 #if !NRF_802154_SERIALIZATION_HOST || defined(DOXYGEN) 97 98 /** @brief Calls @ref nrf_802154_tx_started. 99 * @note See @ref nrf_802154_tx_started for documentation of parameters. 100 */ 101 void nrf_802154_co_tx_started(const uint8_t * p_frame); 102 103 #endif // !NRF_802154_SERIALIZATION_HOST 104