Microchip® Advanced Software Framework

tal_4g_utils.c File Reference

This file supports the TAL PIB attributes by providing 4g specific information.

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 "ieee_const.h"
#include "tal_config.h"
#include "tal_pib.h"
#include "tal_internal.h"
#include "ieee_154g.h"

Macros

#define CCA_OFFSET   10
 
#define CH_SPAC_FSK_MOD_1   200000 /* Hz */
 
#define CH_SPAC_FSK_MOD_2   400000 /* Hz */
 
#define CH_SPAC_FSK_MOD_3   400000 /* Hz */
 
#define CH_SPAC_FSK_MOD_4   600000 /* Hz */
 
#define CH_SPAC_FSK_TABLE
 
#define CH_SPAC_OFDM_OPT_1   1200000 /* Hz */
 
#define CH_SPAC_OFDM_OPT_2   800000 /* Hz */
 
#define CH_SPAC_OFDM_OPT_3   400000 /* Hz */
 
#define CH_SPAC_OFDM_OPT_4   200000 /* Hz */
 
#define CH_SPAC_OFDM_TABLE
 
#define FK_CCA_THRES_FEC_OFFSET   6 /* dBm */
 
#define FPGA_CCA_THRES_VALUE   -105
 
#define FSK_CCA_THRES_100_KBIT   (-88 + CCA_OFFSET) /* dBm */
 
#define FSK_CCA_THRES_150_KBIT   (-86 + CCA_OFFSET) /* dBm */
 
#define FSK_CCA_THRES_200_KBIT   (-85 + CCA_OFFSET) /* dBm */
 
#define FSK_CCA_THRES_300_KBIT   (-83 + CCA_OFFSET) /* dBm */
 
#define FSK_CCA_THRES_400_KBIT   (-82 + CCA_OFFSET) /* dBm */
 
#define FSK_CCA_THRES_50_KBIT   (-91 + CCA_OFFSET) /* dBm */
 
#define FSK_CCA_THRES_DATA_TYPE   int8_t
 
#define FSK_CCA_THRES_TABLE
 
#define FSK_CCA_THRES_TABLE_SIZE   6
 
#define FSK_CH_CENTER_FREQ0_MAP
 
#define FSK_CH_CENTER_FREQ0_MAP_COL_SIZE   5
 
#define FSK_CH_CENTER_FREQ0_MAP_ROW_SIZE   7
 
#define FSK_PROCESSING_DELAY_ACK_TABLE_DATA_TYPE   uint8_t
 
#define FSK_PROCESSING_DELAY_ACK_TABLE_ROW_SIZE   6
 
#define FSK_PROCESSING_DELAY_ACK_TIMING
 
#define FSK_PROCESSING_DELAY_ACK_TIMING_AUTO_MODES
 
#define FSK_SYM_RATE_TABLE
 
#define FSK_SYM_RATE_TABLE_DATA_TYPE   uint8_t
 
#define FSK_SYM_RATE_TABLE_SIZE   6
 
#define FSK_TOTAL_CHANNELS_MAP
 
#define FSK_TOTAL_CHANNELS_MAP_COL_SIZE   5
 
#define FSK_TOTAL_CHANNELS_MAP_ROW_SIZE   7
 
#define LEG_OQPSK_CH_CENTER_FREQ0_MAP
 
#define LEG_OQPSK_CH_CENTER_FREQ0_MAP_COL_SIZE   3
 
#define LEG_OQPSK_CH_CENTER_FREQ0_MAP_ROW_SIZE   3
 
#define OFDM_CCA_THRES_TABLE
 
#define OFDM_CCA_THRES_TABLE_COL_SIZE   4
 
#define OFDM_CCA_THRES_TABLE_DATA_TYPE   int8_t
 
#define OFDM_CCA_THRES_TABLE_ROW_SIZE   7
 
#define OFDM_CH_CENTER_FREQ0_MAP
 
#define OFDM_CH_CENTER_FREQ0_MAP_COL_SIZE   5
 
#define OFDM_CH_CENTER_FREQ0_MAP_ROW_SIZE   7
 
#define OFDM_DATA_RATE_TABLE
 
#define OFDM_DATA_RATE_TABLE_COL_SIZE   4
 
#define OFDM_DATA_RATE_TABLE_DATA_TYPE   uint16_t
 
#define OFDM_DATA_RATE_TABLE_ROW_SIZE   7
 
#define OFDM_PROCESSING_DELAY_ACK_TIMING_TABLE
 
#define OFDM_PROCESSING_DELAY_ACK_TIMING_TABLE_COL_SIZE   4
 
#define OFDM_PROCESSING_DELAY_ACK_TIMING_TABLE_DATA_TYPE   uint8_t
 
#define OFDM_PROCESSING_DELAY_ACK_TIMING_TABLE_ROW_SIZE   7
 
#define OFDM_TOTAL_CHANNELS_MAP
 
#define OFDM_TOTAL_CHANNELS_MAP_COL_SIZE   5
 
#define OFDM_TOTAL_CHANNELS_MAP_ROW_SIZE   7
 
#define OQPSK_ACK_TIMING_OFFSET_TABLE
 
#define OQPSK_ACK_TIMING_OFFSET_TABLE_DATA_TYPE   uint8_t
 
#define OQPSK_ACK_TIMING_OFFSET_TABLE_SIZE   4
 
#define OQPSK_CCA_DURATION_TABLE
 
#define OQPSK_CCA_DURATION_TABLE_DATA_TYPE   uint8_t
 
#define OQPSK_CCA_DURATION_TABLE_SIZE   4
 
#define OQPSK_CCA_THRES   (-90) /* dBm */
 
#define OQPSK_CH_CENTER_FREQ0_MAP
 
#define OQPSK_CH_CENTER_FREQ0_MAP_COL_SIZE   3
 
#define OQPSK_CH_CENTER_FREQ0_MAP_ROW_SIZE   7
 
#define OQPSK_CH_SPAC_TABLE
 
#define OQPSK_CH_SPAC_TABLE_COL_SIZE   2
 
#define OQPSK_CH_SPAC_TABLE_DATA_TYPE   uint32_t
 
#define OQPSK_CH_SPAC_TABLE_ROW_SIZE   7
 
#define OQPSK_CHIP_RATE_FREQ_TABLE
 
#define OQPSK_CHIP_RATE_FREQ_TABLE_COL_SIZE   2
 
#define OQPSK_CHIP_RATE_FREQ_TABLE_DATA_TYPE   uint16_t
 
#define OQPSK_CHIP_RATE_FREQ_TABLE_ROW_SIZE   7
 
