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... | |
|
static |
Callback function for ACK timeout.
This function is called if the ACK timeout timer fires.
parameter | Pointer 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.
trx_id | Id 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().
Checks if received ACK is an valid ACK frame.
trx_id | Transceiver identifier |
References mac_frame_ptr, and rx_frm_info.
Referenced by handle_incoming_frame().
Checks if received frame is an ACK frame.
trx_id | Transceiver identifier |
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 | ) |
Starts the timer to wait for an ACK reception.
trx_id | Id of the corresponding trx |
References ACK_FRAME_TYPE_ONLY, ack_timout_cb(), Assert, FUNC_PTR, MAC_SUCCESS, pal_timer_start(), RF09, RF_BASE_ADDR_OFFSET, RF_RX, RF_TRXOFF, RG_BBC0_AFFTM, RG_RF09_CMD, status, tal_pib, TAL_T_0, TAL_T_1, TIMEOUT_RELATIVE, trx_reg_write(), trx_state, tx_done_handling(), tx_state, and TX_WAITING_FOR_ACK.
Referenced by handle_tx_end_irq().