This file handles the PHY configuration.
Copyright (c) 2015-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 "tal_config.h"
#include "ieee_const.h"
#include "tal_pib.h"
#include "tal_internal.h"
#include "ieee_154g.h"
Functions | |
static retval_t | conf_fsk (trx_id_t trx_id) |
Configures FSK. More... | |
static retval_t | conf_leg_oqpsk (trx_id_t trx_id) |
Configures legacy O-QPSK. More... | |
static retval_t | conf_ofdm (trx_id_t trx_id) |
Configures MR-OFDM. More... | |
static retval_t | conf_oqpsk (trx_id_t trx_id) |
Configures MR-OQPSK. More... | |
retval_t | conf_trx_modulation (trx_id_t trx_id) |
Configure the transceiver w.r.t. More... | |
void | config_fsk_rpc (trx_id_t trx_id, fsk_sym_rate_t sym_rate) |
Configures reduced power consumption for FSK. More... | |
void | set_sfd (trx_id_t trx_id) |
Configures SFDs. More... | |
Configures FSK.
trx_id | Transceiver identifier |
References BB_MRFSK, config_fsk_rpc(), fsk_rfcfg(), MAC_SUCCESS, RF_BASE_ADDR_OFFSET, set_sfd(), SR_BBC0_FSKC0_BT, SR_BBC0_FSKC0_MIDX, SR_BBC0_FSKC0_MORD, SR_BBC0_FSKC1_SRATE, SR_BBC0_PC_PT, status, tal_pib, and trx_bit_write().
Referenced by conf_trx_modulation().
Configures legacy O-QPSK.
trx_id | Transceiver identifier |
References BB_MROQPSK, MAC_SUCCESS, oqpsk_rfcfg(), RF_BASE_ADDR_OFFSET, SR_BBC0_OQPSKC0_FCHIP, SR_BBC0_OQPSKC2_RXM, SR_BBC0_OQPSKPHRTX_LEG, SR_BBC0_PC_PT, status, tal_pib, and trx_bit_write().
Referenced by conf_trx_modulation().
Configures MR-OFDM.
trx_id | Transceiver identifier |
References BB_MROFDM, MAC_SUCCESS, ofdm_rfcfg(), RF_BASE_ADDR_OFFSET, SR_BBC0_OFDMC_OPT, SR_BBC0_PC_PT, status, tal_pib, and trx_bit_write().
Referenced by conf_trx_modulation().
Configures MR-OQPSK.
trx_id | Transceiver identifier |
References BB_MROQPSK, MAC_SUCCESS, oqpsk_rfcfg(), RF_BASE_ADDR_OFFSET, SR_BBC0_OQPSKC0_FCHIP, SR_BBC0_OQPSKC2_RPC, SR_BBC0_OQPSKC2_RXM, SR_BBC0_OQPSKPHRTX_LEG, SR_BBC0_PC_PT, status, tal_pib, and trx_bit_write().
Referenced by conf_trx_modulation().
Configure the transceiver w.r.t.
modulation
trx_id | Transceiver identifier |
References BB_IRQ_AGCH, BB_IRQ_AGCR, BB_IRQ_RXFS, conf_fsk(), conf_leg_oqpsk(), conf_ofdm(), conf_oqpsk(), DEFAULT_TX_PWR_REG, FSK, LEG_OQPSK, MAC_INVALID_PARAMETER, OFDM, OQPSK, RF_BASE_ADDR_OFFSET, RF_RX, RF_TRXOFF, RF_TXPREP, RG_BBC0_IRQM, RG_RF09_CMD, RG_RF09_STATE, start_rpc(), status, stop_rpc(), switch_to_rx(), switch_to_txprep(), tal_pib, trx_reg_read(), trx_reg_write(), and trx_state.
Referenced by config_phy(), and tal_pib_set().
void config_fsk_rpc | ( | trx_id_t | trx_id, |
fsk_sym_rate_t | sym_rate | ||
) |
Configures reduced power consumption for FSK.
trx_id | Transceiver identifier |
sym_rate | Symbol rate |
References FSK_SYM_RATE_100, FSK_SYM_RATE_150, FSK_SYM_RATE_200, FSK_SYM_RATE_300, FSK_SYM_RATE_400, FSK_SYM_RATE_50, RF_BASE_ADDR_OFFSET, RG_BBC0_FSKPLL, RG_BBC0_FSKRPC, SR_BBC0_FSKC1_FSKPLH, SR_BBC0_FSKC2_PDTM, SR_BBC0_FSKRPC_EN, tal_pib, trx_bit_write(), and trx_reg_write().
Referenced by conf_fsk(), and tal_pib_set().
void set_sfd | ( | trx_id_t | trx_id | ) |
Configures SFDs.
trx_id | Transceiver identifier |
References F2FSK_SFD_0_CODED, F2FSK_SFD_0_UNCODED, F2FSK_SFD_1_CODED, F2FSK_SFD_1_UNCODED, RF_BASE_ADDR_OFFSET, RG_BBC0_FSKSFD0L, and tal_pib.
Referenced by conf_fsk(), and tal_pib_set().