#define OQPSK_CHIP_RATE_TABLE
 
#define OQPSK_CHIP_RATE_TABLE_DATA_TYPE   uint8_t
 
#define OQPSK_CHIP_RATE_TABLE_SIZE   4
 
#define OQPSK_EU_863_FREQ_TABLE   868300000, 868950000, 869525000
 
#define OQPSK_EU_863_FREQ_TABLE_DATA_TYPE   uint32_t
 
#define OQPSK_EU_863_FREQ_TABLE_SIZE   3
 
#define OQPSK_SHR_DURATION_TABLE
 
#define OQPSK_SHR_DURATION_TABLE_DATA_TYPE   uint8_t
 
#define OQPSK_SHR_DURATION_TABLE_SIZE   4
 
#define OQPSK_SYMBOL_DURATION_TABLE
 
#define OQPSK_SYMBOL_DURATION_TABLE_DATA_TYPE   uint16_t
 
#define OQPSK_SYMBOL_DURATION_TABLE_SIZE   4
 
#define OQPSK_SYMBOL_LENGTH_TABLE
 
#define OQPSK_SYMBOL_LENGTH_TABLE_DATA_TYPE   uint8_t
 
#define OQPSK_SYMBOL_LENGTH_TABLE_SIZE   4
 
#define OQPSK_TOTAL_CHANNELS_MAP
 
#define OQPSK_TOTAL_CHANNELS_MAP_COL_SIZE   2
 
#define OQPSK_TOTAL_CHANNELS_MAP_ROW_SIZE   7
 

Functions

uint16_t calculate_cca_duration_us (trx_id_t trx_id)
 Gets CCA duration. More...
 
uint16_t ceiling_sym (trx_id_t trx_id, uint16_t duration_us)
 Implements the ceiling function for symbols. More...
 
 FLASH_DECLARE (OQPSK_SYMBOL_DURATION_TABLE_DATA_TYPE oqpsk_sym_duration_table[OQPSK_SYMBOL_DURATION_TABLE_SIZE])
 
 FLASH_DECLARE (OQPSK_CCA_DURATION_TABLE_DATA_TYPE oqpsk_cca_dur_table[OQPSK_CCA_DURATION_TABLE_SIZE])
 
 FLASH_DECLARE (OQPSK_SHR_DURATION_TABLE_DATA_TYPE oqpsk_shr_duration_table[OQPSK_SHR_DURATION_TABLE_SIZE])
 
 FLASH_DECLARE (OQPSK_SYMBOL_LENGTH_TABLE_DATA_TYPE oqpsk_sym_len_table[OQPSK_SYMBOL_LENGTH_TABLE_SIZE])
 
 FLASH_DECLARE (OQPSK_CHIP_RATE_TABLE_DATA_TYPE oqpsk_chip_rate_table[OQPSK_CHIP_RATE_TABLE_SIZE])
 
 FLASH_DECLARE (OQPSK_ACK_TIMING_OFFSET_TABLE_DATA_TYPE oqpsk_ack_timing_offset_table[OQPSK_ACK_TIMING_OFFSET_TABLE_SIZE])
 
 FLASH_DECLARE (uint32_t oqpsk_freq0_map[OQPSK_CH_CENTER_FREQ0_MAP_ROW_SIZE][OQPSK_CH_CENTER_FREQ0_MAP_COL_SIZE])
 
 FLASH_DECLARE (uint32_t leg_oqpsk_freq0_map[LEG_OQPSK_CH_CENTER_FREQ0_MAP_ROW_SIZE][LEG_OQPSK_CH_CENTER_FREQ0_MAP_COL_SIZE])
 
 FLASH_DECLARE (OQPSK_CH_SPAC_TABLE_DATA_TYPE oqpsk_ch_spac_table[OQPSK_CH_SPAC_TABLE_ROW_SIZE][OQPSK_CH_SPAC_TABLE_COL_SIZE])
 
 FLASH_DECLARE (uint32_t oqpsk_max_ch_map[OQPSK_TOTAL_CHANNELS_MAP_ROW_SIZE][OQPSK_TOTAL_CHANNELS_MAP_COL_SIZE])
 
 FLASH_DECLARE (OQPSK_CHIP_RATE_FREQ_TABLE_DATA_TYPE oqpsk_chip_rate_freq_table[OQPSK_CHIP_RATE_FREQ_TABLE_ROW_SIZE][OQPSK_CHIP_RATE_FREQ_TABLE_COL_SIZE])
 
 FLASH_DECLARE (uint32_t ofdm_freq0_map[OFDM_CH_CENTER_FREQ0_MAP_ROW_SIZE][OFDM_CH_CENTER_FREQ0_MAP_COL_SIZE])
 
 FLASH_DECLARE (uint32_t ofdm_max_ch_map[OFDM_TOTAL_CHANNELS_MAP_ROW_SIZE][OFDM_TOTAL_CHANNELS_MAP_COL_SIZE])
 
 FLASH_DECLARE (uint32_t ofdm_ch_spacing_table[]) = { CH_SPAC_FSK_TABLE }
 
 FLASH_DECLARE (OFDM_CCA_THRES_TABLE_DATA_TYPE ofdm_cca_thres[OFDM_CCA_THRES_TABLE_ROW_SIZE][OFDM_CCA_THRES_TABLE_COL_SIZE])
 
 FLASH_DECLARE (OFDM_DATA_RATE_TABLE_DATA_TYPE ofdm_data_rate_table[OFDM_DATA_RATE_TABLE_ROW_SIZE][OFDM_DATA_RATE_TABLE_COL_SIZE])
 
 FLASH_DECLARE (OFDM_PROCESSING_DELAY_ACK_TIMING_TABLE_DATA_TYPE ofdm_processing_delay_ack_timing[OFDM_PROCESSING_DELAY_ACK_TIMING_TABLE_COL_SIZE][OFDM_PROCESSING_DELAY_ACK_TIMING_TABLE_ROW_SIZE])
 
 FLASH_DECLARE (uint32_t fsk_freq0_map[FSK_CH_CENTER_FREQ0_MAP_ROW_SIZE][FSK_CH_CENTER_FREQ0_MAP_COL_SIZE])
 
 FLASH_DECLARE (uint32_t fsk_max_ch_map[FSK_TOTAL_CHANNELS_MAP_ROW_SIZE][FSK_TOTAL_CHANNELS_MAP_COL_SIZE])
 
 FLASH_DECLARE (FSK_SYM_RATE_TABLE_DATA_TYPE fsk_sym_rate_table[FSK_SYM_RATE_TABLE_SIZE])
 
 FLASH_DECLARE (FSK_CCA_THRES_DATA_TYPE fsk_cca_thres_table[FSK_CCA_THRES_TABLE_SIZE])
 
 FLASH_DECLARE (FSK_PROCESSING_DELAY_ACK_TABLE_DATA_TYPE fsk_processing_delay_ack_timing[FSK_PROCESSING_DELAY_ACK_TABLE_ROW_SIZE])
 
