Microchip® Advanced Software Framework

at86rf232/inc/tal_internal.h File Reference

Copyright (c) 2013-2018 Microchip Technology Inc.

and its subsidiaries.

#include "bmm.h"
#include "qmm.h"
#include "tal_slotted_csma.h"
#include "mac_build_config.h"

Macros

#define PIN_ACK_OK_END()
 
#define PIN_ACK_OK_START()
 
#define PIN_ACK_WAITING_END()
 
#define PIN_ACK_WAITING_START()
 
#define PIN_BACKOFF_END()
 
#define PIN_BACKOFF_START()
 
#define PIN_BEACON_END()
 
#define PIN_BEACON_LOSS_TIMER_END()
 
#define PIN_BEACON_LOSS_TIMER_START()
 
#define PIN_BEACON_START()
 
#define PIN_CCA_END()
 
#define PIN_CCA_START()
 
#define PIN_CSMA_END()
 
#define PIN_CSMA_START()
 
#define PIN_NO_ACK_END()
 
#define PIN_NO_ACK_START()
 
#define PIN_TX_END()
 
#define PIN_TX_START()
 
#define PIN_WAITING_FOR_BEACON_END()
 
#define PIN_WAITING_FOR_BEACON_START()
 
#define TAL_PSDU_US_PER_OCTET(octets)   ((uint16_t)(octets) * 32)
 Conversion of number of PSDU octets to duration in microseconds. More...
 
#define TRX_IRQ_DEFAULT   TRX_IRQ_3_TRX_END | TRX_IRQ_2_RX_START
 

Typedefs

typedef enum tal_state_tag tal_state_t
 TAL states. More...
 

Enumerations

enum  tal_state_tag {
  TAL_IDLE = 0,
  TAL_TX_AUTO = 1,
  TAL_TX_DONE = 2,
  TAL_SLOTTED_CSMA = 3,
  TAL_IDLE = 0,
  TAL_TX_AUTO = 1,
  TAL_TX_DONE = 2,
  TAL_SLOTTED_CSMA = 3,
  TAL_IDLE,
  TAL_SLEEP,
  TAL_RESET,
  TAL_WAKING_UP,
  TAL_TX,
  TAL_ED_SCAN,
  TAL_TFA_CW_RX,
  TAL_TFA_CW,
  TAL_TFA_CCA,
  TAL_IDLE = 0,
  TAL_TX_AUTO = 1,
  TAL_TX_DONE = 2,
  TAL_SLOTTED_CSMA = 3,
  TAL_IDLE = 0,
  TAL_TX_AUTO = 1,
  TAL_TX_DONE = 2,
  TAL_SLOTTED_CSMA = 3,
  TAL_IDLE = 0,
  TAL_TX_AUTO = 1,
  TAL_TX_DONE = 2,
  TAL_SLOTTED_CSMA = 3
}
 TAL states. More...
 

Functions

tal_trx_status_t set_trx_state (trx_cmd_t trx_cmd)
 Sets transceiver state. More...
 

Variables

uint8_t last_frame_length
 
frame_info_tmac_frame_ptr
 Frame pointer for the frame structure provided by the MCL. More...
 
volatile bool tal_awake_end_flag
 
csma_state_t tal_csma_state
 CSMA state machine variable. More...
 
uint8_t * tal_frame_to_tx
 Pointer to the 15.4 frame created by the TAL to be handed over to the transceiver. More...
 
queue_t tal_incoming_frame_queue
 Queue that contains all frames that are uploaded from the trx, but have not be processed by the MCL yet. More...
 
buffer_t * tal_rx_buffer
 Pointer to receive buffer that can be used to upload a frame from the trx. More...
 
bool tal_rx_on_required
 Indicates if the transceiver needs to switch on its receiver by tal_task(), because it could not be switched on due to buffer shortage. More...
 
tal_state_t tal_state
 Current state of the TAL state machine. More...
 
uint32_t tal_timestamp
 Timestamp The timestamping is only required for beaconing networks or if timestamping is explicitly enabled. More...
 
tal_trx_status_t tal_trx_status
 Current state of the transceiver. More...
 

#define PIN_ACK_OK_END ( )
#define PIN_ACK_OK_START ( )
#define PIN_ACK_WAITING_END ( )
#define PIN_ACK_WAITING_START ( )
#define PIN_BACKOFF_END ( )
#define PIN_BACKOFF_START ( )
#define PIN_BEACON_END ( )
#define PIN_BEACON_LOSS_TIMER_END ( )
#define PIN_BEACON_LOSS_TIMER_START ( )
#define PIN_BEACON_START ( )
#define PIN_CCA_END ( )
#define PIN_CCA_START ( )
#define PIN_CSMA_END ( )
#define PIN_CSMA_START ( )
#define PIN_NO_ACK_END ( )
#define PIN_NO_ACK_START ( )
#define PIN_TX_END ( )
#define PIN_TX_START ( )
#define PIN_WAITING_FOR_BEACON_END ( )
#define PIN_WAITING_FOR_BEACON_START ( )
#define TAL_PSDU_US_PER_OCTET (   octets)    ((uint16_t)(octets) * 32)

Conversion of number of PSDU octets to duration in microseconds.

#define TRX_IRQ_DEFAULT   TRX_IRQ_3_TRX_END | TRX_IRQ_2_RX_START

typedef enum tal_state_tag tal_state_t

TAL states.

TAL states.

Enumerator
TAL_IDLE 
TAL_TX_AUTO 
TAL_TX_DONE 
TAL_SLOTTED_CSMA 
TAL_IDLE 
TAL_TX_AUTO 
TAL_TX_DONE 
TAL_SLOTTED_CSMA 
TAL_IDLE 
TAL_SLEEP 
TAL_RESET 
TAL_WAKING_UP 
TAL_TX 
TAL_ED_SCAN 
TAL_TFA_CW_RX 
TAL_TFA_CW 
TAL_TFA_CCA 
TAL_IDLE 
TAL_TX_AUTO 
TAL_TX_DONE 
TAL_SLOTTED_CSMA 
TAL_IDLE 
TAL_TX_AUTO 
TAL_TX_DONE 
TAL_SLOTTED_CSMA 
TAL_IDLE 
TAL_TX_AUTO 
TAL_TX_DONE 
TAL_SLOTTED_CSMA 

uint8_t last_frame_length
frame_info_t* mac_frame_ptr

Frame pointer for the frame structure provided by the MCL.

Referenced by calculate_transaction_duration(), handle_tx_end_irq(), is_ack_valid(), tal_tx_frame(), transmit_frame(), tx_done(), and tx_done_handling().

volatile bool tal_awake_end_flag
uint8_t* tal_frame_to_tx

Pointer to the 15.4 frame created by the TAL to be handed over to the transceiver.

Referenced by calculate_transaction_duration(), send_frame(), tal_tx_frame(), and tx_done_handling().

queue_t tal_incoming_frame_queue

Queue that contains all frames that are uploaded from the trx, but have not be processed by the MCL yet.

Referenced by cleanup_tal(), complete_rx_transaction(), handle_received_frame_irq(), init_after_disconnect(), mac_ready_to_sleep(), tal_init(), tal_reset(), and tal_task().

buffer_t* tal_rx_buffer
uint32_t tal_timestamp

Timestamp The timestamping is only required for beaconing networks or if timestamping is explicitly enabled.

Referenced by handle_received_frame_irq(), handle_tx_end_irq(), and trx_irq_handler_cb().