• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * TwIfDebug.c
3  *
4  * Copyright(c) 1998 - 2009 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 /** \file   TwIfDebug.c
36  *  \brief  TwIf debug commands
37  *
38  * TwIf debug commands
39  *
40  *  \see    TwIf.c, TwIf.h
41  */
42 
43 #include "tidef.h"
44 #include "report.h"
45 #include "TwIf.h"
46 #include "TwIfDebug.h"
47 #include "TWDriverInternal.h"
48 
49 
50 static void printTwIfDbgFunctions (void);
51 
52 
53 /**
54  * \fn     twifDebugFunction
55  * \brief  Main TwIf debug function
56  *
57  * Main TwIf debug function
58  *
59  * \param  hTwIf     - handle to the TWIF object
60  * \param  uFuncType - the specific debug function
61  * \param  pParam    - parameters for the debug function
62  * \return None
63  */
twifDebugFunction(TI_HANDLE hTWD,TI_UINT32 uFuncType,void * pParam)64 void twifDebugFunction (TI_HANDLE hTWD, TI_UINT32 uFuncType, void *pParam)
65 {
66     TTwd      *pTWD  = (TTwd *)hTWD;
67     TI_HANDLE  hTwIf = pTWD->hTwIf;
68 
69     switch (uFuncType)
70     {
71     case DBG_TWIF_PRINT_HELP:
72         printTwIfDbgFunctions();
73         break;
74 
75     case DBG_TWIF_PRINT_INFO:
76         twIf_PrintModuleInfo (hTwIf);
77         break;
78 
79 	default:
80    		WLAN_OS_REPORT(("Invalid function type in TWIF debug function: %d\n", uFuncType));
81         break;
82     }
83 }
84 
85 
86 /**
87  * \fn     printTwIfDbgFunctions
88  * \brief  Print the TwIf debug menu
89  *
90  * Print the TwIf debug menu
91  *
92  * \return None
93  */
printTwIfDbgFunctions(void)94 static void printTwIfDbgFunctions (void)
95 {
96     WLAN_OS_REPORT(("   TwIf Debug Functions   \n"));
97 	WLAN_OS_REPORT(("--------------------------\n"));
98 	WLAN_OS_REPORT(("2300 - Print the TwIf Debug Help\n"));
99 	WLAN_OS_REPORT(("2301 - Print the TwIf Information\n"));
100 }
101 
102 
103 
104 
105 
106 
107 
108