uint16_t get_AckTiming_us (trx_id_t trx_id)
 Gets the ACK timing in us. More...
 
uint16_t get_AckWaitDuration_us (trx_id_t trx_id)
 Gets the AckWaitDuration in us. More...
 
uint16_t get_cca_duration_us (trx_id_t trx_id)
 Gets the CCA duration in us. More...
 
int8_t get_cca_thres (trx_id_t trx_id)
 Gets the CCA threshold. More...
 
float get_data_rate (trx_id_t trx_id)
 Gets PSDU data rate. More...
 
void get_fsk_freq_f0 (trx_id_t trx_id, sun_freq_band_t freq_band, fsk_op_mode_t option, uint32_t *freq, uint32_t *spacing)
 Gets the FSK center frequency F0. More...
 
void get_leg_oqpsk_freq_f0 (trx_id_t trx_id, sun_freq_band_t freq_band, uint32_t *freq, uint32_t *spacing)
 Gets the Legacy OQPSK center frequency F0. More...
 
void get_ofdm_freq_f0 (trx_id_t trx_id, sun_freq_band_t freq_band, ofdm_option_t option, uint32_t *freq, uint32_t *spacing)
 Gets the OFDM center frequency F0. More...
 
oqpsk_chip_rate_t get_oqpsk_chip_rate (trx_id_t trx_id, sun_freq_band_t freq_band)
 Gets the OQPSK Chiprate. More...
 
void get_oqpsk_freq_f0 (trx_id_t trx_id, sun_freq_band_t freq_band, uint32_t *freq, uint32_t *spacing)
 Gets the OQPSK center frequency F0. More...
 
uint16_t get_sun_max_ch_no (trx_id_t trx_id)
 Gets Maximum no of channel supported by each modulation. More...
 
retval_t get_supported_channels_tuple (trx_id_t trx_id, uint32_t *value)
 Gets ACK duration. More...
 
static uint16_t oqpsk_ack_psdu_duration_sym (trx_id_t trx_id)
 Gets the PSDU duration for MR-OQPSK. More...
 
static uint16_t oqpsk_get_chip_rate (trx_id_t trx_id)
 Gets the MR-OQPSK chip rate. More...
 
static uint8_t oqpsk_spreading (oqpsk_chip_rate_t chip_rate, oqpsk_rate_mode_t rate_mode)
 Gets the MR-OQPSK spreading. More...
 
uint8_t phr_duration_sym (trx_id_t trx_id)
 Gets the PHR duration. More...
 
uint8_t shr_duration_sym (trx_id_t trx_id)
 Gets the SHR duration. More...
 
uint16_t tal_get_symbol_duration_us (trx_id_t trx_id)
 Gets the symbol duration in us. More...
 

#define CCA_OFFSET   10
#define CH_SPAC_FSK_MOD_1   200000 /* Hz */
#define CH_SPAC_FSK_MOD_2   400000 /* Hz */
#define CH_SPAC_FSK_MOD_3   400000 /* Hz */
#define CH_SPAC_FSK_MOD_4   600000 /* Hz */
#define CH_SPAC_FSK_TABLE
Value:
#define CH_SPAC_FSK_MOD_1
Definition: tal_4g_utils.c:166
#define CH_SPAC_FSK_MOD_3
Definition: tal_4g_utils.c:168
#define CH_SPAC_FSK_MOD_2
Definition: tal_4g_utils.c:167
#define CH_SPAC_FSK_MOD_4
Definition: tal_4g_utils.c:169
#define CH_SPAC_OFDM_OPT_1   1200000 /* Hz */
#define CH_SPAC_OFDM_OPT_2   800000 /* Hz */
#define CH_SPAC_OFDM_OPT_3   400000 /* Hz */
#define CH_SPAC_OFDM_OPT_4   200000 /* Hz */
#define CH_SPAC_OFDM_TABLE
Value:
#define CH_SPAC_OFDM_OPT_3
Definition: tal_4g_utils.c:175
#define CH_SPAC_OFDM_OPT_4
Definition: tal_4g_utils.c:176
#define CH_SPAC_OFDM_OPT_1
Definition: tal_4g_utils.c:173
#define CH_SPAC_OFDM_OPT_2
Definition: tal_4g_utils.c:174
#define FK_CCA_THRES_FEC_OFFSET   6 /* dBm */

Referenced by get_cca_thres().

