aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2012-06-19 14:12:27 -0300
committerJoão Paulo Rechi Vita <jprvita@openbossa.org>2012-06-21 18:00:19 -0300
commitee843839e79f7514f8d82ab704819606f5f6f629 (patch)
treed598d6b2136133d4a2161e937a31dc6fb89eb99e
parent85befcf7c3d2af052897c373bc7090454c7ec3f5 (diff)
downloadbluez-ee843839e79f7514f8d82ab704819606f5f6f629.tar.gz
bluez-ee843839e79f7514f8d82ab704819606f5f6f629.tar.xz
bluez-ee843839e79f7514f8d82ab704819606f5f6f629.zip
hog: Add fast connection parameters settings
-rw-r--r--input/hog_device.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/input/hog_device.c b/input/hog_device.c
index dbbea10b..dfa23128 100644
--- a/input/hog_device.c
+++ b/input/hog_device.c
@@ -68,6 +68,12 @@
#define MIN(x, y) ((x) < (y) ? (x) : (y))
#endif
+/* 30 msec: 48 * 0.625 */
+#define HOG_FAST_CONN_INTERVAL 48
+
+/* 30 msec: 48 * 0.625 */
+#define HOG_FAST_CONN_WINDOW 48
+
struct hog_device {
char *path;
struct btd_device *device;
@@ -587,6 +593,7 @@ int hog_device_register(struct btd_device *device, const char *path)
struct gatt_primary *prim;
GIOCondition cond = G_IO_IN | G_IO_ERR | G_IO_NVAL;
GIOChannel *io;
+ struct scan_params fast;
hogdev = find_device_by_path(devices, path);
if (hogdev)
@@ -615,7 +622,9 @@ int hog_device_register(struct btd_device *device, const char *path)
hogdev->hog_primary = g_memdup(prim, sizeof(*prim));
- hogdev->attioid = btd_device_add_attio_callback(device,
+ fast.interval = HOG_FAST_CONN_INTERVAL;
+ fast.window = HOG_FAST_CONN_WINDOW;
+ hogdev->attioid = btd_device_add_attio_callback(device, &fast,
attio_connected_cb,
attio_disconnected_cb,
hogdev);