pins.h 931 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * Freescale STMP37XX/STMP378X Pin multiplexing interface definitions
  3. *
  4. * Author: Vladislav Buzov <vbuzov@embeddedalley.com>
  5. *
  6. * Copyright 2008 Freescale Semiconductor, Inc. All Rights Reserved.
  7. * Copyright 2008 Embedded Alley Solutions, Inc All Rights Reserved.
  8. */
  9. /*
  10. * The code contained herein is licensed under the GNU General Public
  11. * License. You may obtain a copy of the GNU General Public License
  12. * Version 2 or later at the following locations:
  13. *
  14. * http://www.opensource.org/licenses/gpl-license.html
  15. * http://www.gnu.org/copyleft/gpl.html
  16. */
  17. #ifndef __ASM_PLAT_PINS_H
  18. #define __ASM_PLAT_PINS_H
  19. #define STMP3XXX_PINID(bank, pin) (bank * 32 + pin)
  20. #define STMP3XXX_PINID_TO_BANK(pinid) (pinid / 32)
  21. #define STMP3XXX_PINID_TO_PINNUM(pinid) (pinid % 32)
  22. /*
  23. * Special invalid pin identificator to show a pin doesn't exist
  24. */
  25. #define PINID_NO_PIN STMP3XXX_PINID(0xFF, 0xFF)
  26. #endif /* __ASM_PLAT_PINS_H */