Struct nfc_sys::nfc_driver [] [src]

pub struct nfc_driver {
    pub name: *const c_char,
    pub scan_type: scan_type_enum,
    pub scan: Option<unsafe extern fn(context: *const nfc_context, connstrings: *mut nfc_connstring, connstrings_len: size_t) -> size_t>,
    pub open: Option<unsafe extern fn(context: *const nfc_context, connstring: nfc_connstring) -> *mut nfc_device>,
    pub close: Option<unsafe extern fn(pnd: *mut nfc_device)>,
    pub strerror: Option<unsafe extern fn(pnd: *const nfc_device) -> *const c_char>,
    pub initiator_init: Option<unsafe extern fn(pnd: *mut nfc_device) -> c_int>,
    pub initiator_init_secure_element: Option<unsafe extern fn(pnd: *mut nfc_device) -> c_int>,
    pub initiator_select_passive_target: Option<unsafe extern fn(pnd: *mut nfc_device, nm: nfc_modulation, pbtInitData: *const uint8_t, szInitData: size_t, pnt: *mut nfc_target) -> c_int>,
    pub initiator_poll_target: Option<unsafe extern fn(pnd: *mut nfc_device, pnmModulations: *const nfc_modulation, szModulations: size_t, uiPollNr: uint8_t, btPeriod: uint8_t, pnt: *mut nfc_target) -> c_int>,
    pub initiator_select_dep_target: Option<unsafe extern fn(pnd: *mut nfc_device, ndm: nfc_dep_mode, nbr: nfc_baud_rate, pndiInitiator: *const nfc_dep_info, pnt: *mut nfc_target, timeout: c_int) -> c_int>,
    pub initiator_deselect_target: Option<unsafe extern fn(pnd: *mut nfc_device) -> c_int>,
    pub initiator_transceive_bytes: Option<unsafe extern fn(pnd: *mut nfc_device, pbtTx: *const uint8_t, szTx: size_t, pbtRx: *mut uint8_t, szRx: size_t, timeout: c_int) -> c_int>,
    pub initiator_transceive_bits: Option<unsafe extern fn(pnd: *mut nfc_device, pbtTx: *const uint8_t, szTxBits: size_t, pbtTxPar: *const uint8_t, pbtRx: *mut uint8_t, pbtRxPar: *mut uint8_t) -> c_int>,
    pub initiator_transceive_bytes_timed: Option<unsafe extern fn(pnd: *mut nfc_device, pbtTx: *const uint8_t, szTx: size_t, pbtRx: *mut uint8_t, szRx: size_t, cycles: *mut uint32_t) -> c_int>,
    pub initiator_transceive_bits_timed: Option<unsafe extern fn(pnd: *mut nfc_device, pbtTx: *const uint8_t, szTxBits: size_t, pbtTxPar: *const uint8_t, pbtRx: *mut uint8_t, pbtRxPar: *mut uint8_t, cycles: *mut uint32_t) -> c_int>,
    pub initiator_target_is_present: Option<unsafe extern fn(pnd: *mut nfc_device, pnt: *const nfc_target) -> c_int>,
    pub target_init: Option<unsafe extern fn(pnd: *mut nfc_device, pnt: *mut nfc_target, pbtRx: *mut uint8_t, szRx: size_t, timeout: c_int) -> c_int>,
    pub target_send_bytes: Option<unsafe extern fn(pnd: *mut nfc_device, pbtTx: *const uint8_t, szTx: size_t, timeout: c_int) -> c_int>,
    pub target_receive_bytes: Option<unsafe extern fn(pnd: *mut nfc_device, pbtRx: *mut uint8_t, szRxLen: size_t, timeout: c_int) -> c_int>,
    pub target_send_bits: Option<unsafe extern fn(pnd: *mut nfc_device, pbtTx: *const uint8_t, szTxBits: size_t, pbtTxPar: *const uint8_t) -> c_int>,
    pub target_receive_bits: Option<unsafe extern fn(pnd: *mut nfc_device, pbtRx: *mut uint8_t, szRxLen: size_t, pbtRxPar: *mut uint8_t) -> c_int>,
    pub device_set_property_bool: Option<unsafe extern fn(pnd: *mut nfc_device, property: nfc_property, bEnable: u8) -> c_int>,
    pub device_set_property_int: Option<unsafe extern fn(pnd: *mut nfc_device, property: nfc_property, value: c_int) -> c_int>,
    pub get_supported_modulation: Option<unsafe extern fn(pnd: *mut nfc_device, mode: nfc_mode, supported_mt: *mut *const nfc_modulation_type) -> c_int>,
    pub get_supported_baud_rate: Option<unsafe extern fn(pnd: *mut nfc_device, mode: nfc_mode, nmt: nfc_modulation_type, supported_br: *mut *const nfc_baud_rate) -> c_int>,
    pub device_get_information_about: Option<unsafe extern fn(pnd: *mut nfc_device, buf: *mut *mut c_char) -> c_int>,
    pub abort_command: Option<unsafe extern fn(pnd: *mut nfc_device) -> c_int>,
    pub idle: Option<unsafe extern fn(pnd: *mut nfc_device) -> c_int>,
    pub powerdown: Option<unsafe extern fn(pnd: *mut nfc_device) -> c_int>,
}

