portmux.h 957 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
/*
 * AT32 portmux interface.
 *
 * Copyright (C) 2006 Atmel Corporation
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */
10
11
#ifndef __ASM_ARCH_PORTMUX_H__
#define __ASM_ARCH_PORTMUX_H__
12

13
14
15
16
17
/*
 * Set up pin multiplexing, called from board init only.
 *
 * The following flags determine the initial state of the pin.
 */
18
19
20
21
#define AT32_GPIOF_PULLUP	0x00000001	/* (not-OUT) Enable pull-up */
#define AT32_GPIOF_OUTPUT	0x00000002	/* (OUT) Enable output driver */
#define AT32_GPIOF_HIGH		0x00000004	/* (OUT) Set output high */
#define AT32_GPIOF_DEGLITCH	0x00000008	/* (IN) Filter glitches */
22
23
24
25

void at32_select_periph(unsigned int pin, unsigned int periph,
			unsigned long flags);
void at32_select_gpio(unsigned int pin, unsigned long flags);
26
void at32_reserve_pin(unsigned int pin);
27

28
#endif /* __ASM_ARCH_PORTMUX_H__ */