OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2010 Atheros Communications Inc. |
| 2 // All rights reserved. |
| 3 // |
| 4 // |
| 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. |
| 8 // |
| 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. |
| 16 // |
| 17 // |
| 18 |
| 19 #ifndef BTCOEX_GPIO_H_ |
| 20 #define BTCOEX_GPIO_H_ |
| 21 |
| 22 |
| 23 |
| 24 #ifdef FPGA |
| 25 #define GPIO_A (15) |
| 26 #define GPIO_B (16) |
| 27 #define GPIO_C (17) |
| 28 #define GPIO_D (18) |
| 29 #define GPIO_E (19) |
| 30 #define GPIO_F (21) |
| 31 #define GPIO_G (21) |
| 32 #else |
| 33 #define GPIO_A (0) |
| 34 #define GPIO_B (5) |
| 35 #define GPIO_C (6) |
| 36 #define GPIO_D (7) |
| 37 #define GPIO_E (7) |
| 38 #define GPIO_F (7) |
| 39 #define GPIO_G (7) |
| 40 #endif |
| 41 |
| 42 |
| 43 |
| 44 |
| 45 |
| 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)) |
| 53 |
| 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) |
| 62 |
| 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) |
| 71 |
| 72 |
| 73 |
| 74 extern void btcoexDbgPulseWord(A_UINT32 gpioPinMask); |
| 75 extern void btcoexDbgPulse(A_UINT32 pin); |
| 76 |
| 77 #ifdef CONFIG_BTCOEX_ENABLE_GPIO_DEBUG |
| 78 #define BTCOEX_DBG_PULSE_WORD(gpioPinMask) (btcoexDbgPulseWord(gpioPinMask)) |
| 79 #define BTCOEX_DBG_PULSE(pin) (btcoexDbgPulse(pin)) |
| 80 #else |
| 81 #define BTCOEX_DBG_PULSE_WORD(gpioPinMask) |
| 82 #define BTCOEX_DBG_PULSE(pin) |
| 83 |
| 84 #endif |
| 85 #endif |
| 86 |
OLD | NEW |