#define FPGA_CCA_THRES_VALUE   -105
#define FSK_CCA_THRES_100_KBIT   (-88 + CCA_OFFSET) /* dBm */
#define FSK_CCA_THRES_150_KBIT   (-86 + CCA_OFFSET) /* dBm */
#define FSK_CCA_THRES_200_KBIT   (-85 + CCA_OFFSET) /* dBm */
#define FSK_CCA_THRES_300_KBIT   (-83 + CCA_OFFSET) /* dBm */
#define FSK_CCA_THRES_400_KBIT   (-82 + CCA_OFFSET) /* dBm */
#define FSK_CCA_THRES_50_KBIT   (-91 + CCA_OFFSET) /* dBm */
#define FSK_CCA_THRES_DATA_TYPE   int8_t
#define FSK_CCA_THRES_TABLE
Value:
#define FSK_CCA_THRES_300_KBIT
Definition: tal_4g_utils.c:112
#define FSK_CCA_THRES_100_KBIT
Definition: tal_4g_utils.c:109
#define FSK_CCA_THRES_200_KBIT
Definition: tal_4g_utils.c:111
#define FSK_CCA_THRES_50_KBIT
Definition: tal_4g_utils.c:108
#define FSK_CCA_THRES_150_KBIT
Definition: tal_4g_utils.c:110
#define FSK_CCA_THRES_400_KBIT
Definition: tal_4g_utils.c:113
#define FSK_CCA_THRES_TABLE_SIZE   6
#define FSK_CH_CENTER_FREQ0_MAP
Value:
/* EU_169 */ \
/* US_450 */ \
{ CHINA_470, 470020000, 470040000, 470020000, 0 }, \
{ CHINA_780, 779200000, 779400000, 779400000, 0 }, \
{ EU_863, 863125000, 863225000, 863225000, 0 }, \
/* US_896 */ \
/* US_901 */ \
{ US_915, 902200000, 902400000, 902400000, 0 }, \
{ KOREA_917, 917100000, 917300000, 917300000, 0 }, \
{ JAPAN_920, 920600000, 920900000, 920800000, 920800000 }, \
/* US_928 */ \
/* { JAPAN_950, 0, 951300000, 951100000, 951000000 }, */ \
/* US_1427 */ \
{ WORLD_2450, 2400200000UL, 2400400000UL, 2400400000UL, 0 }
Definition: ieee_154g.h:440
Definition: ieee_154g.h:442
Definition: ieee_154g.h:441
Definition: ieee_154g.h:446
Definition: ieee_154g.h:437
Definition: ieee_154g.h:436
Definition: ieee_154g.h:435
#define FSK_CH_CENTER_FREQ0_MAP_COL_SIZE   5
#define FSK_CH_CENTER_FREQ0_MAP_ROW_SIZE   7
#define FSK_PROCESSING_DELAY_ACK_TABLE_DATA_TYPE   uint8_t
#define FSK_PROCESSING_DELAY_ACK_TABLE_ROW_SIZE   6
#define FSK_PROCESSING_DELAY_ACK_TIMING
Value:
{ \
160, /* FSK_DATA_RATE_50 */ \
90, /* FSK_DATA_RATE_100 */ \
60, /* FSK_DATA_RATE_150 */ \
70, /* FSK_DATA_RATE_200 */ \
50, /* FSK_DATA_RATE_300 */ \
40 /* FSK_DATA_RATE_400 */ \
}
#define FSK_PROCESSING_DELAY_ACK_TIMING_AUTO_MODES
Value:
{ \
128, /* FSK_DATA_RATE_50 */ \
70, /* FSK_DATA_RATE_100 */ \
60, /* FSK_DATA_RATE_150 */ \
60, /* FSK_DATA_RATE_200 */ \
30, /* FSK_DATA_RATE_300 */ \
25 /* FSK_DATA_RATE_400 */ \
}
#define FSK_SYM_RATE_TABLE
Value:
{ \
5, /* FSK_SYM_RATE_50 */ \
10, /* FSK_SYM_RATE_100 */ \
15, /* FSK_SYM_RATE_150 */ \
20, /* FSK_SYM_RATE_200 */ \
30, /* FSK_SYM_RATE_300 */ \
40 /* FSK_SYM_RATE_400 */ \
}
#define FSK_SYM_RATE_TABLE_DATA_TYPE   uint8_t
#define FSK_SYM_RATE_TABLE_SIZE   6
#define FSK_TOTAL_CHANNELS_MAP
Value:
/* frequency band, opmode1 ,opmode2 ,opmode3 ,opmode4 total channels */ \
/* EU_169 */ \
/* US_450 */ \
{ CHINA_470, 199, 99, 99, 0 }, \
{ CHINA_780, 39, 19, 19, 0 }, \
{ EU_863, 34, 17, 17, 0 }, \
/* US_896 */ \
/* US_901 */ \
{ US_915, 129, 64, 64, 0 }, \
{ KOREA_917, 32, 16, 16, 0 }, \
{ JAPAN_920, 38, 18, 12, 12 }, \
/* US_928 */ \
/* { JAPAN_950, 951100000, 400000 }, */ \
/* US_1427 */ \
{ WORLD_2450, 416, 207, 207, 0 }
Definition: ieee_154g.h:440
Definition: ieee_154g.h:442
Definition: ieee_154g.h:441
Definition: ieee_154g.h:446
Definition: ieee_154g.h:437
Definition: ieee_154g.h:436
Definition: ieee_154g.h:435
#define FSK_TOTAL_CHANNELS_MAP_COL_SIZE   5
#define FSK_TOTAL_CHANNELS_MAP_ROW_SIZE   7
#define LEG_OQPSK_CH_CENTER_FREQ0_MAP
Value:
/* frequency band, channel center freq0, channel spacing */ \
/* EU_169 */ \
/* US_450 */ \
/* CHINA_470 */ \
{ CHINA_780, 780000000, 2000000 }, \
/*EU_863*/ \
/* US_896 */ \
/* US_901 */ \
{ US_915, 906000000, 2000000 }, \
/*KOREA_917*/ \
/* JAPAN_920*/ \
/* US_928 */ \
/* JAPAN_950 */ \
/* US_1427 */ \
{ WORLD_2450, 2405000000UL, 5000000 }
Definition: ieee_154g.h:440
Definition: ieee_154g.h:446
Definition: ieee_154g.h:436
#define LEG_OQPSK_CH_CENTER_FREQ0_MAP_COL_SIZE   3
#define LEG_OQPSK_CH_CENTER_FREQ0_MAP_ROW_SIZE   3

Referenced by get_leg_oqpsk_freq_f0().

