this a test code modified to cr20A

Dependencies:   fsl_phy_mcr20a fsl_smac mbed-rtos mbed

Fork of mcr20_connectivity_test by Freescale

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers ConnectivityMenus.c Source File

ConnectivityMenus.c

Go to the documentation of this file.
00001 /*!
00002 * Copyright (c) 2015, Freescale Semiconductor, Inc.
00003 * All rights reserved.
00004 *
00005 * \file ConnectivityMenus.c
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 #include "ConnectivityMenus.h "
00034 
00035 /************************************************************************************
00036 *************************************************************************************
00037 * Public memory declarations
00038 *************************************************************************************
00039 ************************************************************************************/
00040 
00041 char * const cu8FreescaleLogo[]={  
00042   "\f\r\n",
00043   "\n\r\n\r\n\r      #\n",
00044   "\r     ###\n",
00045   "\r    ###  *\n",
00046   "\r     #  ***\n",
00047   "\r       ***  #\n",
00048   "\r        *  ###\n",
00049   "\r          ###\n",
00050   "\r        *  #\n",
00051   "\r       ***\n",
00052   "\r      ***  #\n",
00053   "\r    #  *  ###\n",
00054   "\r   ###   ###\n",
00055   "\r  ###  *  #         F R E E S C A L E\n",
00056   "\r   #  ***\n",
00057   "\r     ***            S E M I C O N D U C T O R\n",
00058   "\r   #  *\n",
00059   "\r  ###               2 0 1 5\n",
00060   "\r ###\n",
00061   "\r  #           Connectivity Test Demo\n\n",
00062   "\r\n -Press enter to start",
00063   NULL
00064 };
00065 
00066 char * const cu8IupuiLogo[]={   " \r IUPUI DEPARTMENT OF  \n"
00067  "\r ELECTRICAL  AND COMPUTER ENGINEERING  \n "
00068       " \r LAB ON THREAD COMMNICATION \n" 
00069       "\r\n -Press enter to start",
00070   NULL
00071     };
00072 
00073 /*@CMA, Conn Test. New string*/
00074 char * const cu8MainMenu[]={  
00075   "\f\r  Connectivity Test Interface short cuts\n",
00076   "\r------------------------------------------\n",
00077   "\r -Press [t] for Tx operation\n",
00078   "\r -Press [r] for Rx operation\n",
00079   "\r -Press [q] for channel up\n",
00080   "\r -Press [w] for channel down\n",
00081   "\r -Press [a] for Power up\n",
00082   "\r -Press [s] for Power down\n",
00083   "\r -Press [n] to increase the Payload\n",
00084   "\r -Press [m] to decrease the Payload\n",
00085   "\r -Press [k] to increase CCA Threshold in Carrier Sense Test\n",
00086   "\r -Press [l] to decrease CCA Threshold in Carrier Sense Test\n",
00087   "\r These keys can be used all over the application to change \n",
00088   "\r the test parameters\n",
00089   "\r  ________________________________\n",
00090   "\r |                                |\n",
00091   "\r |   Select the Test to perform   |\n",
00092   "\r |________________________________|\n",
00093   "\r -Press [1] Continuous tests\n",
00094   "\r -Press [2] Packet Error Rate test\n",
00095   "\r -Press [3] Range test\n",
00096   "\r -Press [4] Carrier Sense and Transmission Control menu\n",
00097   "\r -Press [5] Radio registers edit\n",
00098   "\r -Press [p] Reset MCU\n\r\n",
00099   NULL
00100 };
00101 
00102 /*@CMA, Conn Test. New string*/
00103 char * const cu8ShortCutsBar[]={ 
00104   "\f\r\n",
00105   "\r----------------------------------------------------\n",
00106   "\r   [t] Tx   [q] Ch+  [a] Pw+  [n] Pyld+  [l] CCAThr-\n",  
00107   "\r   [r] Rx   [w] Ch-  [s] Pw-  [m] Pyld-  [k] CCAThr+\n",  
00108   "\r----------------------------------------------------\n\r",
00109   NULL
00110 };
00111 
00112 char * const cu8ContinuousTestMenu[]={ 
00113   "\r __________________________ \n",
00114   "\r|                          |\n",
00115   "\r|   Continuous Test Menu   |\n",
00116   "\r|__________________________|\n\r\n",
00117   "\r-Press [1] Idle\n",
00118   "\r-Press [2] Burst PRBS Transmission using packet mode\n",
00119   "\r-Press [3] Continuous Modulated Transmission\n",
00120   "\r-Press [4] Continuous Unmodulated Transmission\n",
00121   "\r-Press [5] Continuous Reception\n",
00122   "\r-Press [6] Continuous Energy Detect\n",
00123   "\r-Press [7] Continuous Scan\n",
00124   "\r-Press [8] Continuous Cca\n"
00125   "\r-Press [p] Previous Menu\n\r\n",
00126   "\rNow Running: ",
00127   NULL
00128 };
00129 
00130 char * const cu8PerTxTestMenu[]={ 
00131   "\r  ____________________________ \n",
00132   "\r |                            |\n",
00133   "\r |      PER Tx Test Menu      |\n",
00134   "\r |____________________________|\n\r\n",
00135   "\r  Choose the amount of packets to send:\n",
00136   "\r [0] - 1     Packet     [1] - 25    Packets\n",
00137   "\r [2] - 100   Packets    [3] - 500   Packets\n",
00138   "\r [4] - 1000  Packets    [5] - 2000  Packets\n",
00139   "\r [6] - 5000  Packets    [7] - 10000 Packets\n",
00140   "\r [8] - 65535 Packets\n\r\n",
00141   "\r-Press [p] Previous Menu\n\r\n",
00142   NULL
00143 };
00144 
00145 char * const cu8PerRxTestMenu[]={ 
00146   "\r  ______________________ \n",
00147   "\r |                      |\n",
00148   "\r |   PER Rx Test Menu   |\n",
00149   "\r |______________________|\n\r\n",
00150   "\r -Press [space bar] to start/stop Receiving Packets\n",
00151   "\r -Press [p] Previous Menu\n\r\n",
00152   NULL
00153 };
00154 
00155 char * const cu8RangeTxTestMenu[]={ 
00156   "\r  ________________________ \n",
00157   "\r |                        |\n",
00158   "\r |   Range Tx Test Menu   |\n",
00159   "\r |________________________|\n\r\n",
00160   "\r -Press [space bar] to start/stop Transmiting Packets\n",
00161   "\r -Press [p] Previous Menu\n\r\n",
00162   NULL
00163 };
00164 
00165 char * const cu8RangeRxTestMenu[]={ 
00166   "\r  ________________________ \n",
00167   "\r |                        |\n",
00168   "\r |   Range Rx Test Menu   |\n",
00169   "\r |________________________|\n\r\n",
00170   "\r -Press [space bar] to start/stop Receiving Packets\n",
00171   "\r -Press [p] Previous Menu\n\r\n",
00172   NULL
00173 };
00174 
00175 /*@CMA, Conn Test. New menu*/
00176 char * const cu8RadioRegistersEditMenu[]={ 
00177   "\r   ____________________________ \n",
00178   "\r  |                            |\n",
00179   "\r  | Radio Registers Edit Menu  |\n",
00180   "\r  |____________________________|\n\r\n",
00181   "\r  -Press [1] Write Direct Registers\n",
00182   "\r  -Press [2] Read  Direct Registers\n",
00183   "\r  -Press [3] Write Indirect Registers\n",
00184   "\r  -Press [4] Read  Indirect Registers\n",
00185   "\r  -Press [5] Dump  All Registers\n",
00186   "\r  -Press [p] Previous Menu\n\r\n",
00187   NULL
00188 };
00189 
00190 char * const cu8RadioCSTCSelectMenu[]={ 
00191   "\r   ___________________________________________________________ \n",
00192   "\r  |                                                           |\n",
00193   "\r  | Radio Carrier Sense and Transmission Control Select Menu  |\n",
00194   "\r  |___________________________________________________________|\n\r\n",
00195   "\r  -Press [1] Carrier Sense Test with un-modulation input signal\n",
00196   "\r  -Press [2] Transmission Control Test\n",
00197   "\r  -Press [p] Previous Menu\n\r\n",
00198   NULL
00199 };
00200 
00201 char * const cu8CsTcTestMenu[]={ 
00202   "\r  ____________________________ \n",
00203   "\r |                            |\n",
00204   "\r |     Tr Ctrl Test Menu      |\n",
00205   "\r |____________________________|\n\r\n",
00206   "\r  Choose the amount of packets to send:\n",
00207   "\r [0] - 1     Packet     [1] - 25    Packets\n",
00208   "\r [2] - 100   Packets    [3] - 500   Packets\n",
00209   "\r [4] - 1000  Packets    [5] - 2000  Packets\n",
00210   "\r [6] - 5000  Packets    [7] - 10000 Packets\n",
00211   "\r [8] - 65535 Packets\n\r\n",
00212   "\r-Press [p] Previous Menu\n\r\n",
00213   NULL
00214 };
00215 
00216 char * const cu8SelectTags[] ={
00217   " Channel select ",
00218   "  Power select  ",
00219   " Test Tx select ",
00220   " Test Rx select ",
00221   "Trim coarse tune",
00222   " Trim fine tune "
00223 };
00224 
00225 char * const cu8TxTestTags[] ={
00226   "     PER Tx     ",
00227   "    Range Tx    ",
00228   "   Cont. Idle   ",
00229   "  Cont. PRBS9   ",
00230   "Cont. Modulated ",
00231   "Cont. Unmodulatd"
00232 };
00233 
00234 char * const cu8RxTestTags[] ={
00235   "     PER Rx     ",
00236   "    Range Rx    ",
00237   "Cont. Reception ",
00238   "   Cont. Scan   ",
00239   "Cont.Energy Det."
00240 };
00241 
00242 char * const cu8TxModTestTags[] ={
00243   "0's\r\n",
00244   "1's\r\n",
00245   "\b\b\b\b\b PN9\r\n"
00246 };
00247 
00248 char * const cu8ContinuousTestTags[] ={
00249   "Idle mode",
00250   "Continuous Tx Modulated - All ",
00251   "Continuous Tx Unmodulated",
00252   "Continuous PRBS9"
00253 };
00254 
00255 /************************************************************************************
00256 *************************************************************************************
00257 * Private prototypes
00258 *************************************************************************************
00259 ************************************************************************************/
00260 
00261 
00262 /************************************************************************************
00263 *************************************************************************************
00264 * Private memory declarations
00265 *************************************************************************************
00266 ************************************************************************************/
00267 
00268 
00269 /************************************************************************************
00270 *************************************************************************************
00271 * Interface functions
00272 *************************************************************************************
00273 ************************************************************************************/
00274 
00275 /************************************************************************************
00276 *************************************************************************************
00277 * private functions
00278 *************************************************************************************
00279 ************************************************************************************/
00280 
00281