MCPcopy Create free account
hub / github.com/deviceplug/btleplug / test_write_with_response

Function test_write_with_response

tests/common/test_cases.rs:240–252  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

238}
239
240pub async fn test_write_with_response() {
241 use btleplug::api::WriteType;
242
243 let peripheral = peripheral_finder::find_and_connect().await;
244 peripheral_finder::reset_peripheral(&peripheral).await;
245 let char = peripheral_finder::find_characteristic(&peripheral, gatt_uuids::WRITE_WITH_RESPONSE);
246 let data = vec![0xAA, 0xBB, 0xCC];
247 peripheral
248 .write(&char, &data, WriteType::WithResponse)
249 .await
250 .unwrap();
251 peripheral.disconnect().await.unwrap();
252}
253
254pub async fn test_write_without_response() {
255 use btleplug::api::WriteType;

Callers

nothing calls this directly

Calls 5

find_and_connectFunction · 0.85
reset_peripheralFunction · 0.85
find_characteristicFunction · 0.85
writeMethod · 0.45
disconnectMethod · 0.45

Tested by

no test coverage detected