#define OFDM_CCA_THRES_TABLE
Value:
/* rows: MCSn; column: option n */ \
{ (-103 + CCA_OFFSET), (-105 + CCA_OFFSET), (-105 + CCA_OFFSET), \
(-105 + CCA_OFFSET) }, \
{ (-100 + CCA_OFFSET), (-103 + CCA_OFFSET), (-105 + CCA_OFFSET), \
(-105 + CCA_OFFSET) }, \
{ (-97 + CCA_OFFSET), (-100 + CCA_OFFSET), (-103 + CCA_OFFSET), \
(-105 + CCA_OFFSET) }, \
{ (-94 + CCA_OFFSET), (-97 + CCA_OFFSET), (-100 + CCA_OFFSET), \
(-103 + CCA_OFFSET) }, \
{ (-91 + CCA_OFFSET), (-94 + CCA_OFFSET), (-97 + CCA_OFFSET), \
(-100 + CCA_OFFSET) }, \
{ (-88 + CCA_OFFSET), (-91 + CCA_OFFSET), (-94 + CCA_OFFSET), \
(-97 + CCA_OFFSET) }, \
{ (-85 + CCA_OFFSET), (-88 + CCA_OFFSET), (-91 + CCA_OFFSET), \
(-94 + CCA_OFFSET) }
#define CCA_OFFSET
Definition: tal_4g_utils.c:132
#define OFDM_CCA_THRES_TABLE_COL_SIZE   4
#define OFDM_CCA_THRES_TABLE_DATA_TYPE   int8_t
#define OFDM_CCA_THRES_TABLE_ROW_SIZE   7
#define OFDM_CH_CENTER_FREQ0_MAP
Value:
/* EU_169 */ \
/* US_450 */ \
{ CHINA_470, 0, 0, 0, 470020000 }, \
{ CHINA_780, 780200000, 779800000, 779400000, 779200000 }, \
{ EU_863, 863625000, 863425000, 863225000, 863125000 }, \
/* US_896 */ \
/* US_901 */ \
{ US_915, 903200000, 902800000, 902400000, 902200000 }, \
{ KOREA_917, 917900000, 917500000, 917300000, 917100000 }, \
{ JAPAN_920, 921200000, 920800000, 920400000, 920200000 }, \
/* US_928 */ \
/* { JAPAN_950, 0, 951300000, 951100000, 951000000 }, */ \
/* US_1427 */ \
{ WORLD_2450, 2401200000UL, 2400800000UL, 2400400000UL, 2400200000UL }
Definition: ieee_154g.h:440
Definition: ieee_154g.h:442
Definition: ieee_154g.h:441
Definition: ieee_154g.h:446
Definition: ieee_154g.h:437
Definition: ieee_154g.h:436
Definition: ieee_154g.h:435
#define OFDM_CH_CENTER_FREQ0_MAP_COL_SIZE   5
#define OFDM_CH_CENTER_FREQ0_MAP_ROW_SIZE   7
#define OFDM_DATA_RATE_TABLE
Value:
/* see table 148, pg. 80 */ \
/* OFDM option 1, OFDM option 2, OFDM option 3, OFDM option 4 */ \
/* row contains value for a MCS value */ \
/* MCS0: */ {100, 50, 25, 12}, \
/* MCS1: */ {200, 100, 50, 25}, \
/* MCS2: */ {400, 200, 100, 50}, \
/* MCS3: */ {800, 400, 200, 100}, \
/* MCS4: */ {1200, 600, 300, 150}, \
/* MCS5: */ {1600, 800, 400, 200}, \
/* MCS6: */ {2400, 1200, 600, 300}
#define OFDM_DATA_RATE_TABLE_COL_SIZE   4
#define OFDM_DATA_RATE_TABLE_DATA_TYPE   uint16_t
#define OFDM_DATA_RATE_TABLE_ROW_SIZE   7
#define OFDM_PROCESSING_DELAY_ACK_TIMING_TABLE
Value:
{ 120, 120, 110, 150, 80, 160, 140 }, /* Opt. 1 */ \
{ 15, 100, 150, 100, 80, 140, 55 }, /* Opt. 2 */ \
{ 0, 35, 100, 140, 120, 100, 75 }, /* Opt. 3 */ \
{ 130, 130, 130, 130, 140, 140, 100 } /* Opt. 4 */
#define OFDM_PROCESSING_DELAY_ACK_TIMING_TABLE_COL_SIZE   4
#define OFDM_PROCESSING_DELAY_ACK_TIMING_TABLE_DATA_TYPE   uint8_t
#define OFDM_PROCESSING_DELAY_ACK_TIMING_TABLE_ROW_SIZE   7
#define OFDM_TOTAL_CHANNELS_MAP
Value:
/* frequency band, op1 ,opt2 ,opt3 ,opt4total channels */ \
/* EU_169 */ \
/* US_450 */ \
{ CHINA_470, 0, 0, 0, 199 }, \
{ CHINA_780, 6, 9, 19, 39 }, \
{ EU_863, 5, 8, 17, 34 }, \
/* US_896 */ \
/* US_901 */ \
{ US_915, 20, 31, 64, 129 }, \
{ KOREA_917, 5, 8, 16, 32 }, \
{ JAPAN_920, 6, 9, 19, 39 }, \
/* US_928 */ \
/* { JAPAN_950, 951100000, 400000 }, */ \
/* US_1427 */ \
{ WORLD_2450, 64, 97, 207, 416 }
Definition: ieee_154g.h:440
Definition: ieee_154g.h:442
Definition: ieee_154g.h:441
Definition: ieee_154g.h:446
Definition: ieee_154g.h:437
Definition: ieee_154g.h:436
Definition: ieee_154g.h:435
#define OFDM_TOTAL_CHANNELS_MAP_COL_SIZE   5
#define OFDM_TOTAL_CHANNELS_MAP_ROW_SIZE   7
#define OQPSK_ACK_TIMING_OFFSET_TABLE
Value:
/* Offset for ACK timing depending on chip rate */ \
/* 100, 200, 1000, 2000 */ \
{ 90, 50, 25, 20 }
#define OQPSK_ACK_TIMING_OFFSET_TABLE_DATA_TYPE   uint8_t
#define OQPSK_ACK_TIMING_OFFSET_TABLE_SIZE   4
#define OQPSK_CCA_DURATION_TABLE
Value:
/* aCCATime in symbols depending von chip rate */ \
/* 100, 200, 1000, 2000 kchip */ \
{ 4, 4, 8, 8 }
#define OQPSK_CCA_DURATION_TABLE_DATA_TYPE   uint8_t
#define OQPSK_CCA_DURATION_TABLE_SIZE   4
#define OQPSK_CCA_THRES   (-90) /* dBm */

Referenced by get_cca_thres().

