meta_dll_nfc.h 19.8 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461
/*****************************************************************************
*  Copyright Statement:
*  --------------------
*  This software is protected by Copyright and the information contained
*  herein is confidential. The software may not be copied and the information
*  contained herein may not be used or disclosed except with the written
*  permission of MediaTek Inc. (C) 2001
*
*****************************************************************************/

/*******************************************************************************
 * Filename:
 * ---------
 * meta_dll_nfc.h
 *
 * Project:
 * --------
 *   META
 *
 * Description:
 * ------------
 *   This module contains the META DLL NFC exported API.
 *
 * Author:
 * -------
 * -------
 *
 *==============================================================================
 *           HISTORY
 * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
 *------------------------------------------------------------------------------
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 *
 *------------------------------------------------------------------------------
 * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
 *==============================================================================
 *******************************************************************************/
#ifndef __META_DLL_NFC_H__
#define __META_DLL_NFC_H__
#if !defined(__GNUC__) || !defined(WIN32)
#include "meta.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
 * \addtogroup Connectivity
 *  @{
 */
/*****************************************************
 * NFC test mode commands
 ****************************************************/
typedef struct
{
    unsigned int type;
    unsigned int action;
    unsigned int length;
} META_NFC_SCRIPT_REQUEST_T;
typedef struct
{
    unsigned int result;
    unsigned int length;
} META_NFC_SCRIPT_RESPONSE_T;
META_RESULT __stdcall META_NFC_TestModeCardModeTest(const unsigned int ms_timeout, const META_NFC_SCRIPT_REQUEST_T* request, unsigned int requestLength, META_NFC_SCRIPT_RESPONSE_T* response, unsigned int responseLength);
META_RESULT __stdcall META_NFC_TestModeCardModeTest_r(const int meta_handle, const unsigned int ms_timeout, const META_NFC_SCRIPT_REQUEST_T* request, unsigned int requestLength, META_NFC_SCRIPT_RESPONSE_T* response, unsigned int responseLength);
META_RESULT __stdcall META_NFC_TestModeReaderModeTest(const unsigned int ms_timeout, const META_NFC_SCRIPT_REQUEST_T* request, unsigned int requestLength, META_NFC_SCRIPT_RESPONSE_T* response, unsigned int responseLength);
META_RESULT __stdcall META_NFC_TestModeReaderModeTest_r(const int meta_handle, const unsigned int ms_timeout, const META_NFC_SCRIPT_REQUEST_T* request, unsigned int requestLength, META_NFC_SCRIPT_RESPONSE_T* response, unsigned int responseLength);
META_RESULT __stdcall META_NFC_TestModeP2PModeTest(const unsigned int ms_timeout, const META_NFC_SCRIPT_REQUEST_T* request, unsigned int requestLength, META_NFC_SCRIPT_RESPONSE_T* response, unsigned int responseLength);
META_RESULT __stdcall META_NFC_TestModeP2PModeTest_r(const int meta_handle, const unsigned int ms_timeout, const META_NFC_SCRIPT_REQUEST_T* request, unsigned int requestLength, META_NFC_SCRIPT_RESPONSE_T* response, unsigned int responseLength);
META_RESULT __stdcall META_NFC_TestModeSwpSelfTest(const unsigned int ms_timeout, const META_NFC_SCRIPT_REQUEST_T* request, unsigned int requestLength, META_NFC_SCRIPT_RESPONSE_T* response, unsigned int responseLength);
META_RESULT __stdcall META_NFC_TestModeSwpSelfTest_r(const int meta_handle, const unsigned int ms_timeout, const META_NFC_SCRIPT_REQUEST_T* request, unsigned int requestLength, META_NFC_SCRIPT_RESPONSE_T* response, unsigned int responseLength);
META_RESULT __stdcall META_NFC_TestModeAntennaSelfTest(const unsigned int ms_timeout, const META_NFC_SCRIPT_REQUEST_T* request, unsigned int requestLength, META_NFC_SCRIPT_RESPONSE_T* response, unsigned int responseLength);
META_RESULT __stdcall META_NFC_TestModeAntennaSelfTest_r(const int meta_handle, const unsigned int ms_timeout, const META_NFC_SCRIPT_REQUEST_T* request, unsigned int requestLength, META_NFC_SCRIPT_RESPONSE_T* response, unsigned int responseLength);
typedef struct
{
    unsigned int   type;    /*Test type: currently, always set 1*/
    unsigned int   action;  /*Test action, 1: start test, 0:stop test*/
    unsigned char  modulation_type;   /* 0:type A, 1:type B, 2:type F, 3:No Modulation */
    unsigned char  bitrate;           /* 0:106kbps, 1:212kbps, 2:424kbps */
} META_NFC_TX_ALWAYSON_REQUEST_T;
META_RESULT __stdcall META_NFC_TestModeTxAlwaysOnTest(const unsigned int ms_timeout, const META_NFC_TX_ALWAYSON_REQUEST_T* request, unsigned int requestLength, META_NFC_SCRIPT_RESPONSE_T* response, unsigned int responseLength);
META_RESULT __stdcall META_NFC_TestModeTxAlwaysOnTest_r(const int meta_handle, const unsigned int ms_timeout, const META_NFC_TX_ALWAYSON_REQUEST_T* request, unsigned int requestLength, META_NFC_SCRIPT_RESPONSE_T* response, unsigned int responseLength);
META_RESULT __stdcall META_NFC_TestModeTxAlwaysOnWithoutAckTest(const unsigned int ms_timeout, const META_NFC_TX_ALWAYSON_REQUEST_T* request, unsigned int requestLength, META_NFC_SCRIPT_RESPONSE_T* response, unsigned int responseLength);
META_RESULT __stdcall META_NFC_TestModeTxAlwaysOnWithoutAckTest_r(const int meta_handle, const unsigned int ms_timeout, const META_NFC_TX_ALWAYSON_REQUEST_T* request, unsigned int requestLength, META_NFC_SCRIPT_RESPONSE_T* response, unsigned int responseLength);
typedef struct
{
    unsigned int    type;           /*Test type: currently, always set 1*/
    unsigned int    action;        /*Test action, 1: start test, 0:stop test*/
    unsigned short  technology;    /*bitmask: MifareUL=bit 0, MifareStd=bit1, ISO14443_4A=bit 2, ISO14443_4B=bit 3, Jewel=bit 4, Felica=bit 5, ISO15693=bit 6 */
    unsigned short  protocols;     /*bitmask: Iso14443A=bit 0, Iso14443B=bit 1, Felica212=bit 2, Felica424=bit 3, Iso15693=bit 4 */
} META_NFC_CARD_EMULATION_REQUEST_T;
META_RESULT __stdcall META_NFC_TestModeCardEmulationTest(const unsigned int ms_timeout, const META_NFC_CARD_EMULATION_REQUEST_T* request, unsigned int requestLength, META_NFC_SCRIPT_RESPONSE_T* response, unsigned int responseLength);
META_RESULT __stdcall META_NFC_TestModeCardEmulationTest_r(const int meta_handle, const unsigned int ms_timeout, const META_NFC_CARD_EMULATION_REQUEST_T* request, unsigned int requestLength, META_NFC_SCRIPT_RESPONSE_T* response, unsigned int responseLength);
typedef struct
{
    unsigned int  type;
    unsigned int  action;
    unsigned int  uid_length;
    unsigned char data[10];
} META_NFC_SCRIPT_UID_REQUEST_T;
typedef struct
{
    int           result;
    unsigned int  uid_length;
    unsigned char data[10];
} META_NFC_SCRIPT_UID_RESPONSE_T;
META_RESULT __stdcall META_NFC_TestModeUidReadWriteTest(const unsigned int ms_timeout, const META_NFC_SCRIPT_UID_REQUEST_T* request, unsigned int requestLength, META_NFC_SCRIPT_UID_RESPONSE_T* response, unsigned int responseLength);
META_RESULT __stdcall META_NFC_TestModeUidReadWriteTest_r(const int meta_handle, const unsigned int ms_timeout,  const META_NFC_SCRIPT_UID_REQUEST_T* request, unsigned int requestLength, META_NFC_SCRIPT_UID_RESPONSE_T* response, unsigned int responseLength);
/*****************************************************
 * NFC Init commands
 ****************************************************/
typedef struct
{
    unsigned int nfc_enable;
    unsigned int debug_enable;
    unsigned int sw_protocol;
    unsigned int get_capabilities;
} META_NFC_SETTING_REQUEST_T;
typedef struct
{
    unsigned int status;
    unsigned int nfc_enable;
    unsigned int debug_enable;
    unsigned int sw_protocol;
    unsigned int get_capabilities;
    unsigned int sw_ver;
    unsigned int hw_ver;
    unsigned int fw_ver;
    unsigned int reader_mode;
    unsigned int card_mode;
} META_NFC_SETTING_RESPONSE_T;
META_RESULT __stdcall META_NFC_InitQuery(const unsigned int ms_timeout, const META_NFC_SETTING_REQUEST_T* request, unsigned int requestLength, META_NFC_SETTING_RESPONSE_T* response, unsigned int responseLength);
META_RESULT __stdcall META_NFC_InitQuery_r(const int meta_handle, const unsigned int ms_timeout, const META_NFC_SETTING_REQUEST_T* request, unsigned int requestLength, META_NFC_SETTING_RESPONSE_T* response, unsigned int responseLength);
/*****************************************************
 * NFC SWP commands
 ****************************************************/
typedef struct
{
    unsigned int reg_type;
} META_NFC_SWP_REGISTER_NOTIFICATION_REQUEST_T;
typedef struct
{
    unsigned int status;
    unsigned int se;
    unsigned int se_status;
    unsigned int se_type;
} META_NFC_SWP_REGISTER_NOTIFICATION_RESPONSE_T;
META_RESULT __stdcall META_NFC_SwpRegisterNotification(const unsigned int ms_timeout, const META_NFC_SWP_REGISTER_NOTIFICATION_REQUEST_T* request, unsigned int requestLength, META_NFC_SWP_REGISTER_NOTIFICATION_RESPONSE_T* response, unsigned int responseLength);
META_RESULT __stdcall META_NFC_SwpRegisterNotification_r(const int meta_handle, const unsigned int ms_timeout, const META_NFC_SWP_REGISTER_NOTIFICATION_REQUEST_T* request, unsigned int requestLength, META_NFC_SWP_REGISTER_NOTIFICATION_RESPONSE_T* response, unsigned int responseLength);
typedef struct
{
    unsigned int set_type;
} META_NFC_SWP_SECURE_ELEMENT_REQUEST_T;
typedef struct
{
    unsigned int status;
} META_NFC_SWP_SECURE_ELEMENT_RESPONSE_T;
META_RESULT __stdcall META_NFC_SwpSecureElementSet(const unsigned int ms_timeout, const META_NFC_SWP_SECURE_ELEMENT_REQUEST_T* request, unsigned int requestLength, META_NFC_SWP_SECURE_ELEMENT_RESPONSE_T* response, unsigned int responseLength);
META_RESULT __stdcall META_NFC_SwpSecureElementSet_r(const int meta_handle, const unsigned int ms_timeout, const META_NFC_SWP_SECURE_ELEMENT_REQUEST_T* request, unsigned int requestLength, META_NFC_SWP_SECURE_ELEMENT_RESPONSE_T* response, unsigned int responseLength);
typedef struct
{
    unsigned int dis_type;
    unsigned int duration;
} META_NFC_SWP_DISCOVERY_REQUEST_T;
typedef struct
{
    unsigned int  tag_type;
    unsigned int  card_type;
    unsigned char uid[10];
    unsigned int  sak;
    unsigned int  atag;
    unsigned int  appdata;
    unsigned int  maxdatarate;
} META_NFC_SWP_TAG_DETECTED_RESPONSE_T;
typedef struct
{
    unsigned int p2p_type;
} META_NFC_SWP_P2P_DETECTED_RESPONSE_T;
typedef union
{
    META_NFC_SWP_TAG_DETECTED_RESPONSE_T tag_data;
    META_NFC_SWP_P2P_DETECTED_RESPONSE_T p2p_data;
} META_NFC_SWP_DETECTED_TYPE_U;
typedef struct
{
    unsigned int status;
    unsigned char type;
    META_NFC_SWP_DETECTED_TYPE_U detect_target;
} META_NFC_SWP_DISCOVERY_RESPONSE_T;
typedef void (__stdcall* META_NFC_DISCOVERY_CALLBACK)(const void* buffer, unsigned int bufferLength, void* cb_arg);
META_RESULT __stdcall META_NFC_SwpDiscovery(const unsigned int ms_timeout, const META_NFC_SWP_DISCOVERY_REQUEST_T* request, unsigned int requestLength, META_NFC_DISCOVERY_CALLBACK cb, void* cb_arg);
META_RESULT __stdcall META_NFC_SwpDiscovery_r(const int meta_handle, const unsigned int ms_timeout, const META_NFC_SWP_DISCOVERY_REQUEST_T* request, unsigned int requestLength, META_NFC_DISCOVERY_CALLBACK cb, void* cb_arg);
typedef struct
{
    unsigned int action;
} META_NFC_SWP_TAG_DISCONNECT_REQUEST_T;
typedef struct
{
    unsigned int status;
} META_NFC_SWP_TAG_DISCONNECT_RESPONSE_T;
META_RESULT __stdcall META_NFC_SwpTagDisconnect(const unsigned int ms_timeout, const META_NFC_SWP_TAG_DISCONNECT_REQUEST_T* request, unsigned int requestLength, META_NFC_SWP_TAG_DISCONNECT_RESPONSE_T* response, unsigned int responseLength);
META_RESULT __stdcall META_NFC_SwpTagDisconnect_r(const int meta_handle, const unsigned int ms_timeout, const META_NFC_SWP_TAG_DISCONNECT_REQUEST_T* request, unsigned int requestLength, META_NFC_SWP_TAG_DISCONNECT_RESPONSE_T* response, unsigned int responseLength);
typedef struct
{
    unsigned int action;
} META_NFC_SWP_TAG_FORMAT_TO_NDEF_REQUEST_T;
typedef struct
{
    unsigned int status;
} META_NFC_SWP_TAG_FORMAT_TO_NDEF_RESPONSE_T;
META_RESULT __stdcall META_NFC_SwpTagFormatToNdef(const unsigned int ms_timeout, const META_NFC_SWP_TAG_FORMAT_TO_NDEF_REQUEST_T* request, unsigned int requestLength, META_NFC_SWP_TAG_FORMAT_TO_NDEF_RESPONSE_T* response, unsigned int responseLength);
META_RESULT __stdcall META_NFC_SwpTagFormatToNdef_r(const int meta_handle, const unsigned int ms_timeout, const META_NFC_SWP_TAG_FORMAT_TO_NDEF_REQUEST_T* request, unsigned int requestLength, META_NFC_SWP_TAG_FORMAT_TO_NDEF_RESPONSE_T* response, unsigned int responseLength);
typedef struct
{
    unsigned char read_type;
    unsigned int  sector;
    unsigned int  block;
    unsigned char AuthentificationKey;
} META_NFC_SWP_TAG_READ_REQUEST_T;
typedef struct
{
    unsigned int   length;
    unsigned char  data[16];
} META_NFC_SWP_TAG_READ_MIFARE4K_DATA_T;
typedef struct
{
    unsigned int   length;
    unsigned char  data[4];
} META_NFC_SWP_TAG_READ_ISO15693_DATA_T;
typedef struct
{
    unsigned char ndef_type;
    unsigned char lang[3];
    unsigned char recordFlags;
    unsigned char recordId[32];
    unsigned char recordTnf;
    unsigned int  length;
    unsigned char data[512];
} META_NFC_SWP_TAG_READ_NDEF_DATA_T;
typedef union
{
    META_NFC_SWP_TAG_READ_MIFARE4K_DATA_T mifare4k;
    META_NFC_SWP_TAG_READ_ISO15693_DATA_T iso15693;
    META_NFC_SWP_TAG_READ_NDEF_DATA_T     ndef;
} META_NFC_SWP_TAG_READ_BUFFER_T;
typedef struct
{
    unsigned int  status;
    unsigned char type;
    META_NFC_SWP_TAG_READ_BUFFER_T data;
} META_NFC_SWP_TAG_READ_RESPONSE_T;
META_RESULT __stdcall META_NFC_SwpTagRead(const unsigned int ms_timeout, const META_NFC_SWP_TAG_READ_REQUEST_T* request, unsigned int requestLength, META_NFC_SWP_TAG_READ_RESPONSE_T* response, unsigned int responseLength);
META_RESULT __stdcall META_NFC_SwpTagRead_r(const int meta_handle, const unsigned int ms_timeout, const META_NFC_SWP_TAG_READ_REQUEST_T* request, unsigned int requestLength, META_NFC_SWP_TAG_READ_RESPONSE_T* response, unsigned int responseLength);
typedef struct
{
    unsigned int   sector;
    unsigned int   block;
    unsigned char  data[16];
    unsigned char  AuthentificationKey;
} META_NFC_SWP_TAG_WRITE_MIFARE4K_DATA_T;
typedef struct
{
    unsigned int   sector;
    unsigned int   block;
    unsigned char  data[4];
} META_NFC_SWP_TAG_WRITE_ISO15693_DATA_T;

typedef struct
{
    char Name[64];
    char Company[64];
    char Titlep[64];
    char Tel[32];
    char Email[64];
    char Adress[128];
    char PostalCode[32];
    char City[64];
    char CompanyUrl[64];
} META_NFC_SWP_TAG_WRITE_NDEF_VCARD_T;

typedef struct
{
    unsigned char  Company[64];
    unsigned short CompanyLength;
    unsigned char  CompanyUrl[64];
    unsigned short CompanyUrlLength;
} META_NFC_SWP_TAG_WRITE_NDEF_SMARTPOSTER_T;

typedef struct
{
    unsigned char  data[128];
    unsigned short DataLength;
} META_NFC_SWP_TAG_WRITE_NDEF_TEXT_T;

typedef struct
{
    unsigned char  URLtype;
    unsigned char  URLData[64];
    unsigned short URLLength;
} META_NFC_SWP_TAG_WRITE_NDEF_URL_T;

typedef struct
{
    char  EXTTagType[64];
    char  EXTData[128];
    unsigned short EXTLength;
} META_NFC_SWP_TAG_WRITE_NDEF_EXTTAG_T;


typedef union
{
    META_NFC_SWP_TAG_WRITE_NDEF_SMARTPOSTER_T  SP_Data;
    META_NFC_SWP_TAG_WRITE_NDEF_VCARD_T        VC_Data;
    META_NFC_SWP_TAG_WRITE_NDEF_TEXT_T         TX_Data;
    META_NFC_SWP_TAG_WRITE_NDEF_URL_T          URL_Data;
    META_NFC_SWP_TAG_WRITE_NDEF_EXTTAG_T       EXT_Data;
    char                                       buffer[576];
} META_NFC_SWP_TAG_WRITE_NDEF_DATA_U;

typedef struct
{
    unsigned char  ndef_type;
    unsigned char  language;
    unsigned int   length;
    META_NFC_SWP_TAG_WRITE_NDEF_DATA_U  ndef_data;
} META_NFC_SWP_TAG_WRITE_NDEF_DATA_T;
typedef union
{
    META_NFC_SWP_TAG_WRITE_MIFARE4K_DATA_T mifare4k;
    META_NFC_SWP_TAG_WRITE_ISO15693_DATA_T iso15693;
    META_NFC_SWP_TAG_WRITE_NDEF_DATA_T     ndef;
} META_NFC_SWP_TAG_WRITE_BUFFER_T;
typedef struct
{
    unsigned char write_type;
    META_NFC_SWP_TAG_WRITE_BUFFER_T payload;
} META_NFC_SWP_TAG_WRITE_REQUEST_T;
typedef struct
{
    unsigned char write_type;
    unsigned int  status;
} META_NFC_SWP_TAG_WRITE_RESPONSE_T;
META_RESULT __stdcall META_NFC_SwpTagWrite(const unsigned int ms_timeout, const META_NFC_SWP_TAG_WRITE_REQUEST_T* request, unsigned int requestLength, META_NFC_SWP_TAG_WRITE_RESPONSE_T* response, unsigned int responseLength);
META_RESULT __stdcall META_NFC_SwpTagWrite_r(const int meta_handle, const unsigned int ms_timeout, const META_NFC_SWP_TAG_WRITE_REQUEST_T* request, unsigned int requestLength, META_NFC_SWP_TAG_WRITE_RESPONSE_T* response, unsigned int responseLength);

typedef struct
{
    unsigned char type;
    unsigned int  length;
    unsigned char data[256];
} META_NFC_SWP_TAG_RAW_COMM_REQUEST_T;
typedef struct
{
    unsigned char type;
    unsigned int  status;
    unsigned int  length;
    unsigned char data[256];
} META_NFC_SWP_TAG_RAW_COMM_RESPONSE_T;
META_RESULT __stdcall META_NFC_SwpTagRawCommunication(const unsigned int ms_timeout, const META_NFC_SWP_TAG_RAW_COMM_REQUEST_T* request, unsigned int requestLength, META_NFC_SWP_TAG_RAW_COMM_RESPONSE_T* response, unsigned int responseLength);
META_RESULT __stdcall META_NFC_SwpTagRawCommunication_r(const int meta_handle, const unsigned int ms_timeout, const META_NFC_SWP_TAG_RAW_COMM_REQUEST_T* request, unsigned int requestLength, META_NFC_SWP_TAG_RAW_COMM_RESPONSE_T* response, unsigned int responseLength);
typedef struct
{
    unsigned int action;
    unsigned int length;
    void* buffer;
} META_NFC_SWP_P2P_COMM_REQUEST_T;
typedef struct
{
    unsigned int status;
    /// [IN/OUT] output: modified as the length of return buffer length
    unsigned int length;
    /// [IN] output: returned buffer (DO not free/delete the buffer, the buffer is maintained in META DLL)
    void* buffer;
} META_NFC_SWP_P2P_COMM_RESPONSE_T;
META_RESULT __stdcall META_NFC_SwpP2PCommunication(const unsigned int ms_timeout, const META_NFC_SWP_P2P_COMM_REQUEST_T* request, unsigned int requestLength, META_NFC_SWP_P2P_COMM_RESPONSE_T* response, unsigned int responseLength);
META_RESULT __stdcall META_NFC_SwpP2PCommunication_r(const int meta_handle, const unsigned int ms_timeout, const META_NFC_SWP_P2P_COMM_REQUEST_T* request, unsigned int requestLength, META_NFC_SWP_P2P_COMM_RESPONSE_T* response, unsigned int responseLength);
/*****************************************************
 * NFC RAW DATA commands
 ****************************************************/
typedef struct
{
    unsigned int action;
    unsigned int length;
    void* buffer;
} META_NFC_RAW_COMM_REQUEST_T;
typedef struct
{
    unsigned int status;
    /// [IN/OUT] output: modified as the length of return buffer length
    unsigned int length;
    /// [IN] output: returned buffer (DO not free/delete the buffer, the buffer is maintained in META DLL)
    void* buffer;
} META_NFC_RAW_COMM_RESPONSE_T;
META_RESULT __stdcall META_NFC_RawDataCommunication(const unsigned int ms_timeout, const META_NFC_RAW_COMM_REQUEST_T* request, unsigned int requestLength, META_NFC_RAW_COMM_RESPONSE_T* response, unsigned int responseLength);
META_RESULT __stdcall META_NFC_RawDataCommunication_r(const int meta_handle, const unsigned int ms_timeout, const META_NFC_RAW_COMM_REQUEST_T* request, unsigned int requestLength, META_NFC_RAW_COMM_RESPONSE_T* response, unsigned int responseLength);
/**
 * @}
 */
#ifdef __cplusplus
}
#endif
#endif // #if !defined(__GNUC__) || !defined(WIN32)
#endif // __META_DLL_NFC_H__