Microchip® Advanced Software Framework

tal_auto_rx.c File Reference

This file implements function to handle received frames.

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

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

Functions

void complete_rx_transaction (trx_id_t trx_id)
 Completes Rx transaction. More...
 
static void handle_incoming_frame (trx_id_t trx_id)
 Handles incoming frame from transceiver. More...
 
void handle_rx_end_irq (trx_id_t trx_id)
 Handle received frame interrupt. More...
 
void process_incoming_frame (trx_id_t trx_id, buffer_t *buf_ptr)
 Parses received frame and create the frame_info_t structure. More...
 
static bool upload_frame (trx_id_t trx_id)
 Parses received frame and create the frame_info_t structure. More...
 

Variables

frame_info_trx_frm_info [NUM_TRX]
 

void complete_rx_transaction ( trx_id_t  trx_id)

Completes Rx transaction.

Parameters
trx_idTransceiver identifier

References frame_info_tag::mpdu, NULL, RF_BASE_ADDR_OFFSET, RG_RF09_EDV, tal_incoming_frame_queue, tal_pib, tal_rx_buffer, and trx_reg_read().

Referenced by ack_transmission_done(), handle_incoming_frame(), and handle_rx_end_irq().

void handle_rx_end_irq ( trx_id_t  trx_id)
void process_incoming_frame ( trx_id_t  trx_id,
buffer_t *  buf_ptr 
)

Parses received frame and create the frame_info_t structure.

This function parses the received frame and creates the frame_info_t structure to be sent to the MAC as a parameter of tal_rx_frame_cb().

Parameters
trx_idTransceiver identifier
buf_ptrPointer to the buffer containing the received frame

References frame_info_tag::buffer_header, frame_info_tag::mpdu, scale_ed_value(), tal_pib, and tal_rx_frame_cb().

static bool upload_frame ( trx_id_t  trx_id)
static

Parses received frame and create the frame_info_t structure.

This function parses the received frame and creates the frame_info_t structure to be sent to the MAC as a parameter of tal_rx_frame_cb().

Parameters
trx_idTransceiver identifier

References Assert, BB_RX_FRM_BUF_OFFSET, ED_VAL_LEN, fs_tstamp, LQI_LEN, frame_info_tag::mpdu, NULL, RF_BASE_ADDR_OFFSET, RG_BBC0_FBRXS, RG_BBC0_RXFLL, tal_pib, tal_rx_buffer, and frame_info_tag::time_stamp.

Referenced by handle_rx_end_irq().

frame_info_t* rx_frm_info[NUM_TRX]

Referenced by is_ack_valid(), and is_frame_an_ack().