Microchip® Advanced Software Framework

tal_tx.c File Reference

This file handles the frame transmission within the TAL.

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

#include <stdint.h>
#include <string.h>
#include <stdbool.h>
#include "pal.h"
#include "return_val.h"
#include "tal.h"
#include "ieee_const.h"
#include "tal_pib.h"
#include "tal_irq_handler.h"
#include "tal_constants.h"
#include "tal_tx.h"
#include "stack_config.h"
#include "bmm.h"
#include "qmm.h"
#include "tal_rx.h"
#include "tal_internal.h"
#include "at86rf212b.h"
#include "mac_build_config.h"

Functions

void handle_tx_end_irq (bool underrun_occured)
 Handles interrupts issued due to end of transmission. More...
 
void send_frame (csma_mode_t csma_mode, bool tx_retries)
 Sends frame using trx features to handle CSMA and re-transmissions. More...
 
retval_t tal_tx_frame (frame_info_t *tx_frame, csma_mode_t csma_mode, bool perform_frame_retry)
 Requests to TAL to transmit frame. More...
 
void tx_done_handling (void)
 Implements the handling of the transmission end. More...
 

Variables

static trx_trac_status_t trx_trac_status
 

retval_t tal_tx_frame ( frame_info_t tx_frame,
csma_mode_t  csma_mode,
bool  perform_frame_retry 
)

Requests to TAL to transmit frame.

This function is called by the MAC to deliver a frame to the TAL to be transmitted by the transceiver.

Parameters
tx_framePointer to the frame_info_t structure or to frame array to be transmitted
csma_modeIndicates mode of csma-ca to be performed for this frame
perform_frame_retryIndicates whether to retries are to be performed for this frame
Returns
MAC_SUCCESS if the TAL has accepted the data from the MAC for frame transmission TAL_BUSY if the TAL is busy servicing the previous MAC request

References aUnitBackoffPeriod, CSMA_SLOTTED, last_frame_length, MAC_CHANNEL_ACCESS_FAILURE, mac_frame_ptr, MAC_INVALID_PARAMETER, MAC_SUCCESS, frame_info_tag::mpdu, NO_CSMA_WITH_IFS, NON_BEACON_NWK, pal_get_current_time(), send_frame(), tal_add_time_symbols(), TAL_BUSY, TAL_CONVERT_US_TO_SYMBOLS, tal_frame_to_tx, TAL_GET_BEACON_INTERVAL_TIME, TAL_IDLE, tal_pib, tal_state, and tal_sub_time_symbols().

Referenced by mac_awake_disassociate(), mac_build_and_tx_beacon(), mac_build_and_tx_data_req(), mac_handle_tx_null_data_frame(), mac_process_data_request(), mac_tx_coord_realignment_command(), mcps_data_request(), mlme_associate_request(), send_scan_cmd(), and tx_pan_id_conf_notif().

trx_trac_status_t trx_trac_status
static