hci_usb.h
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:2k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  1. /* 
  2.    BlueZ - Bluetooth protocol stack for Linux
  3.    Copyright (C) 2000-2001 Qualcomm Incorporated
  4.    Written 2000,2001 by Maxim Krasnyansky <maxk@qualcomm.com>
  5.    This program is free software; you can redistribute it and/or modify
  6.    it under the terms of the GNU General Public License version 2 as
  7.    published by the Free Software Foundation;
  8.    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  9.    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  10.    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
  11.    IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY
  12.    CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES 
  13.    WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 
  14.    ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 
  15.    OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  16.    ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS, 
  17.    COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS 
  18.    SOFTWARE IS DISCLAIMED.
  19. */
  20. /*
  21.  * $Id: hci_usb.h,v 1.2 2002/03/18 19:10:04 maxk Exp $
  22.  */
  23. #ifdef __KERNEL__
  24. /* Class, SubClass, and Protocol codes that describe a Bluetooth device */
  25. #define HCI_DEV_CLASS        0xe0 /* Wireless class */
  26. #define HCI_DEV_SUBCLASS     0x01 /* RF subclass */
  27. #define HCI_DEV_PROTOCOL     0x01 /* Bluetooth programming protocol */
  28. #define HCI_CTRL_REQ      0x20
  29. #define HCI_MAX_IFACE_NUM 3 
  30. #define HCI_MAX_BULK_TX      4
  31. #define HCI_MAX_BULK_RX      1
  32. struct hci_usb {
  33. struct hci_dev hdev;
  34. unsigned long state;
  35. struct usb_device  *udev;
  36. struct usb_interface    *isoc_iface;
  37. __u8 bulk_out_ep;
  38. __u8 bulk_in_ep;
  39. __u8 isoc_out_ep;
  40. __u8 isoc_in_ep;
  41. __u8 intr_ep;
  42. __u8 intr_interval;
  43. struct urb *intr_urb;
  44. struct sk_buff * intr_skb;
  45. rwlock_t completion_lock;
  46. struct sk_buff_head cmd_q;      // TX Commands
  47. struct sk_buff_head acl_q;      // TX ACLs
  48. struct sk_buff_head pending_q;   // Pending requests
  49. struct sk_buff_head completed_q; // Completed requests
  50. };
  51. struct hci_usb_scb {
  52. struct urb *urb;
  53. int    intr_len;
  54. };
  55. /* States  */
  56. #define HCI_USB_TX_PROCESS 1
  57. #define HCI_USB_TX_WAKEUP 2
  58. #define HCI_USB_CTRL_TX 3
  59. #endif /* __KERNEL__ */