[2.0.0] Add BLE characteristic callbacks overloads (#4832)
Add BLE characteristic callbacks overloads with esp_ble_gatts_cb_param_t* param. Example: class BleCharactCallback : public BLECharacteristicCallbacks { void onRead(BLECharacteristic *pCharacteristic, esp_ble_gatts_cb_param_t *param) { auto addr = param->read.bda; ESP_LOGV(TAG, "Device " ESP_BD_ADDR_STR " request data", ESP_BD_ADDR_HEX(addr)); } void onWrite(BLECharacteristic *pCharacteristic, esp_ble_gatts_cb_param_t *param) { auto addr = param->write.bda; ESP_LOGV(TAG, "Device " ESP_BD_ADDR_STR " transmit data", ESP_BD_ADDR_HEX(addr)); } };
Showing
想要评论请 注册 或 登录