1 // Copyright (c) 2010 Atheros Communications Inc.
2 // All rights reserved.
5 // Permission to use, copy, modify, and/or distribute this software for any
6 // purpose with or without fee is hereby granted, provided that the above
7 // copyright notice and this permission notice appear in all copies.
9 // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 // ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19 #ifndef BTCOEX_GPIO_H_
20 #define BTCOEX_GPIO_H_
46 #define GPIO_DEBUG_WORD_1 (1<<GPIO_A)
47 #define GPIO_DEBUG_WORD_2 (1<<GPIO_B)
48 #define GPIO_DEBUG_WORD_3 ((1<<GPIO_B) | (1<<GPIO_A))
49 #define GPIO_DEBUG_WORD_4 (1<<GPIO_C)
50 #define GPIO_DEBUG_WORD_5 ((1<<GPIO_C) | (1<<GPIO_A))
51 #define GPIO_DEBUG_WORD_6 ((1<<GPIO_C) | (1<<GPIO_B))
52 #define GPIO_DEBUG_WORD_7 ((1<<GPIO_C) | (1<<GPIO_B) | (1<<GPIO_A))
54 #define GPIO_DEBUG_WORD_8 (1<<GPIO_D)
55 #define GPIO_DEBUG_WORD_9 ((1<<GPIO_D) | GPIO_DEBUG_WORD_1)
56 #define GPIO_DEBUG_WORD_10 ((1<<GPIO_D) | GPIO_DEBUG_WORD_2)
57 #define GPIO_DEBUG_WORD_11 ((1<<GPIO_D) | GPIO_DEBUG_WORD_3)
58 #define GPIO_DEBUG_WORD_12 ((1<<GPIO_D) | GPIO_DEBUG_WORD_4)
59 #define GPIO_DEBUG_WORD_13 ((1<<GPIO_D) | GPIO_DEBUG_WORD_5)
60 #define GPIO_DEBUG_WORD_14 ((1<<GPIO_D) | GPIO_DEBUG_WORD_6)
61 #define GPIO_DEBUG_WORD_15 ((1<<GPIO_D) | GPIO_DEBUG_WORD_7)
63 #define GPIO_DEBUG_WORD_16 (1<<GPIO_E)
64 #define GPIO_DEBUG_WORD_17 ((1<<GPIO_E) | GPIO_DEBUG_WORD_1)
65 #define GPIO_DEBUG_WORD_18 ((1<<GPIO_E) | GPIO_DEBUG_WORD_2)
66 #define GPIO_DEBUG_WORD_19 ((1<<GPIO_E) | GPIO_DEBUG_WORD_3)
67 #define GPIO_DEBUG_WORD_20 ((1<<GPIO_E) | GPIO_DEBUG_WORD_4)
68 #define GPIO_DEBUG_WORD_21 ((1<<GPIO_E) | GPIO_DEBUG_WORD_5)
69 #define GPIO_DEBUG_WORD_22 ((1<<GPIO_E) | GPIO_DEBUG_WORD_6)
70 #define GPIO_DEBUG_WORD_23 ((1<<GPIO_E) | GPIO_DEBUG_WORD_7)
74 extern void btcoexDbgPulseWord(A_UINT32 gpioPinMask);
75 extern void btcoexDbgPulse(A_UINT32 pin);
77 #ifdef CONFIG_BTCOEX_ENABLE_GPIO_DEBUG
78 #define BTCOEX_DBG_PULSE_WORD(gpioPinMask) (btcoexDbgPulseWord(gpioPinMask))
79 #define BTCOEX_DBG_PULSE(pin) (btcoexDbgPulse(pin))
81 #define BTCOEX_DBG_PULSE_WORD(gpioPinMask)
82 #define BTCOEX_DBG_PULSE(pin)