40#ifndef NRF_802154_PROCEDURES_DURATION_H_
41#define NRF_802154_PROCEDURES_DURATION_H_
49#define TX_RAMP_UP_TIME 40
50#define RX_RAMP_UP_TIME 40
51#define RX_RAMP_DOWN_TIME 0
52#define MAX_RAMP_DOWN_TIME 6
53#define RX_TX_TURNAROUND_TIME 20
55#define A_CCA_DURATION_SYMBOLS 8
56#define A_TURNAROUND_TIME_SYMBOLS 12
57#define A_UNIT_BACKOFF_SYMBOLS 20
59#define PHY_SYMBOLS_FROM_OCTETS(octets) ((octets) * PHY_SYMBOLS_PER_OCTET)
60#define PHY_US_TIME_FROM_SYMBOLS(symbols) ((symbols) * PHY_US_PER_SYMBOL)
62#define IMM_ACK_SYMBOLS (PHY_SHR_SYMBOLS + \
63 PHY_SYMBOLS_FROM_OCTETS(IMM_ACK_LENGTH + PHR_SIZE))
64#define IMM_ACK_DURATION (PHY_US_TIME_FROM_SYMBOLS(IMM_ACK_SYMBOLS))
66#define MAC_IMM_ACK_WAIT_SYMBOLS (A_UNIT_BACKOFF_SYMBOLS + \
67 A_TURNAROUND_TIME_SYMBOLS + \
71#define MAX_PHY_FRAME_TIME_US \
72 PHY_US_TIME_FROM_SYMBOLS( \
73 PHY_SHR_SYMBOLS + PHY_SYMBOLS_FROM_OCTETS(PHR_SIZE + MAX_PACKET_SIZE))
85#ifndef SUPPRESS_INLINE_IMPLEMENTATION
#define PHR_SIZE
Size of the PHR field.
Definition nrf_802154_const.h:166
#define PHY_SHR_SYMBOLS
Number of symbols in the Synchronization Header (SHR).
Definition nrf_802154_const.h:181
#define IMM_ACK_LENGTH
Length of the ACK frame.
Definition nrf_802154_const.h:157
#define RX_RAMP_UP_TIME
Definition nrf_802154_procedures_duration.h:50
#define A_TURNAROUND_TIME_SYMBOLS
Definition nrf_802154_procedures_duration.h:56
__STATIC_INLINE uint16_t nrf_802154_frame_duration_get(uint8_t psdu_length, bool shr, bool phr)
Definition nrf_802154_procedures_duration.h:87
__STATIC_INLINE uint16_t nrf_802154_ack_duration_with_turnaround_get(void)
Get the duration of the Ack frame along with turnaround in microseconds.
Definition nrf_802154_procedures_duration.h:142
#define PHY_US_TIME_FROM_SYMBOLS(symbols)
Definition nrf_802154_procedures_duration.h:60
#define A_CCA_DURATION_SYMBOLS
Definition nrf_802154_procedures_duration.h:55
#define PHY_SYMBOLS_FROM_OCTETS(octets)
Definition nrf_802154_procedures_duration.h:59
__STATIC_INLINE uint16_t nrf_802154_rx_duration_get(uint8_t psdu_length, bool ack_requested)
Definition nrf_802154_procedures_duration.h:150
#define RX_RAMP_DOWN_TIME
Definition nrf_802154_procedures_duration.h:51
__STATIC_INLINE uint16_t nrf_802154_cca_before_tx_duration_get(void)
Definition nrf_802154_procedures_duration.h:133
#define RX_TX_TURNAROUND_TIME
Definition nrf_802154_procedures_duration.h:53
#define MAX_RAMP_DOWN_TIME
Definition nrf_802154_procedures_duration.h:52
#define MAC_IMM_ACK_WAIT_SYMBOLS
Definition nrf_802154_procedures_duration.h:66
__STATIC_INLINE uint16_t nrf_802154_cca_duration_get(void)
Definition nrf_802154_procedures_duration.h:164
__STATIC_INLINE uint16_t nrf_802154_tx_duration_get(uint8_t psdu_length, bool cca, bool ack_requested)
Definition nrf_802154_procedures_duration.h:106
#define TX_RAMP_UP_TIME
Module that contains calculations of the duration of the 802.15.4 radio driver procedures.
Definition nrf_802154_procedures_duration.h:49