#define OQPSK_CH_CENTER_FREQ0_MAP
Value:
/* frequency band, channel center freq0, channel spacing */ \
/* EU_169 */ \
/* US_450 */ \
{ CHINA_470, 470040000, 400000 }, \
{ CHINA_780, 780000000, 2000000 }, \
{ EU_863, 868300000, 0 }, \
/* US_896 */ \
/* US_901 */ \
{ US_915, 904000000, 2000000 }, \
{ KOREA_917, 918100000, 2000000 }, \
{ JAPAN_920, 920600000, 200000 }, \
/* US_928 */ \
/* { JAPAN_950, 951100000, 400000 }, */ \
/* US_1427 */ \
{ WORLD_2450, 2405000000UL, 5000000 }
Definition: ieee_154g.h:440
Definition: ieee_154g.h:442
Definition: ieee_154g.h:441
Definition: ieee_154g.h:446
Definition: ieee_154g.h:437
Definition: ieee_154g.h:436
Definition: ieee_154g.h:435
#define OQPSK_CH_CENTER_FREQ0_MAP_COL_SIZE   3
#define OQPSK_CH_CENTER_FREQ0_MAP_ROW_SIZE   7
#define OQPSK_CH_SPAC_TABLE
Value:
/* EU_169 */ \
/* US_450 */ \
{ CHINA_470, 400000 }, \
{ CHINA_780, 2000000 }, \
{ EU_863, 0 }, \
/* US_896 */ \
/* US_901 */ \
{ US_915, 2000000 }, \
{ KOREA_917, 2000000 }, \
{ JAPAN_920, 200000 }, \
/* US_928 */ \
/* { JAPAN_950, 951000000, 951100000, 951200000, 951200000 }, */ \
/* US_1427 */ \
{ WORLD_2450, 5000000 }
Definition: ieee_154g.h:440
Definition: ieee_154g.h:442
Definition: ieee_154g.h:441
Definition: ieee_154g.h:446
Definition: ieee_154g.h:437
Definition: ieee_154g.h:436
Definition: ieee_154g.h:435
#define OQPSK_CH_SPAC_TABLE_COL_SIZE   2
#define OQPSK_CH_SPAC_TABLE_DATA_TYPE   uint32_t
#define OQPSK_CH_SPAC_TABLE_ROW_SIZE   7
#define OQPSK_CHIP_RATE_FREQ_TABLE
Value:
/* rows: freq band ; column: chip rate (kchip/s) */ \
/* EU_169 */ \
/* US_450 */ \
{ CHINA_470, 100 }, \
{ CHINA_780, 1000 }, \
{ EU_863, 100 }, \
/* US_896 */ \
/* US_901 */ \
{ US_915, 1000 }, \
{ KOREA_917, 1000 }, \
{ JAPAN_920, 100 }, \
/* US_928 */ \
/* { JAPAN_950, 320 }, */ \
/* US_1427 */ \
{ WORLD_2450, 2000 }
Definition: ieee_154g.h:440
Definition: ieee_154g.h:442
Definition: ieee_154g.h:441
Definition: ieee_154g.h:446
Definition: ieee_154g.h:437
Definition: ieee_154g.h:436
Definition: ieee_154g.h:435
#define OQPSK_CHIP_RATE_FREQ_TABLE_COL_SIZE   2
#define OQPSK_CHIP_RATE_FREQ_TABLE_DATA_TYPE   uint16_t
#define OQPSK_CHIP_RATE_FREQ_TABLE_ROW_SIZE   7

Referenced by get_oqpsk_chip_rate().

#define OQPSK_CHIP_RATE_TABLE
Value:
/* kbit * 10 */ \
{ 10, 20, 100, 200 }
#define OQPSK_CHIP_RATE_TABLE_DATA_TYPE   uint8_t
#define OQPSK_CHIP_RATE_TABLE_SIZE   4
#define OQPSK_EU_863_FREQ_TABLE   868300000, 868950000, 869525000
#define OQPSK_EU_863_FREQ_TABLE_DATA_TYPE   uint32_t
#define OQPSK_EU_863_FREQ_TABLE_SIZE   3
#define OQPSK_SHR_DURATION_TABLE
Value:
/* SHR duration depend of chip rate, shrDuration table 148, pg. 119 */ \
{ 48, 48, 72, 72 }
#define OQPSK_SHR_DURATION_TABLE_DATA_TYPE   uint8_t
#define OQPSK_SHR_DURATION_TABLE_SIZE   4
#define OQPSK_SYMBOL_DURATION_TABLE
Value:
/* symbol duration depends on chip rate */ \
{ 320, 160, 64, 64 }
#define OQPSK_SYMBOL_DURATION_TABLE_DATA_TYPE   uint16_t
#define OQPSK_SYMBOL_DURATION_TABLE_SIZE   4
#define OQPSK_SYMBOL_LENGTH_TABLE
Value:
/* symbol length in chips depends on chip rate */ \
/* 100, 200, 1000, 2000 kchip */ \
{ 32, 32, 64, 128 }
#define OQPSK_SYMBOL_LENGTH_TABLE_DATA_TYPE   uint8_t
#define OQPSK_SYMBOL_LENGTH_TABLE_SIZE   4
#define OQPSK_TOTAL_CHANNELS_MAP
Value:
/* frequency band, total channels */ \
/* EU_169 */ \
/* US_450 */ \
{ CHINA_470, 99 }, \
{ CHINA_780, 4 }, \
{ EU_863, 3 }, \
/* US_896 */ \
/* US_901 */ \
{ US_915, 12 }, \
{ KOREA_917, 3 }, \
{ JAPAN_920, 38 }, \
/* US_928 */ \
/* { JAPAN_950, 951100000, 400000 }, */ \
/* US_1427 */ \
{ WORLD_2450, 16 }
Definition: ieee_154g.h:440
Definition: ieee_154g.h:442
Definition: ieee_154g.h:441
Definition: ieee_154g.h:446
Definition: ieee_154g.h:437
Definition: ieee_154g.h:436
Definition: ieee_154g.h:435
#define OQPSK_TOTAL_CHANNELS_MAP_COL_SIZE   2
#define OQPSK_TOTAL_CHANNELS_MAP_ROW_SIZE   7

uint16_t calculate_cca_duration_us ( trx_id_t  trx_id)

Gets CCA duration.

Parameters
trx_idTransceiver identifier
Returns
CCA duration in us

References tal_pib.

Referenced by get_cca_duration_us(), and tal_pib_set().

uint16_t ceiling_sym ( trx_id_t  trx_id,
uint16_t  duration_us 
)

Implements the ceiling function for symbols.

Returns the smallest integer value in symbols greater or equal to its argument value see section 9.2, pg. 43

Parameters
trx_idTransceiver identifier
duration_usSymbol duration in us
Returns
Number of symbols

References tal_pib.

Referenced by get_AckTiming_us(), and get_AckWaitDuration_us().

