nfc_device_copy_data

Function nfc_device_copy_data 

Source
pub unsafe extern "C" fn nfc_device_copy_data(
    instance: *const NfcDevice,
    protocol: NfcProtocol,
    protocol_data: *mut NfcDeviceData,
)
Expand description

Copy (export) the data contained in an NfcDevice instance to an outside NfcDeviceData instance.

This function does the inverse of nfc_device_set_data().

The protocol identifier passed as the protocol parameter MUST match the one stored in the instance, otherwise a crash will occur. This is to improve type safety.

§Arguments

  • instance (direction in) - pointer to the instance to be copied from.
  • protocol (direction in) - numeric identifier of the instance’s protocol.
  • protocol_data (direction out) - pointer to the destination data.