Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nrf_802154: Update revision of nrf_802154 #1287

Merged
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
2 changes: 1 addition & 1 deletion nrf_802154/driver/src/mac_features/nrf_802154_csma_ca.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ static uint8_t m_be; ///< Backoff exponent,

static uint8_t * mp_data; ///< Pointer to a buffer containing PHR and PSDU of the frame being transmitted.
static nrf_802154_transmitted_frame_props_t m_data_props; ///< Structure containing detailed properties of data in buffer.
static nrf_802154_fal_tx_power_split2_t m_tx_power; ///< Power to be used when transmitting the frame split into components.
static nrf_802154_fal_tx_power_split_t m_tx_power; ///< Power to be used when transmitting the frame split into components.
static uint8_t m_tx_channel; ///< Channel to be used to transmit the current frame.
static csma_ca_state_t m_state; ///< The current state of the CSMA-CA procedure.

Expand Down
2 changes: 1 addition & 1 deletion nrf_802154/driver/src/nrf_802154.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ void nrf_802154_tx_power_set(int8_t power)

int8_t nrf_802154_tx_power_get(void)
{
nrf_802154_fal_tx_power_split2_t split_power = {0};
nrf_802154_fal_tx_power_split_t split_power = {0};

return nrf_802154_tx_power_split_pib_power_get(&split_power);
}
Expand Down
24 changes: 12 additions & 12 deletions nrf_802154/driver/src/nrf_802154_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,14 @@ static rx_buffer_t * const mp_current_rx_buffer = &nrf_802154_rx_buffers[0];

#endif

static uint8_t * mp_ack; ///< Pointer to Ack frame buffer.
static uint8_t * mp_tx_data; ///< Pointer to the data to transmit.
static uint32_t m_ed_time_left; ///< Remaining time of the current energy detection procedure [us].
static uint8_t m_ed_result; ///< Result of the current energy detection procedure.
static uint8_t m_last_lqi; ///< LQI of the last received non-ACK frame, corrected for the temperature.
static nrf_802154_fal_tx_power_split2_t m_tx_power; ///< Power to be used to transmit the current frame split into components.
static uint8_t m_tx_channel; ///< Channel to be used to transmit the current frame.
static int8_t m_last_rssi; ///< RSSI of the last received non-ACK frame, corrected for the temperature.
static uint8_t * mp_ack; ///< Pointer to Ack frame buffer.
static uint8_t * mp_tx_data; ///< Pointer to the data to transmit.
static uint32_t m_ed_time_left; ///< Remaining time of the current energy detection procedure [us].
static uint8_t m_ed_result; ///< Result of the current energy detection procedure.
static uint8_t m_last_lqi; ///< LQI of the last received non-ACK frame, corrected for the temperature.
static nrf_802154_fal_tx_power_split_t m_tx_power; ///< Power to be used to transmit the current frame split into components.
static uint8_t m_tx_channel; ///< Channel to be used to transmit the current frame.
static int8_t m_last_rssi; ///< RSSI of the last received non-ACK frame, corrected for the temperature.

static nrf_802154_frame_parser_data_t m_current_rx_frame_data; ///< RX frame parser data.

Expand Down Expand Up @@ -967,7 +967,7 @@ static void rx_init(nrf_802154_trx_ramp_up_trigger_mode_t ru_tr_mode, bool * p_a

nrf_802154_trx_receive_buffer_set(rx_buffer_get());

nrf_802154_fal_tx_power_split2_t split_power = {0};
nrf_802154_fal_tx_power_split_t split_power = {0};

(void)nrf_802154_tx_power_split_pib_power_get(&split_power);

Expand Down Expand Up @@ -1167,7 +1167,7 @@ static void continuous_carrier_init(void)
{
return;
}
nrf_802154_fal_tx_power_split2_t split_power = {0};
nrf_802154_fal_tx_power_split_t split_power = {0};

(void)nrf_802154_tx_power_split_pib_power_get(&split_power);

Expand All @@ -1187,7 +1187,7 @@ static void modulated_carrier_init(const uint8_t * p_data)
return;
}

nrf_802154_fal_tx_power_split2_t split_power = {0};
nrf_802154_fal_tx_power_split_t split_power = {0};

(void)nrf_802154_tx_power_split_pib_power_get(&split_power);

