Beispiel #1
0
// Close an NFC device.
func (d Device) Close() error {
	if *d.d == nil {
		// closing a closed device is a nop
		return nil
	}

	*d.d = nil
	C.nfc_close(*d.d)

	return nil
}
Beispiel #2
0
// Close an NFC device.
func (d *Device) Close() error {
	if d.d == nil {
		// closing a closed device is a nop
		return nil
	}

	C.nfc_close(d.d)
	d.d = nil

	return nil
}