FLASH_DECLARE ( OQPSK_SYMBOL_DURATION_TABLE_DATA_TYPE  oqpsk_sym_duration_table[OQPSK_SYMBOL_DURATION_TABLE_SIZE])
FLASH_DECLARE ( OQPSK_CCA_DURATION_TABLE_DATA_TYPE  oqpsk_cca_dur_table[OQPSK_CCA_DURATION_TABLE_SIZE])
FLASH_DECLARE ( OQPSK_SHR_DURATION_TABLE_DATA_TYPE  oqpsk_shr_duration_table[OQPSK_SHR_DURATION_TABLE_SIZE])
FLASH_DECLARE ( OQPSK_SYMBOL_LENGTH_TABLE_DATA_TYPE  oqpsk_sym_len_table[OQPSK_SYMBOL_LENGTH_TABLE_SIZE])
FLASH_DECLARE ( OQPSK_CHIP_RATE_TABLE_DATA_TYPE  oqpsk_chip_rate_table[OQPSK_CHIP_RATE_TABLE_SIZE])
FLASH_DECLARE ( OQPSK_ACK_TIMING_OFFSET_TABLE_DATA_TYPE  oqpsk_ack_timing_offset_table[OQPSK_ACK_TIMING_OFFSET_TABLE_SIZE])
FLASH_DECLARE ( uint32_t  oqpsk_freq0_map[OQPSK_CH_CENTER_FREQ0_MAP_ROW_SIZE][OQPSK_CH_CENTER_FREQ0_MAP_COL_SIZE])
FLASH_DECLARE ( uint32_t  leg_oqpsk_freq0_map[LEG_OQPSK_CH_CENTER_FREQ0_MAP_ROW_SIZE][LEG_OQPSK_CH_CENTER_FREQ0_MAP_COL_SIZE])
FLASH_DECLARE ( OQPSK_CH_SPAC_TABLE_DATA_TYPE  oqpsk_ch_spac_table[OQPSK_CH_SPAC_TABLE_ROW_SIZE][OQPSK_CH_SPAC_TABLE_COL_SIZE])
FLASH_DECLARE ( uint32_t  oqpsk_max_ch_map[OQPSK_TOTAL_CHANNELS_MAP_ROW_SIZE][OQPSK_TOTAL_CHANNELS_MAP_COL_SIZE])
FLASH_DECLARE ( OQPSK_CHIP_RATE_FREQ_TABLE_DATA_TYPE  oqpsk_chip_rate_freq_table[OQPSK_CHIP_RATE_FREQ_TABLE_ROW_SIZE][OQPSK_CHIP_RATE_FREQ_TABLE_COL_SIZE])
FLASH_DECLARE ( uint32_t  ofdm_freq0_map[OFDM_CH_CENTER_FREQ0_MAP_ROW_SIZE][OFDM_CH_CENTER_FREQ0_MAP_COL_SIZE])
FLASH_DECLARE ( uint32_t  ofdm_max_ch_map[OFDM_TOTAL_CHANNELS_MAP_ROW_SIZE][OFDM_TOTAL_CHANNELS_MAP_COL_SIZE])
FLASH_DECLARE ( uint32_t  ofdm_ch_spacing_table[]) = { CH_SPAC_FSK_TABLE }
FLASH_DECLARE ( OFDM_CCA_THRES_TABLE_DATA_TYPE  ofdm_cca_thres[OFDM_CCA_THRES_TABLE_ROW_SIZE][OFDM_CCA_THRES_TABLE_COL_SIZE])
FLASH_DECLARE ( OFDM_DATA_RATE_TABLE_DATA_TYPE  ofdm_data_rate_table[OFDM_DATA_RATE_TABLE_ROW_SIZE][OFDM_DATA_RATE_TABLE_COL_SIZE])
FLASH_DECLARE ( OFDM_PROCESSING_DELAY_ACK_TIMING_TABLE_DATA_TYPE  ofdm_processing_delay_ack_timing[OFDM_PROCESSING_DELAY_ACK_TIMING_TABLE_COL_SIZE][OFDM_PROCESSING_DELAY_ACK_TIMING_TABLE_ROW_SIZE])
FLASH_DECLARE ( uint32_t  fsk_freq0_map[FSK_CH_CENTER_FREQ0_MAP_ROW_SIZE][FSK_CH_CENTER_FREQ0_MAP_COL_SIZE])
FLASH_DECLARE ( uint32_t  fsk_max_ch_map[FSK_TOTAL_CHANNELS_MAP_ROW_SIZE][FSK_TOTAL_CHANNELS_MAP_COL_SIZE])
FLASH_DECLARE ( FSK_SYM_RATE_TABLE_DATA_TYPE  fsk_sym_rate_table[FSK_SYM_RATE_TABLE_SIZE])
FLASH_DECLARE ( FSK_CCA_THRES_DATA_TYPE  fsk_cca_thres_table[FSK_CCA_THRES_TABLE_SIZE])
FLASH_DECLARE ( FSK_PROCESSING_DELAY_ACK_TABLE_DATA_TYPE  fsk_processing_delay_ack_timing[FSK_PROCESSING_DELAY_ACK_TABLE_ROW_SIZE])
uint16_t get_AckTiming_us ( trx_id_t  trx_id)

Gets the ACK timing in us.

Parameters
trx_idTransceiver identifier
Returns
ACK timing in us

References aMinTurnaroundTimeSUNPHY, aTurnaroundTime, ceiling_sym(), FSK, LEG_OQPSK, OFDM, OQPSK, PGM_READ_BYTE, and tal_pib.

Referenced by calculate_pib_values().

uint16_t get_AckWaitDuration_us ( trx_id_t  trx_id)

Gets the AckWaitDuration in us.

Parameters
trx_idTransceiver identifier
Returns
AckWaitDuration in us

References aMinTurnaroundTimeSUNPHY, ceiling_sym(), F4FSK, FSK, LEG_OQPSK, OFDM, OQPSK, oqpsk_ack_psdu_duration_sym(), phr_duration_sym(), shr_duration_sym(), and tal_pib.

Referenced by calculate_pib_values().

uint16_t get_cca_duration_us ( trx_id_t  trx_id)

Gets the CCA duration in us.

Parameters
trx_idTransceiver identifier
Returns
CCA duration in us

References calculate_cca_duration_us(), FSK, JAPAN_920, LEG_OQPSK, OFDM, OQPSK, PGM_READ_BYTE, and tal_pib.

Referenced by calculate_pib_values().

int8_t get_cca_thres ( trx_id_t  trx_id)

Gets the CCA threshold.

Parameters
trx_idTransceiver identifier
Returns
CCA threshold in dBm

References FK_CCA_THRES_FEC_OFFSET, FSK, LEG_OQPSK, OFDM, OQPSK, OQPSK_CCA_THRES, PGM_READ_BYTE, and tal_pib.

Referenced by calculate_pib_values().

float get_data_rate ( trx_id_t  trx_id)

Gets PSDU data rate.

Parameters
trx_idTransceiver identifier
Returns
data rate in kbit/s

References CHIP_RATE_1000, F4FSK, FSK, LEG_OQPSK, OFDM, OQPSK, oqpsk_get_chip_rate(), oqpsk_spreading(), PGM_READ_BYTE, PGM_READ_WORD, and tal_pib.

Referenced by calculate_pib_values().

void get_fsk_freq_f0 ( trx_id_t  trx_id,
sun_freq_band_t  freq_band,
fsk_op_mode_t  option,
uint32_t *  freq,
uint32_t *  spacing 
)

Gets the FSK center frequency F0.

