Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: fsl_phy_mcr20a fsl_smac mbed-rtos mbed
Fork of mcr20_connectivity_test by
Application_Interface.h
00001 /*! 00002 * Copyright (c) 2015, Freescale Semiconductor, Inc. 00003 * All rights reserved. 00004 * 00005 * \file Application_Interface.h 00006 * 00007 * Redistribution and use in source and binary forms, with or without modification, 00008 * are permitted provided that the following conditions are met: 00009 * 00010 * o Redistributions of source code must retain the above copyright notice, this list 00011 * of conditions and the following disclaimer. 00012 * 00013 * o Redistributions in binary form must reproduce the above copyright notice, this 00014 * list of conditions and the following disclaimer in the documentation and/or 00015 * other materials provided with the distribution. 00016 * 00017 * o Neither the name of Freescale Semiconductor, Inc. nor the names of its 00018 * contributors may be used to endorse or promote products derived from this 00019 * software without specific prior written permission. 00020 * 00021 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 00022 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 00023 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00024 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 00025 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 00026 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 00027 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 00028 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00029 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00030 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00031 */ 00032 00033 #ifndef __SMAC_APPLICATION_CONF_H__ 00034 #define __SMAC_APPLICATION_CONF_H__ 00035 00036 #include "MemManager.h" 00037 #include "ConnectivityMenus.h " /*Defines the Application menus*/ 00038 00039 #include "SMAC_Interface.h" /*@CMA Conn Test*/ 00040 #include "FunctionLib.h" 00041 #include "AspInterface.h" 00042 #ifdef gPHY_802_15_4g_d 00043 #include "PhyTime.h" 00044 #endif 00045 00046 #include "mbed.h" 00047 #include "rtos.h" 00048 00049 00050 00051 /* BEGIN Configuration Parameters Definition */ 00052 typedef enum ConnectivityStates_tag 00053 { 00054 gConnInitState_c, 00055 gConnIdleState_c, 00056 gConnSelectTest_c, 00057 gConnContinuousTxRxState_c, 00058 gConnPerState_c, 00059 gConnRangeState_c, 00060 gConnRegEditState_c, 00061 gConnSetChannelState_c, 00062 gConnSetPowerState_c, 00063 gConnSetTxTestState_c, 00064 gConnSetRxTestState_c, 00065 gConnSetTrimCoarseState_c, 00066 gConnSetTrimFineState_c, 00067 gConnContinuousTxState_c, 00068 gConnPerTxState_c, 00069 gConnRangeTxState_c, 00070 gConnContinuousRxState_c, 00071 gConnPerRxState_c, 00072 gConnRangeRxState_c, 00073 gConnBitrateSelectState_c, 00074 gConnCSenseAndTCtrl_c, 00075 gConnEDMeasCalib_c, 00076 gConnMaxState_c 00077 }ConnectivityStates_t; 00078 00079 00080 typedef enum ContinuousTxRxTestStates_tag 00081 { 00082 gCTxRxStateInit_c, 00083 gCTxRxStateIdle_c, 00084 gCTxRxStateSelectTest_c, 00085 gCTxRxStateRunnigEdTest_c, 00086 gCTxRxStateRunningEdTestGotResult_c, 00087 gCTxRxStateRunningPRBS9Test_c, 00088 gCTxRxStateRunnigScanTest_c, 00089 gCTxRxStateRunnigRxTest_c, 00090 gCTxRxStateRunningTXModSelectOpt, 00091 gCTxRxStateRunnigCcaTest_c, 00092 gCTxRxMaxState_c 00093 }ContinuousTxRxTestStates_t; 00094 00095 typedef enum PerTxStates_tag 00096 { 00097 gPerTxStateInit_c = 0, 00098 gPerTxStateIdle_c, 00099 gPerTxStateSelectPacketNum_c, 00100 gPerTxStateInputPacketDelay_c, 00101 gPerTxStateStartTest_c, 00102 gPerTxStateRunningTest_c, 00103 gPerTxStateSendingLastFrames_c, 00104 gPerTxStateMaxState_c 00105 }PerTxStates_t; 00106 00107 typedef enum PerRxStates_tag 00108 { 00109 gPerRxStateInit_c = 0, 00110 gPerRxStateIdle_c, 00111 gPerRxWaitStartTest_c, 00112 gPerRxStateStartTest_c, 00113 gPerRxStateRunningTest_c, 00114 gPerRxStateReceivingLastFrames_c, 00115 gPerrxStateMaxState_c 00116 }PerRxStates_t; 00117 00118 typedef enum RangeTxStates_tag 00119 { 00120 gRangeTxStateInit_c = 0, 00121 gRangeTxStateIdle_c, 00122 gRangeTxWaitStartTest_c, 00123 gRangeTxStateStartTest_c, 00124 gRangeTxStateRunningTest_c, 00125 gRangeTxStatePrintTestResults_c, 00126 gRangeTxStateMaxState_c 00127 }RangeTxStates_t; 00128 00129 typedef enum RangeRxStates_tag 00130 { 00131 gRangeRxStateInit_c = 0, 00132 gRangeRxStateIdle_c, 00133 gRangeRxWaitStartTest_c, 00134 gRangeRxStateStartTest_c, 00135 gRangeRxStateRunningTest_c, 00136 gRangeRxStatePrintTestResults_c, 00137 gRangeRxStateMaxState_c 00138 }RangeRxStates_t; 00139 00140 typedef enum CSenseTCtrlStates_tag 00141 { 00142 gCsTcStateInit_c = 0, 00143 gCsTcStateSelectTest_c, 00144 gCsTcStateCarrierSenseStart_c, 00145 gCsTcStateCarrierSenseSelectType_c, 00146 gCsTcStateCarrierSensePerformingTest_c, 00147 gCsTcStateCarrierSenseEndTest_c, 00148 gCsTcStateTransmissionControlStart_c, 00149 gCsTcStateTransmissionControlSelectNumOfPackets_c, 00150 gCsTcStateTransmissionControlSelectInterpacketDelay_c, 00151 gCsTcStateTransmissionControlPerformingTest_c, 00152 gCsTcStateTransmissionControlEndTest_c, 00153 gCsTcStateMaxState_c 00154 }CSenseTCtrlStates_t; 00155 00156 typedef enum overrideRegistersStates_tag 00157 { 00158 gORStateInit_c = 0, 00159 gORStateStart_c, 00160 gORWaitForTheAddress_c, 00161 gORWaitForTheValue_c, 00162 gORStateIdle_c, 00163 gORStateMaxState_c 00164 }oRStates_t; 00165 00166 typedef enum readRegistersStates_tag 00167 { 00168 gRRStateInit_c = 0, 00169 gRRStateStart_c, 00170 gRRWaitForTheAddress_c, 00171 gRRStateMaxState_c 00172 }rRStates_t; 00173 00174 typedef enum EditRegsStates_tag 00175 { 00176 gERStateInit_c = 0, 00177 gERWaitSelection_c, 00178 gERStateOverrideReg_c, 00179 gERStateReadReg_c, 00180 gERStateDumpAllRegs_c, 00181 gERStateOverrideRadioSpiReg_c, 00182 gERStateReadRadioSpiReg_c, 00183 gERStateMaxState_c 00184 }EditRegsStates_t; 00185 00186 typedef enum dumpRegistersStates_t 00187 { 00188 gDRStateInit_c = 0, 00189 gDRStateDumpRegs_c 00190 }dRStates_t; 00191 /* END Configuration Parameters Definition */ 00192 00193 #define gDefaultOperationMode_c mTxOperation_c 00194 #define gDefaultPayload_c 20 00195 #define mTotalFinalFrames_c 25 00196 00197 #ifdef gPHY_802_15_4g_d 00198 #define gMaxChannel_c ((channels_t)(gTotalChannels - 1)) 00199 #define gMinChannel_c (gChannel0_c) 00200 #else 00201 #define gMaxChannel_c ((channels_t)gTotalChannels) 00202 #define gMinChannel_c (gChannel11_c) 00203 #endif 00204 00205 extern smacErrors_t smacToAppMlmeSap(smacToAppMlmeMessage_t* pMsg, instanceId_t instance); 00206 extern smacErrors_t smacToAppMcpsSap(smacToAppDataMessage_t* pMsg, instanceId_t instance); 00207 extern void InitApp(); 00208 00209 #endif /* __SMAC_APP_CONFIG_H__ */
Generated on Thu Jul 14 2022 12:41:17 by
