nrfxlib API 2.7.99
Loading...
Searching...
No Matches
nrf_802154_notification.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
35#ifndef NRF_802154_NOTIFICATION_H__
36#define NRF_802154_NOTIFICATION_H__
37
38#include <stdbool.h>
39#include <stdint.h>
40
41#include "nrf_802154.h"
42#include "nrf_802154_types.h"
43
44#ifdef __cplusplus
45extern "C" {
46#endif
47
63typedef void (* nrf_802154_notification_func_t)(bool result);
64
69
77void nrf_802154_notify_received(uint8_t * p_data, int8_t power, uint8_t lqi);
78
93bool nrf_802154_notify_receive_failed(nrf_802154_rx_error_t error, uint32_t id, bool allow_drop);
94
104void nrf_802154_notify_transmitted(uint8_t * p_frame,
106
120 const nrf_802154_transmit_done_metadata_t * p_metadata);
121
128
135
141void nrf_802154_notify_cca(bool is_free);
142
149
154#ifdef __cplusplus
155}
156#endif
157
158#endif // NRF_802154_NOTIFICATION_H__
void(* nrf_802154_notification_func_t)(bool result)
Function type used for notifications from critical sections in the core module.
Definition: nrf_802154_notification.h:63
void nrf_802154_notify_cca(bool is_free)
Notifies the next higher layer that the CCA procedure ended.
void nrf_802154_notification_init(void)
Initializes the notification module.
void nrf_802154_notify_received(uint8_t *p_data, int8_t power, uint8_t lqi)
Notifies the next higher layer that a frame was received.
void nrf_802154_notify_energy_detection_failed(nrf_802154_ed_error_t error)
Notifies the next higher layer that the energy detection procedure failed.
void nrf_802154_notify_transmit_failed(uint8_t *p_frame, nrf_802154_tx_error_t error, const nrf_802154_transmit_done_metadata_t *p_metadata)
Notifies the next higher layer that a frame was not transmitted.
void nrf_802154_notify_cca_failed(nrf_802154_cca_error_t error)
Notifies the next higher layer that the CCA procedure failed.
bool nrf_802154_notify_receive_failed(nrf_802154_rx_error_t error, uint32_t id, bool allow_drop)
Notifies the next higher layer that the reception of a frame failed.
void nrf_802154_notify_energy_detected(const nrf_802154_energy_detected_t *p_result)
Notifies the next higher layer that the energy detection procedure ended.
void nrf_802154_notify_transmitted(uint8_t *p_frame, nrf_802154_transmit_done_metadata_t *p_metadata)
Notifies the next higher layer that a frame was transmitted.
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