Peter Tyser | 9902e42 | 2008-12-17 16:36:21 -0600 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2008 Extreme Engineering Solutions, Inc. |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU General Public License |
| 6 | * Version 2 as published by the Free Software Foundation. |
| 7 | * |
| 8 | * This program is distributed in the hope that it will be useful, |
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | * GNU General Public License for more details. |
| 12 | * |
| 13 | * You should have received a copy of the GNU General Public License |
| 14 | * along with this program; if not, write to the Free Software |
| 15 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
| 16 | * MA 02111-1307 USA |
| 17 | */ |
| 18 | |
| 19 | #ifndef __PCA953X_H_ |
| 20 | #define __PCA953X_H_ |
| 21 | |
| 22 | #define PCA953X_IN 0x00 |
| 23 | #define PCA953X_OUT 0x01 |
| 24 | #define PCA953X_POL 0x02 |
| 25 | #define PCA953X_CONF 0x03 |
| 26 | |
| 27 | #define PCA953X_OUT_LOW 0 |
| 28 | #define PCA953X_OUT_HIGH 1 |
| 29 | #define PCA953X_POL_NORMAL 0 |
| 30 | #define PCA953X_POL_INVERT 1 |
| 31 | #define PCA953X_DIR_OUT 0 |
| 32 | #define PCA953X_DIR_IN 1 |
| 33 | |
| 34 | int pca953x_set_val(u8 chip, uint mask, uint data); |
| 35 | int pca953x_set_pol(u8 chip, uint mask, uint data); |
| 36 | int pca953x_set_dir(u8 chip, uint mask, uint data); |
| 37 | int pca953x_get_val(u8 chip); |
| 38 | |
| 39 | #endif /* __PCA953X_H_ */ |