Fields

name: *const c_char scan_type: scan_type_enum scan: Option<unsafe extern fn(context: *const nfc_context, connstrings: *mut nfc_connstring, connstrings_len: size_t) -> size_t> open: Option<unsafe extern fn(context: *const nfc_context, connstring: nfc_connstring) -> *mut nfc_device> close: Option<unsafe extern fn(pnd: *mut nfc_device)> strerror: Option<unsafe extern fn(pnd: *const nfc_device) -> *const c_char> initiator_init: Option<unsafe extern fn(pnd: *mut nfc_device) -> c_int> initiator_init_secure_element: Option<unsafe extern fn(pnd: *mut nfc_device) -> c_int> initiator_select_passive_target: Option<unsafe extern fn(pnd: *mut nfc_device, nm: nfc_modulation, pbtInitData: *const uint8_t, szInitData: size_t, pnt: *mut nfc_target) -> c_int> initiator_poll_target: Option<unsafe extern fn(pnd: *mut nfc_device, pnmModulations: *const nfc_modulation, szModulations: size_t, uiPollNr: uint8_t, btPeriod: uint8_t, pnt: *mut nfc_target) -> c_int> initiator_select_dep_target: Option<unsafe extern fn(pnd: *mut nfc_device, ndm: nfc_dep_mode, nbr: nfc_baud_rate, pndiInitiator: *const nfc_dep_info, pnt: *mut nfc_target, timeout: c_int) -> c_int> initiator_deselect_target: Option<unsafe extern fn(pnd: *mut nfc_device) -> c_int> initiator_transceive_bytes: Option<unsafe extern fn(pnd: *mut nfc_device, pbtTx: *const uint8_t, szTx: size_t, pbtRx: *mut uint8_t, szRx: size_t, timeout: c_int) -> c_int> initiator_transceive_bits: Option<unsafe extern fn(pnd: *mut nfc_device, pbtTx: *const uint8_t, szTxBits: size_t, pbtTxPar: *const uint8_t, pbtRx: *mut uint8_t, pbtRxPar: *mut uint8_t) -> c_int> initiator_transceive_bytes_timed: Option<unsafe extern fn(pnd: *mut nfc_device, pbtTx: *const uint8_t, szTx: size_t, pbtRx: *mut uint8_t, szRx: size_t, cycles: *mut uint32_t) -> c_int> initiator_transceive_bits_timed: Option<unsafe extern fn(pnd: *mut nfc_device, pbtTx: *const uint8_t, szTxBits: size_t, pbtTxPar: *const uint8_t, pbtRx: *mut uint8_t, pbtRxPar: *mut uint8_t, cycles: *mut uint32_t) -> c_int> initiator_target_is_present: Option<unsafe extern fn(pnd: *mut nfc_device, pnt: *const nfc_target) -> c_int> target_init: Option<unsafe extern fn(pnd: *mut nfc_device, pnt: *mut nfc_target, pbtRx: *mut uint8_t, szRx: size_t, timeout: c_int) -> c_int> target_send_bytes: Option<unsafe extern fn(pnd: *mut nfc_device, pbtTx: *const uint8_t, szTx: size_t, timeout: c_int) -> c_int> target_receive_bytes: Option<unsafe extern fn(pnd: *mut nfc_device, pbtRx: *mut uint8_t, szRxLen: size_t, timeout: c_int) -> c_int> target_send_bits: Option<unsafe extern fn(pnd: *mut nfc_device, pbtTx: *const uint8_t, szTxBits: size_t, pbtTxPar: *const uint8_t) -> c_int> target_receive_bits: Option<unsafe extern fn(pnd: *mut nfc_device, pbtRx: *mut uint8_t, szRxLen: size_t, pbtRxPar: *mut uint8_t) -> c_int> device_set_property_bool: Option<unsafe extern fn(pnd: *mut nfc_device, property: nfc_property, bEnable: u8) -> c_int> device_set_property_int: Option<unsafe extern fn(pnd: *mut nfc_device, property: nfc_property, value: c_int) -> c_int> get_supported_modulation: Option<unsafe extern fn(pnd: *mut nfc_device, mode: nfc_mode, supported_mt: *mut *const nfc_modulation_type) -> c_int> get_supported_baud_rate: Option<unsafe extern fn(pnd: *mut nfc_device, mode: nfc_mode, nmt: nfc_modulation_type, supported_br: *mut *const nfc_baud_rate) -> c_int> device_get_information_about: Option<unsafe extern fn(pnd: *mut nfc_device, buf: *mut *mut c_char) -> c_int> abort_command: Option<unsafe extern fn(pnd: *mut nfc_device) -> c_int> idle: Option<unsafe extern fn(pnd: *mut nfc_device) -> c_int> powerdown: Option<unsafe extern fn(pnd: *mut nfc_device) -> c_int>

Trait Implementations

impl Clone for nfc_driver
[src]

fn clone(&self) -> nfc_driver

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl Copy for nfc_driver
[src]

impl Debug for nfc_driver
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Default for nfc_driver
[src]

fn default() -> Self

Returns the "default value" for a type. Read more