Microchip® Advanced Software Framework

prime/pal/atpl230_primemac13/source/pal.c File Reference

Physical Abstraction Layer.

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

#include <string.h>
#include "asf.h"
#include "conf_pal.h"

Functions

static uint8_t _pal_get_ex_snr (void)
 Get the extended signal noise ratio value. More...
 
static uint8_t _pal_get_qt (void)
 Calculates the QT value with the last message rx parameters. More...
 
static void pal_get_rx (void *pvParameters)
 Get result from reception. More...
 
static void pal_get_tx_result (void *pvParameters)
 Get result from transmission. More...
 
void pal_init (void)
 This function initiates PRIME PHY layer configuration and it must be implemented externally by the user. More...
 
void pal_process (void)
 This function runs the PAL layer process. More...
 
void pal_data_indication (uint8_t *puc_psdu, uint16_t *pus_len, uint8_t *puc_level, uint8_t *puc_scheme, uint32_t *pul_time)
 Check if a message has been received from PHY layer. More...
 
uint8_t pal_data_request (uint8_t *puc_mpdu, uint16_t us_len, uint8_t uc_level, uint8_t uc_scheme, uint32_t ul_time)
 Send message using standard PHY layer. More...
 
uint8_t pal_timer_get (uint32_t *pul_timer)
 Get timer. More...
 
uint8_t pal_cd_get (uint8_t *puc_cd, uint8_t *puc_rssi, uint32_t *pul_time, uint8_t *puc_header)
 Get carrier detect. More...
 
uint8_t pal_zct_get (uint32_t *pul_zct)
 Get zero-cross time. More...
 
uint8_t pal_agc_get (uint8_t *puc_mode, uint8_t *puc_gain)
 Get Automatic Gain Mode (AGC) More...
 
uint8_t pal_agc_set (uint8_t uc_mode, uint8_t uc_gain)
 Set Automatic Gain Mode (AGC) More...
 
uint8_t pal_nl_get (uint8_t *puc_noise)
 Get Noise Level (NL) More...
 
uint8_t pal_snr_get (uint8_t *puc_snr, uint8_t uc_qt)
 Get Signal Noise Ratio (SNR) More...
 
void pal_data_indication_ex (xPalMsgRx_t *px_msg)
 Check if a message has been received from PHY layer. More...
 
uint8_t pal_data_request_ex (xPalMsgTx_t *px_msg)
 Send message using PHY layer. More...
 
uint8_t pal_get_cfg_ex (uint16_t us_id, void *p_val, uint16_t uc_len)
 Get extended PHY layer parameter. More...
 
uint8_t pal_set_cfg_ex (uint16_t us_id, void *p_val, uint16_t uc_len)
 Set extended PHY layer parameter. More...
 
uint8_t pal_cmd_cfg_ex (uint16_t us_id, uint8_t uc_cmd, uint8_t uc_mask)
 Binary Command extended PHY layer parameter. More...
 

Variables

uint32_t l_tx_time
 
const uint32_t phyEvmThresholdEx []
 
static uint8_t uc_pal_crc_enable
 
static uint8_t uc_pal_data_buf_rx [PHY_MAX_PPDU_SIZE]
 
static uint8_t uc_rx_msg_flag
 
static uint8_t uc_tx_bcn_res_flag
 
uint8_t uc_tx_delay
 
uint8_t uc_tx_head_type
 
uint8_t uc_tx_level
 
static uint8_t uc_tx_res_flag
 
uint8_t uc_tx_scheme
 
static uint16_t ul_rx_bad_crc
 
static uint16_t ul_rx_false_positive
 
static xPhyMsgTxResult_t x_pal_bcn_tx_res
 
static xPhyMsgRx_t x_pal_rx_msg
 
static xPhyMsgTxResult_t x_pal_tx_res