summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nrf5/drivers/bluetooth/ble_drv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/nrf5/drivers/bluetooth/ble_drv.c b/nrf5/drivers/bluetooth/ble_drv.c
index b1670d035..8d3348f5f 100644
--- a/nrf5/drivers/bluetooth/ble_drv.c
+++ b/nrf5/drivers/bluetooth/ble_drv.c
@@ -696,10 +696,10 @@ void ble_drv_attr_c_write(uint16_t conn_handle, uint16_t handle, uint16_t len, u
write_params.len = len;
write_params.p_value = p_data;
- uint32_t err_code = sd_ble_gattc_write(conn_handle, &write_params);
-
m_write_done = !w_response;
+ uint32_t err_code = sd_ble_gattc_write(conn_handle, &write_params);
+
if (err_code != 0) {
nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_OSError,
"Can not write attribute value. status: 0x" HEX2_FMT, (uint16_t)err_code));