Expand Down Expand Up @@ -1890,7 +1890,7 @@ void nrf_802154_trx_receive_frame_crcerror(void)
// We don't change receive buffer, receive will go to the same that was already used
request_preconditions_for_state(m_state);

nrf_802154_fal_tx_power_split2_t split_power = {0};
nrf_802154_fal_tx_power_split_t split_power = {0};

(void)nrf_802154_tx_power_split_pib_power_get(&split_power);

Expand Down
24 changes: 12 additions & 12 deletions nrf_802154/driver/src/nrf_802154_trx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1292,10 +1292,10 @@ bool nrf_802154_trx_receive_buffer_set(void * p_receive_buffer)
return result;
}

void nrf_802154_trx_receive_frame(uint8_t bcc,
nrf_802154_trx_ramp_up_trigger_mode_t rampup_trigg_mode,
nrf_802154_trx_receive_notifications_t notifications_mask,
const nrf_802154_fal_tx_power_split2_t * p_ack_tx_power)
void nrf_802154_trx_receive_frame(uint8_t bcc,
nrf_802154_trx_ramp_up_trigger_mode_t rampup_trigg_mode,
nrf_802154_trx_receive_notifications_t notifications_mask,
const nrf_802154_fal_tx_power_split_t * p_ack_tx_power)
{
nrf_802154_log_function_enter(NRF_802154_LOG_VERBOSITY_LOW);

Expand Down Expand Up @@ -1528,11 +1528,11 @@ bool nrf_802154_trx_rssi_sample_is_available(void)
#endif
}

