fix Central Chars write response
This commit is contained in:
1 parent
9ac50c633f
commit
fde64249d7
2 files changed
+4
-2
No files matched your search
@@ -129,6 +129,8 @@ uint16_t BLECentralCharacteristic::write_resp(const void* data, int len)
|
||||
// SD132 v3.0 could negotiate MTU to higher number
|
||||
const uint16_t MTU_MPS = 20;
|
||||
|
||||
const uint16_t conn_handle = _service->connHandle();
|
||||
|
||||
const uint8_t* u8data = (const uint8_t*) data;
|
||||
|
||||
// Write Response requires to wait for BLE_GATTC_EVT_WRITE_RSP event
|
||||
@@ -150,7 +152,7 @@ uint16_t BLECentralCharacteristic::write_resp(const void* data, int len)
|
||||
.p_value = (uint8_t* ) u8data
|
||||
};
|
||||
|
||||
if ( ERROR_NONE != sd_ble_gattc_write(Bluefruit.Central.connHandle(), ¶m) ) break;
|
||||
if ( ERROR_NONE != sd_ble_gattc_write(conn_handle, ¶m) ) break;
|
||||
|
||||
if ( !xSemaphoreTake(_sem, CENTRAL_CHR_TIMEOUT) ) break;
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ typedef struct
|
||||
|
||||
uint8_t categoryID;
|
||||
uint8_t categoryCount;
|
||||
uint32_t NotificationUID;
|
||||
uint32_t uid;
|
||||
} ancsNotification_t;
|
||||
|
||||
VERIFY_STATIC( sizeof(ancsNotification_t) == 8);
|
||||
|
||||
Reference in new issue
Block a user