portmux.h 828 B

1234567891011121314151617181920212223242526
  1. /*
  2. * AT32 portmux interface.
  3. *
  4. * Copyright (C) 2006 Atmel Corporation
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. */
  10. #ifndef __ASM_ARCH_PORTMUX_H__
  11. #define __ASM_ARCH_PORTMUX_H__
  12. /*
  13. * Set up pin multiplexing, called from board init only.
  14. *
  15. * The following flags determine the initial state of the pin.
  16. */
  17. #define AT32_GPIOF_PULLUP 0x00000001 /* Enable pull-up */
  18. #define AT32_GPIOF_OUTPUT 0x00000002 /* Enable output driver */
  19. #define AT32_GPIOF_HIGH 0x00000004 /* Set output high */
  20. void at32_select_periph(unsigned int pin, unsigned int periph,
  21. unsigned long flags);
  22. void at32_select_gpio(unsigned int pin, unsigned long flags);
  23. #endif /* __ASM_ARCH_PORTMUX_H__ */