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 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 BMM_BUFFER_POINTER, frame_info_tag::buffer_header, frame_info_tag::len_no_crc, frame_info_tag::mpdu, scale_ed_value(), tal_pib, and tal_rx_frame_cb().

Referenced by tal_task().

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, BMM_BUFFER_POINTER, ED_VAL_LEN, LARGE_BUFFER_SIZE, frame_info_tag::len_no_crc, LQI_LEN, frame_info_tag::mpdu, RF_BASE_ADDR_OFFSET, RG_BBC0_FBRXS, RG_BBC0_RXFLL, tal_pib, tal_rx_buffer, and trx_read().

Referenced by handle_rx_end_irq().

frame_info_t* rx_frm_info[NUM_TRX]

Referenced by is_ack_valid(), and is_frame_an_ack().