Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 4 additions & 32 deletions nrf_802154/common/include/nrf_802154.h
Original file line number Diff line number Diff line change
Expand Up @@ -371,19 +371,12 @@ void nrf_802154_short_address_set(const uint8_t * p_short_address);
*/
void nrf_802154_alternate_short_address_set(const uint8_t * p_short_address);

#if !NRF_802154_SERIALIZATION_HOST || defined(DOXYGEN)
/**
* @}
* @defgroup nrf_802154_transitions Functions to request FSM transitions and check current state
* @defgroup nrf_802154_transitions Functions to request FSM transitions
* @{
*/

/**
* @brief Gets the current state of the radio.
*/
nrf_802154_state_t nrf_802154_state_get(void);
#endif // !NRF_802154_SERIALIZATION_HOST

/**
* @brief Changes the radio state to the @ref RADIO_STATE_SLEEP state.
*
Expand Down Expand Up @@ -720,32 +713,14 @@ bool nrf_802154_modulated_carrier(const uint8_t * p_data);
* @brief Notifies the driver that the buffer containing the received frame is not used anymore.
*
* @note The buffer pointed to by @p p_data may be modified by this function.
* @note This function can be safely called only from the main context. To free the buffer from
* a callback or the IRQ context, use @ref nrf_802154_buffer_free_immediately_raw.
* @note This function can be safely called from the main context or callouts running on the
* same core as the driver. Do not call this function directly in the serialized callouts.
*
* @param[in] p_data Pointer to the buffer containing the received data that is no longer needed
* by the higher layer.
*/
void nrf_802154_buffer_free_raw(uint8_t * p_data);

#if !NRF_802154_SERIALIZATION_HOST || defined(DOXYGEN)
/**
* @brief Notifies the driver that the buffer containing the received frame is not used anymore.
*
* @note The buffer pointed to by @p p_data may be modified by this function.
* @note This function can be safely called from any context. If the driver is busy processing
* a request called from a context with lower priority, this function returns false and
* the caller should free the buffer later.
*
* @param[in] p_data Pointer to the buffer containing the received data that is no longer needed
* by the higher layer.
*
* @retval true Buffer was freed successfully.
* @retval false Buffer cannot be freed right now due to ongoing operation.
*/
bool nrf_802154_buffer_free_immediately_raw(uint8_t * p_data);
#endif // !NRF_802154_SERIALIZATION_HOST

/**
* @}
* @defgroup nrf_802154_rssi RSSI measurement function
Expand Down Expand Up @@ -1086,10 +1061,7 @@ void nrf_802154_cca_cfg_get(nrf_802154_cca_cfg_t * p_cca_cfg);
* @note The driver may be configured to automatically time out waiting for an ACK frame depending
* on @ref NRF_802154_ACK_TIMEOUT_ENABLED. If the automatic ACK timeout is disabled,
* the CSMA-CA procedure does not time out waiting for an ACK frame if a frame
* with the ACK request bit set was transmitted. The MAC layer is expected to manage the timer
* to time out waiting for the ACK frame. This timer can be started
* by @ref nrf_802154_tx_started. When the timer expires, the MAC layer is expected
* to call @ref nrf_802154_receive or @ref nrf_802154_sleep to stop waiting for the ACK frame.
* with the ACK request bit set was transmitted.
* @note This function is available if @ref NRF_802154_CSMA_CA_ENABLED is enabled.
*
* @param[in] p_data Pointer to the frame to transmit. See also @ref nrf_802154_transmit_raw.
Expand Down
15 changes: 0 additions & 15 deletions nrf_802154/common/include/nrf_802154_callouts.h
Original file line number Diff line number Diff line change
Expand Up @@ -209,21 +209,6 @@ extern void nrf_802154_transmit_failed(uint8_t
const nrf_802154_transmit_done_metadata_t * p_metadata);

#if !NRF_802154_SERIALIZATION_HOST || defined(DOXYGEN)
/**
* @brief Notifies that transmitting a frame has started.
*
* @note Currently this callout is only available on the CPU which is running the core of the radio driver.
* If the higher layer runs on a different core it should use nrf_802154_received_timestamp_raw instead.
* @note Usually, @ref nrf_802154_transmitted_raw is called shortly after this function.
* However, if the transmit procedure is interrupted, it might happen that
* @ref nrf_802154_transmitted_raw is not called.
* @note This function should be very short to prevent dropping frames by the driver.
*
* @param[in] p_frame Pointer to a buffer that contains PHR and PSDU of the frame being
* transmitted.
*/
extern void nrf_802154_tx_started(const uint8_t * p_frame);

