1262885Sbr/*-
2262885Sbr * Copyright (c) 2014 Ruslan Bukin <br@bsdpad.com>
3262885Sbr * All rights reserved.
4262885Sbr *
5262885Sbr * Redistribution and use in source and binary forms, with or without
6262885Sbr * modification, are permitted provided that the following conditions
7262885Sbr * are met:
8262885Sbr * 1. Redistributions of source code must retain the above copyright
9262885Sbr *    notice, this list of conditions and the following disclaimer.
10262885Sbr * 2. Redistributions in binary form must reproduce the above copyright
11262885Sbr *    notice, this list of conditions and the following disclaimer in the
12262885Sbr *    documentation and/or other materials provided with the distribution.
13262885Sbr *
14262885Sbr * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15262885Sbr * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16262885Sbr * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17262885Sbr * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18262885Sbr * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19262885Sbr * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20262885Sbr * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21262885Sbr * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22262885Sbr * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23262885Sbr * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24262885Sbr * SUCH DAMAGE.
25262885Sbr *
26262885Sbr * $FreeBSD$
27262885Sbr */
28262885Sbr
29262885Sbr#define	NPORTS		5
30262885Sbr#define	NGPIO		(NPORTS * 32)
31262885Sbr
32262885Sbrenum ev_type {
33262885Sbr	DMA_RISING_EDGE,
34262885Sbr	DMA_FALLING_EDGE,
35262885Sbr	DMA_EITHER_EDGE,
36262885Sbr	INT_LOGIC_ZERO,
37262885Sbr	INT_RISING_EDGE,
38262885Sbr	INT_FALLING_EDGE,
39262885Sbr	INT_EITHER_EDGE,
40262885Sbr	INT_LOGIC_ONE,
41262885Sbr};
42262885Sbr
43262885Sbrint port_setup(int, enum ev_type, void (*ih)(void *), void *ih_user);
44