Home | History | Annotate | Line # | Download | only in btattach
btattach.h revision 1.2
      1  1.2   lukem /*	$NetBSD: btattach.h,v 1.2 2009/04/15 00:32:23 lukem Exp $	*/
      2  1.1  plunky 
      3  1.1  plunky /*-
      4  1.1  plunky  * Copyright (c) 2008 Iain Hibbert
      5  1.1  plunky  * All rights reserved.
      6  1.1  plunky  *
      7  1.1  plunky  * Redistribution and use in source and binary forms, with or without
      8  1.1  plunky  * modification, are permitted provided that the following conditions
      9  1.1  plunky  * are met:
     10  1.1  plunky  * 1. Redistributions of source code must retain the above copyright
     11  1.1  plunky  *    notice, this list of conditions and the following disclaimer.
     12  1.1  plunky  * 2. Redistributions in binary form must reproduce the above copyright
     13  1.1  plunky  *    notice, this list of conditions and the following disclaimer in the
     14  1.1  plunky  *    documentation and/or other materials provided with the distribution.
     15  1.1  plunky  *
     16  1.1  plunky  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     17  1.1  plunky  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     18  1.1  plunky  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     19  1.1  plunky  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     20  1.1  plunky  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
     21  1.1  plunky  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     22  1.1  plunky  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     23  1.1  plunky  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     24  1.1  plunky  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
     25  1.1  plunky  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     26  1.1  plunky  */
     27  1.1  plunky 
     28  1.1  plunky #include <sys/types.h>
     29  1.1  plunky #include <stdbool.h>
     30  1.1  plunky 
     31  1.1  plunky typedef void (devinit_t)(int, unsigned int);
     32  1.1  plunky 
     33  1.1  plunky struct devtype {
     34  1.1  plunky 	const char *	name;	/* short name */
     35  1.1  plunky 	const char *	line;	/* line discipline */
     36  1.1  plunky 	const char *	descr;	/* long description */
     37  1.1  plunky 	devinit_t *	init;	/* init function */
     38  1.1  plunky 	tcflag_t	cflag;	/* default cflags */
     39  1.2   lukem 	unsigned int	speed;	/* default baudrate */
     40  1.1  plunky };
     41  1.1  plunky 
     42  1.1  plunky devinit_t init_bcm2035;
     43  1.1  plunky devinit_t init_bgb2xx;
     44  1.1  plunky devinit_t init_csr;
     45  1.1  plunky devinit_t init_digi;
     46  1.1  plunky devinit_t init_ericsson;
     47  1.1  plunky devinit_t init_st;
     48  1.1  plunky devinit_t init_stlc2500;
     49  1.1  plunky devinit_t init_swave;
     50  1.1  plunky 
     51  1.1  plunky void uart_send_cmd(int, uint16_t, void *, size_t);
     52  1.1  plunky size_t uart_recv_ev(int, uint8_t, void *, size_t);
     53  1.1  plunky size_t uart_recv_cc(int, uint16_t, void *, size_t);
     54