void nrf_802154_trx_transmit_frame(const void * p_transmit_buffer,
nrf_802154_trx_ramp_up_trigger_mode_t rampup_trigg_mode,
uint8_t cca_attempts,
const nrf_802154_fal_tx_power_split2_t * p_tx_power,
nrf_802154_trx_transmit_notifications_t notifications_mask)
void nrf_802154_trx_transmit_frame(const void * p_transmit_buffer,
nrf_802154_trx_ramp_up_trigger_mode_t rampup_trigg_mode,
uint8_t cca_attempts,
const nrf_802154_fal_tx_power_split_t * p_tx_power,
nrf_802154_trx_transmit_notifications_t notifications_mask)
{
nrf_802154_log_function_enter(NRF_802154_LOG_VERBOSITY_LOW);

Expand Down Expand Up @@ -2168,7 +2168,7 @@ static void standalone_cca_abort(void)

#if NRF_802154_CARRIER_FUNCTIONS_ENABLED

void nrf_802154_trx_continuous_carrier(const nrf_802154_fal_tx_power_split2_t * p_tx_power)
void nrf_802154_trx_continuous_carrier(const nrf_802154_fal_tx_power_split_t * p_tx_power)
{
nrf_802154_log_function_enter(NRF_802154_LOG_VERBOSITY_LOW);

Expand Down Expand Up @@ -2222,8 +2222,8 @@ static void continuous_carrier_abort(void)
nrf_802154_log_function_exit(NRF_802154_LOG_VERBOSITY_HIGH);
}

void nrf_802154_trx_modulated_carrier(const void * p_transmit_buffer,
const nrf_802154_fal_tx_power_split2_t * p_tx_power)
void nrf_802154_trx_modulated_carrier(const void * p_transmit_buffer,
const nrf_802154_fal_tx_power_split_t * p_tx_power)
{
nrf_802154_log_function_enter(NRF_802154_LOG_VERBOSITY_LOW);

Expand Down
24 changes: 12 additions & 12 deletions nrf_802154/driver/src/nrf_802154_trx.h
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,10 @@ void nrf_802154_trx_cca_configuration_update(void);
* It is bitwise combination of @ref nrf_802154_trx_receive_notifications_t values.
* @param[in] p_ack_tx_power Selects the power which should be used to transmitted an ACK if required.
*/
void nrf_802154_trx_receive_frame(uint8_t bcc,
nrf_802154_trx_ramp_up_trigger_mode_t rampup_trigg_mode,
nrf_802154_trx_receive_notifications_t notifications_mask,
const nrf_802154_fal_tx_power_split2_t * p_ack_tx_power);
void nrf_802154_trx_receive_frame(uint8_t bcc,
nrf_802154_trx_ramp_up_trigger_mode_t rampup_trigg_mode,
nrf_802154_trx_receive_notifications_t notifications_mask,
const nrf_802154_fal_tx_power_split_t * p_ack_tx_power);

/**@brief Puts the trx module into receive ACK mode.
*
Expand Down Expand Up @@ -353,11 +353,11 @@ bool nrf_802154_trx_receive_buffer_set(void * p_receive_buffer);
* It is bitwise combination of @ref nrf_802154_trx_transmit_notifications_t values.
* @note To transmit ack after frame is received use @ref nrf_802154_trx_transmit_ack.
*/
void nrf_802154_trx_transmit_frame(const void * p_transmit_buffer,
nrf_802154_trx_ramp_up_trigger_mode_t rampup_trigg_mode,
uint8_t cca_attempts,
const nrf_802154_fal_tx_power_split2_t * p_tx_power,
nrf_802154_trx_transmit_notifications_t notifications_mask);
void nrf_802154_trx_transmit_frame(const void * p_transmit_buffer,
nrf_802154_trx_ramp_up_trigger_mode_t rampup_trigg_mode,
uint8_t cca_attempts,
const nrf_802154_fal_tx_power_split_t * p_tx_power,
nrf_802154_trx_transmit_notifications_t notifications_mask);

/**@brief Puts the trx module into transmit ACK mode.
*
Expand Down Expand Up @@ -403,7 +403,7 @@ void nrf_802154_trx_standalone_cca(void);
* Generation of a continuous carrier generates no handlers. It may be terminated by a call to
* @ref nrf_802154_trx_abort or @ref nrf_802154_trx_disable.
*/
void nrf_802154_trx_continuous_carrier(const nrf_802154_fal_tx_power_split2_t * p_tx_power);
void nrf_802154_trx_continuous_carrier(const nrf_802154_fal_tx_power_split_t * p_tx_power);

/**@brief Restarts generating continuous carrier
*
Expand All @@ -420,8 +420,8 @@ void nrf_802154_trx_continuous_carrier_restart(void);
* @param[in] p_transmit_buffer Pointer to a buffer used for modulating the carrier wave.
* @param[in] p_tx_power Transmit power in dBm.
*/
void nrf_802154_trx_modulated_carrier(const void * p_transmit_buffer,
const nrf_802154_fal_tx_power_split2_t * p_tx_power);
void nrf_802154_trx_modulated_carrier(const void * p_transmit_buffer,
const nrf_802154_fal_tx_power_split_t * p_tx_power);

/** @brief Restarts generating modulated carrier.*/
void nrf_802154_trx_modulated_carrier_restart(void);
Expand Down
26 changes: 13 additions & 13 deletions nrf_802154/driver/src/nrf_802154_tx_power.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,29 +37,29 @@
#include "nrf_802154_fal.h"

int8_t nrf_802154_tx_power_convert_metadata_to_tx_power_split(
uint8_t channel,
nrf_802154_tx_power_metadata_t tx_power,
nrf_802154_fal_tx_power_split2_t * const p_tx_power_split)
uint8_t channel,
nrf_802154_tx_power_metadata_t tx_power,
nrf_802154_fal_tx_power_split_t * const p_tx_power_split)
{
int8_t power_unconstrained =
tx_power.use_metadata_value ? tx_power.power : nrf_802154_pib_tx_power_get();

return nrf_802154_fal_tx_power_split2(channel, power_unconstrained, p_tx_power_split);
return nrf_802154_fal_tx_power_split(channel, power_unconstrained, p_tx_power_split);
}

int8_t nrf_802154_tx_power_split_pib_power_get(
nrf_802154_fal_tx_power_split2_t * const p_split_power)
nrf_802154_fal_tx_power_split_t * const p_split_power)
{
return nrf_802154_fal_tx_power_split2(nrf_802154_pib_channel_get(),
nrf_802154_pib_tx_power_get(),
p_split_power);
return nrf_802154_fal_tx_power_split(nrf_802154_pib_channel_get(),
nrf_802154_pib_tx_power_get(),
p_split_power);
}

