[PATCH 08/10] android/gatt: Add support for reliable write

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch add support for reliable write
---
 android/gatt.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/android/gatt.c b/android/gatt.c
index c98a4f1..e5da1b2 100644
--- a/android/gatt.c
+++ b/android/gatt.c
@@ -55,6 +55,7 @@
 #define GATT_FAILURE	0x00000101
 
 #define GATT_WRITE_DEFAULT	0x02
+#define GATT_WRITE_RELIABLE	0x03
 
 struct gatt_client {
 	int32_t id;
@@ -2078,6 +2079,11 @@ static void handle_client_write_characteristic(const void *buf, uint16_t len)
 	}
 
 	switch (cmd->write_type) {
+	case GATT_WRITE_RELIABLE:
+		res = gatt_reliable_write_char(dev->attrib, ch->ch.value_handle,
+							cmd->value, cmd->len,
+							write_char_cb, cb_data);
+		break;
 	case GATT_WRITE_DEFAULT:
 		res = gatt_write_char(dev->attrib, ch->ch.value_handle,
 							cmd->value, cmd->len,
@@ -2377,6 +2383,12 @@ static void handle_client_write_descriptor(const void *buf, uint16_t len)
 	}
 
 	switch (cmd->write_type) {
+	case GATT_WRITE_RELIABLE:
+		res = gatt_reliable_write_char(dev->attrib, descr->handle,
+							cmd->value, cmd->len,
+							write_descr_cb,
+							cb_data);
+		break;
 	case GATT_WRITE_DEFAULT:
 		res = gatt_write_char(dev->attrib, descr->handle, cmd->value,
 					cmd->len, write_descr_cb, cb_data);
-- 
1.8.4

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux