1 /**************************************************************************** 2 **+-----------------------------------------------------------------------+** 3 **| |** 4 **| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** 5 **| All rights reserved. |** 6 **| |** 7 **| Redistribution and use in source and binary forms, with or without |** 8 **| modification, are permitted provided that the following conditions |** 9 **| are met: |** 10 **| |** 11 **| * Redistributions of source code must retain the above copyright |** 12 **| notice, this list of conditions and the following disclaimer. |** 13 **| * Redistributions in binary form must reproduce the above copyright |** 14 **| notice, this list of conditions and the following disclaimer in |** 15 **| the documentation and/or other materials provided with the |** 16 **| distribution. |** 17 **| * Neither the name Texas Instruments nor the names of its |** 18 **| contributors may be used to endorse or promote products derived |** 19 **| from this software without specific prior written permission. |** 20 **| |** 21 **| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** 22 **| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** 23 **| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** 24 **| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** 25 **| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** 26 **| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** 27 **| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** 28 **| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** 29 **| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** 30 **| (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |** 31 **| OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |** 32 **| |** 33 **+-----------------------------------------------------------------------+** 34 ****************************************************************************/ 35 36 /** \file public_radio.h 37 * \brief Contains information element defines/structures used by the TNETxxxx and host and Radio Module. 38 * 39 */ 40 41 /* 42 ======================================================================================================================= 43 R E V I S I O N H I S T O R Y 44 45 04/29/05 BRK 1. retrieved from ClearCase and added this rev. history 46 2. added two new entries to RadioParamType_e enum 47 3. increased MAX_RADIO_PARAM_POWER_TABLE (from 20 to 56) 48 - this is sort of a kludge, struct RadioParam_t should have used an 49 array pointer instead of an actual data block 50 06/10/05 BRK changed MAX_RADIO_PARAM_POWER_TABLE for 1251 support (sort of a KLUDGE) 51 07/15/05 BRK added RADIO_PABIAS_TABLE entry to RadioParamType_e enum 52 04/12/06 MH Added new run-time calibration state: RFPLL_CALIBRATION_NEEDED 53 54 Note: This code should only be edited with TAB stops set at 4 55 ======================================================================================================================= 56 */ 57 #ifndef PUBLIC_RADIO 58 #define PUBLIC_RADIO 59 60 // radio parameter to set 61 #ifdef TNETW1251 62 #define MAX_RADIO_PARAM_POWER_TABLE 4*48 // cPowLmtTbl[] max size for ABG radios 63 #else 64 #define MAX_RADIO_PARAM_POWER_TABLE 56 // cPowLmtTbl[] max size for BG radios 65 #endif 66 #define MAX_RADIO_PARAM_LEN MAX_RADIO_PARAM_POWER_TABLE 67 68 #define RADIO_PARAM_POWER_TABLE_ENABLE 0x01 // mask for RADIO_PARAM_POWER_ENABLES usage 69 #define RADIO_PARAM_POWER_LIMIT_TABLE_ENABLE 0x02 // mask for RADIO_PARAM_POWER_ENABLES usage 70 #define RADIO_PARAM_POWER_ADJ_TABLE_ENABLE 0x04 // mask for RADIO_PARAM_POWER_ENABLES usage 71 72 73 #define NUM_OF_SUB_BANDS 5 74 #define NUM_OF_POWER_LEVEL 4 75 76 #ifndef HOST_IF_ENUMS_DISABLED 77 typedef enum RadioParamType_e 78 { 79 RADIO_PARAM_POWER_TABLE = 1, 80 RADIO_PARAM_POWER_LIMIT_TABLE, 81 RADIO_PARAM_POWER_ADJ_TABLE, 82 RADIO_PARAM_POWER_ENABLES, 83 RADIO_PABIAS_TABLE, 84 RADIO_PARAM_POWER_LEVELS, 85 MAX_RADIO_PARAM_TYPE = 0x7FFFFFFF /* force this enum to be uint32 */ 86 } RadioParamType_e; 87 #else 88 typedef uint32 RadioParamType_e; 89 #endif 90 91 typedef struct RadioParam_t 92 { 93 RadioParamType_e parameterType; 94 int8 parameter[MAX_RADIO_PARAM_LEN]; 95 } RadioParam_t; 96 97 98 /****************************************************************************** 99 100 Name: ACX_CAL_ASSESSMENT 101 Type: Configuration 102 Access: Write Only 103 Length: 4 104 Note: OBSOLETE !!! (DO_CALIBRATION_IN_DRIVER is not defined) 105 106 ******************************************************************************/ 107 108 typedef enum 109 { 110 RUNTIME_CALIBRATION_NOT_NEEDED = 1, 111 RUNTIME_CALIBRATION_NEEDED = 2, 112 RFPLL_CALIBRATION_NEEDED = 3, 113 MAX_RUNTIME_CALIBRATION_OPTIONS = 0x7FFFFFFF // force this enum to be uint32 114 } RadioRuntimeCalState_enum; 115 116 117 118 #ifdef HOST_COMPILE 119 typedef uint32 RadioRuntimeCalState_e; 120 #else 121 typedef RadioRuntimeCalState_enum RadioRuntimeCalState_e; 122 #endif 123 124 /************************************************************************/ 125 /* */ 126 /* Commands section */ 127 /* */ 128 /************************************************************************/ 129 130 131 /****************************************************************************** 132 133 Name: ACX_PLT_NVS_BUFFER_UPDATE 134 TestCmdId: TEST_CMD_PLT_GET_NVS_UPDATE_BUFFER 135 Description: This PLT function provides the all information required by 136 the upper driver in order to update the NVS image. 137 It received a parameter defining the type of update 138 information required and provides an array of elements defining 139 the data bytes to be written to the NVS image and the byte 140 offset in which they should be written. 141 Type: PLT 142 Access: Read Only 143 Length: 420 144 145 ******************************************************************************/ 146 #define NVS_RESULTS_MAX_NUM_OF_TABLES 4 147 #define NVS_RESULTS_MAX_UPDATE_TABLE_SIZE 100 148 149 typedef struct resultsBuffer_t 150 { 151 uint16 size; /* size of table*/ 152 uint16 offset; /* offset in the binary image of the NVS file*/ 153 uint8 data[NVS_RESULTS_MAX_UPDATE_TABLE_SIZE];/* the actual table data */ 154 }resultsBuffer_t; 155 156 157 typedef struct PltNvsResultsBuffer_t 158 { 159 resultsBuffer_t tables[NVS_RESULTS_MAX_NUM_OF_TABLES]; /* array of structures of type containing the tables*/ 160 uint8 numOfTables; /* number of tables needed to be updated*/ 161 uint8 padding[3]; 162 }PltNvsResultsBuffer_t; 163 164 165 typedef struct PltGainGet_t 166 { 167 uint8 TxGain; //Total TX chain gain according to the current setting 168 uint8 TxUpperBound; //the max gain setting allowed 169 uint8 TxLowerBound; //the min gain setting allowed 170 uint8 padding; /* padding to 32 bit */ 171 }PltGainGet_t; 172 173 #endif 174