summaryrefslogtreecommitdiff
path: root/sys/dev/bluetooth/btdev.h
diff options
context:
space:
mode:
authortron <tron@NetBSD.org>2006-07-26 10:30:59 +0000
committertron <tron@NetBSD.org>2006-07-26 10:30:59 +0000
commit4241fec1bf5dddf07d1681ccdcbe408f389dbbe2 (patch)
tree8bfa4c84be7a357bbb1f40913c22e26eec582650 /sys/dev/bluetooth/btdev.h
parentb504a17332ef6e90bb11c6a3aedd721959b653fb (diff)
Bluetooth fixes by Iain Hibbert:
Change the way in which bluetooth devices attach to system. The new way is for devices to attach directly to a btdevN device via its own control file /dev/btdevN. - bthub(4) is replaced by btdev(4). - /dev/bthubctl is replaced by /dev/btdevN. - configuration now uses proplib(3) property lists. - btcontrol(8) updated to use new API, and now uses private - XML config file /var/db/btdev.xml.
Diffstat (limited to 'sys/dev/bluetooth/btdev.h')
-rw-r--r--sys/dev/bluetooth/btdev.h61
1 files changed, 3 insertions, 58 deletions
diff --git a/sys/dev/bluetooth/btdev.h b/sys/dev/bluetooth/btdev.h
index e8aa4ff8421..35714174e81 100644
--- a/sys/dev/bluetooth/btdev.h
+++ b/sys/dev/bluetooth/btdev.h
@@ -1,4 +1,4 @@
-/* $NetBSD: btdev.h,v 1.1 2006/06/19 15:44:45 gdamore Exp $ */
+/* $NetBSD: btdev.h,v 1.2 2006/07/26 10:31:00 tron Exp $ */
/*-
* Copyright (c) 2006 Itronix Inc.
@@ -34,63 +34,8 @@
#ifndef _DEV_BLUETOOTH_BTDEV_H_
#define _DEV_BLUETOOTH_BTDEV_H_
-/*
- * Bluetooth Device attach arguments (from userland)
- */
-struct btdev_attach_args {
- bdaddr_t bd_laddr; /* local address */
- bdaddr_t bd_raddr; /* remote address */
- uint16_t bd_type; /* device type */
-
- union {
- struct { /* HID arguments */
- uint16_t hid_flags;/* HID flags */
- uint16_t hid_ctl; /* control PSM */
- uint16_t hid_int; /* interrupt PSM */
- void *hid_desc; /* HID descriptor */
- uint16_t hid_dlen; /* descriptor length */
- } bdd_hid;
-
- struct { /* HSET arguments */
- uint8_t hset_channel; /* RFCOMM channel */
- uint8_t hset_mtu; /* SCO mtu */
- } bdd_hset;
-
- struct { /* Advance Audio arguments */
- } bdd_a2dp;
- } bdd;
-};
-
-#define bd_hid bdd.bdd_hid
-#define bd_hset bdd.bdd_hset
-#define bd_a2dp bdd.bdd_a2dp
-
-/* btdev type */
-#define BTDEV_HID 0x0001
-#define BTDEV_HSET 0x0002
-
-/* bthid flags */
-#define BTHID_INITIATE (1 << 0) /* normally initiate */
-#define BTHID_CONNECT (1 << 1) /* initiate connect */
-
/* btdev attach/detach ioctl's */
-#define BTDEV_ATTACH _IOW('b', 14, struct btdev_attach_args)
-#define BTDEV_DETACH _IOW('b', 15, bdaddr_t)
-
-#ifdef _KERNEL
-
-/*
- * Bluetooth device header
- */
-struct btdev {
- struct device sc_dev; /* system device */
- bdaddr_t sc_addr; /* device bdaddr */
-
- LIST_ENTRY(btdev) sc_next;
-};
-
-#define btdev_name(d) (((struct btdev *)(d))->sc_dev.dv_xname)
-
-#endif /* _KERNEL */
+#define BTDEV_ATTACH _IOW('b', 14, struct plistref)
+#define BTDEV_DETACH _IOW('b', 15, struct plistref)
#endif /* _DEV_BLUETOOTH_BTDEV_H_ */