5 * Copyright (c) 2004-2007 Atheros Communications Inc.
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation;
13 * Software distributed under the License is distributed on an "AS
14 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
15 * implied. See the License for the specific language governing
16 * rights and limitations under the License.
22 /* ------- Debug related stuff ------- */
24 ATH_DEBUG_SEND
= 0x0001,
25 ATH_DEBUG_RECV
= 0x0002,
26 ATH_DEBUG_SYNC
= 0x0004,
27 ATH_DEBUG_DUMP
= 0x0008,
28 ATH_DEBUG_IRQ
= 0x0010,
29 ATH_DEBUG_TRC
= 0x0020,
30 ATH_DEBUG_WARN
= 0x0040,
31 ATH_DEBUG_ERR
= 0x0080,
32 ATH_DEBUG_ANY
= 0xFFFF,
37 // TODO FIX usage of A_PRINTF!
38 #define AR_DEBUG_LVL_CHECK(lvl) (debughtc & (lvl))
39 #define AR_DEBUG_PRINTBUF(buffer, length, desc) do { \
40 if (debughtc & ATH_DEBUG_DUMP) { \
41 DebugDumpBytes(buffer, length,desc); \
44 #define PRINTX_ARG(arg...) arg
45 #define AR_DEBUG_PRINTF(flags, args) do { \
46 if (debughtc & (flags)) { \
47 A_PRINTF(KERN_ALERT PRINTX_ARG args); \
50 #define AR_DEBUG_ASSERT(test) do { \
52 AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Debug Assert Caught, File %s, Line: %d, Test:%s \n",__FILE__, __LINE__,#test)); \
57 #define AR_DEBUG_PRINTF(flags, args)
58 #define AR_DEBUG_PRINTBUF(buffer, length, desc)
59 #define AR_DEBUG_ASSERT(test)
60 #define AR_DEBUG_LVL_CHECK(lvl) 0
63 void DebugDumpBytes(A_UCHAR
*buffer
, A_UINT16 length
, char *pDescription
);
65 #endif /*HTC_DEBUG_H_*/
This page took 0.044944 seconds and 5 git commands to generate.