component/bt:Fixed the bug for #11754:GATT service should provide command to set char/descriptor read value.

pull/307/merge
Yulong 2017-04-28 07:23:52 -04:00
rodzic 523a76fe0b
commit e8a3f87e4f
3 zmienionych plików z 5 dodań i 2 usunięć

Wyświetl plik

@ -347,6 +347,7 @@ esp_err_t esp_ble_gatts_set_attr_value(uint16_t attr_handle, uint16_t length, co
msg.sig = BTC_SIG_API_CALL;
msg.pid = BTC_PID_GATTS;
msg.act = BTC_GATTS_ACT_SET_ATTR_VALUE;
arg.set_attr_val.handle = attr_handle;
arg.set_attr_val.length = length;
arg.set_attr_val.value = (uint8_t *)value;

Wyświetl plik

@ -560,7 +560,8 @@ void btc_gatts_call_handler(btc_msg_t *msg)
break;
}
case BTC_GATTS_ACT_SET_ATTR_VALUE:
BTA_SetAttributeValue(arg->set_attr_val.handle, arg->set_attr_val.length,
arg->set_attr_val.value);
break;
case BTC_GATTS_ACT_OPEN: {
// Ensure device is in inquiry database

Wyświetl plik

@ -123,7 +123,8 @@ typedef union {
} send_rsp;
//BTC_GATTS_SET_ATTR_VALUE
struct set_attr_val_args{
struct set_attr_val_args {
uint16_t handle;
uint16_t length;
uint8_t *value;
} set_attr_val;