Skip to content

Commit b9ed86e

Browse files
authored
Enable Notify or Indication ability to change default GattWriteOption (#125)
1 parent 1c1eeb1 commit b9ed86e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nanoFramework.Device.Bluetooth/GenericAttributeProfile/GattCharacteristic.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ public GattReadClientCharacteristicConfigurationDescriptorResult ReadClientChara
157157
/// <returns>
158158
/// Returns an asynchronous operation that completes with a GattWriteResult object.
159159
/// </returns>
160-
public GattWriteResult WriteClientCharacteristicConfigurationDescriptorWithResult(GattClientCharacteristicConfigurationDescriptorValue clientCharacteristicConfigurationDescriptorValue)
160+
public GattWriteResult WriteClientCharacteristicConfigurationDescriptorWithResult(GattClientCharacteristicConfigurationDescriptorValue clientCharacteristicConfigurationDescriptorValue, GattWriteOption gattWriteOption = GattWriteOption.WriteWithoutResponse)
161161
{
162162
GattCommunicationStatus status = GattCommunicationStatus.AccessDenied;
163163
byte protocolError = 0;
@@ -181,7 +181,7 @@ public GattWriteResult WriteClientCharacteristicConfigurationDescriptorWithResul
181181
GattWriteResult wr = _service.Device.WriteAttributeValueWithResult(
182182
_cccdDescriptorHandle,
183183
dw.DetachBuffer(),
184-
GattWriteOption.WriteWithoutResponse);
184+
gattWriteOption);
185185

186186
if (wr.Status == 0)
187187
{

0 commit comments

Comments
 (0)