diff options
-rw-r--r-- | nrf-softdevice/src/ble/gatt_client.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/nrf-softdevice/src/ble/gatt_client.rs b/nrf-softdevice/src/ble/gatt_client.rs index 2944066..3e82eed 100644 --- a/nrf-softdevice/src/ble/gatt_client.rs +++ b/nrf-softdevice/src/ble/gatt_client.rs @@ -407,6 +407,7 @@ pub async fn read(conn: &Connection, handle: u16, buf: &mut [u8]) -> Result<usiz #[cfg_attr(feature = "defmt", derive(defmt::Format))] pub enum WriteError { Disconnected, + Timeout, Gatt(GattError), Raw(RawError), } @@ -461,6 +462,9 @@ pub async fn write(conn: &Connection, handle: u16, buf: &[u8]) -> Result<(), Wri }; Some(Ok(())) } + raw::BLE_GATTC_EVTS_BLE_GATTC_EVT_TIMEOUT => { + return Some(Err(WriteError::Timeout)); + } _ => None, } }) |