/**
* @brief Perform some additional operations during initialization of the RADIO peripheral.
*
Expand Down
7 changes: 7 additions & 0 deletions nrf_802154/doc/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ Added
If the latency is not set, the driver assumes a default worst-case startup latency of 1650 us.
* When the FEM power amplifier is configured, the Errata 56 for nRF54L15 is automatically applied. (KRKNWK-20409)

Removed
=======

* Removed the deprecated :c:func:`nrf_802154_state_get` function. (KRKNWK-17467)
* Removed the deprecated :c:func:`nrf_802154_tx_started` callout function. (KRKNWK-17467)
* Removed the deprecated :c:func:`nrf_802154_buffer_free_immediately_raw` function. (KRKNWK-17467)

nRF Connect SDK v3.0.0 - nRF 802.15.4 Radio Driver
**************************************************

Expand Down
10 changes: 3 additions & 7 deletions nrf_802154/driver/src/mac_features/nrf_802154_csma_ca.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,9 @@
* @brief Starts the CSMA-CA procedure for the transmission of a given frame.
*
* If the CSMA-CA procedure is successful and the frame is transmitted,
* the @ref nrf_802154_tx_started() function is called. If the procedure failed and the frame
* cannot be transmitted due to busy channel, the @ref nrf_802154_transmit_failed() function
* is called.
*
* @note CSMA-CA does not time out automatically when waiting for ACK. Waiting for ACK must be
* timed out by the next layer. The ACK timeout timer must start when
* the @ref nrf_802154_tx_started() function is called.
* the @ref nrf_802154_transmitted_raw function is called. If the procedure
* failed and the frame cannot be transmitted due to busy channel,
* the @ref nrf_802154_transmit_failed function is called.
*
* @param[in] p_data Pointer to a buffer the contains PHR and PSDU of the frame that is
* to be transmitted.
Expand Down
11 changes: 4 additions & 7 deletions nrf_802154/driver/src/mac_features/nrf_802154_delayed_trx.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,10 @@ void nrf_802154_delayed_trx_deinit(void);
/**
* @brief Requests transmission of a frame at a given time.
*
* If the requested transmission is successful and the frame is transmitted, the
* @ref nrf_802154_tx_started function is called. If the requested frame cannot be transmitted
* at the given time, the @ref nrf_802154_transmit_failed function is called.
*
* @note The delayed transmission does not time out automatically when waiting for ACK.
* Waiting for ACK must be timed out by the next higher layer or the ACK timeout module.
* The ACK timeout timer must start when the @ref nrf_802154_tx_started function is called.
* If the requested transmission is successful and the frame is transmitted,
* the @ref nrf_802154_transmitted_raw function is called. If the requested frame
* cannot be transmitted at the given time, the @ref nrf_802154_transmit_failed
* function is called.
*
* @param[in] p_data Pointer to a buffer containing PHR and PSDU of the frame to be
* transmitted.
Expand Down
58 changes: 0 additions & 58 deletions nrf_802154/driver/src/nrf_802154.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,43 +342,6 @@ void nrf_802154_antenna_diversity_timer_irq_handler(void)
#endif
}

nrf_802154_state_t nrf_802154_state_get(void)
{
switch (nrf_802154_core_state_get())
{
case RADIO_STATE_SLEEP:
case RADIO_STATE_FALLING_ASLEEP:
return NRF_802154_STATE_SLEEP;

case RADIO_STATE_RX:
case RADIO_STATE_TX_ACK:
return NRF_802154_STATE_RECEIVE;

case RADIO_STATE_CCA_TX:
case RADIO_STATE_TX:
case RADIO_STATE_RX_ACK:
return NRF_802154_STATE_TRANSMIT;

case RADIO_STATE_ED:
return NRF_802154_STATE_ENERGY_DETECTION;

case RADIO_STATE_CCA:
return NRF_802154_STATE_CCA;

#if NRF_802154_CARRIER_FUNCTIONS_ENABLED

case RADIO_STATE_CONTINUOUS_CARRIER:
return NRF_802154_STATE_CONTINUOUS_CARRIER;

case RADIO_STATE_MODULATED_CARRIER:
return NRF_802154_STATE_MODULATED_CARRIER;
#endif // NRF_802154_CARRIER_FUNCTIONS_ENABLED

}

return NRF_802154_STATE_INVALID;
}

bool nrf_802154_sleep(void)
{
bool result;
Expand Down Expand Up @@ -636,22 +599,6 @@ void nrf_802154_buffer_free_raw(uint8_t * p_data)
nrf_802154_log_function_exit(NRF_802154_LOG_VERBOSITY_LOW);
}

bool nrf_802154_buffer_free_immediately_raw(uint8_t * p_data)
{
nrf_802154_log_function_enter(NRF_802154_LOG_VERBOSITY_LOW);

bool result;
rx_buffer_t * p_buffer = (rx_buffer_t *)p_data;

NRF_802154_ASSERT(p_buffer->free == false);
(void)p_buffer;

result = nrf_802154_request_buffer_free(p_data);

nrf_802154_log_function_exit(NRF_802154_LOG_VERBOSITY_LOW);
return result;
}

bool nrf_802154_rssi_measure_begin(void)
{
return nrf_802154_request_rssi_measure();
Expand Down Expand Up @@ -1009,11 +956,6 @@ __WEAK void nrf_802154_receive_failed(nrf_802154_rx_error_t error, uint32_t id)
(void)id;
}

__WEAK void nrf_802154_tx_started(const uint8_t * p_frame)
{
(void)p_frame;
}

__WEAK void nrf_802154_transmitted_raw(uint8_t * p_frame,
const nrf_802154_transmit_done_metadata_t * p_metadata)
{
Expand Down
11 changes: 0 additions & 11 deletions nrf_802154/driver/src/nrf_802154_co.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,3 @@ void nrf_802154_co_transmit_failed(uint8_t * p
nrf_802154_transmit_failed(p_frame, error, p_metadata);
nrf_802154_log_function_exit(NRF_802154_LOG_VERBOSITY_LOW);
}

#if !NRF_802154_SERIALIZATION_HOST || defined(DOXYGEN)

void nrf_802154_co_tx_started(const uint8_t * p_frame)
{
nrf_802154_log_function_enter(NRF_802154_LOG_VERBOSITY_LOW);
nrf_802154_tx_started(p_frame);
nrf_802154_log_function_exit(NRF_802154_LOG_VERBOSITY_LOW);
}

#endif // !NRF_802154_SERIALIZATION_HOST
9 changes: 0 additions & 9 deletions nrf_802154/driver/src/nrf_802154_co.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,3 @@ void nrf_802154_co_transmitted_raw(uint8_t * p
void nrf_802154_co_transmit_failed(uint8_t * p_frame,
nrf_802154_tx_error_t error,
const nrf_802154_transmit_done_metadata_t * p_metadata);

#if !NRF_802154_SERIALIZATION_HOST || defined(DOXYGEN)

/** @brief Calls @ref nrf_802154_tx_started.
* @note See @ref nrf_802154_tx_started for documentation of parameters.
*/
void nrf_802154_co_tx_started(const uint8_t * p_frame);

#endif // !NRF_802154_SERIALIZATION_HOST
9 changes: 1 addition & 8 deletions nrf_802154/driver/src/nrf_802154_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,20 +329,13 @@ static void receive_failed_notify(nrf_802154_rx_error_t error)
/** Notify MAC layer that transmission of requested frame has started. */
static void transmit_started_notify(void)
{
uint8_t * p_frame = mp_tx_data;

#if defined(CONFIG_SOC_SERIES_BSIM_NRFXX)
/**
* TX started hooks were executed before transmission started. Use latched result
*/
if (m_flags.tx_started_notify)
#else
if (nrf_802154_core_hooks_tx_started(p_frame))
(void)nrf_802154_core_hooks_tx_started(mp_tx_data);
#endif
{
nrf_802154_tx_started(p_frame);
}

}

/** Notify MAC layer that transmission of ACK frame has started. */
Expand Down