OLD | NEW |
1 //------------------------------------------------------------------------------ | 1 //------------------------------------------------------------------------------ |
2 // <copyright file="gpio.h" company="Atheros"> | 2 // Copyright (c) 2005-2010 Atheros Corporation. All rights reserved. |
3 // Copyright (c) 2005 Atheros Corporation. All rights reserved. | |
4 // | |
5 // This program is free software; you can redistribute it and/or modify | |
6 // it under the terms of the GNU General Public License version 2 as | |
7 // published by the Free Software Foundation; | |
8 // | |
9 // Software distributed under the License is distributed on an "AS | |
10 // IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or | |
11 // implied. See the License for the specific language governing | |
12 // rights and limitations under the License. | |
13 // | 3 // |
14 // | 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 // Author(s): ="Atheros" |
15 //------------------------------------------------------------------------------ | 20 //------------------------------------------------------------------------------ |
16 //============================================================================== | |
17 // Author(s): ="Atheros" | |
18 //============================================================================== | |
19 | 21 |
20 #define AR6001_GPIO_PIN_COUNT 18 | 22 #define AR6001_GPIO_PIN_COUNT 18 |
21 #define AR6002_GPIO_PIN_COUNT 18 | 23 #define AR6002_GPIO_PIN_COUNT 18 |
22 #define AR6003_GPIO_PIN_COUNT 28 | 24 #define AR6003_GPIO_PIN_COUNT 28 |
23 | 25 |
24 /* | 26 /* |
25 * Possible values for WMIX_GPIO_SET_REGISTER_CMDID. | 27 * Possible values for WMIX_GPIO_SET_REGISTER_CMDID. |
26 * NB: These match hardware order, so that addresses can | 28 * NB: These match hardware order, so that addresses can |
27 * easily be computed. | 29 * easily be computed. |
28 */ | 30 */ |
29 #define GPIO_ID_OUT 0x00000000 | 31 #define GPIO_ID_OUT 0x00000000 |
30 #define GPIO_ID_OUT_W1TS 0x00000001 | 32 #define GPIO_ID_OUT_W1TS 0x00000001 |
31 #define GPIO_ID_OUT_W1TC 0x00000002 | 33 #define GPIO_ID_OUT_W1TC 0x00000002 |
32 #define GPIO_ID_ENABLE 0x00000003 | 34 #define GPIO_ID_ENABLE 0x00000003 |
33 #define GPIO_ID_ENABLE_W1TS 0x00000004 | 35 #define GPIO_ID_ENABLE_W1TS 0x00000004 |
34 #define GPIO_ID_ENABLE_W1TC 0x00000005 | 36 #define GPIO_ID_ENABLE_W1TC 0x00000005 |
35 #define GPIO_ID_IN 0x00000006 | 37 #define GPIO_ID_IN 0x00000006 |
36 #define GPIO_ID_STATUS 0x00000007 | 38 #define GPIO_ID_STATUS 0x00000007 |
37 #define GPIO_ID_STATUS_W1TS 0x00000008 | 39 #define GPIO_ID_STATUS_W1TS 0x00000008 |
38 #define GPIO_ID_STATUS_W1TC 0x00000009 | 40 #define GPIO_ID_STATUS_W1TC 0x00000009 |
39 #define GPIO_ID_PIN0 0x0000000a | 41 #define GPIO_ID_PIN0 0x0000000a |
40 #define GPIO_ID_PIN(n) (GPIO_ID_PIN0+(n)) | 42 #define GPIO_ID_PIN(n) (GPIO_ID_PIN0+(n)) |
41 | 43 |
42 #define GPIO_LAST_REGISTER_ID GPIO_ID_PIN(17) | 44 #define GPIO_LAST_REGISTER_ID GPIO_ID_PIN(17) |
43 #define GPIO_ID_NONE 0xffffffff | 45 #define GPIO_ID_NONE 0xffffffff |
OLD | NEW |