/**************************************************************************************** * dda_input.h * Environment Input module implementation. * * 2006 (c) Texas Instruments Inc. * * 10/6/2006 AV Adding Sar Loopback as an input. * ? CZ Adding load_afe_dsp for Mfg Diag * 01/29/2007 CZ CQ11430: port DSLHAL App to Linux. Added datapump_path * 02/14/2007 EP Added env var for CPPI error handling. ****************************************************************************************/ #ifndef __DDA_ENV_INPUT_H__ #define __DDA_ENV_INPUT_H__ #define MAX_ENV_LEN 31 #define IN_USE_FLAG 0x1 #define VAL_IS_PTR 0x2 typedef struct { const unsigned char name[MAX_ENV_LEN]; unsigned char in_use; union { int IntValue; char *CpValue; }; }DDA_Input_elem_t; /* NOTE: If you need to add or delete an env variable make sure that you update the enum below as well, to keep the offsets in sync. */ static DDA_Input_elem_t DDA_Env_Input[] = { {"DSL_PHY_CNTL_1", 0, {0}}, /* 0 */ {"cpufrequency", 0, {0}}, /* 1 */ {"DSL_FEATURE_CNTL_0", 0, {0}}, /* 2 */ {"DSL_FEATURE_CNTL_1", 0, {0}}, /* 3 */ {"DSL_PHY_CNTL_0", 0, {0}}, /* 4 */ {"dsp_freq", 0, {0}}, /* 5 */ {"fine_gain_control" , 0, {0}}, /* 6 */ {"fine_gain_value", 0, {0}}, /* 7 */ {"margin_threshold", 0, {0}}, /* 8 */ {"maximum_bits_per_carrier", 0, {0}}, /* 9 */ {"maximum_interleave_depth", 0, {0}}, /* 10 */ {"modulation", VAL_IS_PTR, {0}}, /* 11 */ {"oam_lb_timeout", 0, {0}}, /* 12 */ {"pair_selection", 0, {0}}, /* 13 */ {"sar_ipacemax", 0, {0}}, /* 14 */ {"SarRxBuf", 0, {0}}, /* 15 */ {"SarRxMax", 0, {0}}, /* 16 */ {"SarTxBuf", 0, {0}}, /* 17 */ {"SarTxMax", 0, {0}}, /* 18 */ {"trellis", 0, {0}}, /* 19 */ {"autopvc_enable", 0, {0}}, /* 20 */ {"bitswap", 0, {0}}, /* 21 */ {"dgas_polarity", 0, {0}}, /* 22 */ {"DSL_BIT_TMODE", 0, {0}}, /* 23 */ {"DSL_UPG_DONE", 0, {0}}, /* 24 */ {"dsp_noboost", 0, {0}}, /* 25 */ {"enable_margin_retrain", 0, {0}}, /* 26 */ {"enable_rate_adapt", 0, {0}}, /* 27 */ {"los_alarm", 0, {0}}, /* 28 */ {"TurboDSL", 0, {0}}, /* 29 */ {"ATM_ETSI", VAL_IS_PTR, {0}}, /* 30 */ {"eoc_vendor_revision", VAL_IS_PTR, {0}}, /* 31 */ {"invntry_vernum", VAL_IS_PTR, {0}}, /* 32 */ {"eoc_vendor_serialnum", VAL_IS_PTR, {0}}, /* 33 */ {"eoc_vendor_id", VAL_IS_PTR, {0}}, /* 34 */ {"SarLB", 0, {0}}, /* 35 */ {"CppiErrProc", 0, {0}}, /* 36 */ #ifdef AFE_DIAG {"load_afe_dsp", 0, {0}}, /* 37 */ #endif {"datapump_path", VAL_IS_PTR, {0}} /* 38 */ }; typedef enum { DSL_PHY_CNTL_1 = 0, /* 0 */ cpufrequency, /* 1 */ DSL_FEATURE_CNTL_0, /* 2 */ DSL_FEATURE_CNTL_1, /* 3 */ DSL_PHY_CNTL_0, /* 4 */ dsp_freq, /* 5 */ fine_gain_control, /* 6 */ fine_gain_value, /* 7 */ margin_threshold, /* 8 */ maximum_bits_per_carrier, /* 9 */ maximum_interleave_depth, /* 10 */ modulation, /* 11 */ oam_lb_timeout, /* 12 */ pair_selection, /* 13 */ sar_ipacemax, /* 14 */ SarRxBuf, /* 15 */ SarRxMax, /* 16 */ SarTxBuf, /* 17 */ SarTxMax, /* 18 */ trellis, /* 19 */ autopvc_enable, /* 20 */ bitswap, /* 21 */ dgas_polarity, /* 22 */ DSL_BIT_TMODE, /* 23 */ DSL_UPG_DONE, /* 24 */ dsp_noboost, /* 25 */ enable_margin_retrain, /* 26 */ enable_rate_adapt, /* 27 */ los_alarm, /* 28 */ TurboDSL, /* 29 */ ATM_ETSI, /* 30 */ eoc_vendor_revision, /* 31 */ invntry_vernum, /* 32 */ eoc_vendor_serialnum, /* 33 */ eoc_vendor_id, /* 34 */ SarLB, /* 35 */ CppiErrProc, /* 36 */ #ifdef AFE_DIAG load_afe_dsp, /* 37 */ #endif datapump_path /* 38 */ }Env_Offset_t; extern int DDA_init_envs(void); extern int DDA_get_value_from_name(const char *variable_name, void * result); extern int DDA_get_value_from_offset(int offset, void * result); extern int DDA_close_envs(void); #endif /* __DDA_ENV_INPUT_H__ */