pca953x.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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. #ifndef __PCA953X_H_
  19. #define __PCA953X_H_
  20. #define PCA953X_IN 0x00
  21. #define PCA953X_OUT 0x01
  22. #define PCA953X_POL 0x02
  23. #define PCA953X_CONF 0x03
  24. #define PCA953X_OUT_LOW 0
  25. #define PCA953X_OUT_HIGH 1
  26. #define PCA953X_POL_NORMAL 0
  27. #define PCA953X_POL_INVERT 1
  28. #define PCA953X_DIR_OUT 0
  29. #define PCA953X_DIR_IN 1
  30. int pca953x_set_val(u8 chip, uint mask, uint data);
  31. int pca953x_set_pol(u8 chip, uint mask, uint data);
  32. int pca953x_set_dir(u8 chip, uint mask, uint data);
  33. int pca953x_get_val(u8 chip);
  34. #endif /* __PCA953X_H_ */