aboutsummaryrefslogtreecommitdiffstats
path: root/ble.c
diff options
context:
space:
mode:
authorroot <root@no.no.james.local>2015-09-01 16:49:20 +0100
committerroot <root@no.no.james.local>2015-09-01 16:49:20 +0100
commitb92a20c60e5a4409179efc5b659411d3c0c7b6f6 (patch)
treefe257f8ae2547dbcbbdf603b33e4715d9d9d471a /ble.c
parent88d098d6b3f85f70c9cde405a0d2ff70997fe706 (diff)
downloadnrfdfu-b92a20c60e5a4409179efc5b659411d3c0c7b6f6.tar.gz
nrfdfu-b92a20c60e5a4409179efc5b659411d3c0c7b6f6.tar.bz2
nrfdfu-b92a20c60e5a4409179efc5b659411d3c0c7b6f6.zip
fix bugs, and better end handling
Diffstat (limited to 'ble.c')
-rw-r--r--ble.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/ble.c b/ble.c
index 7bf7231..24871b9 100644
--- a/ble.c
+++ b/ble.c
@@ -553,6 +553,23 @@ ble_send_cp (BLE * ble, uint8_t * buf, size_t len)
}
+
+int
+ble_send_cp_noresp (BLE * ble, uint8_t * buf, size_t len)
+{
+ printf ("Sending control:\n");
+ hexdump (buf, len);
+
+ if (!bt_gatt_client_write_without_response
+ (ble->gatt, ble->cp_handle, false, buf, len))
+ {
+ printf ("Failed to initiate write procedure\n");
+ return EXIT_FAILURE;
+ }
+ return EXIT_SUCCESS;
+}
+
+
#if 0
int
ble_send_data (BLE * ble, uint8_t * buf, size_t len)