tags_int.h revision 993437a401849447dfaabc2edf53e682e056a5a4
1/****************************************************************************** 2** 3** File: tags_int.h 4** 5** Description: This file contains the common data types shared by 6** Reader/Writer mode and Card Emulation. 7** 8** Copyright (c) 2009-2010 Broadcom Corp. All Rights Reserved. 9** Broadcom Bluetooth Core. Proprietary and confidential. 10** 11******************************************************************************/ 12 13#ifndef TAGS_INT_H 14#define TAGS_INT_H 15 16/****************************************************************************** 17// T1T command and response definitions 18******************************************************************************/ 19 20typedef struct 21{ 22 UINT8 opcode; 23 UINT8 cmd_len; 24 UINT8 uid_offset; 25 UINT8 rsp_len; 26} tT1T_CMD_RSP_INFO; 27 28typedef struct 29{ 30 UINT8 tag_model; 31 UINT8 tms; 32 UINT8 b_dynamic; 33 UINT8 lock_tlv[3]; 34 UINT8 mem_tlv[3]; 35} tT1T_INIT_TAG; 36 37typedef struct 38{ 39 UINT8 manufacturer_id; 40 BOOLEAN b_multi_version; 41 UINT8 version_block; 42 UINT16 version_no; 43 UINT16 version_bmask; 44 UINT8 b_calc_cc; 45 UINT8 tms; 46 BOOLEAN b_otp; 47 UINT8 default_lock_blpb; 48} tT2T_INIT_TAG; 49 50typedef struct 51{ 52 UINT8 opcode; 53 UINT8 cmd_len; 54 UINT8 rsp_len; 55 UINT8 nack_rsp_len; 56} tT2T_CMD_RSP_INFO; 57 58extern const UINT8 t4t_v10_ndef_tag_aid[]; /* V1.0 Type 4 Tag Applicaiton ID */ 59extern const UINT8 t4t_v20_ndef_tag_aid[]; /* V2.0 Type 4 Tag Applicaiton ID */ 60 61extern const tT1T_CMD_RSP_INFO t1t_cmd_rsp_infos[]; 62extern const tT1T_INIT_TAG t1t_init_content[]; 63extern const tT1T_CMD_RSP_INFO * t1t_cmd_to_rsp_info(UINT8 opcode); 64extern const tT1T_INIT_TAG * t1t_tag_init_data (UINT8 tag_model); 65extern UINT8 t1t_info_to_evt (const tT1T_CMD_RSP_INFO * p_info); 66 67extern const tT2T_INIT_TAG * t2t_tag_init_data (UINT8 manufacturer_id, BOOLEAN b_valid_ver, UINT16 version_no); 68extern const tT2T_CMD_RSP_INFO t2t_cmd_rsp_infos[]; 69extern const tT2T_CMD_RSP_INFO * t2t_cmd_to_rsp_info(UINT8 opcode); 70extern UINT8 t2t_info_to_evt (const tT2T_CMD_RSP_INFO * p_info); 71 72 73#if (BT_TRACE_PROTOCOL == TRUE) 74extern const char * t1t_info_to_str (const tT1T_CMD_RSP_INFO * p_info); 75extern const char * t2t_info_to_str (const tT2T_CMD_RSP_INFO * p_info); 76#else 77#define t1t_info_to_str(x) "" 78#define t2t_info_to_str(x) "" 79#endif 80extern int tags_pow(int x, int y); 81extern unsigned int tags_log2(register unsigned int x); 82 83 84#endif /* TAGS_INT_H */ 85