Microchip® Advanced Software Framework

tal_auto_ack.c File Reference

This file implements acknowledgement handling.

Copyright (c) 2015-2018 Microchip Technology Inc. and its subsidiaries.

#include "tal_config.h"
#include <stdint.h>
#include <string.h>
#include <stdbool.h>
#include <inttypes.h>
#include "pal.h"
#include "return_val.h"
#include "tal.h"
#include "ieee_const.h"
#include "stack_config.h"
#include "tal_pib.h"
#include "tal_internal.h"

Functions

static void ack_timout_cb (void *cb_timer_element)
 Callback function for ACK timeout. More...
 
void ack_transmission_done (trx_id_t trx_id)
 Handles end of ACK transmission. More...
 
bool is_ack_valid (trx_id_t trx_id)
 Checks if received ACK is an valid ACK frame. More...
 
bool is_frame_an_ack (trx_id_t trx_id)
 Checks if received frame is an ACK frame. More...
 
void start_ack_wait_timer (trx_id_t trx_id)
 Starts the timer to wait for an ACK reception. More...
 

void ack_timout_cb ( void *  cb_timer_element)
static

Callback function for ACK timeout.

This function is called if the ACK timeout timer fires.

Parameters
parameterPointer to trx_id

References Assert, DEFAULT_FRAME_TYPES, MAC_NO_ACK, NUM_TRX, RF_BASE_ADDR_OFFSET, RG_BBC0_AFFTM, switch_to_txprep(), tal_pib, trx_reg_write(), and tx_done_handling().

Referenced by start_ack_wait_timer().

void ack_transmission_done ( trx_id_t  trx_id)

Handles end of ACK transmission.

This function is called with the TXFE IRQ. It handles further processing after an ACK has been transmitted.

Parameters
trx_idId of the corresponding trx

References ack_transmitting, Assert, complete_rx_transaction(), continue_deferred_transmission(), FSK, RF_BASE_ADDR_OFFSET, RG_BBC0_FSKPLL, SR_BBC0_FSKC1_FSKPLH, switch_to_rx(), tal_pib, trx_bit_write(), trx_reg_write(), TX_DEFER, TX_IDLE, and tx_state.

Referenced by handle_tx_end_irq().

bool is_ack_valid ( trx_id_t  trx_id)

Checks if received ACK is an valid ACK frame.

Parameters
trx_idTransceiver identifier
Returns
true if ACK frame is valid, else false

References mac_frame_ptr, and rx_frm_info.

Referenced by handle_incoming_frame().

bool is_frame_an_ack ( trx_id_t  trx_id)

Checks if received frame is an ACK frame.

Parameters
trx_idTransceiver identifier
Returns
true if frame is an ACK frame, else false

References FCF1_FV_SHIFT, FCF_FRAME_VERSION_2006, FCF_FRAMETYPE_ACK, and rx_frm_info.

Referenced by handle_incoming_frame().

void start_ack_wait_timer ( trx_id_t  trx_id)