├── doc ├── Linux_NFC_API_Guide │ ├── bc_s.png │ ├── bdwn.png │ ├── doc.png │ ├── open.png │ ├── closed.png │ ├── nav_f.png │ ├── nav_g.png │ ├── nav_h.png │ ├── schema.png │ ├── tab_a.png │ ├── tab_b.png │ ├── tab_h.png │ ├── tab_s.png │ ├── arrowdown.png │ ├── doxygen.png │ ├── search │ │ ├── files_1.js │ │ ├── close.png │ │ ├── mag_sel.png │ │ ├── search_l.png │ │ ├── search_m.png │ │ ├── search_r.png │ │ ├── all_0.js │ │ ├── typedefs_1.js │ │ ├── variables_0.js │ │ ├── all_2.js │ │ ├── variables_7.js │ │ ├── variables_2.js │ │ ├── typedefs_0.js │ │ ├── defines_0.js │ │ ├── all_9.js │ │ ├── all_8.js │ │ ├── files_0.js │ │ ├── all_6.js │ │ ├── all_f.js │ │ ├── variables_5.js │ │ ├── variables_d.js │ │ ├── all_7.js │ │ ├── variables_4.js │ │ ├── variables_c.js │ │ ├── all_d.js │ │ ├── variables_6.js │ │ ├── variables_b.js │ │ ├── all_1.js │ │ ├── variables_1.js │ │ ├── variables_3.js │ │ ├── all_4.js │ │ ├── defines_1.js │ │ ├── all_c.js │ │ ├── variables_a.js │ │ ├── all_3.js │ │ ├── nomatches.html │ │ ├── searchdata.js │ │ ├── variables_8.js │ │ ├── enums_0.js │ │ ├── all_0.html │ │ ├── all_1.html │ │ ├── all_10.html │ │ ├── all_2.html │ │ ├── all_3.html │ │ ├── all_4.html │ │ ├── all_5.html │ │ ├── all_6.html │ │ ├── all_7.html │ │ ├── all_8.html │ │ ├── all_9.html │ │ ├── all_a.html │ │ ├── all_b.html │ │ ├── all_c.html │ │ ├── all_d.html │ │ ├── all_e.html │ │ ├── all_f.html │ │ ├── enums_0.html │ │ ├── files_0.html │ │ ├── files_1.html │ │ ├── classes_0.html │ │ ├── defines_0.html │ │ ├── defines_1.html │ │ ├── defines_2.html │ │ ├── defines_3.html │ │ ├── functions_0.html │ │ ├── typedefs_0.html │ │ ├── typedefs_1.html │ │ ├── variables_0.html │ │ ├── variables_1.html │ │ ├── variables_2.html │ │ ├── variables_3.html │ │ ├── variables_4.html │ │ ├── variables_5.html │ │ ├── variables_6.html │ │ ├── variables_7.html │ │ ├── variables_8.html │ │ ├── variables_9.html │ │ ├── variables_a.html │ │ ├── variables_b.html │ │ ├── variables_c.html │ │ ├── variables_d.html │ │ ├── variables_e.html │ │ ├── enumvalues_0.html │ │ ├── enumvalues_1.html │ │ ├── enumvalues_0.js │ │ ├── classes_0.js │ │ ├── all_5.js │ │ ├── defines_3.js │ │ ├── all_b.js │ │ ├── variables_9.js │ │ ├── all_e.js │ │ ├── enumvalues_1.js │ │ ├── all_10.js │ │ ├── variables_e.js │ │ └── defines_2.js │ ├── splitbar.png │ ├── sync_off.png │ ├── sync_on.png │ ├── arrowright.png │ ├── folderopen.png │ ├── nxp_logo_s.png │ ├── folderclosed.png │ └── tabs.css └── Linux_NFC_API_Guide.html ├── bootstrap ├── libnfc-nci.pc.in ├── .gitignore ├── src ├── halimpl │ └── pn54x │ │ ├── dnld │ │ ├── phNxpNciHal_Dnld.h │ │ ├── phDnldNfc_Utils.h │ │ ├── phDnldNfc_Cmd.h │ │ └── phDnldNfc_Status.h │ │ ├── hal │ │ ├── phNxpNciHal_Kovio.h │ │ ├── phNxpNciHal_ext.h │ │ ├── phNxpNciHal_dta.h │ │ └── phNxpNciHal_NfcDepSWPrio.h │ │ ├── tml │ │ ├── lpcusbsio │ │ │ ├── lpcusbsio │ │ │ │ ├── framework_Allocator.h │ │ │ │ ├── framework_linux.h │ │ │ │ ├── framework_Timer.h │ │ │ │ ├── framework_Map.h │ │ │ │ ├── framework_Container.h │ │ │ │ ├── framework_Allocator.c │ │ │ │ ├── framework_sem.c │ │ │ │ ├── framework_Parcel.h │ │ │ │ └── framework_log.c │ │ │ ├── phTmlNfc_lpcusbsio.h │ │ │ └── 97-lpcusbsio-hid.rules │ │ ├── i2c │ │ │ ├── phTmlNfc_i2c.h │ │ │ └── phTmlNfc_alt.h │ │ ├── phDal4Nfc_messageQueueLib.h │ │ └── phOsalNfc_Timer.h │ │ ├── inc │ │ ├── phNxpNciHal_Adaptation.h │ │ └── phNxpNciHal_Api.h │ │ └── common │ │ └── phNfcCompId.h ├── libnfc-nci │ ├── include │ │ ├── btu_api.h │ │ ├── buildcfg_hal.h │ │ ├── CrcChecksum.h │ │ └── android_logmsg.h │ ├── nfa │ │ ├── sys │ │ │ └── nfa_sys_cfg.c │ │ ├── include │ │ │ └── nfa_mem_co.h │ │ ├── hci │ │ │ └── nfa_hci_ci.c │ │ └── int │ │ │ └── nfa_sys_int.h │ ├── gki │ │ ├── common │ │ │ └── gki_inet.h │ │ └── ulinux │ │ │ └── data_types.h │ ├── udrv │ │ └── include │ │ │ ├── udac.h │ │ │ ├── utimer.h │ │ │ └── unv.h │ ├── nfc │ │ └── nfc │ │ │ └── nfc_test.c │ └── hal │ │ └── int │ │ └── nfc_hal_post_reset.h └── service │ ├── utils │ ├── IntervalTimer.h │ ├── IntervalTimer.cpp │ └── CondVar.h │ ├── interface │ ├── nativeNfcHandover.h │ ├── nativeNfcSnep.h │ ├── nativeNfcLlcp.h │ └── nativeNdef.h │ └── extns │ ├── src │ └── common │ │ ├── phNfcTypes_Mapping.h │ │ └── phNfcCompId.h │ └── inc │ └── phNxpExtns.h ├── README.md └── conf ├── libnfc-nxp-init.conf ├── libnfc-nci.conf └── libnfc-nxp-pn547.conf /doc/Linux_NFC_API_Guide/bc_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NXPNFCLinux/linux_libnfc-nci/HEAD/doc/Linux_NFC_API_Guide/bc_s.png -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/bdwn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NXPNFCLinux/linux_libnfc-nci/HEAD/doc/Linux_NFC_API_Guide/bdwn.png -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/doc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NXPNFCLinux/linux_libnfc-nci/HEAD/doc/Linux_NFC_API_Guide/doc.png -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NXPNFCLinux/linux_libnfc-nci/HEAD/doc/Linux_NFC_API_Guide/open.png -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/closed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NXPNFCLinux/linux_libnfc-nci/HEAD/doc/Linux_NFC_API_Guide/closed.png -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/nav_f.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NXPNFCLinux/linux_libnfc-nci/HEAD/doc/Linux_NFC_API_Guide/nav_f.png -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/nav_g.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NXPNFCLinux/linux_libnfc-nci/HEAD/doc/Linux_NFC_API_Guide/nav_g.png -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/nav_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NXPNFCLinux/linux_libnfc-nci/HEAD/doc/Linux_NFC_API_Guide/nav_h.png -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/schema.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NXPNFCLinux/linux_libnfc-nci/HEAD/doc/Linux_NFC_API_Guide/schema.png -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/tab_a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NXPNFCLinux/linux_libnfc-nci/HEAD/doc/Linux_NFC_API_Guide/tab_a.png -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/tab_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NXPNFCLinux/linux_libnfc-nci/HEAD/doc/Linux_NFC_API_Guide/tab_b.png -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/tab_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NXPNFCLinux/linux_libnfc-nci/HEAD/doc/Linux_NFC_API_Guide/tab_h.png -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/tab_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NXPNFCLinux/linux_libnfc-nci/HEAD/doc/Linux_NFC_API_Guide/tab_s.png -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/arrowdown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NXPNFCLinux/linux_libnfc-nci/HEAD/doc/Linux_NFC_API_Guide/arrowdown.png -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/doxygen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NXPNFCLinux/linux_libnfc-nci/HEAD/doc/Linux_NFC_API_Guide/doxygen.png -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/files_1.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['main_2etxt',['main.txt',['../main_8txt.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/splitbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NXPNFCLinux/linux_libnfc-nci/HEAD/doc/Linux_NFC_API_Guide/splitbar.png -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/sync_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NXPNFCLinux/linux_libnfc-nci/HEAD/doc/Linux_NFC_API_Guide/sync_off.png -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/sync_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NXPNFCLinux/linux_libnfc-nci/HEAD/doc/Linux_NFC_API_Guide/sync_on.png -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/arrowright.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NXPNFCLinux/linux_libnfc-nci/HEAD/doc/Linux_NFC_API_Guide/arrowright.png -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/folderopen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NXPNFCLinux/linux_libnfc-nci/HEAD/doc/Linux_NFC_API_Guide/folderopen.png -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/nxp_logo_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NXPNFCLinux/linux_libnfc-nci/HEAD/doc/Linux_NFC_API_Guide/nxp_logo_s.png -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/folderclosed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NXPNFCLinux/linux_libnfc-nci/HEAD/doc/Linux_NFC_API_Guide/folderclosed.png -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NXPNFCLinux/linux_libnfc-nci/HEAD/doc/Linux_NFC_API_Guide/search/close.png -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/mag_sel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NXPNFCLinux/linux_libnfc-nci/HEAD/doc/Linux_NFC_API_Guide/search/mag_sel.png -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/search_l.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NXPNFCLinux/linux_libnfc-nci/HEAD/doc/Linux_NFC_API_Guide/search/search_l.png -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/search_m.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NXPNFCLinux/linux_libnfc-nci/HEAD/doc/Linux_NFC_API_Guide/search/search_m.png -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/search_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NXPNFCLinux/linux_libnfc-nci/HEAD/doc/Linux_NFC_API_Guide/search/search_r.png -------------------------------------------------------------------------------- /bootstrap: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | mkdir -p m4 4 | aclocal 5 | autoheader 6 | libtoolize 7 | automake --add-missing 8 | autoreconf -fi 9 | rm -Rf autom4te.cache 10 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/all_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['address',['address',['../structnfc__btoob__pairing__t.html#aec602ee1101c95c15b3b76d58037a603',1,'nfc_btoob_pairing_t']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/typedefs_1.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['tnfc_5fprotocol',['tNFC_PROTOCOL',['../linux__nfc__api_8h.html#a5bbdb860d0cd45c3077e27bbcf0abc5f',1,'linux_nfc_api.h']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/variables_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['address',['address',['../structnfc__btoob__pairing__t.html#aec602ee1101c95c15b3b76d58037a603',1,'nfc_btoob_pairing_t']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/all_2.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['current_5fndef_5flength',['current_ndef_length',['../structndef__info__t.html#a599deceb00d4286b83343f8ad7313c2b',1,'ndef_info_t']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/variables_7.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['max_5fndef_5flength',['max_ndef_length',['../structndef__info__t.html#aceab07510d20e6cb2fa440c5c425e84d',1,'ndef_info_t']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/variables_2.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['current_5fndef_5flength',['current_ndef_length',['../structndef__info__t.html#a599deceb00d4286b83343f8ad7313c2b',1,'ndef_info_t']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide.html: -------------------------------------------------------------------------------- 1 | Linux NFC API Guide 2 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/typedefs_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['nfc_5fbtoob_5frequest_5ft',['nfc_btoob_request_t',['../linux__nfc__api_8h.html#aad6b282cdfe3a0ea400cfc1419666a0d',1,'linux_nfc_api.h']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/defines_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['default_5fnfa_5ftech_5fmask',['DEFAULT_NFA_TECH_MASK',['../linux__nfc__api_8h.html#a30bfe94762be1486a4dd80c17fa940a2',1,'linux_nfc_api.h']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/all_9.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['main_2etxt',['main.txt',['../main_8txt.html',1,'']]], 4 | ['max_5fndef_5flength',['max_ndef_length',['../structndef__info__t.html#aceab07510d20e6cb2fa440c5c425e84d',1,'ndef_info_t']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/all_8.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['linux_5fnfc_5fapi_2eh',['linux_nfc_api.h',['../linux__nfc__api_8h.html',1,'']]], 4 | ['linux_5fnfc_5ffactory_5fapi_2eh',['linux_nfc_factory_api.h',['../linux__nfc__factory__api_8h.html',1,'']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/files_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['linux_5fnfc_5fapi_2eh',['linux_nfc_api.h',['../linux__nfc__api_8h.html',1,'']]], 4 | ['linux_5fnfc_5ffactory_5fapi_2eh',['linux_nfc_factory_api.h',['../linux__nfc__factory__api_8h.html',1,'']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/all_6.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['is_5fndef',['is_ndef',['../structndef__info__t.html#a210aa7d6be8d2488af3c32a6f1882953',1,'ndef_info_t']]], 4 | ['is_5fwritable',['is_writable',['../structndef__info__t.html#a181e9b302e56bfd9fb2d3d7373fee5a9',1,'ndef_info_t']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/all_f.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['uid',['uid',['../structnfc__tag__info__t.html#ac78a89e30460f5223a824f75e82d4170',1,'nfc_tag_info_t']]], 4 | ['uid_5flength',['uid_length',['../structnfc__tag__info__t.html#a0c957c67c5b182ee182741cbd827fc11',1,'nfc_tag_info_t']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/variables_5.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['is_5fndef',['is_ndef',['../structndef__info__t.html#a210aa7d6be8d2488af3c32a6f1882953',1,'ndef_info_t']]], 4 | ['is_5fwritable',['is_writable',['../structndef__info__t.html#a181e9b302e56bfd9fb2d3d7373fee5a9',1,'ndef_info_t']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/variables_d.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['uid',['uid',['../structnfc__tag__info__t.html#ac78a89e30460f5223a824f75e82d4170',1,'nfc_tag_info_t']]], 4 | ['uid_5flength',['uid_length',['../structnfc__tag__info__t.html#a0c957c67c5b182ee182741cbd827fc11',1,'nfc_tag_info_t']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/all_7.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['key',['key',['../structnfc__wifi__pairing__t.html#a74640c5faed8fa7cc73dd72f3a59d4d7',1,'nfc_wifi_pairing_t']]], 4 | ['key_5flength',['key_length',['../structnfc__wifi__pairing__t.html#aa045f1d547271bf0e09da158f306488f',1,'nfc_wifi_pairing_t']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/variables_4.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['handle',['handle',['../structnfc__tag__info__t.html#a85985ecd5d8effd2ab8c1c71a0b7729a',1,'nfc_tag_info_t']]], 4 | ['has_5fwifi',['has_wifi',['../structnfc__wifi__request__t.html#aed304d3ae9388b52a0781bbc76b5a241',1,'nfc_wifi_request_t']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/variables_c.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['technology',['technology',['../structnfc__tag__info__t.html#ae86261692eb29257980f646402880367',1,'nfc_tag_info_t']]], 4 | ['type',['type',['../structnfc__btoob__pairing__t.html#adba44a81c741d47f12c4bd3ea049434b',1,'nfc_btoob_pairing_t']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /libnfc-nci.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: libnfc-nci 7 | Description: NXP NFC library 8 | Version: 1.0 9 | URL: https://github.com/NXPNFCLinux/linux_libnfc-nci 10 | Cflags: -I${includedir} 11 | Libs: -L${libdir} -lnfc_nci_linux 12 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/all_d.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['ssid',['ssid',['../structnfc__wifi__pairing__t.html#a2550dd60e0a3c28016bcf00211a40d76',1,'nfc_wifi_pairing_t']]], 4 | ['ssid_5flength',['ssid_length',['../structnfc__wifi__pairing__t.html#a0b5d0473b67e95de4974425c55d88fdb',1,'nfc_wifi_pairing_t']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/variables_6.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['key',['key',['../structnfc__wifi__pairing__t.html#a74640c5faed8fa7cc73dd72f3a59d4d7',1,'nfc_wifi_pairing_t']]], 4 | ['key_5flength',['key_length',['../structnfc__wifi__pairing__t.html#aa045f1d547271bf0e09da158f306488f',1,'nfc_wifi_pairing_t']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/variables_b.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['ssid',['ssid',['../structnfc__wifi__pairing__t.html#a2550dd60e0a3c28016bcf00211a40d76',1,'nfc_wifi_pairing_t']]], 4 | ['ssid_5flength',['ssid_length',['../structnfc__wifi__pairing__t.html#a0b5d0473b67e95de4974425c55d88fdb',1,'nfc_wifi_pairing_t']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/all_1.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['bluetooth',['bluetooth',['../structnfc__handover__request__t.html#a4c573081e5a1b4e8375fe794b92fab6f',1,'nfc_handover_request_t::bluetooth()'],['../structnfc__handover__select__t.html#a217527ba221612e9f11e2c733877e218',1,'nfc_handover_select_t::bluetooth()']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/variables_1.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['bluetooth',['bluetooth',['../structnfc__handover__request__t.html#a4c573081e5a1b4e8375fe794b92fab6f',1,'nfc_handover_request_t::bluetooth()'],['../structnfc__handover__select__t.html#a217527ba221612e9f11e2c733877e218',1,'nfc_handover_select_t::bluetooth()']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/variables_3.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['device_5fname',['device_name',['../structnfc__btoob__pairing__t.html#a3d92f5d1d624e303432eb6ceaf099f33',1,'nfc_btoob_pairing_t']]], 4 | ['device_5fname_5flength',['device_name_length',['../structnfc__btoob__pairing__t.html#a50389448189c288965ca80bafc272e5a',1,'nfc_btoob_pairing_t']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/all_4.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['flag_5fhce_5fenable_5fhce',['FLAG_HCE_ENABLE_HCE',['../linux__nfc__api_8h.html#a8ca369281b4b9bedbcd9d738085e2922',1,'linux_nfc_api.h']]], 4 | ['flag_5fhce_5fskip_5fndef_5fcheck',['FLAG_HCE_SKIP_NDEF_CHECK',['../linux__nfc__api_8h.html#adaa7628f126663e1651667b8cb9b0574',1,'linux_nfc_api.h']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/defines_1.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['flag_5fhce_5fenable_5fhce',['FLAG_HCE_ENABLE_HCE',['../linux__nfc__api_8h.html#a8ca369281b4b9bedbcd9d738085e2922',1,'linux_nfc_api.h']]], 4 | ['flag_5fhce_5fskip_5fndef_5fcheck',['FLAG_HCE_SKIP_NDEF_CHECK',['../linux__nfc__api_8h.html#adaa7628f126663e1651667b8cb9b0574',1,'linux_nfc_api.h']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/all_c.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['power_5fstate',['power_state',['../structnfc__btoob__pairing__t.html#aecc2447ff2bc8675c9899a9347dc689d',1,'nfc_btoob_pairing_t::power_state()'],['../structnfc__wifi__pairing__t.html#ac66cfb068c42e4abc29d455f6db14faa',1,'nfc_wifi_pairing_t::power_state()']]], 4 | ['protocol',['protocol',['../structnfc__tag__info__t.html#a7019d0eb48e5ac62425e2596d9974433',1,'nfc_tag_info_t']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/variables_a.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['power_5fstate',['power_state',['../structnfc__btoob__pairing__t.html#aecc2447ff2bc8675c9899a9347dc689d',1,'nfc_btoob_pairing_t::power_state()'],['../structnfc__wifi__pairing__t.html#ac66cfb068c42e4abc29d455f6db14faa',1,'nfc_wifi_pairing_t::power_state()']]], 4 | ['protocol',['protocol',['../structnfc__tag__info__t.html#a7019d0eb48e5ac62425e2596d9974433',1,'nfc_tag_info_t']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/all_3.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['default_5fnfa_5ftech_5fmask',['DEFAULT_NFA_TECH_MASK',['../linux__nfc__api_8h.html#a30bfe94762be1486a4dd80c17fa940a2',1,'linux_nfc_api.h']]], 4 | ['device_5fname',['device_name',['../structnfc__btoob__pairing__t.html#a3d92f5d1d624e303432eb6ceaf099f33',1,'nfc_btoob_pairing_t']]], 5 | ['device_5fname_5flength',['device_name_length',['../structnfc__btoob__pairing__t.html#a50389448189c288965ca80bafc272e5a',1,'nfc_btoob_pairing_t']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/nomatches.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
No Matches
10 |
11 | 12 | 13 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/searchdata.js: -------------------------------------------------------------------------------- 1 | var indexSectionsWithContent = 2 | { 3 | 0: "abcdfhiklmnopstuw", 4 | 1: "n", 5 | 2: "lm", 6 | 3: "n", 7 | 4: "abcdhikmnopstuw", 8 | 5: "nt", 9 | 6: "n", 10 | 7: "hn", 11 | 8: "dfnt" 12 | }; 13 | 14 | var indexSectionNames = 15 | { 16 | 0: "all", 17 | 1: "classes", 18 | 2: "files", 19 | 3: "functions", 20 | 4: "variables", 21 | 5: "typedefs", 22 | 6: "enums", 23 | 7: "enumvalues", 24 | 8: "defines" 25 | }; 26 | 27 | var indexSectionLabels = 28 | { 29 | 0: "All", 30 | 1: "Classes", 31 | 2: "Files", 32 | 3: "Functions", 33 | 4: "Variables", 34 | 5: "Typedefs", 35 | 6: "Enumerations", 36 | 7: "Enumerator", 37 | 8: "Macros" 38 | }; 39 | 40 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/variables_8.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['ndef',['ndef',['../structnfc__btoob__pairing__t.html#a56c1d82c331bb22243b9eb2c22a0d69c',1,'nfc_btoob_pairing_t::ndef()'],['../structnfc__wifi__pairing__t.html#a6a8183ef1899f996f7d0868c6f6c5ae0',1,'nfc_wifi_pairing_t::ndef()'],['../structnfc__wifi__request__t.html#a4cf518a0af9b5524d9c6d4f5a0fe003a',1,'nfc_wifi_request_t::ndef()']]], 4 | ['ndef_5flength',['ndef_length',['../structnfc__btoob__pairing__t.html#a912b1dafa4dfc1d3a1db792264e3962e',1,'nfc_btoob_pairing_t::ndef_length()'],['../structnfc__wifi__pairing__t.html#af36b109934a2a2d93bbdd2cf431dbe31',1,'nfc_wifi_pairing_t::ndef_length()'],['../structnfc__wifi__request__t.html#aac33d97bee002ca29c65afafff6081ad',1,'nfc_wifi_request_t::ndef_length()']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/enums_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['nfc_5ffriendly_5ftype_5ft',['nfc_friendly_type_t',['../linux__nfc__api_8h.html#a76218cd68b3ea6ea520a9800cd9b55d2',1,'linux_nfc_api.h']]], 4 | ['nfc_5fhandover_5fbt_5ftype_5ft',['nfc_handover_bt_type_t',['../linux__nfc__api_8h.html#a8b59b6a55393811dd22637a66cfcfbf6',1,'linux_nfc_api.h']]], 5 | ['nfc_5fhandover_5fcps_5ft',['nfc_handover_cps_t',['../linux__nfc__api_8h.html#a7c6b0ba3e307e06fe009338c6899c0ab',1,'linux_nfc_api.h']]], 6 | ['nfcfactory_5fprbsbitrate_5ft',['nfcFactory_PRBSBitrate_t',['../linux__nfc__factory__api_8h.html#a0bbddf1386f0100bcc4bfeba426a3344',1,'linux_nfc_factory_api.h']]], 7 | ['nfcfactory_5fprbstech_5ft',['nfcFactory_PRBSTech_t',['../linux__nfc__factory__api_8h.html#af507e085fb991b2ef57d57304eaa9093',1,'linux_nfc_factory_api.h']]] 8 | ]; 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Object files 2 | *.o 3 | *.ko 4 | *.obj 5 | *.elf 6 | 7 | # Precompiled Headers 8 | *.gch 9 | *.pch 10 | 11 | # Libraries 12 | *.lib 13 | *.a 14 | *.la 15 | *.lo 16 | 17 | # Shared objects (inc. Windows DLLs) 18 | *.dll 19 | *.so 20 | *.so.* 21 | *.dylib 22 | 23 | # Executables 24 | *.exe 25 | *.out 26 | *.app 27 | *.i*86 28 | *.x86_64 29 | *.hex 30 | nfcDemoApp 31 | 32 | # Debug files 33 | *.dSYM/ 34 | *.su 35 | 36 | # Autotools 37 | .deps/ 38 | .libs/ 39 | .dirstamp 40 | Makefile.in 41 | Makefile 42 | /aclocal.m4 43 | /autom4te.cache 44 | /autoscan.log 45 | /autoscan-*.log 46 | /aclocal.m4 47 | /compile 48 | /config.guess 49 | /config.h 50 | /config.h.in 51 | /config.h.in~ 52 | /config.log 53 | /config.status 54 | /config.sub 55 | /configure 56 | /configure.scan 57 | /depcomp 58 | /install-sh 59 | /libtool 60 | /ltmain.sh 61 | /m4 62 | /missing 63 | /stamp-h1 64 | /libnfc-nci.pc 65 | 66 | # Editor 67 | *.orig 68 | *.rej 69 | -------------------------------------------------------------------------------- /src/halimpl/pn54x/dnld/phNxpNciHal_Dnld.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012-2014 NXP Semiconductors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | #ifndef _PHNXPNCIHAL_DNLD_H_ 17 | #define _PHNXPNCIHAL_DNLD_H_ 18 | 19 | #include 20 | 21 | NFCSTATUS phNxpNciHal_fw_download_seq(uint8_t bClkSrcVal, uint8_t bClkFreqVal); 22 | 23 | #endif /* _PHNXPNCIHAL_DNLD_H_ */ 24 | -------------------------------------------------------------------------------- /src/libnfc-nci/include/btu_api.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright (C) 1999-2012 Broadcom Corporation 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | ******************************************************************************/ 18 | #ifndef BTU_API_H 19 | #define BTU_API_H 20 | #endif /* BTU_APU_H */ 21 | -------------------------------------------------------------------------------- /src/halimpl/pn54x/dnld/phDnldNfc_Utils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010-2014 NXP Semiconductors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /* 18 | * Firmware Download Utilities File 19 | */ 20 | #ifndef PHDNLDNFC_UTILS_H 21 | #define PHDNLDNFC_UTILS_H 22 | 23 | #include 24 | 25 | extern uint16_t phDnldNfc_CalcCrc16(uint8_t* pBuff, uint16_t wLen); 26 | 27 | #endif /* PHDNLDNFC_UTILS_H */ 28 | -------------------------------------------------------------------------------- /src/halimpl/pn54x/hal/phNxpNciHal_Kovio.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012-2014 NXP Semiconductors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | #ifndef _PHNXPNCIHAL_KOVIO_H_ 17 | #define _PHNXPNCIHAL_KOVIO_H_ 18 | 19 | #include 20 | #include 21 | #include 22 | 23 | extern NFCSTATUS phNxpNciHal_kovio_rsp_ext(uint8_t *p_ntf, uint16_t *p_len); 24 | extern void phNxpNciHal_clean_Kovio_Ext(); 25 | 26 | #endif /* _PHNXPNCIHAL_KOVIO_H_ */ 27 | -------------------------------------------------------------------------------- /src/service/utils/IntervalTimer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /* 18 | * Asynchronous interval timer. 19 | */ 20 | 21 | #include 22 | 23 | 24 | class IntervalTimer 25 | { 26 | public: 27 | typedef void (*TIMER_FUNC) (union sigval); 28 | 29 | IntervalTimer(); 30 | ~IntervalTimer(); 31 | bool set(int ms, TIMER_FUNC cb); 32 | void kill(); 33 | bool create(TIMER_FUNC ); 34 | 35 | private: 36 | timer_t mTimerId; 37 | TIMER_FUNC mCb; 38 | }; 39 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/all_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/all_1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/all_10.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/all_2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/all_3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/all_4.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/all_5.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/all_6.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/all_7.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/all_8.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/all_9.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/all_a.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/all_b.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/all_c.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/all_d.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/all_e.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/all_f.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/enums_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/files_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/files_1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /src/libnfc-nci/include/buildcfg_hal.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright (C) 1999-2012 Broadcom Corporation 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | ******************************************************************************/ 18 | 19 | /****************************************************************************** 20 | * 21 | * this file contains constant definitions for customizing NFA 22 | * 23 | ******************************************************************************/ 24 | #pragma once 25 | 26 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/classes_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/defines_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/defines_1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/defines_2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/defines_3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/functions_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/typedefs_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/typedefs_1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/variables_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/variables_1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/variables_2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/variables_3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/variables_4.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/variables_5.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/variables_6.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/variables_7.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/variables_8.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/variables_9.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/variables_a.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/variables_b.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/variables_c.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/variables_d.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/variables_e.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/enumvalues_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/enumvalues_1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /src/halimpl/pn54x/tml/lpcusbsio/lpcusbsio/framework_Allocator.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * Copyright (C) 2015 Eff'Innov Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * Developped by Eff'Innov Technologies : contact@effinnov.com 17 | * 18 | **************************************************************************/ 19 | 20 | #ifndef FRAMEWORK_ALLOCATOR_H 21 | #define FRAMEWORK_ALLOCATOR_H 22 | 23 | #include 24 | 25 | void* framework_AllocMem(size_t size); 26 | void framework_FreeMem(void *ptr); 27 | 28 | #endif //ndef FRAMEWORK_ALLOCATOR_H 29 | -------------------------------------------------------------------------------- /src/halimpl/pn54x/hal/phNxpNciHal_ext.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012-2014 NXP Semiconductors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | #ifndef _PHNXPNCIHAL_EXT_H_ 17 | #define _PHNXPNCIHAL_EXT_H_ 18 | 19 | #include 20 | #include 21 | #include 22 | 23 | void phNxpNciHal_ext_init (void); 24 | NFCSTATUS phNxpNciHal_process_ext_rsp (uint8_t *p_ntf, uint16_t *p_len); 25 | NFCSTATUS phNxpNciHal_send_ext_cmd(uint16_t cmd_len, uint8_t *p_cmd); 26 | NFCSTATUS phNxpNciHal_write_ext(uint16_t *cmd_len, uint8_t *p_cmd_data, 27 | uint16_t *rsp_len, uint8_t *p_rsp_data); 28 | 29 | #endif /* _PHNXPNICHAL_EXT_H_ */ 30 | -------------------------------------------------------------------------------- /src/halimpl/pn54x/tml/lpcusbsio/lpcusbsio/framework_linux.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * Copyright (C) 2015 Eff'Innov Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * Developped by Eff'Innov Technologies : contact@effinnov.com 17 | * 18 | **************************************************************************/ 19 | 20 | #include "framework_Interface.h" 21 | 22 | #include 23 | 24 | /** 25 | * Internal function, log a buffer to log output as Hexadecimal + ASCII display. 26 | * @param buffer 27 | * @param size 28 | */ 29 | void HexDump(const void * buffer, uint32_t size); 30 | 31 | void framework_Error(const char* format, ...); 32 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/enumvalues_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['handover_5fcps_5factivating',['HANDOVER_CPS_ACTIVATING',['../linux__nfc__api_8h.html#a7c6b0ba3e307e06fe009338c6899c0aba70957c19fd225cba4c6d070126292561',1,'linux_nfc_api.h']]], 4 | ['handover_5fcps_5factive',['HANDOVER_CPS_ACTIVE',['../linux__nfc__api_8h.html#a7c6b0ba3e307e06fe009338c6899c0aba66e02c11c38536728b1503a0f43f090b',1,'linux_nfc_api.h']]], 5 | ['handover_5fcps_5finactive',['HANDOVER_CPS_INACTIVE',['../linux__nfc__api_8h.html#a7c6b0ba3e307e06fe009338c6899c0aba5a5e7ec10ff5fbf9644956f020b676ee',1,'linux_nfc_api.h']]], 6 | ['handover_5fcps_5funknown',['HANDOVER_CPS_UNKNOWN',['../linux__nfc__api_8h.html#a7c6b0ba3e307e06fe009338c6899c0abadbf07c21a7b7fd2ee679548f303e6089',1,'linux_nfc_api.h']]], 7 | ['handover_5ftype_5fble',['HANDOVER_TYPE_BLE',['../linux__nfc__api_8h.html#a8b59b6a55393811dd22637a66cfcfbf6a2bf23c0e1b198f614921aa72f5c7894f',1,'linux_nfc_api.h']]], 8 | ['handover_5ftype_5fbt',['HANDOVER_TYPE_BT',['../linux__nfc__api_8h.html#a8b59b6a55393811dd22637a66cfcfbf6a9699420a1ddf33d933533a0829eaa41d',1,'linux_nfc_api.h']]], 9 | ['handover_5ftype_5funknown',['HANDOVER_TYPE_UNKNOWN',['../linux__nfc__api_8h.html#a8b59b6a55393811dd22637a66cfcfbf6a4124dbf939a04836cd79b147a1521919',1,'linux_nfc_api.h']]] 10 | ]; 11 | -------------------------------------------------------------------------------- /src/halimpl/pn54x/inc/phNxpNciHal_Adaptation.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012-2014 NXP Semiconductors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _PHNXPNCIHAL_ADAPTATION_H_ 18 | #define _PHNXPNCIHAL_ADAPTATION_H_ 19 | 20 | #include "nfc_hal_api.h" 21 | 22 | /* NXP HAL functions */ 23 | 24 | int phNxpNciHal_open(nfc_stack_callback_t *p_cback, 25 | nfc_stack_data_callback_t *p_data_cback); 26 | int phNxpNciHal_write(uint16_t data_len, const uint8_t *p_data); 27 | int phNxpNciHal_core_initialized(uint8_t* p_core_init_rsp_params); 28 | int phNxpNciHal_pre_discover(void); 29 | int phNxpNciHal_close(void); 30 | int phNxpNciHal_control_granted(void); 31 | int phNxpNciHal_power_cycle(void); 32 | 33 | #endif /* _PHNXPNCIHAL_ADAPTATION_H_ */ 34 | -------------------------------------------------------------------------------- /src/halimpl/pn54x/hal/phNxpNciHal_dta.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012-2014 NXP Semiconductors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _PHNXPNCIHAL_DTA_H_ 18 | #define _PHNXPNCIHAL_DTA_H_ 19 | 20 | #include 21 | /* DTA Control structure */ 22 | typedef struct phNxpDta_Control 23 | { 24 | uint8_t dta_ctrl_flag; 25 | uint16_t dta_pattern_no; 26 | uint8_t dta_t1t_flag; 27 | }phNxpDta_Control_t; 28 | 29 | void phNxpEnable_DtaMode (uint16_t pattern_no); 30 | void phNxpDisable_DtaMode (void); 31 | NFCSTATUS phNxpDta_IsEnable(void); 32 | void phNxpDta_T1TEnable(void); 33 | NFCSTATUS phNxpNHal_DtaUpdate(uint16_t *cmd_len, uint8_t *p_cmd_data, 34 | uint16_t *rsp_len, uint8_t *p_rsp_data); 35 | 36 | #endif /* _PHNXPNICHAL_DTA_H_ */ 37 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | linux_libnfc-nci 2 | ================ 3 | Linux NFC stack for NCI based NXP NFC Controllers (PN7150, PN7120). 4 | 5 | Information about NXP NFC Controller can be found on [NXP website](https://www.nxp.com/products/identification-and-security/nfc/nfc-reader-ics:NFC-READER). 6 | 7 | Further details about the stack [here](https://www.nxp.com/doc/AN11697). 8 | 9 | Release version 10 | --------------- 11 | R2.4 includes dynamic adaptation to the NFC Controller, multiple tags support, and some bug fixes (refer to the [documentation](https://www.nxp.com/doc/AN11697) for more details). 12 | 13 | R2.2 includes support for alternative to pn5xx_i2c kernel driver and some bug fixes (refer to the [documentation](https://www.nxp.com/doc/AN11697) for more details). 14 | 15 | R2.1 includes support for PN7150 NFC Controller IC and some bug fixes (refer to the [documentation](https://www.nxp.com/doc/AN11697) for more details). 16 | 17 | R2.0 includes LLCP1.3 support and some bug fixes (refer to the [documentation](https://www.nxp.com/doc/AN11697) for more details). 18 | 19 | R1.0 is the first official release of Linux libnfc-nci stack 20 | 21 | Possible problems, known errors and restrictions of R2.4: 22 | --------------------------------------------------------- 23 | LLCP1.3 support requires OpenSSL Cryptography and SSL/TLS Toolkit (version 1.0.1j or later) 24 | -------------------------------------------------------------------------------- /src/halimpl/pn54x/tml/i2c/phTmlNfc_i2c.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010-2014 NXP Semiconductors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /* 18 | * TML I2C port implementation for linux 19 | */ 20 | 21 | /* Basic type definitions */ 22 | #include 23 | #include 24 | 25 | /* Function declarations */ 26 | void phTmlNfc_i2c_close(void *pDevHandle); 27 | NFCSTATUS phTmlNfc_i2c_open_and_configure(pphTmlNfc_Config_t pConfig, void ** pLinkHandle); 28 | int phTmlNfc_i2c_read(void *pDevHandle, uint8_t * pBuffer, int nNbBytesToRead); 29 | int phTmlNfc_i2c_write(void *pDevHandle,uint8_t * pBuffer, int nNbBytesToWrite); 30 | int phTmlNfc_i2c_reset(void *pDevHandle,long level); 31 | bool_t getDownloadFlag(void); 32 | extern phTmlNfc_i2cfragmentation_t fragmentation_enabled; 33 | -------------------------------------------------------------------------------- /src/halimpl/pn54x/tml/lpcusbsio/phTmlNfc_lpcusbsio.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010-2014 NXP Semiconductors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /* 18 | * TML I2C port implementation for linux 19 | */ 20 | 21 | /* Basic type definitions */ 22 | #include 23 | #include 24 | 25 | /* Function declarations */ 26 | void phTmlNfc_i2c_close(void *pDevHandle); 27 | NFCSTATUS phTmlNfc_i2c_open_and_configure(pphTmlNfc_Config_t pConfig, void ** pLinkHandle); 28 | int phTmlNfc_i2c_read(void *pDevHandle, uint8_t * pBuffer, int nNbBytesToRead); 29 | int phTmlNfc_i2c_write(void *pDevHandle,uint8_t * pBuffer, int nNbBytesToWrite); 30 | int phTmlNfc_i2c_reset(void *pDevHandle,long level); 31 | bool_t getDownloadFlag(void); 32 | extern phTmlNfc_i2cfragmentation_t fragmentation_enabled; 33 | -------------------------------------------------------------------------------- /src/halimpl/pn54x/tml/lpcusbsio/97-lpcusbsio-hid.rules: -------------------------------------------------------------------------------- 1 | # This is a sample udev file for HIDAPI devices which changes the permissions 2 | # to 0666 (world readable/writable) for a specified device on Linux systems. 3 | 4 | # If you are using the hidraw implementation, then do something like the 5 | # following, substituting the VID and PID with your device. Busnum 1 is USB. 6 | 7 | # HIDAPI/hidraw 8 | KERNEL=="hidraw*", ATTRS{busnum}=="1", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="0088", MODE="0666" 9 | KERNEL=="hidraw*", ATTRS{busnum}=="2", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="0088", MODE="0666" 10 | KERNEL=="hidraw*", ATTRS{busnum}=="3", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="0088", MODE="0666" 11 | KERNEL=="hidraw*", ATTRS{busnum}=="4", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="0088", MODE="0666" 12 | 13 | # Once done, optionally rename this file for your device, and drop it into 14 | # /etc/udev/rules.d and unplug and re-plug your device. This is all that is 15 | # necessary to see the new permissions. Udev does not have to be restarted. 16 | 17 | # If you think permissions of 0666 are too loose, then see: 18 | # http://reactivated.net/writing_udev_rules.html for more information on finer 19 | # grained permission setting. For example, it might be sufficient to just 20 | # set the group or user owner for specific devices (for example the plugdev 21 | # group on some systems). 22 | -------------------------------------------------------------------------------- /src/halimpl/pn54x/tml/lpcusbsio/lpcusbsio/framework_Timer.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * Copyright (C) 2015 Eff'Innov Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * Developped by Eff'Innov Technologies : contact@effinnov.com 17 | * 18 | **************************************************************************/ 19 | 20 | #ifndef FRAMEWORK_TIMER_H 21 | #define FRAMEWORK_TIMER_H 22 | 23 | #include "framework_Interface.h" 24 | 25 | typedef void (framework_TimerCallBack)(void*); 26 | 27 | void framework_TimerCreate(void **timer); 28 | void framework_TimerStart(void *timer,uint32_t delay,framework_TimerCallBack *cb,void *usercontext); 29 | void framework_TimerStop(void *timer); 30 | void framework_TimerDelete(void *timer); 31 | 32 | #endif // ndef FRAMEWORK_TIMER_H 33 | 34 | -------------------------------------------------------------------------------- /src/halimpl/pn54x/tml/phDal4Nfc_messageQueueLib.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010-2014 NXP Semiconductors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /* 18 | * DAL independent message queue implementation for Android 19 | */ 20 | 21 | #ifndef PHDAL4NFC_MESSAGEQUEUE_H 22 | #define PHDAL4NFC_MESSAGEQUEUE_H 23 | 24 | #include 25 | #include 26 | 27 | #ifndef key_t 28 | #define key_t __kernel_key_t 29 | #endif 30 | 31 | intptr_t phDal4Nfc_msgget(key_t key, int msgflg); 32 | void phDal4Nfc_msgrelease(intptr_t msqid); 33 | int phDal4Nfc_msgctl(intptr_t msqid, int cmd, void *buf); 34 | intptr_t phDal4Nfc_msgsnd(intptr_t msqid, phLibNfc_Message_t * msg, int msgflg); 35 | int phDal4Nfc_msgrcv(intptr_t msqid, phLibNfc_Message_t * msg, long msgtyp, int msgflg); 36 | 37 | #endif /* PHDAL4NFC_MESSAGEQUEUE_H */ 38 | -------------------------------------------------------------------------------- /src/halimpl/pn54x/inc/phNxpNciHal_Api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012-2014 NXP Semiconductors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | #ifndef _PHNXPNCIHAL_API_H_ 17 | #define _PHNXPNCIHAL_API_H_ 18 | 19 | #include 20 | #include 21 | #include 22 | 23 | /******************************************************************************* 24 | ** 25 | ** Function phNxpNciHal_get_version 26 | ** 27 | ** Description Function to get the HW, FW and SW versions. 28 | ** 29 | ** Returns NFCSTATUS_SUCCESS if successful,otherwise NFCSTATUS_FAILED. 30 | ** 31 | *******************************************************************************/ 32 | 33 | NFCSTATUS phNxpNciHal_get_version (uint32_t *hw_ver, uint32_t *fw_ver, uint32_t *sw_ver); 34 | 35 | #endif /* _PHNXPNCIHAL_API_H_ */ 36 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/tabs.css: -------------------------------------------------------------------------------- 1 | .tabs, .tabs2, .tabs3 { 2 | background-image: url('tab_b.png'); 3 | width: 100%; 4 | z-index: 101; 5 | font-size: 13px; 6 | font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; 7 | } 8 | 9 | .tabs2 { 10 | font-size: 10px; 11 | } 12 | .tabs3 { 13 | font-size: 9px; 14 | } 15 | 16 | .tablist { 17 | margin: 0; 18 | padding: 0; 19 | display: table; 20 | } 21 | 22 | .tablist li { 23 | float: left; 24 | display: table-cell; 25 | background-image: url('tab_b.png'); 26 | line-height: 36px; 27 | list-style: none; 28 | } 29 | 30 | .tablist a { 31 | display: block; 32 | padding: 0 20px; 33 | font-weight: bold; 34 | background-image:url('tab_s.png'); 35 | background-repeat:no-repeat; 36 | background-position:right; 37 | color: #283A5D; 38 | text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); 39 | text-decoration: none; 40 | outline: none; 41 | } 42 | 43 | .tabs3 .tablist a { 44 | padding: 0 10px; 45 | } 46 | 47 | .tablist a:hover { 48 | background-image: url('tab_h.png'); 49 | background-repeat:repeat-x; 50 | color: #fff; 51 | text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); 52 | text-decoration: none; 53 | } 54 | 55 | .tablist li.current a { 56 | background-image: url('tab_a.png'); 57 | background-repeat:repeat-x; 58 | color: #fff; 59 | text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); 60 | } 61 | -------------------------------------------------------------------------------- /src/service/interface/nativeNfcHandover.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright (C) 2015 NXP Semiconductors 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License") 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | ******************************************************************************/ 18 | 19 | #ifndef __NATIVE_NFC_HANDOVER_H__ 20 | #define __NATIVE_NFC_HANDOVER_H__ 21 | 22 | #include "data_types.h" 23 | #include "linux_nfc_api.h" 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | extern INT32 nativeNfcHO_registerCallback(nfcHandoverCallback_t *callback); 30 | 31 | extern void nativeNfcHO_deregisterCallback(); 32 | 33 | extern INT32 nativeNfcHO_sendHs(UINT8 *msg, UINT32 length); 34 | 35 | extern INT32 nativeNfcHO_sendSelectError(UINT8 error_reason, UINT32 error_data); 36 | 37 | #ifdef __cplusplus 38 | } 39 | #endif 40 | 41 | #endif // __NATIVE_NFC_HANDOVER_H__ 42 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/classes_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['ndef_5finfo_5ft',['ndef_info_t',['../structndef__info__t.html',1,'']]], 4 | ['nfc_5fbtoob_5fpairing_5ft',['nfc_btoob_pairing_t',['../structnfc__btoob__pairing__t.html',1,'']]], 5 | ['nfc_5fhandover_5frequest_5ft',['nfc_handover_request_t',['../structnfc__handover__request__t.html',1,'']]], 6 | ['nfc_5fhandover_5fselect_5ft',['nfc_handover_select_t',['../structnfc__handover__select__t.html',1,'']]], 7 | ['nfc_5ftag_5finfo_5ft',['nfc_tag_info_t',['../structnfc__tag__info__t.html',1,'']]], 8 | ['nfc_5fwifi_5fpairing_5ft',['nfc_wifi_pairing_t',['../structnfc__wifi__pairing__t.html',1,'']]], 9 | ['nfc_5fwifi_5frequest_5ft',['nfc_wifi_request_t',['../structnfc__wifi__request__t.html',1,'']]], 10 | ['nfcfactory_5fantenna_5fst_5fresp_5ft',['nfcFactory_Antenna_St_Resp_t',['../structnfc_factory___antenna___st___resp__t.html',1,'']]], 11 | ['nfchandovercallback_5ft',['nfcHandoverCallback_t',['../structnfc_handover_callback__t.html',1,'']]], 12 | ['nfchostcardemulationcallback_5ft',['nfcHostCardEmulationCallback_t',['../structnfc_host_card_emulation_callback__t.html',1,'']]], 13 | ['nfcsnepclientcallback_5ft',['nfcSnepClientCallback_t',['../structnfc_snep_client_callback__t.html',1,'']]], 14 | ['nfcsnepservercallback_5ft',['nfcSnepServerCallback_t',['../structnfc_snep_server_callback__t.html',1,'']]], 15 | ['nfctagcallback_5ft',['nfcTagCallback_t',['../structnfc_tag_callback__t.html',1,'']]] 16 | ]; 17 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/all_5.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['handle',['handle',['../structnfc__tag__info__t.html#a85985ecd5d8effd2ab8c1c71a0b7729a',1,'nfc_tag_info_t']]], 4 | ['handover_5fcps_5factivating',['HANDOVER_CPS_ACTIVATING',['../linux__nfc__api_8h.html#a7c6b0ba3e307e06fe009338c6899c0aba70957c19fd225cba4c6d070126292561',1,'linux_nfc_api.h']]], 5 | ['handover_5fcps_5factive',['HANDOVER_CPS_ACTIVE',['../linux__nfc__api_8h.html#a7c6b0ba3e307e06fe009338c6899c0aba66e02c11c38536728b1503a0f43f090b',1,'linux_nfc_api.h']]], 6 | ['handover_5fcps_5finactive',['HANDOVER_CPS_INACTIVE',['../linux__nfc__api_8h.html#a7c6b0ba3e307e06fe009338c6899c0aba5a5e7ec10ff5fbf9644956f020b676ee',1,'linux_nfc_api.h']]], 7 | ['handover_5fcps_5funknown',['HANDOVER_CPS_UNKNOWN',['../linux__nfc__api_8h.html#a7c6b0ba3e307e06fe009338c6899c0abadbf07c21a7b7fd2ee679548f303e6089',1,'linux_nfc_api.h']]], 8 | ['handover_5ftype_5fble',['HANDOVER_TYPE_BLE',['../linux__nfc__api_8h.html#a8b59b6a55393811dd22637a66cfcfbf6a2bf23c0e1b198f614921aa72f5c7894f',1,'linux_nfc_api.h']]], 9 | ['handover_5ftype_5fbt',['HANDOVER_TYPE_BT',['../linux__nfc__api_8h.html#a8b59b6a55393811dd22637a66cfcfbf6a9699420a1ddf33d933533a0829eaa41d',1,'linux_nfc_api.h']]], 10 | ['handover_5ftype_5funknown',['HANDOVER_TYPE_UNKNOWN',['../linux__nfc__api_8h.html#a8b59b6a55393811dd22637a66cfcfbf6a4124dbf939a04836cd79b147a1521919',1,'linux_nfc_api.h']]], 11 | ['has_5fwifi',['has_wifi',['../structnfc__wifi__request__t.html#aed304d3ae9388b52a0781bbc76b5a241',1,'nfc_wifi_request_t']]] 12 | ]; 13 | -------------------------------------------------------------------------------- /src/halimpl/pn54x/tml/lpcusbsio/lpcusbsio/framework_Map.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * Copyright (C) 2015 Eff'Innov Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * Developped by Eff'Innov Technologies : contact@effinnov.com 17 | * 18 | **************************************************************************/ 19 | 20 | #ifndef MAP_H 21 | #define MAP_H 22 | 23 | typedef enum STATUS 24 | { 25 | SUCCESS, 26 | FAILED, 27 | NOT_FOUND, 28 | INVALID_MAP, 29 | INVALID_PARAM, 30 | ALREADY_EXISTS 31 | }STATUS; 32 | 33 | STATUS map_create(void ** map); 34 | 35 | STATUS map_destroy(void* map); 36 | 37 | STATUS map_add(void * map, void* id, void* object); 38 | 39 | STATUS map_remove(void* map, void* id); 40 | 41 | STATUS map_get(void* map, void* id, void ** object); 42 | 43 | STATUS map_getAll(void* map, void ** elements, int * lenght); 44 | 45 | #endif /*MAP_H*/ 46 | -------------------------------------------------------------------------------- /src/halimpl/pn54x/dnld/phDnldNfc_Cmd.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010-2014 NXP Semiconductors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /* 18 | * Firmware Download command values 19 | */ 20 | 21 | #ifndef PHDNLDNFC_CMD_H 22 | #define PHDNLDNFC_CMD_H 23 | 24 | #include 25 | 26 | /* 27 | * Enum definition contains Firmware Download Command Ids 28 | */ 29 | typedef enum phDnldNfc_CmdId 30 | { 31 | PH_DL_CMD_NONE = 0x00, /* Invalid Cmd */ 32 | PH_DL_CMD_RESET = 0xF0, /* Reset */ 33 | PH_DL_CMD_GETVERSION = 0xF1, /* Get Version */ 34 | PH_DL_CMD_CHECKINTEGRITY = 0xE0, /* Check Integrity */ 35 | PH_DL_CMD_WRITE = 0xC0, /* Write */ 36 | PH_DL_CMD_READ = 0xA2, /* Read */ 37 | PH_DL_CMD_LOG = 0xA7, /* Log */ 38 | PH_DL_CMD_FORCE = 0xD0, /* Force */ 39 | PH_DL_CMD_GETSESSIONSTATE = 0xF2 /* Get Session State */ 40 | }phDnldNfc_CmdId_t; 41 | 42 | #endif /* PHDNLDNFC_CMD_H */ 43 | -------------------------------------------------------------------------------- /src/libnfc-nci/nfa/sys/nfa_sys_cfg.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright (C) 2010-2014 Broadcom Corporation 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | ******************************************************************************/ 18 | 19 | 20 | /****************************************************************************** 21 | * 22 | * This file contains compile-time configurable constants for the NFA 23 | * system manager. 24 | * 25 | ******************************************************************************/ 26 | 27 | #include "nfc_target.h" 28 | #include "gki.h" 29 | #include "nfa_sys.h" 30 | 31 | const tNFA_SYS_CFG nfa_sys_cfg = 32 | { 33 | NFA_MBOX_EVT_MASK, /* GKI mailbox event */ 34 | NFA_MBOX_ID, /* GKI mailbox id */ 35 | NFA_TIMER_ID, /* GKI timer id */ 36 | APPL_INITIAL_TRACE_LEVEL /* initial trace level */ 37 | }; 38 | 39 | tNFA_SYS_CFG *p_nfa_sys_cfg = (tNFA_SYS_CFG *) &nfa_sys_cfg; 40 | 41 | 42 | -------------------------------------------------------------------------------- /src/halimpl/pn54x/hal/phNxpNciHal_NfcDepSWPrio.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012-2014 NXP Semiconductors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | #ifndef _PHNXPNCIHAL_NFCDEPSWPRIO_H_ 17 | #define _PHNXPNCIHAL_NFCDEPSWPRIO_H_ 18 | 19 | #include 20 | #include 21 | #include 22 | 23 | #define START_POLLING 0x00 24 | #define RESUME_POLLING 0x01 25 | #define STOP_POLLING 0x02 26 | #define DISCOVER_SELECT 0x03 27 | #define CLEAR_PIPE_RSP 0x04 28 | 29 | extern uint8_t EnableP2P_PrioLogic; 30 | 31 | extern NFCSTATUS phNxpNciHal_NfcDep_rsp_ext(uint8_t *p_ntf, uint16_t *p_len); 32 | extern void phNxpNciHal_NfcDep_cmd_ext(uint8_t *p_cmd_data, uint16_t *cmd_len); 33 | extern NFCSTATUS phNxpNciHal_NfcDep_comapre_ntf(uint8_t *p_cmd_data, uint16_t cmd_len); 34 | extern NFCSTATUS phNxpNciHal_select_RF_Discovery(unsigned int RfID,unsigned int RfProtocolType); 35 | extern NFCSTATUS phNxpNciHal_clean_P2P_Prio(); 36 | extern NFCSTATUS phNxpNciHal_send_clear_pipe_rsp(void); 37 | 38 | #endif /* _PHNXPNCIHAL_NFCDEPSWPRIO_H_ */ 39 | -------------------------------------------------------------------------------- /src/service/interface/nativeNfcSnep.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright (C) 2015 NXP Semiconductors 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License") 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | ******************************************************************************/ 18 | 19 | #ifndef __NATIVE_NFC_SNEP_H__ 20 | #define __NATIVE_NFC_SNEP_H__ 21 | 22 | #include "data_types.h" 23 | #include "linux_nfc_api.h" 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | #undef WIN_PLATFORM 30 | 31 | extern INT32 nativeNfcSnep_registerClientCallback(nfcSnepClientCallback_t *clientCallback); 32 | 33 | extern void nativeNfcSnep_deregisterClientCallback(); 34 | 35 | extern INT32 nativeNfcSnep_startServer(nfcSnepServerCallback_t *serverCallback); 36 | 37 | extern void nativeNfcSnep_stopServer(); 38 | 39 | extern INT32 nativeNfcSnep_putMessage(UINT8* msg, UINT32 length); 40 | 41 | extern void nativeNfcSnep_handleNfcOnOff (BOOLEAN isOn); 42 | 43 | #ifdef __cplusplus 44 | } 45 | #endif 46 | 47 | #endif // __NATIVE_NFC_SNEP_H__ 48 | 49 | -------------------------------------------------------------------------------- /src/libnfc-nci/gki/common/gki_inet.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright (C) 1999-2012 Broadcom Corporation 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | ******************************************************************************/ 18 | #ifndef GKI_INET_H 19 | #define GKI_INET_H 20 | 21 | #include "data_types.h" 22 | 23 | #define htons ntohs 24 | #define htonl ntohl 25 | 26 | #define htonets nettohs 27 | #define htonetl nettohl 28 | 29 | #if BIG_ENDIAN == TRUE 30 | #define ntohs(n) (n) 31 | #define ntohl(n) (n) 32 | #define ntoh6(n) (n) 33 | 34 | #define nettohs(n) (n) 35 | #define nettohl(n) (n) 36 | #else 37 | extern UINT16 ntohs(UINT16 n); 38 | extern UINT32 ntohl(UINT32 n); 39 | extern UINT8 *ntoh6(UINT8 *p); 40 | 41 | #define nettohs(n) ((UINT16)((((n) << 8) & 0xff00) | (((n) >> 8) & 0x00ff))) 42 | #define nettohl(n) ((((n) & 0x000000ff) << 24) | (((n) << 8) & 0x00ff0000) | \ 43 | (((n) >> 8) & 0x0000ff00) | (((n) >> 24) & 0x000000ff)) 44 | #endif 45 | 46 | #endif /* GKI_INET_H */ 47 | 48 | -------------------------------------------------------------------------------- /src/service/interface/nativeNfcLlcp.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright (C) 2015 NXP Semiconductors 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License") 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | ******************************************************************************/ 18 | 19 | #ifndef __NATIVE_NFC_LLCP_H__ 20 | #define __NATIVE_NFC_LLCP_H__ 21 | 22 | #include "data_types.h" 23 | #include "linux_nfc_api.h" 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | #undef WIN_PLATFORM 30 | 31 | #define LLCP_CL_SAP_ID_DEFAULT 0x14 32 | #define LLCP_MAX_DATA_SIZE 0x07FF + 0x0800 33 | 34 | extern INT32 nativeNfcLlcp_ConnLessRegisterClientCallback(nfcllcpConnlessClientCallback_t *clientCallback); 35 | 36 | extern void nativeNfcLlcp_ConnLessDeregisterClientCallback(); 37 | 38 | extern INT32 nativeNfcLlcp_ConnLessStartServer(nfcllcpConnlessServerCallback_t *serverCallback); 39 | 40 | extern void nativeNfcLlcp_ConnLessStopServer(); 41 | 42 | extern INT32 nativeNfcLlcp_ConnLessSendMessage(UINT8* msg, UINT32 length); 43 | 44 | extern INT32 nativeNfcLlcp_ConnLessReceiveMessage(UINT8* msg, UINT32 *length); 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif 49 | 50 | #endif // __NATIVE_NFC_LLCP_H__ 51 | 52 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/defines_3.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['target_5ftype_5ffelica',['TARGET_TYPE_FELICA',['../linux__nfc__api_8h.html#ab777e59956b9a4241dc9e0ebc4ac892a',1,'linux_nfc_api.h']]], 4 | ['target_5ftype_5fiso14443_5f3a',['TARGET_TYPE_ISO14443_3A',['../linux__nfc__api_8h.html#ab5ef14a4bbe39ca91b84f9806a80905f',1,'linux_nfc_api.h']]], 5 | ['target_5ftype_5fiso14443_5f3a_5f3b',['TARGET_TYPE_ISO14443_3A_3B',['../linux__nfc__api_8h.html#a7a63f883dd82c4d397c577932e411147',1,'linux_nfc_api.h']]], 6 | ['target_5ftype_5fiso14443_5f3b',['TARGET_TYPE_ISO14443_3B',['../linux__nfc__api_8h.html#aa9bf0125db1eccd1abeac27268ed784c',1,'linux_nfc_api.h']]], 7 | ['target_5ftype_5fiso14443_5f4',['TARGET_TYPE_ISO14443_4',['../linux__nfc__api_8h.html#af56d104a6280d313a7af87f6bd506dd9',1,'linux_nfc_api.h']]], 8 | ['target_5ftype_5fiso15693',['TARGET_TYPE_ISO15693',['../linux__nfc__api_8h.html#a15d24472b7f54cc02ca3a45581caadf5',1,'linux_nfc_api.h']]], 9 | ['target_5ftype_5fkovio_5fbarcode',['TARGET_TYPE_KOVIO_BARCODE',['../linux__nfc__api_8h.html#ac8b86ebf047a536f88f8278543dd7353',1,'linux_nfc_api.h']]], 10 | ['target_5ftype_5fmifare_5fclassic',['TARGET_TYPE_MIFARE_CLASSIC',['../linux__nfc__api_8h.html#a264ed89b38167610d72872342c067147',1,'linux_nfc_api.h']]], 11 | ['target_5ftype_5fmifare_5ful',['TARGET_TYPE_MIFARE_UL',['../linux__nfc__api_8h.html#a6ad905f83acdbdfdff0fb55c44426987',1,'linux_nfc_api.h']]], 12 | ['target_5ftype_5fndef',['TARGET_TYPE_NDEF',['../linux__nfc__api_8h.html#a0000dadcbe739099a795c891aca5bca5',1,'linux_nfc_api.h']]], 13 | ['target_5ftype_5fndef_5fformatable',['TARGET_TYPE_NDEF_FORMATABLE',['../linux__nfc__api_8h.html#ad7718e7c754ad319ddba0728dd8a2e50',1,'linux_nfc_api.h']]], 14 | ['target_5ftype_5funknown',['TARGET_TYPE_UNKNOWN',['../linux__nfc__api_8h.html#a520342ae6a088fef28b07683d262424b',1,'linux_nfc_api.h']]] 15 | ]; 16 | -------------------------------------------------------------------------------- /src/halimpl/pn54x/tml/i2c/phTmlNfc_alt.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010-2014 NXP Semiconductors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /* 18 | * TML Alternative I2C port implementation for linux 19 | */ 20 | 21 | /* Basic type definitions */ 22 | #include "poll.h" 23 | 24 | /* Describe PN71xx connection 25 | * 0 = Custom configuration 26 | * 1 = OM557x on Raspberry Pi 27 | * 2 = OM557x on UdooNeo 28 | * 3 = OM557x on BeagleBone black 29 | * 30 | */ 31 | #define CONFIGURATION 1 32 | 33 | #if (CONFIGURATION == 1) 34 | /* OM557x on Raspberry Pi */ 35 | #define I2C_BUS "/dev/i2c-1" 36 | #define I2C_ADDRESS 0x28 37 | #define PIN_INT 23 38 | #define PIN_ENABLE 24 39 | #elif (CONFIGURATION == 2) 40 | /* OM557x on UdooNeo */ 41 | #define I2C_BUS "/dev/i2c-1" 42 | #define I2C_ADDRESS 0x28 43 | #define PIN_INT 105 44 | #define PIN_ENABLE 149 45 | #elif (CONFIGURATION == 3) 46 | /* OM557x on BeagleBone Black */ 47 | #define I2C_BUS "/dev/i2c-2" 48 | #define I2C_ADDRESS 0x28 49 | #define PIN_INT 61 50 | #define PIN_ENABLE 30 51 | #else 52 | /* Custom configuration */ 53 | #define I2C_BUS "/dev/i2c-1" 54 | #define I2C_ADDRESS 0x28 55 | #define PIN_INT 23 56 | #define PIN_ENABLE 24 57 | #endif 58 | -------------------------------------------------------------------------------- /src/libnfc-nci/include/CrcChecksum.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright (C) 2012 Broadcom Corporation 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | ******************************************************************************/ 18 | #pragma once 19 | 20 | 21 | #ifdef __cplusplus 22 | extern "C" { 23 | #endif 24 | 25 | 26 | /******************************************************************************* 27 | ** 28 | ** Function crcChecksumCompute 29 | ** 30 | ** Description Compute a checksum on a buffer of data. 31 | ** 32 | ** Returns 2-byte checksum. 33 | ** 34 | *******************************************************************************/ 35 | unsigned short crcChecksumCompute (const unsigned char *buffer, int bufferLen); 36 | 37 | 38 | /******************************************************************************* 39 | ** 40 | ** Function crcChecksumVerifyIntegrity 41 | ** 42 | ** Description Detect any corruption in a file by computing a checksum. 43 | ** filename: file name. 44 | ** 45 | ** Returns True if file is good. 46 | ** 47 | *******************************************************************************/ 48 | BOOLEAN crcChecksumVerifyIntegrity (const char* filename); 49 | 50 | 51 | #ifdef __cplusplus 52 | } 53 | #endif 54 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/all_b.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['ondatareceived',['onDataReceived',['../structnfc_host_card_emulation_callback__t.html#a8cb71a8207203bb827375b735a824545',1,'nfcHostCardEmulationCallback_t']]], 4 | ['ondevicearrival',['onDeviceArrival',['../structnfc_snep_server_callback__t.html#aa1fa5aa1156a33599b7b238c2a5242d8',1,'nfcSnepServerCallback_t::onDeviceArrival()'],['../structnfc_snep_client_callback__t.html#a4633f5b3a61001248290c63f1beee3a1',1,'nfcSnepClientCallback_t::onDeviceArrival()']]], 5 | ['ondevicedeparture',['onDeviceDeparture',['../structnfc_snep_server_callback__t.html#af9f6e0a0d6d4ef5e2a1d626c6a60745d',1,'nfcSnepServerCallback_t::onDeviceDeparture()'],['../structnfc_snep_client_callback__t.html#a7cec60e7a871e3fa5b8e4698fa7a441f',1,'nfcSnepClientCallback_t::onDeviceDeparture()']]], 6 | ['onhandoverrequestreceived',['onHandoverRequestReceived',['../structnfc_handover_callback__t.html#abf4713cafbfca6e8b3ab9396a2eef602',1,'nfcHandoverCallback_t']]], 7 | ['onhandoverselectreceived',['onHandoverSelectReceived',['../structnfc_handover_callback__t.html#ad16d97ef8794f16ab3f54fdc95f49c11',1,'nfcHandoverCallback_t']]], 8 | ['onhostcardemulationactivated',['onHostCardEmulationActivated',['../structnfc_host_card_emulation_callback__t.html#a87c79c203d878b56b1d4a686fecc95ac',1,'nfcHostCardEmulationCallback_t']]], 9 | ['onhostcardemulationdeactivated',['onHostCardEmulationDeactivated',['../structnfc_host_card_emulation_callback__t.html#a2d2da4dcbb1071939d30e99cbae89178',1,'nfcHostCardEmulationCallback_t']]], 10 | ['onmessagereceived',['onMessageReceived',['../structnfc_snep_server_callback__t.html#a83f235498ed61e567c23d527b1caf629',1,'nfcSnepServerCallback_t']]], 11 | ['ontagarrival',['onTagArrival',['../structnfc_tag_callback__t.html#a2169464514c76c027f68528aaa22c707',1,'nfcTagCallback_t']]], 12 | ['ontagdeparture',['onTagDeparture',['../structnfc_tag_callback__t.html#ad25aa5616b50732c6c69aa6ed8d8775c',1,'nfcTagCallback_t']]] 13 | ]; 14 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/variables_9.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['ondatareceived',['onDataReceived',['../structnfc_host_card_emulation_callback__t.html#a8cb71a8207203bb827375b735a824545',1,'nfcHostCardEmulationCallback_t']]], 4 | ['ondevicearrival',['onDeviceArrival',['../structnfc_snep_server_callback__t.html#aa1fa5aa1156a33599b7b238c2a5242d8',1,'nfcSnepServerCallback_t::onDeviceArrival()'],['../structnfc_snep_client_callback__t.html#a4633f5b3a61001248290c63f1beee3a1',1,'nfcSnepClientCallback_t::onDeviceArrival()']]], 5 | ['ondevicedeparture',['onDeviceDeparture',['../structnfc_snep_server_callback__t.html#af9f6e0a0d6d4ef5e2a1d626c6a60745d',1,'nfcSnepServerCallback_t::onDeviceDeparture()'],['../structnfc_snep_client_callback__t.html#a7cec60e7a871e3fa5b8e4698fa7a441f',1,'nfcSnepClientCallback_t::onDeviceDeparture()']]], 6 | ['onhandoverrequestreceived',['onHandoverRequestReceived',['../structnfc_handover_callback__t.html#abf4713cafbfca6e8b3ab9396a2eef602',1,'nfcHandoverCallback_t']]], 7 | ['onhandoverselectreceived',['onHandoverSelectReceived',['../structnfc_handover_callback__t.html#ad16d97ef8794f16ab3f54fdc95f49c11',1,'nfcHandoverCallback_t']]], 8 | ['onhostcardemulationactivated',['onHostCardEmulationActivated',['../structnfc_host_card_emulation_callback__t.html#a87c79c203d878b56b1d4a686fecc95ac',1,'nfcHostCardEmulationCallback_t']]], 9 | ['onhostcardemulationdeactivated',['onHostCardEmulationDeactivated',['../structnfc_host_card_emulation_callback__t.html#a2d2da4dcbb1071939d30e99cbae89178',1,'nfcHostCardEmulationCallback_t']]], 10 | ['onmessagereceived',['onMessageReceived',['../structnfc_snep_server_callback__t.html#a83f235498ed61e567c23d527b1caf629',1,'nfcSnepServerCallback_t']]], 11 | ['ontagarrival',['onTagArrival',['../structnfc_tag_callback__t.html#a2169464514c76c027f68528aaa22c707',1,'nfcTagCallback_t']]], 12 | ['ontagdeparture',['onTagDeparture',['../structnfc_tag_callback__t.html#ad25aa5616b50732c6c69aa6ed8d8775c',1,'nfcTagCallback_t']]] 13 | ]; 14 | -------------------------------------------------------------------------------- /src/halimpl/pn54x/tml/lpcusbsio/lpcusbsio/framework_Container.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * Copyright (C) 2015 Eff'Innov Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * Developped by Eff'Innov Technologies : contact@effinnov.com 17 | * 18 | **************************************************************************/ 19 | 20 | #ifndef FRAMEWORK_CONTAINER_H 21 | #define FRAMEWORK_CONTAINER_H 22 | 23 | #include "framework_Interface.h" 24 | 25 | typedef enum CONTAINER_STATUS 26 | { 27 | CONTAINER_SUCCESS, 28 | CONTAINER_FAILED, 29 | CONTAINER_INVALID_PARAM, 30 | CONTAINER_INVALID_CONTAINER 31 | }CONTAINER_STATUS; 32 | 33 | CONTAINER_STATUS container_create(void** lContainer, uint32_t size); 34 | 35 | CONTAINER_STATUS container_delete(void* lContainer); 36 | 37 | CONTAINER_STATUS container_add(void* pContainer, void* _ptr); 38 | 39 | CONTAINER_STATUS container_set(void* pContainer, uint32_t index,void*_ptr, void** _old); 40 | 41 | CONTAINER_STATUS container_remove(void* pContainer, uint32_t index, void** _old); 42 | 43 | CONTAINER_STATUS container_get(void* pContainer, uint32_t index, void** _out); 44 | 45 | CONTAINER_STATUS container_size(void* pContainer, uint32_t* size); 46 | 47 | CONTAINER_STATUS container_clear(void* pContainer); 48 | 49 | CONTAINER_STATUS container_removePtr(void* pContainer, void* ref, void** out); 50 | 51 | #endif /* FRAMEWORK_CONTAINER_H*/ 52 | -------------------------------------------------------------------------------- /src/service/extns/src/common/phNfcTypes_Mapping.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010-2014 NXP Semiconductors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef PHNFCTYPES_MAPPING_H_ 18 | #define PHNFCTYPES_MAPPING_H_ 19 | 20 | 21 | typedef phNfc_sData_t phHal_sData_t; 22 | typedef phNfc_sSupProtocol_t phHal_sSupProtocol_t; 23 | #define phHal_eMifareRaw phNfc_eMifareRaw 24 | #define phHal_eMifareAuthentA phNfc_eMifareAuthentA 25 | #define phHal_eMifareAuthentB phNfc_eMifareAuthentB 26 | #define phHal_eMifareRead16 phNfc_eMifareRead16 27 | #define phHal_eMifareRead phNfc_eMifareRead 28 | #define phHal_eMifareWrite16 phNfc_eMifareWrite16 29 | #define phHal_eMifareWrite4 phNfc_eMifareWrite4 30 | #define phHal_eMifareInc phNfc_eMifareInc 31 | #define phHal_eMifareDec phNfc_eMifareDec 32 | #define phHal_eMifareTransfer phNfc_eMifareTransfer 33 | #define phHal_eMifareRestore phNfc_eMifareRestore 34 | #define phHal_eMifareReadSector phNfc_eMifareReadSector 35 | #define phHal_eMifareWriteSector phNfc_eMifareWriteSector 36 | #define phHal_eMifareReadN phNfc_eMifareReadN 37 | #define phHal_eMifareWriteN phNfc_eMifareWriteN 38 | #define phHal_eMifareSectorSel phNfc_eMifareSectorSel 39 | #define phHal_eMifareAuth phNfc_eMifareAuth 40 | #define phHal_eMifareProxCheck phNfc_eMifareProxCheck 41 | #define phHal_eMifareInvalidCmd phNfc_eMifareInvalidCmd 42 | 43 | typedef phNfc_eMifareCmdList_t phHal_eMifareCmdList_t; 44 | 45 | typedef phNfc_uCmdList_t phHal_uCmdList_t; 46 | typedef phNfc_sRemoteDevInformation_t phHal_sRemoteDevInformation_t; 47 | typedef phNfc_sRemoteDevInformation_t phLibNfc_sRemoteDevInformation_t; 48 | #endif /* PHNFCTYPES_MAPPING_H_ */ 49 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/all_e.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['target_5ftype_5ffelica',['TARGET_TYPE_FELICA',['../linux__nfc__api_8h.html#ab777e59956b9a4241dc9e0ebc4ac892a',1,'linux_nfc_api.h']]], 4 | ['target_5ftype_5fiso14443_5f3a',['TARGET_TYPE_ISO14443_3A',['../linux__nfc__api_8h.html#ab5ef14a4bbe39ca91b84f9806a80905f',1,'linux_nfc_api.h']]], 5 | ['target_5ftype_5fiso14443_5f3a_5f3b',['TARGET_TYPE_ISO14443_3A_3B',['../linux__nfc__api_8h.html#a7a63f883dd82c4d397c577932e411147',1,'linux_nfc_api.h']]], 6 | ['target_5ftype_5fiso14443_5f3b',['TARGET_TYPE_ISO14443_3B',['../linux__nfc__api_8h.html#aa9bf0125db1eccd1abeac27268ed784c',1,'linux_nfc_api.h']]], 7 | ['target_5ftype_5fiso14443_5f4',['TARGET_TYPE_ISO14443_4',['../linux__nfc__api_8h.html#af56d104a6280d313a7af87f6bd506dd9',1,'linux_nfc_api.h']]], 8 | ['target_5ftype_5fiso15693',['TARGET_TYPE_ISO15693',['../linux__nfc__api_8h.html#a15d24472b7f54cc02ca3a45581caadf5',1,'linux_nfc_api.h']]], 9 | ['target_5ftype_5fkovio_5fbarcode',['TARGET_TYPE_KOVIO_BARCODE',['../linux__nfc__api_8h.html#ac8b86ebf047a536f88f8278543dd7353',1,'linux_nfc_api.h']]], 10 | ['target_5ftype_5fmifare_5fclassic',['TARGET_TYPE_MIFARE_CLASSIC',['../linux__nfc__api_8h.html#a264ed89b38167610d72872342c067147',1,'linux_nfc_api.h']]], 11 | ['target_5ftype_5fmifare_5ful',['TARGET_TYPE_MIFARE_UL',['../linux__nfc__api_8h.html#a6ad905f83acdbdfdff0fb55c44426987',1,'linux_nfc_api.h']]], 12 | ['target_5ftype_5fndef',['TARGET_TYPE_NDEF',['../linux__nfc__api_8h.html#a0000dadcbe739099a795c891aca5bca5',1,'linux_nfc_api.h']]], 13 | ['target_5ftype_5fndef_5fformatable',['TARGET_TYPE_NDEF_FORMATABLE',['../linux__nfc__api_8h.html#ad7718e7c754ad319ddba0728dd8a2e50',1,'linux_nfc_api.h']]], 14 | ['target_5ftype_5funknown',['TARGET_TYPE_UNKNOWN',['../linux__nfc__api_8h.html#a520342ae6a088fef28b07683d262424b',1,'linux_nfc_api.h']]], 15 | ['technology',['technology',['../structnfc__tag__info__t.html#ae86261692eb29257980f646402880367',1,'nfc_tag_info_t']]], 16 | ['tnfc_5fprotocol',['tNFC_PROTOCOL',['../linux__nfc__api_8h.html#a5bbdb860d0cd45c3077e27bbcf0abc5f',1,'linux_nfc_api.h']]], 17 | ['type',['type',['../structnfc__btoob__pairing__t.html#adba44a81c741d47f12c4bd3ea049434b',1,'nfc_btoob_pairing_t']]] 18 | ]; 19 | -------------------------------------------------------------------------------- /src/halimpl/pn54x/tml/lpcusbsio/lpcusbsio/framework_Allocator.c: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * Copyright (C) 2015 Eff'Innov Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * Developped by Eff'Innov Technologies : contact@effinnov.com 17 | * 18 | **************************************************************************/ 19 | 20 | #include "framework_Allocator.h" 21 | 22 | #include 23 | #include 24 | #include 25 | 26 | typedef struct sMemInfo 27 | { 28 | uint32_t magic; 29 | size_t size; 30 | } sMemInfo_t; 31 | 32 | typedef struct sMemInfoEnd 33 | { 34 | uint32_t magicEnd; 35 | } sMemInfoEnd_t; 36 | 37 | 38 | void* framework_AllocMem(size_t size) 39 | { 40 | sMemInfo_t *info = NULL; 41 | sMemInfoEnd_t *infoEnd = NULL; 42 | uint8_t * pMem = (uint8_t *) malloc(size+sizeof(sMemInfo_t)+sizeof(sMemInfoEnd_t)); 43 | info = (sMemInfo_t*)pMem; 44 | 45 | info->magic = 0xDEADC0DE; 46 | info->size = size; 47 | 48 | pMem = pMem+sizeof(sMemInfo_t); 49 | 50 | memset(pMem,0xAB,size); 51 | 52 | infoEnd = (sMemInfoEnd_t*)(pMem+size); 53 | 54 | infoEnd->magicEnd = 0xDEADC0DE; 55 | return pMem; 56 | } 57 | 58 | void framework_FreeMem(void *ptr) 59 | { 60 | if(NULL != ptr) 61 | { 62 | sMemInfoEnd_t *infoEnd = NULL; 63 | uint8_t *memInfo = (uint8_t*)ptr; 64 | sMemInfo_t *info = (sMemInfo_t*)(memInfo - sizeof(sMemInfo_t)); 65 | 66 | infoEnd = (sMemInfoEnd_t*)(memInfo+info->size); 67 | 68 | if ((info->magic != 0xDEADC0DE)||(infoEnd->magicEnd != 0xDEADC0DE)) 69 | { 70 | // Call Debugger 71 | *(int *)(uintptr_t)0xbbadbeef = 0; 72 | }else 73 | { 74 | memset(info,0x14,info->size+sizeof(sMemInfo_t)+sizeof(sMemInfoEnd_t)); 75 | } 76 | 77 | free(info); 78 | } 79 | } 80 | 81 | -------------------------------------------------------------------------------- /src/libnfc-nci/gki/ulinux/data_types.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright (C) 1999-2012 Broadcom Corporation 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | ******************************************************************************/ 18 | #ifndef DATA_TYPES_H 19 | #define DATA_TYPES_H 20 | 21 | #ifndef NULL 22 | #define NULL 0 23 | #endif 24 | 25 | #ifndef FALSE 26 | #define FALSE 0 27 | #endif 28 | 29 | typedef unsigned char UINT8; 30 | typedef unsigned short UINT16; 31 | typedef unsigned long UINT32; 32 | typedef unsigned long long int UINT64; 33 | typedef signed long INT32; 34 | typedef signed char INT8; 35 | typedef signed short INT16; 36 | typedef unsigned char BOOLEAN; 37 | typedef UINT32 UINTPTR; 38 | typedef UINT32 TIME_STAMP; 39 | 40 | #ifndef TRUE 41 | #define TRUE (!FALSE) 42 | #endif 43 | 44 | typedef unsigned char UBYTE; 45 | 46 | #ifdef __arm 47 | #define PACKED __packed 48 | #define INLINE __inline 49 | #else 50 | #define PACKED 51 | #define INLINE 52 | #endif 53 | 54 | #ifndef BIG_ENDIAN 55 | #define BIG_ENDIAN FALSE 56 | #endif 57 | 58 | #define UINT16_LOW_BYTE(x) ((x) & 0xff) 59 | #define UINT16_HI_BYTE(x) ((x) >> 8) 60 | 61 | /* MACRO definitions for safe string functions */ 62 | /* Replace standard string functions with safe functions if available */ 63 | #define BCM_STRCAT_S(x1,x2,x3) strcat((x1),(x3)) 64 | #define BCM_STRNCAT_S(x1,x2,x3,x4) strncat((x1),(x3),(x4)) 65 | #define BCM_STRCPY_S(x1,x2,x3) strcpy((x1),(x3)) 66 | #define BCM_STRNCPY_S(x1,x2,x3,x4) strncpy((x1),(x3),(x4)) 67 | #define BCM_SPRINTF_S(x1,x2,x3,x4) sprintf((x1),(x3),(x4)) 68 | #define BCM_VSPRINTF_S(x1,x2,x3,x4) vsprintf((x1),(x3),(x4)) 69 | 70 | #endif 71 | 72 | -------------------------------------------------------------------------------- /src/service/interface/nativeNdef.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright (C) 2015 NXP Semiconductors 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License") 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | ******************************************************************************/ 18 | #ifndef __NATIVE_NDEF__H__ 19 | #define __NATIVE_NDEF__H__ 20 | 21 | #include "data_types.h" 22 | #include "linux_nfc_api.h" 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | extern nfc_friendly_type_t nativeNdef_getFriendlyType(UINT8 tnf, UINT8 *type, UINT8 typeLength); 29 | 30 | extern INT32 nativeNdef_readText( UINT8*ndefBuff, UINT32 ndefBuffLen, char * outText, UINT32 textLen); 31 | 32 | extern INT32 nativeNdef_readLang( UINT8*ndefBuff, UINT32 ndefBuffLen, char * outLang, UINT32 LangLen); 33 | 34 | extern INT32 nativeNdef_readUrl(UINT8*ndefBuff, UINT32 ndefBuffLen, char * outUrl, UINT32 urlBufferLen); 35 | 36 | extern INT32 nativeNdef_readHr(UINT8*ndefBuff, UINT32 ndefBuffLen, nfc_handover_request_t *hrInfo); 37 | 38 | extern INT32 nativeNdef_readHs(UINT8*ndefBuff, UINT32 ndefBuffLen, nfc_handover_select_t *hsInfo); 39 | 40 | extern INT32 nativeNdef_createUri(char *uri, UINT8*outNdefBuff, UINT32 outBufferLen); 41 | 42 | extern INT32 nativeNdef_createText(char *languageCode, char *text, UINT8*outNdefBuff, UINT32 outBufferLen); 43 | 44 | extern INT32 nativeNdef_createMime(char *mimeType, UINT8 *mimeData, UINT32 mimeDataLength, 45 | UINT8*outNdefBuff, UINT32 outBufferLen); 46 | 47 | extern INT32 nativeNdef_createHs(nfc_handover_cps_t cps, char *carrier_data_ref, 48 | UINT8 *ndefBuff, UINT32 ndefBuffLen, UINT8 *outBuff, UINT32 outBuffLen); 49 | 50 | 51 | #ifdef __cplusplus 52 | } 53 | #endif 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/enumvalues_1.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['ndef_5ffriendly_5ftype_5fhr',['NDEF_FRIENDLY_TYPE_HR',['../linux__nfc__api_8h.html#a76218cd68b3ea6ea520a9800cd9b55d2acdeea0ff156c848ed583906698bc7da3',1,'linux_nfc_api.h']]], 4 | ['ndef_5ffriendly_5ftype_5fhs',['NDEF_FRIENDLY_TYPE_HS',['../linux__nfc__api_8h.html#a76218cd68b3ea6ea520a9800cd9b55d2ab8323cffdbaf9a547ea49dbb6019ea32',1,'linux_nfc_api.h']]], 5 | ['ndef_5ffriendly_5ftype_5fother',['NDEF_FRIENDLY_TYPE_OTHER',['../linux__nfc__api_8h.html#a76218cd68b3ea6ea520a9800cd9b55d2a869d1640610b7a8d4ac479668f873e6d',1,'linux_nfc_api.h']]], 6 | ['ndef_5ffriendly_5ftype_5ftext',['NDEF_FRIENDLY_TYPE_TEXT',['../linux__nfc__api_8h.html#a76218cd68b3ea6ea520a9800cd9b55d2a0a4c2483a36535c0f9ba336fee9383d7',1,'linux_nfc_api.h']]], 7 | ['ndef_5ffriendly_5ftype_5furl',['NDEF_FRIENDLY_TYPE_URL',['../linux__nfc__api_8h.html#a76218cd68b3ea6ea520a9800cd9b55d2aa7a414cabdf317fe6fb1dd435b7dd1aa',1,'linux_nfc_api.h']]], 8 | ['nfc_5ffactory_5fbit_5frate_5f106',['NFC_FACTORY_BIT_RATE_106',['../linux__nfc__factory__api_8h.html#a0bbddf1386f0100bcc4bfeba426a3344af3c5888d933ebc3bc3319979947e6837',1,'linux_nfc_factory_api.h']]], 9 | ['nfc_5ffactory_5fbit_5frate_5f212',['NFC_FACTORY_BIT_RATE_212',['../linux__nfc__factory__api_8h.html#a0bbddf1386f0100bcc4bfeba426a3344aa9cd7cf6c2836091ab523e4489367dee',1,'linux_nfc_factory_api.h']]], 10 | ['nfc_5ffactory_5fbit_5frate_5f424',['NFC_FACTORY_BIT_RATE_424',['../linux__nfc__factory__api_8h.html#a0bbddf1386f0100bcc4bfeba426a3344a29b0099a9dc7bb98f4a8c2df903f92ad',1,'linux_nfc_factory_api.h']]], 11 | ['nfc_5ffactory_5fbit_5frate_5f848',['NFC_FACTORY_BIT_RATE_848',['../linux__nfc__factory__api_8h.html#a0bbddf1386f0100bcc4bfeba426a3344a9720272d466881b0681e50ddfd6dfd6d',1,'linux_nfc_factory_api.h']]], 12 | ['nfc_5ffactory_5frf_5ftechnology_5fa',['NFC_FACTORY_RF_TECHNOLOGY_A',['../linux__nfc__factory__api_8h.html#af507e085fb991b2ef57d57304eaa9093af6c299087f9c328fe280ccb385dc636e',1,'linux_nfc_factory_api.h']]], 13 | ['nfc_5ffactory_5frf_5ftechnology_5fb',['NFC_FACTORY_RF_TECHNOLOGY_B',['../linux__nfc__factory__api_8h.html#af507e085fb991b2ef57d57304eaa9093a800b2f7957ac2467e58e36ba8e035bb8',1,'linux_nfc_factory_api.h']]], 14 | ['nfc_5ffactory_5frf_5ftechnology_5ff',['NFC_FACTORY_RF_TECHNOLOGY_F',['../linux__nfc__factory__api_8h.html#af507e085fb991b2ef57d57304eaa9093a4516618f4a3ffcee9c19060a8aaab9dc',1,'linux_nfc_factory_api.h']]] 15 | ]; 16 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/all_10.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['wagcdifferentialwithopen1',['wAgcDifferentialWithOpen1',['../structnfc_factory___antenna___st___resp__t.html#a0a22b9d8ec7a8d152eb2356d00744f6d',1,'nfcFactory_Antenna_St_Resp_t']]], 4 | ['wagcdifferentialwithopen2',['wAgcDifferentialWithOpen2',['../structnfc_factory___antenna___st___resp__t.html#a3fa226f2bbaa63ddee5114e0cf3fc484',1,'nfcFactory_Antenna_St_Resp_t']]], 5 | ['wagcdifferentialwithopentolerance1',['wAgcDifferentialWithOpenTolerance1',['../structnfc_factory___antenna___st___resp__t.html#a77fc8e9a494cd41577488921bcc09471',1,'nfcFactory_Antenna_St_Resp_t']]], 6 | ['wagcdifferentialwithopentolerance2',['wAgcDifferentialWithOpenTolerance2',['../structnfc_factory___antenna___st___resp__t.html#a38b804f09a2f17a338929b8c180ba7b7',1,'nfcFactory_Antenna_St_Resp_t']]], 7 | ['wagcvalue',['wAgcValue',['../structnfc_factory___antenna___st___resp__t.html#aedd84f76c2867bb478ca1efb159b579b',1,'nfcFactory_Antenna_St_Resp_t']]], 8 | ['wagcvaluetolerance',['wAgcValueTolerance',['../structnfc_factory___antenna___st___resp__t.html#a1692a5500b2d10047572d484ca7bb5c2',1,'nfcFactory_Antenna_St_Resp_t']]], 9 | ['wagcvaluewithfixednfcld',['wAgcValuewithfixedNFCLD',['../structnfc_factory___antenna___st___resp__t.html#a4ae0eca169937000e789fd3c9a931bbf',1,'nfcFactory_Antenna_St_Resp_t']]], 10 | ['wagcvaluewithfixednfcldtolerance',['wAgcValuewithfixedNFCLDTolerance',['../structnfc_factory___antenna___st___resp__t.html#ac1e52d8d0d3e54c75322fc4f295f6163',1,'nfcFactory_Antenna_St_Resp_t']]], 11 | ['wifi',['wifi',['../structnfc__handover__request__t.html#a2b3132e8cfe22383656949f52ecc426d',1,'nfc_handover_request_t::wifi()'],['../structnfc__handover__select__t.html#a53e2e99c6ef26c85506a7cbbf183562b',1,'nfc_handover_select_t::wifi()']]], 12 | ['wtxdomeasuredrangemax',['wTxdoMeasuredRangeMax',['../structnfc_factory___antenna___st___resp__t.html#a6608e659575d07f604f5fcc960e174e7',1,'nfcFactory_Antenna_St_Resp_t']]], 13 | ['wtxdomeasuredrangemin',['wTxdoMeasuredRangeMin',['../structnfc_factory___antenna___st___resp__t.html#a91d114778912b4ab2859201513113eaf',1,'nfcFactory_Antenna_St_Resp_t']]], 14 | ['wtxdomeasuredtolerance',['wTxdoMeasuredTolerance',['../structnfc_factory___antenna___st___resp__t.html#a5ebf2d59db33ec18eefebfa25e5d84ea',1,'nfcFactory_Antenna_St_Resp_t']]], 15 | ['wtxdorawvalue',['wTxdoRawValue',['../structnfc_factory___antenna___st___resp__t.html#a9e104ecfc95b37892d939e03f16caf22',1,'nfcFactory_Antenna_St_Resp_t']]] 16 | ]; 17 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/variables_e.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['wagcdifferentialwithopen1',['wAgcDifferentialWithOpen1',['../structnfc_factory___antenna___st___resp__t.html#a0a22b9d8ec7a8d152eb2356d00744f6d',1,'nfcFactory_Antenna_St_Resp_t']]], 4 | ['wagcdifferentialwithopen2',['wAgcDifferentialWithOpen2',['../structnfc_factory___antenna___st___resp__t.html#a3fa226f2bbaa63ddee5114e0cf3fc484',1,'nfcFactory_Antenna_St_Resp_t']]], 5 | ['wagcdifferentialwithopentolerance1',['wAgcDifferentialWithOpenTolerance1',['../structnfc_factory___antenna___st___resp__t.html#a77fc8e9a494cd41577488921bcc09471',1,'nfcFactory_Antenna_St_Resp_t']]], 6 | ['wagcdifferentialwithopentolerance2',['wAgcDifferentialWithOpenTolerance2',['../structnfc_factory___antenna___st___resp__t.html#a38b804f09a2f17a338929b8c180ba7b7',1,'nfcFactory_Antenna_St_Resp_t']]], 7 | ['wagcvalue',['wAgcValue',['../structnfc_factory___antenna___st___resp__t.html#aedd84f76c2867bb478ca1efb159b579b',1,'nfcFactory_Antenna_St_Resp_t']]], 8 | ['wagcvaluetolerance',['wAgcValueTolerance',['../structnfc_factory___antenna___st___resp__t.html#a1692a5500b2d10047572d484ca7bb5c2',1,'nfcFactory_Antenna_St_Resp_t']]], 9 | ['wagcvaluewithfixednfcld',['wAgcValuewithfixedNFCLD',['../structnfc_factory___antenna___st___resp__t.html#a4ae0eca169937000e789fd3c9a931bbf',1,'nfcFactory_Antenna_St_Resp_t']]], 10 | ['wagcvaluewithfixednfcldtolerance',['wAgcValuewithfixedNFCLDTolerance',['../structnfc_factory___antenna___st___resp__t.html#ac1e52d8d0d3e54c75322fc4f295f6163',1,'nfcFactory_Antenna_St_Resp_t']]], 11 | ['wifi',['wifi',['../structnfc__handover__request__t.html#a2b3132e8cfe22383656949f52ecc426d',1,'nfc_handover_request_t::wifi()'],['../structnfc__handover__select__t.html#a53e2e99c6ef26c85506a7cbbf183562b',1,'nfc_handover_select_t::wifi()']]], 12 | ['wtxdomeasuredrangemax',['wTxdoMeasuredRangeMax',['../structnfc_factory___antenna___st___resp__t.html#a6608e659575d07f604f5fcc960e174e7',1,'nfcFactory_Antenna_St_Resp_t']]], 13 | ['wtxdomeasuredrangemin',['wTxdoMeasuredRangeMin',['../structnfc_factory___antenna___st___resp__t.html#a91d114778912b4ab2859201513113eaf',1,'nfcFactory_Antenna_St_Resp_t']]], 14 | ['wtxdomeasuredtolerance',['wTxdoMeasuredTolerance',['../structnfc_factory___antenna___st___resp__t.html#a5ebf2d59db33ec18eefebfa25e5d84ea',1,'nfcFactory_Antenna_St_Resp_t']]], 15 | ['wtxdorawvalue',['wTxdoRawValue',['../structnfc_factory___antenna___st___resp__t.html#a9e104ecfc95b37892d939e03f16caf22',1,'nfcFactory_Antenna_St_Resp_t']]] 16 | ]; 17 | -------------------------------------------------------------------------------- /src/halimpl/pn54x/tml/lpcusbsio/lpcusbsio/framework_sem.c: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * Copyright (C) 2015 Eff'Innov Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * Developped by Eff'Innov Technologies : contact@effinnov.com 17 | * 18 | **************************************************************************/ 19 | 20 | #include "framework_linux.h" 21 | #include "framework_Allocator.h" 22 | 23 | // ####################### Semaphore Generic implementation. 24 | 25 | typedef struct tGenericSemaphore 26 | { 27 | int8_t counter; 28 | void *mutex; 29 | }tGenericSemaphore_t; 30 | 31 | eResult framework_CreateSemaphore(void ** semaphoreHandle) 32 | { 33 | tGenericSemaphore_t *sem = (tGenericSemaphore_t *)framework_AllocMem(sizeof(tGenericSemaphore_t)); 34 | 35 | sem->counter = 0; 36 | 37 | framework_CreateMutex(&(sem->mutex)); 38 | 39 | *semaphoreHandle = sem; 40 | 41 | return FRAMEWORK_SUCCESS; 42 | } 43 | 44 | void framework_WaitSemaphore(void * semaphoreHandle) 45 | { 46 | tGenericSemaphore_t *sem = (tGenericSemaphore_t *)semaphoreHandle; 47 | 48 | framework_LockMutex(sem->mutex); 49 | sem->counter++; 50 | if (sem->counter > 0) 51 | { 52 | framework_WaitMutex(sem->mutex, 0); 53 | } 54 | framework_UnlockMutex(sem->mutex); 55 | } 56 | 57 | void framework_PostSemaphore(void * semaphoreHandle) 58 | { 59 | tGenericSemaphore_t *sem = (tGenericSemaphore_t *)semaphoreHandle; 60 | uint8_t needWakeUp = 0; 61 | 62 | framework_LockMutex(sem->mutex); 63 | 64 | if (sem->counter > 0) 65 | { 66 | needWakeUp = 1; 67 | } 68 | sem->counter--; 69 | 70 | if (needWakeUp) 71 | { 72 | framework_NotifyMutex(sem->mutex, 0); 73 | } 74 | framework_UnlockMutex(sem->mutex); 75 | } 76 | 77 | void framework_DeleteSemaphore(void * semaphoreHandle) 78 | { 79 | tGenericSemaphore_t *sem = (tGenericSemaphore_t *)semaphoreHandle; 80 | framework_DeleteMutex(sem->mutex); 81 | framework_FreeMem(sem); 82 | } 83 | -------------------------------------------------------------------------------- /conf/libnfc-nxp-init.conf: -------------------------------------------------------------------------------- 1 | ####################### Common libnfc-nxp.conf for Init ######################## 2 | ## 3 | ## This file is used by NFC NXP NCI HAL(libnfc-nci-linux/src/halimpl/pn54x) 4 | ## and NFC Service Interface Extensions (libnfc-nci-linux/src/service/extns/src) 5 | ## 6 | 7 | ############################################################################### 8 | # Logging Levels. Suggested value for debugging is 0x03. 9 | # NXPLOG_GLOBAL_LOGLEVEL - Configuration for Global logging level 10 | # NXPLOG_EXTNS_LOGLEVEL - Configuration for extns logging level 11 | # NXPLOG_NCIHAL_LOGLEVEL - Configuration for enabling logging of HAL 12 | # NXPLOG_NCIX_LOGLEVEL - Configuration for enabling logging of NCI TX packets 13 | # NXPLOG_NCIR_LOGLEVEL - Configuration for enabling logging of NCI RX packets 14 | # NXPLOG_FWDNLD_LOGLEVEL - Configuration for enabling logging of FW download functionality 15 | # NXPLOG_TML_LOGLEVEL - Configuration for enabling logging of TML 16 | # Logging Levels 17 | # NXPLOG_DEFAULT_LOGLEVEL 0x01 18 | # NXPLOG_DEBUG_LOGLEVEL 0x03 19 | # NXPLOG_WARN_LOGLEVEL 0x02 20 | # NXPLOG_ERROR_LOGLEVEL 0x01 21 | # NXPLOG_SILENT_LOGLEVEL 0x00 22 | NXPLOG_GLOBAL_LOGLEVEL=0x00 23 | NXPLOG_EXTNS_LOGLEVEL=0x00 24 | NXPLOG_NCIHAL_LOGLEVEL=0x00 25 | NXPLOG_NCIX_LOGLEVEL=0x00 26 | NXPLOG_NCIR_LOGLEVEL=0x00 27 | NXPLOG_FWDNLD_LOGLEVEL=0x00 28 | NXPLOG_TML_LOGLEVEL=0x00 29 | 30 | ############################################################################### 31 | # NXP HW Device Node information, when pn5xx_i2c kernel driver configuration is used 32 | NXP_NFC_DEV_NODE="/dev/pn544" 33 | 34 | ############################################################################### 35 | # NXP proprietary settings to enable NXP Proprietary features 36 | # For NXP NFC Controller value must be fixed to {2F, 02, 00} 37 | NXP_ACT_PROP_EXTN={2F, 02, 00} 38 | 39 | ############################################################################### 40 | # NFC forum profile settings. 41 | # For more details refer to the POLL_PROFILE_SEL_ CFG parameter definition from NFC Controller User Manual 42 | NXP_NFC_PROFILE_EXTN={20, 02, 05, 01, A0, 44, 01, 00} 43 | 44 | ############################################################################### 45 | # Standby enable settings. (disable=2F 00 01 00, enable=2F 00 01 01) 46 | NXP_CORE_STANDBY={2F, 00, 01, 00} 47 | 48 | ############################################################################### 49 | # To enable i2c fragmentation set i2c fragmentation enable 0x01 to disable set to 0x00 50 | NXP_I2C_FRAGMENTATION_ENABLED=0x00 51 | -------------------------------------------------------------------------------- /src/libnfc-nci/nfa/include/nfa_mem_co.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright (C) 2010-2014 Broadcom Corporation 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | ******************************************************************************/ 18 | 19 | 20 | /****************************************************************************** 21 | * 22 | * Callout functions for memory allocation/deallocatoin 23 | * 24 | ******************************************************************************/ 25 | #ifndef NFA_MEM_CO_H 26 | #define NFA_MEM_CO_H 27 | 28 | #include "nfc_target.h" 29 | 30 | /***************************************************************************** 31 | ** Constants and data types 32 | *****************************************************************************/ 33 | 34 | 35 | /***************************************************************************** 36 | ** External Function Declarations 37 | *****************************************************************************/ 38 | #ifdef __cplusplus 39 | extern "C" 40 | { 41 | #endif 42 | 43 | /******************************************************************************* 44 | ** 45 | ** Function nfa_mem_co_alloc 46 | ** 47 | ** Description allocate a buffer from platform's memory pool 48 | ** 49 | ** Returns: 50 | ** pointer to buffer if successful 51 | ** NULL otherwise 52 | ** 53 | *******************************************************************************/ 54 | NFC_API extern void *nfa_mem_co_alloc (UINT32 num_bytes); 55 | 56 | 57 | /******************************************************************************* 58 | ** 59 | ** Function nfa_mem_co_free 60 | ** 61 | ** Description free buffer previously allocated using nfa_mem_co_alloc 62 | ** 63 | ** Returns: 64 | ** Nothing 65 | ** 66 | *******************************************************************************/ 67 | NFC_API extern void nfa_mem_co_free (void *p_buf); 68 | 69 | 70 | #ifdef __cplusplus 71 | } 72 | #endif 73 | 74 | #endif /* NFA_MEM_CO_H */ 75 | -------------------------------------------------------------------------------- /src/libnfc-nci/udrv/include/udac.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright (C) 2001-2012 Broadcom Corporation 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | ******************************************************************************/ 18 | 19 | /****************************************************************************** 20 | * 21 | * Definitions for UDAC driver 22 | * 23 | ******************************************************************************/ 24 | #ifndef UDAC_H 25 | #define UDAC_H 26 | 27 | 28 | #define UDAC_GAIN_MAX 0x00FFF 29 | typedef UINT16 tUDAC_GAIN; 30 | 31 | /* API functions for DAC driver */ 32 | 33 | 34 | /***************************************************************************** 35 | ** 36 | ** Function DAC_Init 37 | ** 38 | ** Description 39 | ** Initialize the DAC subsystem 40 | ** 41 | ** Input parameters 42 | ** Nothing 43 | ** 44 | ** Output parameters 45 | ** Nothing 46 | ** 47 | ** Returns 48 | ** Nothing 49 | ** 50 | *****************************************************************************/ 51 | void UDAC_Init(void *p_cfg); 52 | 53 | 54 | /***************************************************************************** 55 | ** 56 | ** Function DAC_Read 57 | ** 58 | ** Description 59 | ** Read current DAC gain 60 | ** 61 | ** Input parameters 62 | ** Nothing 63 | ** 64 | ** Output parameters 65 | ** Nothing 66 | ** 67 | ** Returns 68 | ** Current gain setting 69 | ** 70 | *****************************************************************************/ 71 | tUDAC_GAIN UDAC_Read(void); 72 | 73 | 74 | /***************************************************************************** 75 | ** 76 | ** Function DAC_Set 77 | ** 78 | ** Description 79 | ** Set the DAC gain 80 | ** 81 | ** Input parameters 82 | ** gain Gain setting 83 | ** 84 | ** Output parameters 85 | ** Nothing 86 | ** 87 | ** Returns 88 | ** Nothing 89 | ** 90 | *****************************************************************************/ 91 | void UDAC_Set(tUDAC_GAIN gain); 92 | 93 | #endif /* #ifndef UDAC_H */ 94 | -------------------------------------------------------------------------------- /conf/libnfc-nci.conf: -------------------------------------------------------------------------------- 1 | ###################### Start of libnfc-nci.conf ####################### 2 | 3 | ############################################################################### 4 | # Log levels for libnfc-nci. Suggested value for debugging is 0xFF. 5 | APPL_TRACE_LEVEL=0x00 6 | PROTOCOL_TRACE_LEVEL=0x00 7 | 8 | ############################################################################### 9 | # Specify HOST to listen for a selected protocol 10 | # 0x00 : Disable Host Listen 11 | # 0x01 : Enable Host to Listen (A) for ISO-DEP tech A 12 | # 0x02 : Enable Host to Listen (B) for ISO-DEP tech B 13 | # 0x04 : Enable Host to Listen (F) for T3T Tag Type Protocol tech F 14 | # 0x07 : Enable Host to Listen (ABF)for ISO-DEP tech AB & T3T Tag Type Protocol tech F 15 | HOST_LISTEN_TECH_MASK=0x07 16 | 17 | ############################################################################### 18 | # Force tag polling for the following technology(s). 19 | # The bits are defined as tNFA_TECHNOLOGY_MASK in nfa_api.h. 20 | # Default is NFA_TECHNOLOGY_MASK_A | NFA_TECHNOLOGY_MASK_B | 21 | # NFA_TECHNOLOGY_MASK_F | NFA_TECHNOLOGY_MASK_ISO15693 | 22 | # NFA_TECHNOLOGY_MASK_B_PRIME | NFA_TECHNOLOGY_MASK_KOVIO | 23 | # NFA_TECHNOLOGY_MASK_A_ACTIVE | NFA_TECHNOLOGY_MASK_F_ACTIVE. 24 | # 25 | # Notable bits: 26 | # NFA_TECHNOLOGY_MASK_A 0x01 /* NFC Technology A */ 27 | # NFA_TECHNOLOGY_MASK_B 0x02 /* NFC Technology B */ 28 | # NFA_TECHNOLOGY_MASK_F 0x04 /* NFC Technology F */ 29 | # NFA_TECHNOLOGY_MASK_ISO15693 0x08 /* Proprietary Technology */ 30 | # NFA_TECHNOLOGY_MASK_KOVIO 0x20 /* Proprietary Technology */ 31 | # NFA_TECHNOLOGY_MASK_A_ACTIVE 0x40 /* NFC Technology A active mode */ 32 | # NFA_TECHNOLOGY_MASK_F_ACTIVE 0x80 /* NFC Technology F active mode */ 33 | # This flag when set to zero will disable Reader mode. 34 | POLLING_TECH_MASK=0xEF 35 | 36 | ############################################################################### 37 | # Force P2P to only listen for the following technology(s). 38 | # The bits are defined as tNFA_TECHNOLOGY_MASK in nfa_api.h. 39 | # Default is NFA_TECHNOLOGY_MASK_A | NFA_TECHNOLOGY_MASK_F | 40 | # NFA_TECHNOLOGY_MASK_A_ACTIVE | NFA_TECHNOLOGY_MASK_F_ACTIVE 41 | # 42 | # Notable bits: 43 | # NFA_TECHNOLOGY_MASK_A 0x01 /* NFC Technology A */ 44 | # NFA_TECHNOLOGY_MASK_F 0x04 /* NFC Technology F */ 45 | # NFA_TECHNOLOGY_MASK_A_ACTIVE 0x40 /* NFC Technology A active mode */ 46 | # NFA_TECHNOLOGY_MASK_F_ACTIVE 0x80 /* NFC Technology F active mode */ 47 | # This flag when set to zero will disable P2P Listen mode. 48 | P2P_LISTEN_TECH_MASK=0xC5 49 | -------------------------------------------------------------------------------- /src/halimpl/pn54x/tml/lpcusbsio/lpcusbsio/framework_Parcel.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * Copyright (C) 2015 Eff'Innov Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * Developped by Eff'Innov Technologies : contact@effinnov.com 17 | * 18 | **************************************************************************/ 19 | 20 | #ifndef FRAMEWORK_PARCEL_H 21 | #define FRAMEWORK_PARCEL_H 22 | 23 | #include "framework_Interface.h" 24 | 25 | void framework_ParcelCreate(void **parcel); 26 | void framework_ParcelDelete(void *parcel); 27 | uint8_t framework_ParcelReadByte(void *parcel); 28 | void framework_ParcelWriteByte(void *parcel,uint8_t i); 29 | uint16_t framework_ParcelReadShort(void *parcel); 30 | void framework_ParcelWriteShort(void *parcel,uint16_t i); 31 | uint32_t framework_ParcelReadInt32(void *parcel); 32 | void framework_ParcelWriteInt32(void *parcel,uint32_t i); 33 | uint64_t framework_ParcelReadInt64(void *parcel); 34 | void framework_ParcelWriteInt64(void *parcel,uint64_t i); 35 | float framework_ParcelReadFloat(void *parcel); 36 | void framework_ParcelWriteFloat(void *parcel,float f); 37 | double framework_ParcelReadDouble(void *parcel); 38 | void framework_ParcelWriteDouble(void *parcel,double d); 39 | const char* framework_ParcelReadString(void *parcel); 40 | void framework_ParcelWriteString(void *parcel,const char* s); 41 | void framework_ParcelReadRaw(void *parcel,void* outBuffer, uint32_t len); 42 | void framework_ParcelWriteRaw(void *parcel,const void* buffer, uint32_t len); 43 | const uint8_t* framework_ParcelDataAtCurrentPosition(void *parcel); 44 | uint32_t framework_ParcelGetRemainingDataSize(void *parcel); 45 | const uint8_t *framework_ParcelGetData(void *parcel); 46 | uint32_t framework_ParcelGetSize(void *parcel); 47 | void framework_ParcelSetData(void *parcel,const uint8_t* data,uint32_t size); 48 | void framework_ParcelRewind(void *parcel); 49 | void framework_ParcelForward(void *parcel,uint32_t nbBytes); 50 | void framework_ParcelClear(void *parcel); 51 | void framework_ParcelSerialize(void *dstParcel,void *srcParcel); 52 | void framework_ParcelDeserialize(void *dstParcel,void *srcParcel); 53 | 54 | #endif // ndef FRAMEWORK_PARCEL_H 55 | -------------------------------------------------------------------------------- /src/libnfc-nci/nfc/nfc/nfc_test.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright (C) 2010-2014 Broadcom Corporation 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | ******************************************************************************/ 18 | 19 | 20 | /****************************************************************************** 21 | * 22 | * This file contains functions that interface with the NFC NCI transport. 23 | * On the receive side, it routes events to the appropriate handler 24 | * (callback). On the transmit side, it manages the command transmission. 25 | * 26 | ******************************************************************************/ 27 | #include 28 | #include "gki.h" 29 | #include "nfc_target.h" 30 | #include "bt_types.h" 31 | 32 | #if (NFC_INCLUDED == TRUE) 33 | #include "nfc_int.h" 34 | #include "nci_hmsgs.h" 35 | 36 | /**************************************************************************** 37 | ** Declarations 38 | ****************************************************************************/ 39 | 40 | /******************************************************************************* 41 | ** 42 | ** Function NFC_TestLoopback 43 | ** 44 | ** Description This function is called to send the given data packet 45 | ** to NFCC for loopback test. 46 | ** When loopback data is received from NFCC, tNFC_TEST_CBACK . 47 | ** reports a NFC_LOOPBACK_TEVT. 48 | ** 49 | ** Parameters p_data - the data packet 50 | ** 51 | ** Returns tNFC_STATUS 52 | ** 53 | *******************************************************************************/ 54 | tNFC_STATUS NFC_TestLoopback (BT_HDR *p_data) 55 | { 56 | tNFC_STATUS status = NFC_STATUS_FAILED; 57 | tNFC_CONN_CB *p_cb = nfc_find_conn_cb_by_handle (NCI_TEST_ID); 58 | 59 | if (p_data && p_cb && (p_data->offset >= (NCI_MSG_OFFSET_SIZE + NCI_DATA_HDR_SIZE))) 60 | { 61 | status = nfc_ncif_send_data (p_cb, p_data); 62 | } 63 | 64 | if (status != NFC_STATUS_OK) 65 | GKI_freebuf (p_data); 66 | 67 | return status; 68 | } 69 | 70 | 71 | 72 | 73 | #endif /* NFC_INCLUDED == TRUE */ 74 | -------------------------------------------------------------------------------- /src/service/utils/IntervalTimer.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /* 18 | * Asynchronous interval timer. 19 | */ 20 | 21 | #include "IntervalTimer.h" 22 | #include "OverrideLog.h" 23 | #include "phNxpLog.h" 24 | #include 25 | #include 26 | 27 | IntervalTimer::IntervalTimer() 28 | { 29 | mTimerId = 0; 30 | mCb = NULL; 31 | } 32 | 33 | 34 | bool IntervalTimer::set(int ms, TIMER_FUNC cb) 35 | { 36 | if (mTimerId == 0) 37 | { 38 | if (cb == NULL) 39 | return false; 40 | 41 | if (!create(cb)) 42 | return false; 43 | } 44 | if (cb != mCb) 45 | { 46 | kill(); 47 | if (!create(cb)) 48 | return false; 49 | } 50 | 51 | int stat = 0; 52 | struct itimerspec ts; 53 | ts.it_value.tv_sec = ms / 1000; 54 | ts.it_value.tv_nsec = (ms % 1000) * 1000000; 55 | 56 | ts.it_interval.tv_sec = 0; 57 | ts.it_interval.tv_nsec = 0; 58 | 59 | stat = timer_settime(mTimerId, 0, &ts, 0); 60 | if (stat == -1) 61 | { 62 | NXPLOG_API_D("IntervalTimer::set: fail set timer"); 63 | } 64 | return stat == 0; 65 | } 66 | 67 | 68 | IntervalTimer::~IntervalTimer() 69 | { 70 | kill(); 71 | } 72 | 73 | 74 | void IntervalTimer::kill() 75 | { 76 | if (mTimerId == 0) 77 | return; 78 | 79 | timer_delete(mTimerId); 80 | mTimerId = 0; 81 | mCb = NULL; 82 | } 83 | 84 | 85 | bool IntervalTimer::create(TIMER_FUNC cb) 86 | { 87 | struct sigevent se = {0, 0, 0, 0}; 88 | int stat = 0; 89 | 90 | /* 91 | * Set the sigevent structure to cause the signal to be 92 | * delivered by creating a new thread. 93 | */ 94 | se.sigev_notify = SIGEV_THREAD; 95 | se.sigev_value.sival_ptr = &mTimerId; 96 | se.sigev_notify_function = cb; 97 | se.sigev_notify_attributes = NULL; 98 | mCb = cb; 99 | stat = timer_create(CLOCK_MONOTONIC, &se, &mTimerId); 100 | if (stat == -1) 101 | { 102 | NXPLOG_API_D("IntervalTimer::create: fail create timer"); 103 | } 104 | return stat == 0; 105 | } 106 | -------------------------------------------------------------------------------- /src/halimpl/pn54x/tml/lpcusbsio/lpcusbsio/framework_log.c: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * Copyright (C) 2015 Eff'Innov Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * Developped by Eff'Innov Technologies : contact@effinnov.com 17 | * 18 | **************************************************************************/ 19 | 20 | #include "framework_linux.h" 21 | 22 | #include 23 | #include 24 | 25 | // **************************************** Log functions 26 | void framework_Log(const char* format, ...) 27 | { 28 | va_list varg; 29 | va_start(varg, format); 30 | printf("LOG : "); 31 | vprintf(format, varg); 32 | va_end(varg); 33 | } 34 | 35 | void framework_Warn(const char* format, ...) 36 | { 37 | va_list varg; 38 | va_start(varg, format); 39 | printf("WARNING : "); 40 | vprintf(format, varg); 41 | va_end(varg); 42 | } 43 | 44 | void framework_Error(const char* format, ...) 45 | { 46 | va_list varg; 47 | va_start(varg, format); 48 | printf("ERROR : "); 49 | vprintf(format, varg); 50 | va_end(varg); 51 | } 52 | 53 | void framework_HexDump(const void * buffer, uint32_t size) 54 | { 55 | HexDump(buffer,size); 56 | } 57 | 58 | // Internal function 59 | void HexDump(const void * buffer, uint32_t size) 60 | { 61 | char tmpBuff[128]; 62 | uint8_t *dataBuffer = (uint8_t*)buffer; 63 | uint32_t i = 0; 64 | uint32_t buffIter = 0; 65 | uint32_t tmpI = 0; 66 | while (i < size) 67 | { 68 | buffIter = 0; 69 | tmpI = i; 70 | while ((tmpI < size) && (buffIter < 24)) 71 | { 72 | sprintf(tmpBuff + buffIter, "%.2X ", dataBuffer[tmpI]); 73 | buffIter += 3; 74 | tmpI++; 75 | } 76 | 77 | tmpI = i; 78 | while ((tmpI < size) && (buffIter < 32)) 79 | { 80 | if (dataBuffer[tmpI] == '%') 81 | { 82 | tmpBuff[buffIter++] = '%'; 83 | tmpBuff[buffIter++] = '%'; 84 | }else if (dataBuffer[tmpI] >= 32) 85 | { 86 | tmpBuff[buffIter++] = dataBuffer[tmpI]; 87 | } 88 | else 89 | { 90 | tmpBuff[buffIter++] = '.'; 91 | } 92 | tmpI++; 93 | } 94 | i = tmpI; 95 | tmpBuff[buffIter++] = '\n'; 96 | tmpBuff[buffIter++] = 0; 97 | 98 | framework_Log(tmpBuff); 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /src/halimpl/pn54x/common/phNfcCompId.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010-2014 NXP Semiconductors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /* 18 | * NFC Component ID Values - Used for Function Return Codes 19 | */ 20 | 21 | #ifndef PHNFCCOMPID_H 22 | #define PHNFCCOMPID_H 23 | 24 | /* 25 | * Component IDs 26 | * 27 | * IDs for all NFC components. Combined with the Status Code they build the value (status) 28 | * returned by each function. 29 | * 30 | * ID Number Spaces: 31 | * - 01..1F: HAL 32 | * - 20..3F: NFC-MW (Local Device) 33 | * - 40..5F: NFC-MW (Remote Device) 34 | * . 35 | * 36 | * The value CID_NFC_NONE does not exist for Component IDs. Do not use this value except 37 | * for NFCSTATUS_SUCCESS. The enumeration function uses CID_NFC_NONE 38 | * to mark unassigned "References". 39 | */ 40 | #define CID_NFC_NONE 0x00 /* Unassigned or doesn't apply (see #NFCSTATUS_SUCCESS) */ 41 | #define CID_NFC_TML 0x01 /* Transport Mapping Layer */ 42 | #define CID_NFC_LLC 0x07 /* Logical Link Control Layer */ 43 | #define CID_NFC_NCI 0x08 /* NFC Controller(NFCC) Interface Layer */ 44 | #define CID_NFC_DNLD 0x09 /* Firmware Download Management Layer */ 45 | #define CID_NFC_HAL 0x10 /* Hardware Abstraction Layer */ 46 | #define CID_NFC_OSAL CID_NFC_NONE /* Operating System Abstraction Layer*/ 47 | #define CID_FRI_NFC_OVR_HAL 0x20 /* NFC-Device, HAL-based */ 48 | #define CID_FRI_NFC_NDEF_RECORD 0x22 /* NDEF Record Tools Library. */ 49 | #define CID_FRI_NFC_NDEF_MAP 0x23 /* NDEF Mapping. */ 50 | #define CID_FRI_NFC_NDEF_REGISTRY 0x24 /* NDEF_REGISTRY. */ 51 | #define CID_FRI_NFC_AUTO_DEV_DIS 0x25 /* Automatic Device Discovery. */ 52 | #define CID_FRI_NFC_NDEF_SMTCRDFMT 0x26 /* Smart Card Formatting */ 53 | #define CID_NFC_LIB 0x30 /* NFC Library Layer*/ 54 | #define CID_MAX_VALUE 0xF0 /* The maximum CID value that is defined. */ 55 | #define CID_FRI_NFC_LLCP 0x40 /* Logical Link Control Protocol */ 56 | #define CID_FRI_NFC_LLCP_TRANSPORT 0x50 57 | #define CID_FRI_NFC_LLCP_MAC 0x60 58 | 59 | #endif /* PHNFCCOMPID_H */ 60 | -------------------------------------------------------------------------------- /src/service/extns/src/common/phNfcCompId.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010-2014 NXP Semiconductors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /* 18 | * NFC Component ID Values - Used for Function Return Codes 19 | */ 20 | 21 | #ifndef PHNFCCOMPID_H 22 | #define PHNFCCOMPID_H 23 | 24 | /* 25 | * Component IDs 26 | * 27 | * IDs for all NFC components. Combined with the Status Code they build the value (status) 28 | * returned by each function. 29 | * 30 | * ID Number Spaces: 31 | * - 01..1F: HAL 32 | * - 20..3F: NFC-MW (Local Device) 33 | * - 40..5F: NFC-MW (Remote Device) 34 | * . 35 | * 36 | * The value CID_NFC_NONE does not exist for Component IDs. Do not use this value except 37 | * for NFCSTATUS_SUCCESS. The enumeration function uses CID_NFC_NONE 38 | * to mark unassigned "References". 39 | */ 40 | #define CID_NFC_NONE 0x00 /* Unassigned or doesn't apply (see #NFCSTATUS_SUCCESS) */ 41 | #define CID_NFC_TML 0x01 /* Transport Mapping Layer */ 42 | #define CID_NFC_LLC 0x07 /* Logical Link Control Layer */ 43 | #define CID_NFC_NCI 0x08 /* NFC Controller(NFCC) Interface Layer */ 44 | #define CID_NFC_DNLD 0x09 /* Firmware Download Management Layer */ 45 | #define CID_NFC_HAL 0x10 /* Hardware Abstraction Layer */ 46 | #define CID_NFC_OSAL CID_NFC_NONE /* Operating System Abstraction Layer*/ 47 | #define CID_FRI_NFC_OVR_HAL 0x20 /* NFC-Device, HAL-based */ 48 | #define CID_FRI_NFC_NDEF_RECORD 0x22 /* NDEF Record Tools Library. */ 49 | #define CID_FRI_NFC_NDEF_MAP 0x23 /* NDEF Mapping. */ 50 | #define CID_FRI_NFC_NDEF_REGISTRY 0x24 /* NDEF_REGISTRY. */ 51 | #define CID_FRI_NFC_AUTO_DEV_DIS 0x25 /* Automatic Device Discovery. */ 52 | #define CID_FRI_NFC_NDEF_SMTCRDFMT 0x26 /* Smart Card Formatting */ 53 | #define CID_NFC_LIB 0x30 /* NFC Library Layer*/ 54 | #define CID_MAX_VALUE 0xF0 /* The maximum CID value that is defined. */ 55 | #define CID_FRI_NFC_LLCP 0x40 /* Logical Link Control Protocol */ 56 | #define CID_FRI_NFC_LLCP_TRANSPORT 0x50 57 | #define CID_FRI_NFC_LLCP_MAC 0x60 58 | 59 | #endif /* PHNFCCOMPID_H */ 60 | -------------------------------------------------------------------------------- /src/libnfc-nci/nfa/hci/nfa_hci_ci.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright (C) 2010-2014 Broadcom Corporation 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | ******************************************************************************/ 18 | 19 | 20 | /****************************************************************************** 21 | * 22 | * This file contains the call-in functions for NFA HCI 23 | * 24 | ******************************************************************************/ 25 | #include 26 | #include "nfa_sys.h" 27 | #include "nfa_hci_api.h" 28 | #include "nfa_hci_int.h" 29 | #include "nfa_nv_co.h" 30 | 31 | 32 | /******************************************************************************* 33 | ** 34 | ** Function nfa_nv_ci_read 35 | ** 36 | ** Description call-in function for non volatile memory read acess 37 | ** 38 | ** Returns none 39 | ** 40 | *******************************************************************************/ 41 | void nfa_nv_ci_read (UINT16 num_bytes_read, tNFA_NV_CO_STATUS status, UINT8 block) 42 | { 43 | tNFA_HCI_EVENT_DATA *p_msg; 44 | 45 | if ((p_msg = (tNFA_HCI_EVENT_DATA *) GKI_getbuf (sizeof (tNFA_HCI_EVENT_DATA))) != NULL) 46 | { 47 | p_msg->nv_read.hdr.event = NFA_HCI_RSP_NV_READ_EVT; 48 | 49 | if ( (status == NFA_STATUS_OK) 50 | &&(num_bytes_read != 0) ) 51 | p_msg->nv_read.status = NFA_STATUS_OK; 52 | else 53 | p_msg->nv_read.status = NFA_STATUS_FAILED; 54 | 55 | p_msg->nv_read.size = num_bytes_read; 56 | p_msg->nv_read.block = block; 57 | nfa_sys_sendmsg (p_msg); 58 | } 59 | } 60 | 61 | /******************************************************************************* 62 | ** 63 | ** Function nfa_nv_ci_write 64 | ** 65 | ** Description call-in function for non volatile memory write acess 66 | ** 67 | ** Returns none 68 | ** 69 | *******************************************************************************/ 70 | void nfa_nv_ci_write (tNFA_NV_CO_STATUS status) 71 | { 72 | tNFA_HCI_EVENT_DATA *p_msg; 73 | 74 | if ((p_msg = (tNFA_HCI_EVENT_DATA *) GKI_getbuf (sizeof (tNFA_HCI_EVENT_DATA))) != NULL) 75 | { 76 | p_msg->nv_write.hdr.event = NFA_HCI_RSP_NV_WRITE_EVT; 77 | p_msg->nv_write.status = 0; 78 | nfa_sys_sendmsg (p_msg); 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /src/halimpl/pn54x/tml/phOsalNfc_Timer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010-2014 NXP Semiconductors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /* 18 | * OSAL header files related to Timer functions. 19 | */ 20 | 21 | #ifndef PHOSALNFC_TIMER_H 22 | #define PHOSALNFC_TIMER_H 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | /* 29 | ************************* Include Files **************************************** 30 | */ 31 | 32 | 33 | /* 34 | * Timer callback interface which will be called once registered timer 35 | * time out expires. 36 | * TimerId - Timer Id for which callback is called. 37 | * pContext - Parameter to be passed to the callback function 38 | */ 39 | typedef void (*pphOsalNfc_TimerCallbck_t)(uint32_t TimerId, void *pContext); 40 | 41 | /* 42 | * The Timer could not be created due to a 43 | * system error */ 44 | #define PH_OSALNFC_TIMER_CREATE_ERROR (0X00E0) 45 | 46 | /* 47 | * The Timer could not be started due to a 48 | * system error or invalid handle */ 49 | #define PH_OSALNFC_TIMER_START_ERROR (0X00E1) 50 | 51 | /* 52 | * The Timer could not be stopped due to a 53 | * system error or invalid handle */ 54 | #define PH_OSALNFC_TIMER_STOP_ERROR (0X00E2) 55 | 56 | /* 57 | * The Timer could not be deleted due to a 58 | * system error or invalid handle */ 59 | #define PH_OSALNFC_TIMER_DELETE_ERROR (0X00E3) 60 | 61 | /* 62 | * Invalid timer ID type.This ID used indicate timer creation is failed */ 63 | #define PH_OSALNFC_TIMER_ID_INVALID (0xFFFF) 64 | 65 | /* 66 | * OSAL timer message .This message type will be posted to 67 | * calling application thread.*/ 68 | #define PH_OSALNFC_TIMER_MSG (0x315) 69 | 70 | /* 71 | ***************************Globals,Structure and Enumeration ****************** 72 | */ 73 | 74 | uint32_t phOsalNfc_Timer_Create(void); 75 | NFCSTATUS phOsalNfc_Timer_Start(uint32_t dwTimerId, uint32_t dwRegTimeCnt, pphOsalNfc_TimerCallbck_t pApplication_callback, void *pContext); 76 | NFCSTATUS phOsalNfc_Timer_Stop(uint32_t dwTimerId); 77 | NFCSTATUS phOsalNfc_Timer_Delete(uint32_t dwTimerId); 78 | void phOsalNfc_Timer_Cleanup(void); 79 | uint32_t phUtilNfc_CheckForAvailableTimer(void); 80 | NFCSTATUS phOsalNfc_CheckTimerPresence(void *pObjectHandle); 81 | 82 | 83 | #ifdef __cplusplus 84 | } 85 | #endif /* C++ Compilation guard */ 86 | #endif /* PHOSALNFC_TIMER_H */ 87 | -------------------------------------------------------------------------------- /src/service/utils/CondVar.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /* 18 | * Encapsulate a condition variable for thread synchronization. 19 | */ 20 | 21 | #pragma once 22 | #include 23 | #include "Mutex.h" 24 | 25 | class CondVar 26 | { 27 | public: 28 | /******************************************************************************* 29 | ** 30 | ** Function: CondVar 31 | ** 32 | ** Description: Initialize member variables. 33 | ** 34 | ** Returns: None. 35 | ** 36 | *******************************************************************************/ 37 | CondVar (); 38 | 39 | 40 | /******************************************************************************* 41 | ** 42 | ** Function: ~CondVar 43 | ** 44 | ** Description: Cleanup all resources. 45 | ** 46 | ** Returns: None. 47 | ** 48 | *******************************************************************************/ 49 | ~CondVar (); 50 | 51 | 52 | /******************************************************************************* 53 | ** 54 | ** Function: wait 55 | ** 56 | ** Description: Block the caller and wait for a condition. 57 | ** 58 | ** Returns: None. 59 | ** 60 | *******************************************************************************/ 61 | void wait (Mutex& mutex); 62 | 63 | 64 | /******************************************************************************* 65 | ** 66 | ** Function: wait 67 | ** 68 | ** Description: Block the caller and wait for a condition. 69 | ** millisec: Timeout in milliseconds. 70 | ** 71 | ** Returns: True if wait is successful; false if timeout occurs. 72 | ** 73 | *******************************************************************************/ 74 | bool wait (Mutex& mutex, long millisec); 75 | 76 | 77 | /******************************************************************************* 78 | ** 79 | ** Function: notifyOne 80 | ** 81 | ** Description: Unblock the waiting thread. 82 | ** 83 | ** Returns: None. 84 | ** 85 | *******************************************************************************/ 86 | void notifyOne (); 87 | 88 | private: 89 | pthread_cond_t mCondition; 90 | }; 91 | -------------------------------------------------------------------------------- /src/libnfc-nci/hal/int/nfc_hal_post_reset.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright (C) 2009-2014 Broadcom Corporation 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | ******************************************************************************/ 18 | 19 | 20 | /****************************************************************************** 21 | * 22 | * Post NCI reset routines 23 | * 24 | ******************************************************************************/ 25 | #ifndef NFC_HAL_POST_RESET_H 26 | #define NFC_HAL_POST_RESET_H 27 | 28 | 29 | /***************************************************************************** 30 | ** Application control block definitions 31 | ******************************************************************************/ 32 | #define NFA_APP_PATCHFILE_MAX_PATH 255 33 | #define NFA_APP_MAX_NUM_REINIT 5 34 | 35 | typedef struct 36 | { 37 | UINT8 prm_file[NFA_APP_PATCHFILE_MAX_PATH+1]; /* Filename of patchram */ 38 | UINT8 *p_prm_buf; /* Pointer to buffer for holding patchram data */ 39 | 40 | /* Patchfile for I2C fix */ 41 | UINT8 prm_i2c_patchfile[NFA_APP_PATCHFILE_MAX_PATH+1]; 42 | UINT8 *p_prm_i2c_buf; 43 | 44 | UINT8 userial_baud; 45 | 46 | tNFC_HAL_DEV_INIT_CFG dev_init_config; 47 | 48 | /* snooze mode setting */ 49 | UINT8 snooze_mode; 50 | UINT8 idle_threshold_dh; 51 | UINT8 idle_threshold_nfcc; 52 | UINT8 nfc_wake_active_mode; 53 | UINT8 dh_wake_active_mode; 54 | 55 | /* NVM detection retry (some platforms require re-attempts to detect NVM) */ 56 | UINT8 spd_nvm_detection_max_count; /* max retry to get NVM type */ 57 | UINT8 spd_nvm_detection_cur_count; /* current retry count */ 58 | 59 | /* handling for failure to download patch */ 60 | BOOLEAN spd_debug_mode; /* debug mode for downloading patchram, report failure immediately and obviously */ 61 | BOOLEAN spd_skip_on_power_cycle; /* skip downloading patchram after power cycle because of patch download failure */ 62 | } tNFC_POST_RESET_CB; 63 | extern tNFC_POST_RESET_CB nfc_post_reset_cb; 64 | 65 | /* 66 | ** Post NCI reset handler 67 | ** 68 | ** This function is called to start device pre-initialization after NCI CORE-RESET. 69 | ** When pre-initialization is completed, 70 | ** HAL_NfcPreInitDone() must be called to proceed with stack start up. 71 | */ 72 | void nfc_hal_post_reset_init (UINT32 brcm_hw_id, UINT8 nvm_type); 73 | 74 | #endif /* NFC_HAL_POST_RESET_H */ 75 | -------------------------------------------------------------------------------- /src/libnfc-nci/udrv/include/utimer.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright (C) 2001-2012 Broadcom Corporation 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | ******************************************************************************/ 18 | 19 | /****************************************************************************** 20 | * 21 | * This file contains timer definitions from WIDCOMM's Universal Embedded 22 | * Drivers API. 23 | * 24 | ******************************************************************************/ 25 | 26 | #ifndef UTIMER_H 27 | #define UTIMER_H 28 | 29 | /******************************************************************************* 30 | ** Timer APIs 31 | *******************************************************************************/ 32 | 33 | /**** Timer IDs ****/ 34 | 35 | #define UTIMER_ID_1 0 36 | #define UTIMER_ID_2 1 37 | #define UTIMER_ID_3 2 38 | #define UTIMER_ID_4 3 39 | 40 | #define UTIMER_NUM_TIMERS 4 /* Number of timers supported */ 41 | 42 | typedef UINT8 tUTIMER_ID; 43 | 44 | /**** Timer types ****/ 45 | 46 | #define UTIMER_TYPE_PERIODIC 0 47 | #define UTIMER_TYPE_ONESHOT 1 48 | 49 | typedef UINT8 tUTIMER_TYPE; 50 | 51 | 52 | /**** Timer time ****/ 53 | 54 | typedef UINT32 tUTIMER_TIME; 55 | 56 | 57 | /**** Timer configuration ****/ 58 | 59 | typedef struct 60 | { 61 | tUTIMER_TIME period; 62 | tUTIMER_TYPE type; 63 | } tUTIMER_CFG; 64 | 65 | 66 | /**** Timer feature types ****/ 67 | #define UTIMER_FEAT_ID_1 0 68 | #define UTIMER_FEAT_ID_2 1 69 | #define UTIMER_FEAT_ID_3 2 70 | #define UTIMER_FEAT_ID_4 3 71 | #define UTIMER_FEAT_TYPE_PERIODIC 4 72 | #define UTIMER_FEAT_TYPE_ONESHOT 5 73 | 74 | typedef UINT8 tUTIMER_FEATURE; 75 | 76 | 77 | /**** Callback for timer expiration ****/ 78 | typedef void (tUTIMER_CBACK)(tUTIMER_ID); 79 | 80 | 81 | /******************************************************************************* 82 | ** Function Prototypes 83 | *******************************************************************************/ 84 | #ifdef __cplusplus 85 | extern "C" { 86 | #endif 87 | 88 | UDRV_API extern void UTIMER_Init(void *); 89 | UDRV_API extern void UTIMER_Start(tUTIMER_ID, tUTIMER_CFG *, tUTIMER_CBACK *); 90 | UDRV_API extern void UTIMER_Read(tUTIMER_ID, tUTIMER_TIME *); 91 | UDRV_API extern void UTIMER_Stop(tUTIMER_ID); 92 | UDRV_API extern BOOLEAN UTIMER_Feature(tUTIMER_FEATURE); 93 | 94 | #ifdef __cplusplus 95 | } 96 | #endif 97 | 98 | #endif /* UTIMER_H */ 99 | -------------------------------------------------------------------------------- /doc/Linux_NFC_API_Guide/search/defines_2.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['ndef_5ftnf_5fempty',['NDEF_TNF_EMPTY',['../linux__nfc__api_8h.html#a665ed7f810ea841ec0a1c3d1e9e2c8b1',1,'linux_nfc_api.h']]], 4 | ['ndef_5ftnf_5fext',['NDEF_TNF_EXT',['../linux__nfc__api_8h.html#abb23e12f1c5e5cc553d840bfca11e2cc',1,'linux_nfc_api.h']]], 5 | ['ndef_5ftnf_5fmedia',['NDEF_TNF_MEDIA',['../linux__nfc__api_8h.html#a9cb3bf24f791c1a026d8fddb001a8fe4',1,'linux_nfc_api.h']]], 6 | ['ndef_5ftnf_5funchanged',['NDEF_TNF_UNCHANGED',['../linux__nfc__api_8h.html#a69a4d012932da18e6f41bc15ee57b396',1,'linux_nfc_api.h']]], 7 | ['ndef_5ftnf_5funknown',['NDEF_TNF_UNKNOWN',['../linux__nfc__api_8h.html#ae5795c78a50c7581bfc2b22b487f1421',1,'linux_nfc_api.h']]], 8 | ['ndef_5ftnf_5furi',['NDEF_TNF_URI',['../linux__nfc__api_8h.html#a11389e8d76a486636ecaf2ab056fe454',1,'linux_nfc_api.h']]], 9 | ['ndef_5ftnf_5fwellknown',['NDEF_TNF_WELLKNOWN',['../linux__nfc__api_8h.html#ad65e0570cdac82d14c8df07d5d76de67',1,'linux_nfc_api.h']]], 10 | ['nfa_5fprotocol_5f15693',['NFA_PROTOCOL_15693',['../linux__nfc__api_8h.html#aa723a5187dc8765d3f100b2b0d18b30f',1,'linux_nfc_api.h']]], 11 | ['nfa_5fprotocol_5fiso_5fdep',['NFA_PROTOCOL_ISO_DEP',['../linux__nfc__api_8h.html#aabfc89a70c9f618ae679f784fae30d60',1,'linux_nfc_api.h']]], 12 | ['nfa_5fprotocol_5fmifare',['NFA_PROTOCOL_MIFARE',['../linux__nfc__api_8h.html#a58b23da431c73ee34b00e0d6ab1e4afe',1,'linux_nfc_api.h']]], 13 | ['nfa_5fprotocol_5ft1t',['NFA_PROTOCOL_T1T',['../linux__nfc__api_8h.html#a1e98f10fa7c6ce0efcf2351df94b7a90',1,'linux_nfc_api.h']]], 14 | ['nfa_5fprotocol_5ft2t',['NFA_PROTOCOL_T2T',['../linux__nfc__api_8h.html#aa08f3d0a36f87a8d60b8af41f5a169fd',1,'linux_nfc_api.h']]], 15 | ['nfa_5fprotocol_5ft3t',['NFA_PROTOCOL_T3T',['../linux__nfc__api_8h.html#ae0581f1d41bbec8d2c5274e0afa6445d',1,'linux_nfc_api.h']]], 16 | ['nfa_5fprotocol_5funknown',['NFA_PROTOCOL_UNKNOWN',['../linux__nfc__api_8h.html#a5fc4eec8fc11c471ac18de4ee4fb81df',1,'linux_nfc_api.h']]], 17 | ['nfa_5ftechnology_5fmask_5fa',['NFA_TECHNOLOGY_MASK_A',['../linux__nfc__api_8h.html#afe8414984dc20465408bd8388c1ca633',1,'linux_nfc_api.h']]], 18 | ['nfa_5ftechnology_5fmask_5fa_5factive',['NFA_TECHNOLOGY_MASK_A_ACTIVE',['../linux__nfc__api_8h.html#a8cb5a5e3a209ba9e3151030c4388a3a9',1,'linux_nfc_api.h']]], 19 | ['nfa_5ftechnology_5fmask_5fall',['NFA_TECHNOLOGY_MASK_ALL',['../linux__nfc__api_8h.html#acfe3420e1f92b3ae0ec6c2ad4b527d3b',1,'linux_nfc_api.h']]], 20 | ['nfa_5ftechnology_5fmask_5fb',['NFA_TECHNOLOGY_MASK_B',['../linux__nfc__api_8h.html#aeb447b32c34c118c6fb9c951b9c79c27',1,'linux_nfc_api.h']]], 21 | ['nfa_5ftechnology_5fmask_5ff',['NFA_TECHNOLOGY_MASK_F',['../linux__nfc__api_8h.html#a9f4058d26944cc5b8de071b47c691fb0',1,'linux_nfc_api.h']]], 22 | ['nfa_5ftechnology_5fmask_5ff_5factive',['NFA_TECHNOLOGY_MASK_F_ACTIVE',['../linux__nfc__api_8h.html#acfc64a78fe20371d18342f7daa8492d8',1,'linux_nfc_api.h']]], 23 | ['nfa_5ftechnology_5fmask_5fiso15693',['NFA_TECHNOLOGY_MASK_ISO15693',['../linux__nfc__api_8h.html#a35566f5278ebc027b0ee806ab5cba84a',1,'linux_nfc_api.h']]], 24 | ['nfa_5ftechnology_5fmask_5fkovio',['NFA_TECHNOLOGY_MASK_KOVIO',['../linux__nfc__api_8h.html#aba720d11b2521bb584cdedc6af53680d',1,'linux_nfc_api.h']]] 25 | ]; 26 | -------------------------------------------------------------------------------- /src/libnfc-nci/include/android_logmsg.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright (C) 2011-2012 Broadcom Corporation 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | ******************************************************************************/ 18 | /****************************************************************************** 19 | * Decode NFC packets and print them to ADB log. 20 | * If protocol decoder is not present, then decode packets into hex numbers. 21 | ******************************************************************************/ 22 | 23 | #ifdef __cplusplus 24 | extern "C" 25 | { 26 | #endif 27 | 28 | 29 | #include "data_types.h" 30 | 31 | 32 | #define DISP_NCI ProtoDispAdapterDisplayNciPacket 33 | void ProtoDispAdapterDisplayNciPacket (UINT8* nciPacket, UINT16 nciPacketLen, BOOLEAN is_recv); 34 | void ProtoDispAdapterUseRawOutput (BOOLEAN isUseRaw); 35 | void ScrLog (UINT32 trace_set_mask, const char* fmt_str, ...); 36 | void LogMsg (UINT32 trace_set_mask, const char *fmt_str, ...); 37 | void LogMsg_0 (UINT32 trace_set_mask, const char *p_str); 38 | void LogMsg_1 (UINT32 trace_set_mask, const char *fmt_str, UINT32 p1); 39 | void LogMsg_2 (UINT32 trace_set_mask, const char *fmt_str, UINT32 p1, UINT32 p2); 40 | void LogMsg_3 (UINT32 trace_set_mask, const char *fmt_str, UINT32 p1, UINT32 p2, UINT32 p3); 41 | void LogMsg_4 (UINT32 trace_set_mask, const char *fmt_str, UINT32 p1, UINT32 p2, UINT32 p3, UINT32 p4); 42 | void LogMsg_5 (UINT32 trace_set_mask, const char *fmt_str, UINT32 p1, UINT32 p2, UINT32 p3, UINT32 p4, UINT32 p5); 43 | void LogMsg_6 (UINT32 trace_set_mask, const char *fmt_str, UINT32 p1, UINT32 p2, UINT32 p3, UINT32 p4, UINT32 p5, UINT32 p6); 44 | UINT8* scru_dump_hex (UINT8* p, char* pTitle, UINT32 len, UINT32 layer, UINT32 type); 45 | void BTDISP_LOCK_LOG(); 46 | void BTDISP_UNLOCK_LOG(); 47 | void BTDISP_INIT_LOCK(); 48 | void BTDISP_UNINIT_LOCK(); 49 | void DispHciCmd (BT_HDR* p_buf); 50 | void DispHciEvt (BT_HDR* p_buf); 51 | void DispLLCP (BT_HDR *p_buf, BOOLEAN is_recv); 52 | void DispHcp (UINT8 *data, UINT16 len, BOOLEAN is_recv); 53 | void DispSNEP (UINT8 local_sap, UINT8 remote_sap, BT_HDR *p_buf, BOOLEAN is_first, BOOLEAN is_rx); 54 | void DispCHO (UINT8 *pMsg, UINT32 MsgLen, BOOLEAN is_rx); 55 | void DispT3TagMessage(BT_HDR *p_msg, BOOLEAN is_rx); 56 | void DispRWT4Tags (BT_HDR *p_buf, BOOLEAN is_rx); 57 | void DispCET4Tags (BT_HDR *p_buf, BOOLEAN is_rx); 58 | void DispRWI93Tag (BT_HDR *p_buf, BOOLEAN is_rx, UINT8 command_to_respond); 59 | void DispNDEFMsg (UINT8 *pMsg, UINT32 MsgLen, BOOLEAN is_recv); 60 | 61 | 62 | 63 | #ifdef __cplusplus 64 | }; 65 | #endif 66 | -------------------------------------------------------------------------------- /src/libnfc-nci/udrv/include/unv.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright (C) 2002-2012 Broadcom Corporation 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | ******************************************************************************/ 18 | 19 | /****************************************************************************** 20 | * 21 | * This file contains NV definitions from WIDCOMM's Universal Embedded 22 | * Drivers API. 23 | * 24 | ******************************************************************************/ 25 | 26 | #ifndef UNV_H 27 | #define UNV_H 28 | 29 | #include "data_types.h" 30 | 31 | /******************************************************************************* 32 | ** NV APIs 33 | *******************************************************************************/ 34 | 35 | /**** Storage preferences ****/ 36 | #define UNV_BLOCK 1 37 | #define UNV_BYTE 2 38 | #define UNV_NOPREF 3 39 | 40 | typedef UINT8 tUNV_STORAGE_PREF; 41 | 42 | /**** Status ****/ 43 | #define UNV_REINIT (-1) 44 | #define UNV_WRITELOCKED (-2) 45 | #define UNV_ERROR (-3) 46 | 47 | typedef INT16 tUNV_STATUS; 48 | 49 | /* Prototype for function to restore defaults to a block */ 50 | typedef void (tUNV_DEFAULT_FUNC)(void); 51 | 52 | /******************************************************************************* 53 | ** Function Prototypes 54 | *******************************************************************************/ 55 | 56 | #ifdef __cplusplus 57 | extern "C" { 58 | #endif 59 | 60 | #ifndef UDRV_API 61 | #define UDRV_API 62 | #endif 63 | 64 | UDRV_API extern void UNV_Init(void *); 65 | UDRV_API extern BOOLEAN UNV_MapBlock(UINT16, tUNV_STORAGE_PREF, UINT16, 66 | UINT16, UINT16 *, void *); 67 | UDRV_API extern BOOLEAN UNV_ReadMap(UINT16, tUNV_STORAGE_PREF *, UINT16 *, 68 | UINT16 *, UINT16 *); 69 | UDRV_API extern BOOLEAN UNV_EraseBlock(UINT16); 70 | UDRV_API extern void UNV_Default(UINT16); 71 | UDRV_API extern tUNV_STATUS UNV_Read(UINT16, UINT16, UINT16, UINT16, void *); 72 | UDRV_API extern tUNV_STATUS UNV_Write(UINT16, UINT16, UINT16, UINT16, void *); 73 | UDRV_API extern tUNV_STATUS UNV_ReadBlock(UINT16, UINT16, void *); 74 | UDRV_API extern tUNV_STATUS UNV_WriteBlock(UINT16, void *); 75 | UDRV_API extern UINT32 UNV_BytesRemaining(void); 76 | UDRV_API extern void UNV_Consolidate(void); 77 | UDRV_API extern tUNV_STATUS UNV_ReadPtr(UINT16, UINT16, UINT8 **); 78 | UDRV_API extern tUNV_STATUS UNV_FreePtr(UINT16, UINT16); 79 | 80 | #ifdef __cplusplus 81 | } 82 | #endif 83 | 84 | #endif /* UNV_H */ 85 | -------------------------------------------------------------------------------- /conf/libnfc-nxp-pn547.conf: -------------------------------------------------------------------------------- 1 | ########################### PN547 libnfc-nxp.conf ############################ 2 | ## 3 | ## This file is used by NFC NXP NCI HAL(libnfc-nci-linux/src/halimpl/pn54x) 4 | ## and NFC Service Interface Extensions (libnfc-nci-linux/src/service/extns/src) 5 | ## 6 | 7 | ############################################################################### 8 | # Extension for MIFARE reader enable 9 | # Setting this parameter to 1 will enable the support of MIFARE Classic Reader. 10 | MIFARE_READER_ENABLE=0x01 11 | 12 | ############################################################################### 13 | # System clock source selection configuration 14 | #define CLK_SRC_XTAL 0x01 15 | #define CLK_SRC_PLL 0x02 16 | NXP_SYS_CLK_SRC_SEL=0x01 17 | 18 | ############################################################################### 19 | # System clock frequency selection configuration. 20 | # Only valid in case of PLL clock source. 21 | #define CLK_FREQ_13MHZ 1 22 | #define CLK_FREQ_19_2MHZ 2 23 | #define CLK_FREQ_24MHZ 3 24 | #define CLK_FREQ_26MHZ 4 25 | #define CLK_FREQ_38_4MHZ 5 26 | #define CLK_FREQ_52MHZ 6 27 | NXP_SYS_CLK_FREQ_SEL=0x00 28 | 29 | ############################################################################### 30 | # The timeout value to be used for clock request acknowledgment 31 | # min value = 0x01 to max = 0x1A 32 | # Only valid in case of PLL clock source. 33 | NXP_SYS_CLOCK_TO_CFG=0x01 34 | 35 | ############################################################################### 36 | # NXP Proprietary core configuration extensions 37 | # For more details refer to the NFC Controller User Manual 38 | NXP_CORE_CONF_EXTN={20, 02, 11, 04, 39 | A0, 5E, 01, 01, 40 | A0, 40, 01, 01, 41 | A0, 41, 01, 04, 42 | A0, 43, 01, 00 43 | } 44 | 45 | ############################################################################### 46 | # Core configuration settings 47 | NXP_CORE_CONF={ 20, 02, 2B, 0D, 48 | 28, 01, 00, 49 | 21, 01, 00, 50 | 30, 01, 08, 51 | 31, 01, 03, 52 | 33, 04, 04, 03, 02, 01, 53 | 54, 01, 06, 54 | 50, 01, 02, 55 | 5B, 01, 00, 56 | 60, 01, 0E, 57 | 80, 01, 01, 58 | 81, 01, 01, 59 | 82, 01, 0E, 60 | 18, 01, 01 61 | } 62 | 63 | ############################################################################### 64 | # Vendor Specific Proprietary Protocol & Discovery Configuration 65 | # Set to 0xFF if unsupported 66 | # byte[0] NCI_PROTOCOL_18092_ACTIVE 67 | # byte[1] NCI_PROTOCOL_B_PRIME 68 | # byte[2] NCI_PROTOCOL_DUAL 69 | # byte[3] NCI_PROTOCOL_15693 70 | # byte[4] NCI_PROTOCOL_KOVIO 71 | # byte[5] NCI_PROTOCOL_MIFARE 72 | # byte[6] NCI_DISCOVERY_TYPE_POLL_KOVIO 73 | # byte[7] NCI_DISCOVERY_TYPE_POLL_B_PRIME 74 | # byte[8] NCI_DISCOVERY_TYPE_LISTEN_B_PRIME 75 | NXP_NFC_PROPRIETARY_CFG={05:FF:FF:06:8A:80:77:FF:FF} 76 | 77 | ############################################################################### 78 | # Override the stack default for NFA_EE_MAX_EE_SUPPORTED set in nfc_target.h. 79 | # The value is set to 3 by default as it assumes we will discover 0xF2, 80 | # 0xF3, and 0xF4. If a platform will exclude and SE, this value can be reduced 81 | # so that the stack will not wait any longer than necessary. 82 | NXP_NFC_MAX_EE_SUPPORTED=0x00 83 | 84 | -------------------------------------------------------------------------------- /src/service/extns/inc/phNxpExtns.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010-2014 NXP Semiconductors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _PHNXPEXTNS_H_ 18 | #define _PHNXPEXTNS_H_ 19 | 20 | #include 21 | #include 22 | #include 23 | #include 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | NFCSTATUS EXTNS_Init(tNFA_DM_CBACK *p_dm_cback, 29 | tNFA_CONN_CBACK *p_conn_cback); 30 | void EXTNS_Close(void); 31 | NFCSTATUS EXTNS_MfcInit(tNFA_ACTIVATED activationData); 32 | NFCSTATUS EXTNS_MfcCheckNDef(void); 33 | NFCSTATUS EXTNS_MfcReadNDef(void); 34 | NFCSTATUS EXTNS_MfcPresenceCheck(void); 35 | NFCSTATUS EXTNS_MfcWriteNDef(uint8_t *pBuf, uint32_t len); 36 | NFCSTATUS EXTNS_MfcFormatTag(uint8_t *key, uint8_t len); 37 | NFCSTATUS EXTNS_MfcDisconnect(void); 38 | NFCSTATUS EXTNS_MfcActivated(void); 39 | NFCSTATUS EXTNS_MfcTransceive(uint8_t *p_data, uint32_t len); 40 | NFCSTATUS EXTNS_MfcRegisterNDefTypeHandler (tNFA_NDEF_CBACK *ndefHandlerCallback); 41 | NFCSTATUS EXTNS_MfcCallBack(uint8_t *buf, uint32_t buflen); 42 | NFCSTATUS EXTNS_MfcSetReadOnly (uint8_t *key, uint8_t len); 43 | void EXTNS_SetConnectFlag(bool_t flagval); 44 | bool_t EXTNS_GetConnectFlag(void); 45 | void EXTNS_SetDeactivateFlag(bool_t flagval); 46 | bool_t EXTNS_GetDeactivateFlag(void); 47 | void EXTNS_SetCallBackFlag(bool_t flagval); 48 | bool_t EXTNS_GetCallBackFlag(void); 49 | NFCSTATUS EXTNS_CheckMfcResponse(uint8_t** sTransceiveData, uint32_t *sTransceiveDataLen); 50 | void MfcPresenceCheckResult(NFCSTATUS status); 51 | void MfcResetPresenceCheckStatus(void); 52 | NFCSTATUS EXTNS_GetPresenceCheckStatus(void); 53 | /*NFC-SPI synchronization related apis*/ 54 | NFCSTATUS EXTNS_EseNfcSyncInit(void); 55 | NFCSTATUS EXTNS_EseNfcSyncDeInit(void); 56 | NFCSTATUS EXTNS_NfcReqResourceIoctl(double time_limit); 57 | NFCSTATUS EXTNS_NfcReleaseResourceIoctl(double time_limit); 58 | 59 | #ifdef __cplusplus 60 | } 61 | #endif 62 | 63 | /* 64 | * Events from JNI for NXP Extensions 65 | */ 66 | #define PH_NXPEXTNS_MIFARE_CHECK_NDEF 0x01 /* MIFARE Check Ndef */ 67 | #define PH_NXPEXTNS_MIFARE_READ_NDEF 0x02 /* MIFARE Read Ndef */ 68 | #define PH_NXPEXTNS_MIFARE_WRITE_NDEF 0x03 /* MIFARE Write Ndef */ 69 | #define PH_NXPEXTNS_MIFARE_FORMAT_NDEF 0x04 /* MIFARE Format */ 70 | #define PH_NXPEXTNS_DISCONNECT 0x05 /* Target Disconnect */ 71 | #define PH_NXPEXTNS_ACTIVATED 0x06 /* Target Activated */ 72 | #define PH_NXPEXTNS_MIFARE_TRANSCEIVE 0x07 /* MIFARE Raw Transceive */ 73 | #define PH_NXPEXTNS_MIFARE_READ_ONLY 0x08 /* MIFARE Read Only */ 74 | #define PH_NXPEXTNS_MIFARE_PRESENCE_CHECK 0x09 /* MIFARE Presence Check */ 75 | #define PH_NXPEXTNS_RX_DATA 0xF1 /* Receive Data */ 76 | 77 | #endif /* _PHNXPEXTNS_H_ */ 78 | -------------------------------------------------------------------------------- /src/halimpl/pn54x/dnld/phDnldNfc_Status.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010-2014 NXP Semiconductors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /* 18 | * Firmware Download Status Values 19 | */ 20 | #ifndef PHDNLDNFC_STATUS_H 21 | #define PHDNLDNFC_STATUS_H 22 | 23 | #include 24 | 25 | /* reusing LibNfcStatus.h value below as a placeholder for now, need to find 26 | the right value */ 27 | #define NFCSTATUS_ABORTED (0x0096) /* Command aborted */ 28 | 29 | /* 30 | * Enum definition contains Firmware Download Status codes 31 | */ 32 | typedef enum phDnldNfc_Status 33 | { 34 | PH_DL_STATUS_PLL_ERROR = 0x0D, 35 | PH_DL_STATUS_LC_WRONG = 0x13, 36 | PH_DL_STATUS_LC_TERMINATION_NOT_SUPPORTED = 0x14, 37 | PH_DL_STATUS_LC_CREATION_NOT_SUPPORTED = 0x15, 38 | PH_DL_STATUS_LC_UNKNOWN = 0x16, 39 | PH_DL_STATUS_AUTHENTICATION_ERROR = 0x19, 40 | PH_DL_STATUS_NOT_AUTHENTICATED = 0x1A, 41 | PH_DL_STATUS_AUTHENTICATION_LOST = 0x1B, 42 | PH_DL_STATUS_WRITE_PROTECTED = 0x1C, 43 | PH_DL_STATUS_READ_PROTECTED = 0x1D, 44 | PH_DL_STATUS_ADDR_RANGE_OFL_ERROR = 0x1E, 45 | PH_DL_STATUS_BUFFER_OFL_ERROR = 0x1F, 46 | PH_DL_STATUS_MEM_BSY = 0x20, 47 | PH_DL_STATUS_SIGNATURE_ERROR = 0x21, 48 | PH_DL_STATUS_SESSION_WAS_OPEN = 0x22, 49 | PH_DL_STATUS_SESSION_WAS_CLOSED = 0x23, 50 | /* the Firmware version passed to CommitSession is not greater than 51 | the EEPROM resident stored Firmware version number */ 52 | PH_DL_STATUS_FIRMWARE_VERSION_ERROR = 0x24, 53 | PH_DL_STATUS_LOOPBACK_DATA_MISSMATCH_ERROR = 0x25, 54 | /*****************************/ 55 | PH_DL_STATUS_HOST_PAYLOAD_UFL_ERROR = 0x26, 56 | PH_DL_STATUS_HOST_PAYLOAD_OFL_ERROR = 0x27, 57 | PH_DL_STATUS_PROTOCOL_ERROR = 0x28, 58 | /* Download codes re-mapped to generic entries */ 59 | PH_DL_STATUS_INVALID_ADDR = NFCSTATUS_INVALID_PARAMETER, 60 | PH_DL_STATUS_GENERIC_ERROR = NFCSTATUS_FAILED, 61 | PH_DL_STATUS_ABORTED_CMD = NFCSTATUS_ABORTED, 62 | PH_DL_STATUS_FLASH_WRITE_PROTECTED = PH_DL_STATUS_WRITE_PROTECTED, 63 | PH_DL_STATUS_FLASH_READ_PROTECTED = PH_DL_STATUS_READ_PROTECTED, 64 | PH_DL_STATUS_USERDATA_WRITE_PROTECTED = PH_DL_STATUS_WRITE_PROTECTED, 65 | PH_DL_STATUS_USERDATA_READ_PROTECTED = PH_DL_STATUS_READ_PROTECTED, 66 | PH_DL_STATUS_OK = NFCSTATUS_SUCCESS 67 | } phDnldNfc_Status_t ; 68 | 69 | #endif /* PHDNLDNFC_STATUS_H */ 70 | -------------------------------------------------------------------------------- /src/libnfc-nci/nfa/int/nfa_sys_int.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright (C) 2010-2014 Broadcom Corporation 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | ******************************************************************************/ 18 | 19 | 20 | /****************************************************************************** 21 | * 22 | * This is the private interface file for the NFA system manager. 23 | * 24 | ******************************************************************************/ 25 | #ifndef NFA_SYS_INT_H 26 | #define NFA_SYS_INT_H 27 | 28 | #include "nfa_sys_ptim.h" 29 | 30 | /***************************************************************************** 31 | ** Constants and data types 32 | *****************************************************************************/ 33 | 34 | 35 | /* nfa_sys flags */ 36 | #define NFA_SYS_FL_INITIALIZED 0x00000001 /* nfa_sys initialized */ 37 | 38 | /***************************************************************************** 39 | ** state table 40 | *****************************************************************************/ 41 | 42 | /* system manager control block */ 43 | typedef struct 44 | { 45 | UINT32 flags; /* nfa_sys flags (must be first element of structure) */ 46 | tNFA_SYS_REG *reg[NFA_ID_MAX]; /* registration structures */ 47 | BOOLEAN is_reg[NFA_ID_MAX]; /* registration structures */ 48 | tPTIM_CB ptim_cb; /* protocol timer list */ 49 | tNFA_SYS_ENABLE_CBACK *p_enable_cback; 50 | UINT16 enable_cplt_flags; 51 | UINT16 enable_cplt_mask; 52 | 53 | tNFA_SYS_PROC_NFCC_PWR_MODE_CMPL *p_proc_nfcc_pwr_mode_cmpl_cback; 54 | UINT16 proc_nfcc_pwr_mode_cplt_flags; 55 | UINT16 proc_nfcc_pwr_mode_cplt_mask; 56 | 57 | BOOLEAN graceful_disable; /* TRUE if NFA_Disable () is called with TRUE */ 58 | BOOLEAN timers_disabled; /* TRUE if sys timers disabled */ 59 | UINT8 trace_level; /* Trace level */ 60 | } tNFA_SYS_CB; 61 | 62 | 63 | 64 | /***************************************************************************** 65 | ** Global variables 66 | *****************************************************************************/ 67 | 68 | /* system manager control block */ 69 | #if NFA_DYNAMIC_MEMORY == FALSE 70 | extern tNFA_SYS_CB nfa_sys_cb; 71 | #else 72 | extern tNFA_SYS_CB *nfa_sys_cb_ptr; 73 | #define nfa_sys_cb (*nfa_sys_cb_ptr) 74 | #endif 75 | 76 | 77 | /* system manager configuration structure */ 78 | extern tNFA_SYS_CFG *p_nfa_sys_cfg; 79 | 80 | BOOLEAN nfa_sys_sm_execute (BT_HDR *p_msg); 81 | 82 | #endif /* NFA_SYS_INT_H */ 83 | --------------------------------------------------------------------------------