nRF5 SDK for Thread and Zigbee v3.2.0
Functions
Auto ACK management

Functions

void nrf_802154_auto_ack_set (bool enabled)
 Enable or disable automatic acknowledgments. More...
 
bool nrf_802154_auto_ack_get (void)
 Check if auto ACK is enabled. More...
 
void nrf_802154_pan_coord_set (bool enabled)
 Notify driver that radio is configured as the PAN coordinator. More...
 
bool nrf_802154_pan_coord_get (void)
 Check if radio is configured as the PAN coordinator. More...
 
bool nrf_802154_ack_data_set (const uint8_t *p_addr, bool extended, const void *p_data, uint16_t length, uint8_t data_type)
 Add address of a peer node for which provided ACK data should be set. More...
 
void nrf_802154_auto_pending_bit_set (bool enabled)
 Enable or disable setting pending bit in automatically transmitted ACK frames. More...
 
bool nrf_802154_pending_bit_for_addr_set (const uint8_t *p_addr, bool extended)
 Add address of a peer node for which there is pending data in the buffer. More...
 
bool nrf_802154_pending_bit_for_addr_clear (const uint8_t *p_addr, bool extended)
 Remove address of a peer node for which there is no more pending data in the buffer. More...
 
void nrf_802154_pending_bit_for_addr_reset (bool extended)
 Remove all addresses of a given type from the pending bit list. More...
 

Detailed Description

Function Documentation

bool nrf_802154_ack_data_set ( const uint8_t *  p_addr,
bool  extended,
const void *  p_data,
uint16_t  length,
uint8_t  data_type 
)

Add address of a peer node for which provided ACK data should be set.

Parameters
[in]p_addrArray of bytes containing the address of the node (little-endian).
[in]extendedIf the given address is an extended MAC address or a short MAC address.
[in]p_dataPointer to the buffer containing data to be set.
[in]lengthLength of p_data.
[in]data_typeType of data to be set. Please refer to nrf_802154_ack_data_t type.
Return values
TrueAddress successfully added to the list.
FalseThere is not enough memory to store this address in the list.
bool nrf_802154_auto_ack_get ( void  )

Check if auto ACK is enabled.

Return values
TrueAuto ACK is enabled.
FalseAuto ACK is disabled.
void nrf_802154_auto_ack_set ( bool  enabled)

Enable or disable automatic acknowledgments.

Note
Auto ACK is enabled by default.

If auto ACK is enabled, the driver prepares and sends ACK frames automatically aTurnaroundTime (192 us) after the proper frame is received. The driver sets the sequence number in the ACK frame and a pending bit according to the auto pending bit feature settings. When auto ACK is enabled, the driver notifies the next higher layer about the received frame after the ACK frame is transmitted. If auto ACK is disabled, the driver does not transmit ACK frames. It notifies the next higher layer about received frames when a frame is received. In this mode, the next higher layer is responsible for sending the ACK frame. ACK frames should be sent using nrf_802154_transmit.

Parameters
[in]enabledIf auto ACK should be enabled.
void nrf_802154_auto_pending_bit_set ( bool  enabled)

Enable or disable setting pending bit in automatically transmitted ACK frames.

Note
Setting a pending bit in automatically transmitted ACK frames is enabled by default.

The radio driver automatically sends ACK frames in response frames destined to this node with the ACK Request bit set. The pending bit in the ACK frame can be set or cleared regarding data in the indirect queue destined to ACK destination.

If setting a pending bit in ACK frames is disabled, the pending bit in every ACK frame is set. If setting a pending bit in ACK frames is enabled, the radio driver checks if there is data in the indirect queue destined to ACK destination. If there is no such data, the pending bit is cleared.

Note
Due to ISR latency, the radio driver might not be able to verify if there is data in the indirect queue before ACK is sent. In this case, the pending bit is set.
Parameters
[in]enabledIf setting a pending bit in ACK frames is enabled.
bool nrf_802154_pan_coord_get ( void  )

Check if radio is configured as the PAN coordinator.

Return values
trueIf radio is configured as the PAN coordinator.
falseIf radio is not configured as the PAN coordinator.
void nrf_802154_pan_coord_set ( bool  enabled)

Notify driver that radio is configured as the PAN coordinator.

Note
That information is used for packet filtering.
Parameters
[in]enabledIf radio is configured as the PAN coordinator.
bool nrf_802154_pending_bit_for_addr_clear ( const uint8_t *  p_addr,
bool  extended 
)

Remove address of a peer node for which there is no more pending data in the buffer.

Parameters
[in]p_addrArray of bytes containing the address of the node (little-endian).
[in]extendedIf the given address is an extended MAC address or a short MAC address.
Return values
TrueIf the address is successfully removed from the list.
FalseIf there is no such address in the list.
void nrf_802154_pending_bit_for_addr_reset ( bool  extended)

Remove all addresses of a given type from the pending bit list.

Parameters
[in]extendedIf the function should remove all extended MAC addresses or all short addresses.
bool nrf_802154_pending_bit_for_addr_set ( const uint8_t *  p_addr,
bool  extended 
)

Add address of a peer node for which there is pending data in the buffer.

Note
This function makes a copy of the given address.
Parameters
[in]p_addrArray of bytes containing the address of the node (little-endian).
[in]extendedIf the given address is an extended MAC address or a short MAC address.
Return values
TrueIf the address is successfully added to the list.
FalseIf there is not enough memory to store the address in the list.

Documentation feedback | Developer Zone | Subscribe | Updated