int8_t nrf_802154_tx_power_split_pib_power_for_channel_get(
uint8_t channel,
nrf_802154_fal_tx_power_split2_t * const p_split_power)
uint8_t channel,
nrf_802154_fal_tx_power_split_t * const p_split_power)
{
return nrf_802154_fal_tx_power_split2(channel,
nrf_802154_pib_tx_power_get(),
p_split_power);
return nrf_802154_fal_tx_power_split(channel,
nrf_802154_pib_tx_power_get(),
p_split_power);
}
12 changes: 6 additions & 6 deletions nrf_802154/driver/src/nrf_802154_tx_power.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@
*
*/
int8_t nrf_802154_tx_power_convert_metadata_to_tx_power_split(
uint8_t channel,
nrf_802154_tx_power_metadata_t tx_power,
nrf_802154_fal_tx_power_split2_t * const p_tx_power_split);
uint8_t channel,
nrf_802154_tx_power_metadata_t tx_power,
nrf_802154_fal_tx_power_split_t * const p_tx_power_split);

/**@brief Get the transmit power stored in PIB after applying the power constraints for the current channel and splitting
* into components to be applied on each stage of the transmit path.
Expand All @@ -68,7 +68,7 @@ int8_t nrf_802154_tx_power_convert_metadata_to_tx_power_split(
*
*/
int8_t nrf_802154_tx_power_split_pib_power_get(
nrf_802154_fal_tx_power_split2_t * const p_split_power);
nrf_802154_fal_tx_power_split_t * const p_split_power);

/**@brief Get the transmit power stored in PIB after applying the power constraints for the given channel and splitting
* into components to be applied on each stage of the transmit path.
Expand All @@ -80,7 +80,7 @@ int8_t nrf_802154_tx_power_split_pib_power_get(
*
*/
int8_t nrf_802154_tx_power_split_pib_power_for_channel_get(
uint8_t channel,
nrf_802154_fal_tx_power_split2_t * const p_split_power);
uint8_t channel,
nrf_802154_fal_tx_power_split_t * const p_split_power);

#endif // NRF_802154_TX_POWER_H__
2 changes: 1 addition & 1 deletion nrf_802154/driver/src/nrf_802154_types_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
typedef struct
{
nrf_802154_transmitted_frame_props_t frame_props; // !< Properties of the frame to be transmitted.
nrf_802154_fal_tx_power_split2_t tx_power; // !< Power to be used when transmitting the frame, split into components to be applied on each stage on transmit path.
nrf_802154_fal_tx_power_split_t tx_power; // !< Power to be used when transmitting the frame, split into components to be applied on each stage on transmit path.
uint8_t channel; // !< Transmission channel
bool cca; // !< If the driver is to perform CCA procedure before transmission.
bool immediate; // !< If true, the driver schedules transmission immediately or never. If false, the transmission may be postponed
Expand Down
8 changes: 4 additions & 4 deletions nrf_802154/sl/include/nrf_802154_fal.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ typedef struct

/** PA power control to be applied to Front-End Module. */
mpsl_fem_pa_power_control_t fem_pa_power_control;
} nrf_802154_fal_tx_power_split2_t;
} nrf_802154_fal_tx_power_split_t;

/** @brief Splits transmit power value into components to be applied on each stage on transmit path.
*
Expand All @@ -68,9 +68,9 @@ typedef struct
*
* @return Actually achieved power in dBm.
*/
int8_t nrf_802154_fal_tx_power_split2(const uint8_t channel,
const int8_t power,
nrf_802154_fal_tx_power_split2_t * const p_tx_power_split);
int8_t nrf_802154_fal_tx_power_split(const uint8_t channel,
const int8_t power,
nrf_802154_fal_tx_power_split_t * const p_tx_power_split);

#ifdef __cplusplus
}
Expand Down
6 changes: 3 additions & 3 deletions nrf_802154/sl/sl_opensource/src/nrf_802154_sl_fem.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,9 @@ bool mpsl_fem_device_config_254_apply_get(void)
return false;
}

int8_t nrf_802154_fal_tx_power_split2(const uint8_t channel,
const int8_t power,
nrf_802154_fal_tx_power_split2_t * const p_tx_power_split)
int8_t nrf_802154_fal_tx_power_split(const uint8_t channel,
const int8_t power,
nrf_802154_fal_tx_power_split_t * const p_tx_power_split)
{
(void)channel;

Expand Down
Loading