解决方案 »
- 请推荐几本详细介绍OLEContainer处理word文档的教材
- 请问WebBrowser中如何判断网站是否可以访问,如果不能访问用一个内置的网页代替。
- 非常菜的问题,用最短的时间判断字符串......
- 怎么注册一个Embed类型的!(高分)解决500分
- 一个比较好的毕业设计,应该是怎样子?
- 有人用过Adoconnection的Attributes属性吗?
- sql问题急救(在线等待)
- 救命啊,我在改了数据库的表结构后,就打不开程序的数据模块了??解决了马上给分
- 我要在报表中的一个字段里,十个汉字就强制换行?
- 下了个报表控件,但不知道怎用????
- delphi 引入wsdl文件 怎么更新?
- 新人求助!!没学过Delphi老师就让我们开发软件。
nfc_driver 这个record 你定义了没有,代码在哪里
* NFC device
*/
typedef struct nfc_device nfc_device;/**
* NFC device driver我就巨晕! 自己定义自己的别名!
nfc-types.h
里的定义!但有点怪!
* NFC device
*/
typedef struct nfc_device nfc_device; /**
* NFC device driver
nfc-internal.hstruct nfc_device {
const nfc_context *context;
const struct nfc_driver *driver;
void *driver_data;
void *chip_data; /** Device name string, including device wrapper firmware */
char name[DEVICE_NAME_LENGTH];
/** Device connection string */
nfc_connstring connstring;
/** Is the CRC automaticly added, checked and removed from the frames */
bool bCrc;
/** Does the chip handle parity bits, all parities are handled as data */
bool bPar;
/** Should the chip handle frames encapsulation and chaining */
bool bEasyFraming;
/** Should the chip switch automatically activate ISO14443-4 when
selecting tags supporting it? */
bool bAutoIso14443_4;
/** Supported modulation encoded in a byte */
uint8_t btSupportByte;
/** Last reported error */
int last_error;
};
nfc_device =record
public nfc_context:^Tnfc_context;
public driver:^nfc_driver; //这里有问题!
driver_data:Pointer;
const char *name;
const scan_type_enum scan_type;
size_t (*scan)(const nfc_context *context, nfc_connstring connstrings[], const size_t connstrings_len);
struct nfc_device *(*open)(const nfc_context *context, const nfc_connstring connstring);
void (*close)(struct nfc_device *pnd);
const char *(*strerror)(const struct nfc_device *pnd); int (*initiator_init)(struct nfc_device *pnd);
int (*initiator_init_secure_element)(struct nfc_device *pnd);
int (*initiator_select_passive_target)(struct nfc_device *pnd, const nfc_modulation nm, const uint8_t *pbtInitData, const size_t szInitData, nfc_target *pnt);
int (*initiator_poll_target)(struct nfc_device *pnd, const nfc_modulation *pnmModulations, const size_t szModulations, const uint8_t uiPollNr, const uint8_t btPeriod, nfc_target *pnt);
int (*initiator_select_dep_target)(struct nfc_device *pnd, const nfc_dep_mode ndm, const nfc_baud_rate nbr, const nfc_dep_info *pndiInitiator, nfc_target *pnt, const int timeout);
int (*initiator_deselect_target)(struct nfc_device *pnd);
int (*initiator_transceive_bytes)(struct nfc_device *pnd, const uint8_t *pbtTx, const size_t szTx, uint8_t *pbtRx, const size_t szRx, int timeout);
int (*initiator_transceive_bits)(struct nfc_device *pnd, const uint8_t *pbtTx, const size_t szTxBits, const uint8_t *pbtTxPar, uint8_t *pbtRx, uint8_t *pbtRxPar);
int (*initiator_transceive_bytes_timed)(struct nfc_device *pnd, const uint8_t *pbtTx, const size_t szTx, uint8_t *pbtRx, const size_t szRx, uint32_t *cycles);
int (*initiator_transceive_bits_timed)(struct nfc_device *pnd, const uint8_t *pbtTx, const size_t szTxBits, const uint8_t *pbtTxPar, uint8_t *pbtRx, uint8_t *pbtRxPar, uint32_t *cycles);
int (*initiator_target_is_present)(struct nfc_device *pnd, const nfc_target *pnt); int (*target_init)(struct nfc_device *pnd, nfc_target *pnt, uint8_t *pbtRx, const size_t szRx, int timeout);
int (*target_send_bytes)(struct nfc_device *pnd, const uint8_t *pbtTx, const size_t szTx, int timeout);
int (*target_receive_bytes)(struct nfc_device *pnd, uint8_t *pbtRx, const size_t szRxLen, int timeout);
int (*target_send_bits)(struct nfc_device *pnd, const uint8_t *pbtTx, const size_t szTxBits, const uint8_t *pbtTxPar);
int (*target_receive_bits)(struct nfc_device *pnd, uint8_t *pbtRx, const size_t szRxLen, uint8_t *pbtRxPar); int (*device_set_property_bool)(struct nfc_device *pnd, const nfc_property property, const bool bEnable);
int (*device_set_property_int)(struct nfc_device *pnd, const nfc_property property, const int value);
int (*get_supported_modulation)(struct nfc_device *pnd, const nfc_mode mode, const nfc_modulation_type **const supported_mt);
int (*get_supported_baud_rate)(struct nfc_device *pnd, const nfc_modulation_type nmt, const nfc_baud_rate **const supported_br);
int (*device_get_information_about)(struct nfc_device *pnd, char **buf); int (*abort_command)(struct nfc_device *pnd);
int (*idle)(struct nfc_device *pnd);
int (*powerdown)(struct nfc_device *pnd);
};括号表示啥?
// int (*target_init)(struct nfc_device *pnd, nfc_target *pnt, uint8_t *pbtRx, const size_t szRx, int timeout);
function target_init(pnd:Tpnd;pnt:pnfc_target;pbtRx:^Byte;szRx:DWORD;timeout:Integer):Integer;
// int (*target_send_bytes)(struct nfc_device *pnd, const uint8_t *pbtTx, const size_t szTx, int timeout);
function target_send_bytes(pnd:Tpnd;pbtTx:^Byte;szTx:DWORD;timeout:Integer):Integer;
// int (*target_receive_bytes)(struct nfc_device *pnd, uint8_t *pbtRx, const size_t szRxLen, int timeout);
function target_receive_bytes(pnd:Tpnd;pbtRx:^Byte;szRxLen:DWORD;timeout:Integer):Integer;
// int (*target_receive_bits)(struct nfc_device *pnd, uint8_t *pbtRx, const size_t szRxLen, uint8_t *pbtRxPar);
function target_receive_bits(pnd:Tpnd;pbtRx:^Byte;szRxLen:DWORD;pbtRxPar:^Byte):Integer;
// int (*device_set_property_bool)(struct nfc_device *pnd, const nfc_property property, const bool bEnable);
function device_set_property_bool(pnd:Tpnd;Pproperty:nfc_property;bEnable:boolean):Integer;
// int (*device_set_property_int)(struct nfc_device *pnd, const nfc_property property, const int value);
function device_set_property_int(pnd:Tpnd;Pproperty:nfc_property;value;Integer):Integer;
// int (*get_supported_modulation)(struct nfc_device *pnd, const nfc_mode mode, const nfc_modulation_type **const supported_mt);
**const supported_mt的是一个静态指针的指针!