pio_if.m revision 274656
1274656Sbr#- 2274656Sbr# Copyright (c) 2014 Ruslan Bukin <br@bsdpad.com> 3274656Sbr# All rights reserved. 4274656Sbr# 5274656Sbr# This software was developed by SRI International and the University of 6274656Sbr# Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) 7274656Sbr# ("CTSRD"), as part of the DARPA CRASH research programme. 8274656Sbr# 9274656Sbr# Redistribution and use in source and binary forms, with or without 10274656Sbr# modification, are permitted provided that the following conditions 11274656Sbr# are met: 12274656Sbr# 1. Redistributions of source code must retain the above copyright 13274656Sbr# notice, this list of conditions and the following disclaimer. 14274656Sbr# 2. Redistributions in binary form must reproduce the above copyright 15274656Sbr# notice, this list of conditions and the following disclaimer in the 16274656Sbr# documentation and/or other materials provided with the distribution. 17274656Sbr# 18274656Sbr# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 19274656Sbr# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20274656Sbr# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21274656Sbr# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 22274656Sbr# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23274656Sbr# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24274656Sbr# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25274656Sbr# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26274656Sbr# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27274656Sbr# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28274656Sbr# SUCH DAMAGE. 29274656Sbr# 30274656Sbr# $FreeBSD: head/sys/dev/altera/pio/pio_if.m 274656 2014-11-18 14:12:19Z br $ 31274656Sbr# 32274656Sbr 33274656Sbr#include <sys/types.h> 34274656Sbr 35274656SbrINTERFACE pio; 36274656Sbr 37274656Sbr# 38274656Sbr# PIO device methods 39274656Sbr# 40274656Sbr 41274656SbrMETHOD int read { 42274656Sbr device_t dev; 43274656Sbr}; 44274656Sbr 45274656SbrMETHOD int setup_irq { 46274656Sbr device_t dev; 47274656Sbr void *handler; 48274656Sbr void *ih_user; 49274656Sbr}; 50274656Sbr 51274656SbrMETHOD int teardown_irq { 52274656Sbr device_t dev; 53274656Sbr}; 54274656Sbr 55274656SbrMETHOD int set { 56274656Sbr device_t dev; 57274656Sbr int bit; 58274656Sbr int enable; 59274656Sbr}; 60274656Sbr 61274656SbrMETHOD int configure { 62274656Sbr device_t dev; 63274656Sbr int dir; 64274656Sbr int mask; 65274656Sbr} 66