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

Function test_write_without_response

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

Source from the content-addressed store, hash-verified

252}
253
254pub async fn test_write_without_response() {
255 use btleplug::api::WriteType;
256
257 let peripheral = peripheral_finder::find_and_connect().await;
258 peripheral_finder::reset_peripheral(&peripheral).await;
259 let char =
260 peripheral_finder::find_characteristic(&peripheral, gatt_uuids::WRITE_WITHOUT_RESPONSE);
261 let data = vec![0x11, 0x22, 0x33];
262 peripheral
263 .write(&char, &data, WriteType::WithoutResponse)
264 .await
265 .unwrap();
266 peripheral.disconnect().await.unwrap();
267}
268
269pub async fn test_write_without_response_burst() {
270 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