OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [drivers/] [bluetooth/] [hci_uart.h] - Blame information for rev 1774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1275 phoenix
/*
2
   BlueZ - Bluetooth protocol stack for Linux
3
   Copyright (C) 2000-2001 Qualcomm Incorporated
4
 
5
   Written 2000,2001 by Maxim Krasnyansky <maxk@qualcomm.com>
6
 
7
   This program is free software; you can redistribute it and/or modify
8
   it under the terms of the GNU General Public License version 2 as
9
   published by the Free Software Foundation;
10
 
11
   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
12
   OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13
   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
14
   IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY
15
   CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
16
   WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
17
   ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
18
   OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19
 
20
   ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS,
21
   COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS
22
   SOFTWARE IS DISCLAIMED.
23
*/
24
 
25
/*
26
 * $Id: hci_uart.h,v 1.1.1.1 2004-04-15 02:29:50 phoenix Exp $
27
 */
28
 
29
#ifndef N_HCI 
30
#define N_HCI   15
31
#endif
32
 
33
/* Ioctls */
34
#define HCIUARTSETPROTO _IOW('U', 200, int)
35
#define HCIUARTGETPROTO _IOR('U', 201, int)
36
 
37
/* UART protocols */
38
#define HCI_UART_MAX_PROTO      3
39
 
40
#define HCI_UART_H4     0
41
#define HCI_UART_BCSP   1
42
#define HCI_UART_NCSP   2
43
 
44
#ifdef __KERNEL__
45
struct hci_uart;
46
 
47
struct hci_uart_proto {
48
        unsigned int id;
49
        int (*open)(struct hci_uart *hu);
50
        int (*close)(struct hci_uart *hu);
51
        int (*flush)(struct hci_uart *hu);
52
        int (*recv)(struct hci_uart *hu, void *data, int len);
53
        int (*enqueue)(struct hci_uart *hu, struct sk_buff *skb);
54
        struct sk_buff *(*dequeue)(struct hci_uart *hu);
55
};
56
 
57
struct hci_uart {
58
        struct tty_struct  *tty;
59
        struct hci_dev     hdev;
60
        unsigned long      flags;
61
 
62
        struct hci_uart_proto *proto;
63
        void               *priv;
64
 
65
        struct sk_buff     *tx_skb;
66
        unsigned long      tx_state;
67
        spinlock_t         rx_lock;
68
};
69
 
70
/* HCI_UART flag bits */
71
#define HCI_UART_PROTO_SET              0
72
 
73
/* TX states  */
74
#define HCI_UART_SENDING                1
75
#define HCI_UART_TX_WAKEUP              2
76
 
77
int hci_uart_register_proto(struct hci_uart_proto *p);
78
int hci_uart_unregister_proto(struct hci_uart_proto *p);
79
int hci_uart_tx_wakeup(struct hci_uart *hu);
80
 
81
#endif /* __KERNEL__ */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.