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
Connectivity_Test_Platform.h
00001 /*! 00002 * Copyright (c) 2015, Freescale Semiconductor, Inc. 00003 * All rights reserved. 00004 * 00005 * \file App_Custom.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 00034 /************************************************************************************ 00035 ************************************************************************************* 00036 * Include 00037 ************************************************************************************* 00038 ************************************************************************************/ 00039 #include "MemManager.h" 00040 #include "SMAC_Interface.h" /*@CMA Conn Test*/ 00041 #include "AspInterface.h" 00042 #include "ConnectivityMenus.h " 00043 00044 #if 0 00045 #include "SerialManager.h" 00046 #include "LED.h" /*Include all LED functionality*/ 00047 #include "TimersManager.h" 00048 #include "FunctionLib.h" 00049 #include "fsl_os_abstraction.h" 00050 #include "fsl_osa_ext.h" 00051 #include "board.h" 00052 #endif 00053 /************************************************************************************ 00054 ************************************************************************************* 00055 * Currently supported feature-sets. 00056 * DO NOT CHANGE as they MIGHT be platform dependent 00057 ************************************************************************************* 00058 ************************************************************************************/ 00059 /*This feature is only for sub-ghz phy's*/ 00060 #ifndef CT_Feature_Bitrate_Select 00061 #define CT_Feature_Bitrate_Select (0) 00062 #endif 00063 00064 /*This feature is only for platforms that have BER Test Connectors 00065 *(currently only KW01)*/ 00066 #ifndef CT_Feature_BER_Test 00067 #define CT_Feature_BER_Test (0) 00068 #endif 00069 00070 #ifndef CT_Feature_Direct_Registers 00071 #define CT_Feature_Direct_Registers (1) 00072 #endif 00073 00074 #ifndef CT_Feature_Indirect_Registers 00075 #define CT_Feature_Indirect_Registers (1) 00076 #endif 00077 00078 /*This feature is currently supported only on KW01 platforms*/ 00079 #ifndef CT_Feature_Calibration 00080 #define CT_Feature_Calibration (0) 00081 #endif 00082 00083 /*This feature is only for sub-ghz platforms*/ 00084 #ifndef CT_Feature_Custom_CCA_Dur 00085 #define CT_Feature_Custom_CCA_Dur (0) 00086 #endif 00087 00088 /*This feature is currently supported on KW01. Disabled by default*/ 00089 #ifndef CT_Feature_Afc 00090 #define CT_Feature_Afc (0) 00091 #endif 00092 00093 00094 #if CT_Feature_Calibration 00095 #include "Flash_Adapter.h" 00096 #endif 00097 00098 /************************************************************************************ 00099 ************************************************************************************* 00100 * Macros 00101 ************************************************************************************* 00102 ************************************************************************************/ 00103 #define gMaxOutputPower_c ( 0x1F ) 00104 #define gMinOutputPower_c ( 0x03 ) 00105 #define gDefaultOutputPower_c ( 0x1F ) 00106 00107 #if CT_Feature_Calibration 00108 #define gMinAdditionalRFOffset_c ( -1000) 00109 #define gMaxAdditionalRFOffset_c ( 1000 ) 00110 #endif 00111 00112 #define gDefaultChannelNumber_c gChannel11_c 00113 #define gMaxCCAThreshold_c 0x6EU 00114 #define gMinCCAThreshold_c 0x00U 00115 #define gDefaultCCAThreshold_c 0x50U 00116 00117 /*register size in bytes and ASCII characters macros*/ 00118 00119 #define gRegisterSize_c (1) 00120 #define gRegisterSizeASCII_c (2*gRegisterSize_c) 00121 00122 /*register address size in ASCII*/ 00123 #define gRegisterAddress_c (1) 00124 #define gRegisterAddressASCII_c (2*gRegisterAddress_c) 00125 00126 /************************************************************************************ 00127 ************************************************************************************* 00128 * Memory Type Definitions 00129 ************************************************************************************* 00130 ************************************************************************************/ 00131 00132 /* these type definitions must be changed depending on register size and address range*/ 00133 typedef uint8_t registerSize_t; 00134 typedef uint8_t registerAddressSize_t; 00135 00136 /*this structure defines the upper and lower bound for dump registers feature*/ 00137 typedef struct registerLimits_tag 00138 { 00139 registerAddressSize_t regStart; 00140 registerAddressSize_t regEnd; 00141 bool_t bIsRegisterDirect; 00142 }registerLimits_t; 00143 00144 typedef enum operationModes_tag 00145 { 00146 mTxOperation_c, 00147 mRxOperation_c 00148 }operationModes_t; 00149 00150 /************************************************************************************ 00151 ************************************************************************************* 00152 * Public memory declarations 00153 ************************************************************************************* 00154 ************************************************************************************/ 00155 extern const registerLimits_t registerIntervals[]; 00156 00157 extern uint8_t crtBitrate; 00158 00159 extern bool_t evTestParameters; 00160 extern bool_t evDataFromUART; 00161 extern bool_t bEdDone; 00162 extern bool_t shortCutsEnabled; 00163 00164 extern uint8_t testPower; 00165 extern uint8_t mAppSer; 00166 extern uint8_t gu8UartData; 00167 extern uint8_t au8ScanResults[]; 00168 extern uint8_t ccaThresh; 00169 extern uint8_t testPayloadLen; 00170 extern channels_t testChannel; 00171 00172 extern operationModes_t testOpMode; 00173 00174 /************************************************************************************ 00175 ************************************************************************************* 00176 * Public functions declarations 00177 ************************************************************************************* 00178 ************************************************************************************/ 00179 #ifdef __cplusplus 00180 extern "C" { 00181 #endif 00182 extern void PrintMenu(char * const pu8Menu[], uint8_t port); 00183 /*common functions declarations which have platform dependent behavior*/ 00184 extern void ShortCutsParser( uint8_t u8UartData ); 00185 extern void InitApp_custom(); 00186 extern void InitProject_custom(); 00187 00188 #ifdef __cplusplus 00189 } //extern "C" 00190 #endif
Generated on Thu Jul 14 2022 12:41:17 by