Parameters
[in]trx_idTransceiver identifier
[in]freq_bandFrequency band
[in]optionFSK operating mode
[out]freqPointer to frequency F0
[out]spacingPointer to Channel spacing
Returns

References FSK_CH_CENTER_FREQ0_MAP_ROW_SIZE, and PGM_READ_DWORD.

Referenced by perf_set_sun_page().

void get_leg_oqpsk_freq_f0 ( trx_id_t  trx_id,
sun_freq_band_t  freq_band,
uint32_t *  freq,
uint32_t *  spacing 
)

Gets the Legacy OQPSK center frequency F0.

Parameters
[in]trx_idTransceiver identifier
[in]freq_bandFrequency band
[out]freqPointer to frequency F0
[out]spacingPointer to Channel spacing
Returns

References LEG_OQPSK_CH_CENTER_FREQ0_MAP_ROW_SIZE, and PGM_READ_DWORD.

Referenced by perf_set_sun_page().

void get_ofdm_freq_f0 ( trx_id_t  trx_id,
sun_freq_band_t  freq_band,
ofdm_option_t  option,
uint32_t *  freq,
uint32_t *  spacing 
)

Gets the OFDM center frequency F0.

Parameters
[in]trx_idTransceiver identifier
[in]freq_bandFrequency band
[in]optionOFDM option
[out]freqPointer to frequency F0
[out]spacingPointer to Channel spacing
Returns

References OFDM_CH_CENTER_FREQ0_MAP_ROW_SIZE, and PGM_READ_DWORD.

Referenced by perf_set_sun_page().

oqpsk_chip_rate_t get_oqpsk_chip_rate ( trx_id_t  trx_id,
sun_freq_band_t  freq_band 
)

Gets the OQPSK Chiprate.

Parameters
[in]trx_idTransceiver identifier
[in]freq_bandFrequency band
Returns
oqpsk chiprate

References CHIP_RATE_100, CHIP_RATE_1000, CHIP_RATE_200, CHIP_RATE_2000, OQPSK_CHIP_RATE_FREQ_TABLE_ROW_SIZE, and PGM_READ_WORD.

void get_oqpsk_freq_f0 ( trx_id_t  trx_id,
sun_freq_band_t  freq_band,
uint32_t *  freq,
uint32_t *  spacing 
)

Gets the OQPSK center frequency F0.

Parameters
[in]trx_idTransceiver identifier
[in]freq_bandFrequency band
[out]freqPointer to frequency F0
[out]spacingPointer to Channel spacing
Returns

References EU_863, OQPSK_CH_CENTER_FREQ0_MAP_ROW_SIZE, and PGM_READ_DWORD.

Referenced by perf_set_sun_page().

uint16_t get_sun_max_ch_no ( trx_id_t  trx_id)

Gets Maximum no of channel supported by each modulation.

Parameters
[in]trx_idTransceiver identifier
Returns
No of channels supported

References FSK, FSK_CH_CENTER_FREQ0_MAP_ROW_SIZE, OFDM, OFDM_CH_CENTER_FREQ0_MAP_ROW_SIZE, OQPSK, OQPSK_CH_CENTER_FREQ0_MAP_ROW_SIZE, PGM_READ_DWORD, and tal_pib.

Referenced by apply_channel_settings(), and set_channel_app().

retval_t get_supported_channels_tuple ( trx_id_t  trx_id,
uint32_t *  value 
)

Gets ACK duration.

Parameters
trx_idTransceiver identifier
Returns
ACK duration in symbols Gets the supported channels

The lowest 16bits contain the lowest supported channel number and the highest 16bits contains the highest supported channel number.

Parameters
[in]trx_idTransceiver identifier
[out]valuePointer to tuple (32bits) storage location
Returns
MAC_SUCCESS, MAC_UNSUPPORTED_ATTRIBUTE, MAC_INVALID_PARAMETER

References CHINA_470, CHINA_780, FSK, LEG_OQPSK, MAC_INVALID_PARAMETER, MAC_SUCCESS, MAC_UNSUPPORTED_ATTRIBUTE, OFDM, OQPSK, RF09, status, tal_pib, and US_915.

Referenced by calculate_pib_values(), init_tal_pib(), set_phy_based_on_channel_page(), and tal_pib_set().

static uint16_t oqpsk_ack_psdu_duration_sym ( trx_id_t  trx_id)
static

Gets the PSDU duration for MR-OQPSK.

pg. 119, section 18.3.2.14

Parameters
trx_idTransceiver identifier
Returns
PSDU length in symbols

References oqpsk_spreading(), PGM_READ_BYTE, tal_pib, and temp.

Referenced by get_AckWaitDuration_us().

uint16_t oqpsk_get_chip_rate ( trx_id_t  trx_id)
static

Gets the MR-OQPSK chip rate.

table 166, pg. 101

Parameters
trx_idTransceiver identifier
Returns
Chip rate

References PGM_READ_BYTE, and tal_pib.

Referenced by get_data_rate().

static uint8_t oqpsk_spreading ( oqpsk_chip_rate_t  chip_rate,
oqpsk_rate_mode_t  rate_mode 
)
static

Gets the MR-OQPSK spreading.

Parameters
chip_rateChip rate
rate_modeRate mode
Returns
Spreading

References CHIP_RATE_100, CHIP_RATE_1000, CHIP_RATE_200, CHIP_RATE_2000, and OQPSK_RATE_MOD_4.

Referenced by get_data_rate(), and oqpsk_ack_psdu_duration_sym().

uint8_t phr_duration_sym ( trx_id_t  trx_id)

Gets the PHR duration.

see pg. 46

Parameters
trx_idTransceiver identifier
Returns
PHR duration in symbols

References FSK, LEG_OQPSK, OFDM, OFDM_OPT_1, OFDM_OPT_2, OQPSK, and tal_pib.

Referenced by get_AckWaitDuration_us().

uint8_t shr_duration_sym ( trx_id_t  trx_id)

Gets the SHR duration.

Parameters
trx_idTransceiver identifier
Returns
SHR duration in symbols

References FSK, LEG_OQPSK, OFDM, OQPSK, PGM_READ_BYTE, and tal_pib.

Referenced by get_AckWaitDuration_us().

uint16_t tal_get_symbol_duration_us ( trx_id_t  trx_id)

Gets the symbol duration in us.

Parameters
trx_idTransceiver identifier
Returns
Duration of a symbol in us

References FSK, LEG_OQPSK, OFDM, OQPSK, PGM_READ_WORD, and tal_pib.

Referenced by calculate_pib_values().