Home | History | Annotate | Line # | Download | only in dev
radio_if.h revision 1.1.20.1
      1  1.1.20.1     skrll /* $NetBSD: radio_if.h,v 1.1.20.1 2004/11/02 07:51:19 skrll Exp $ */
      2       1.1  augustss /* $OpenBSD: radio_if.h,v 1.2 2001/12/05 10:27:06 mickey Exp $ */
      3       1.1  augustss /* $RuOBSD: radio_if.h,v 1.6 2001/10/18 16:51:36 pva Exp $ */
      4       1.1  augustss 
      5       1.1  augustss /*
      6       1.1  augustss  * Copyright (c) 2001 Maxim Tsyplakov <tm (at) oganer.net>
      7       1.1  augustss  * All rights reserved.
      8       1.1  augustss  *
      9       1.1  augustss  * Redistribution and use in source and binary forms, with or without
     10       1.1  augustss  * modification, are permitted provided that the following conditions
     11       1.1  augustss  * are met:
     12       1.1  augustss  * 1. Redistributions of source code must retain the above copyright
     13       1.1  augustss  *    notice, this list of conditions and the following disclaimer.
     14       1.1  augustss  * 2. Redistributions in binary form must reproduce the above copyright
     15       1.1  augustss  *    notice, this list of conditions and the following disclaimer in the
     16       1.1  augustss  *    documentation and/or other materials provided with the distribution.
     17       1.1  augustss  *
     18       1.1  augustss  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     19       1.1  augustss  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     20       1.1  augustss  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     21       1.1  augustss  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
     22       1.1  augustss  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     23       1.1  augustss  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
     24       1.1  augustss  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
     25       1.1  augustss  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
     26       1.1  augustss  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
     27       1.1  augustss  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     28       1.1  augustss  */
     29       1.1  augustss 
     30       1.1  augustss #ifndef _SYS_DEV_RADIO_IF_H
     31       1.1  augustss #define _SYS_DEV_RADIO_IF_H
     32       1.1  augustss 
     33       1.1  augustss /*
     34       1.1  augustss  * Generic interface to hardware driver
     35       1.1  augustss  */
     36       1.1  augustss 
     37       1.1  augustss #define RADIOUNIT(x)	(minor(x))
     38       1.1  augustss 
     39       1.1  augustss struct radio_hw_if {
     40       1.1  augustss 	/* open hardware */
     41       1.1  augustss 	int	(*open)(void *, int, int, struct proc *);
     42       1.1  augustss 
     43       1.1  augustss 	/* close hardware */
     44       1.1  augustss 	int	(*close)(void *, int, int, struct proc *);
     45       1.1  augustss 
     46       1.1  augustss 	int     (*get_info)(void *, struct radio_info *);
     47       1.1  augustss 	int     (*set_info)(void *, struct radio_info *);
     48       1.1  augustss 	int     (*search)(void *, int);
     49       1.1  augustss };
     50       1.1  augustss 
     51       1.1  augustss struct radio_attach_args {
     52  1.1.20.1     skrll 	const struct radio_hw_if *hwif;
     53       1.1  augustss 	void    *hdl;
     54       1.1  augustss };
     55       1.1  augustss 
     56  1.1.20.1     skrll struct device  *radio_attach_mi(const struct radio_hw_if *, void *,
     57  1.1.20.1     skrll     struct device *);
     58       1.1  augustss 
     59       1.1  augustss #endif /* _SYS_DEV_RADIO_IF_H */
     60