Path: blob/master/arch/avr32/mach-at32ap/include/mach/portmux.h
10820 views
/*1* AT32 portmux interface.2*3* Copyright (C) 2006 Atmel Corporation4*5* This program is free software; you can redistribute it and/or modify6* it under the terms of the GNU General Public License version 2 as7* published by the Free Software Foundation.8*/9#ifndef __ASM_ARCH_PORTMUX_H__10#define __ASM_ARCH_PORTMUX_H__1112/*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 /* (not-OUT) Enable pull-up */18#define AT32_GPIOF_OUTPUT 0x00000002 /* (OUT) Enable output driver */19#define AT32_GPIOF_HIGH 0x00000004 /* (OUT) Set output high */20#define AT32_GPIOF_DEGLITCH 0x00000008 /* (IN) Filter glitches */21#define AT32_GPIOF_MULTIDRV 0x00000010 /* Enable multidriver option */2223void at32_select_periph(unsigned int port, unsigned int pin,24unsigned int periph, unsigned long flags);25void at32_select_gpio(unsigned int pin, unsigned long flags);26void at32_deselect_pin(unsigned int pin);27void at32_reserve_pin(unsigned int port, u32 pin_mask);2829#endif /* __ASM_ARCH_PORTMUX_H__ */303132