Skip to content

Commit d898542

Browse files
committed
Add Write command to the darwin gattc implementaiton
1 parent d0c7887 commit d898542

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Diff for: gattc_darwin.go

+8
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,14 @@ func (c *DeviceCharacteristic) UUID() UUID {
175175
return c.uuidWrapper
176176
}
177177

178+
// Write replaces the characteristic value with a new value. The
179+
// call will return after all data has been written.
180+
func (c DeviceCharacteristic) Write(p []byte) (n int, err error) {
181+
c.service.device.prph.WriteCharacteristic(p, c.characteristic, true)
182+
183+
return len(p), nil
184+
}
185+
178186
// WriteWithoutResponse replaces the characteristic value with a new value. The
179187
// call will return before all data has been written. A limited number of such
180188
// writes can be in flight at any given time. This call is also known as a

0 commit comments

Comments
 (0)