├── NOTICE ├── README.md └── nfc-dta ├── Android.bp ├── doc └── readme.md ├── dtaLib ├── Android.bp ├── inc │ └── phDTALib.h └── src │ ├── inc │ └── phDTATst.h │ └── src │ ├── phDTALib.c │ ├── phDTA_HCETest.c │ ├── phDTA_HceFTest.c │ ├── phDTA_LLCPTest.c │ ├── phDTA_P2PTest.c │ ├── phDTA_SnepTest.c │ ├── phDTA_T1TTest.c │ ├── phDTA_T2TTest.c │ ├── phDTA_T3TTest.c │ ├── phDTA_T4TTest.c │ ├── phDTA_T5TTest.c │ └── phDTA_UICCTest.c ├── dtaMwAl ├── inc │ └── phMwIf.h ├── lib │ └── android │ │ └── sample.txt └── src │ └── comps │ └── android │ ├── Android.bp │ ├── inc │ ├── phMwIfAndroid.h │ └── phMwIfLib_NfcAdaptWrap.h │ └── src │ ├── phMwIfAndroid.cpp │ └── phMwIfLib_NfcAdaptWrap.cpp ├── dtaPlatform ├── phDtaLog │ └── src │ │ └── comps │ │ └── android │ │ └── src │ │ └── phOsal_Log.c ├── phDtaOsal │ ├── inc │ │ └── phDTAOSAL.h │ └── src │ │ └── comps │ │ └── android │ │ ├── Android.bp │ │ ├── inc │ │ └── phDTAOSALAndroid.h │ │ └── src │ │ └── phDTAOSALAndroid.c └── phInfra │ ├── inc │ ├── phOsal_LinkList.h │ └── phOsal_Queue.h │ └── src │ ├── phOsal_LinkList.c │ └── phOsal_Queue.c └── dtaUI └── dtaGui └── src └── comps └── android ├── jni ├── Android.bp ├── PhNXPJniHelper.java ├── phDTALibJNI.cpp └── phDTALibJNI.h └── ui ├── Android.bp ├── AndroidManifest.xml ├── res ├── drawable-hdpi │ ├── ic_launcher.png │ ├── nxp_img.png │ ├── ph_border.xml │ ├── ph_border_circle.xml │ ├── ph_border_different_color_one.xml │ ├── ph_border_different_color_orange.xml │ ├── ph_border_different_color_three.xml │ ├── ph_border_different_color_two.xml │ ├── ph_border_different_transparent_color_one.xml │ ├── ph_border_line.xml │ ├── ph_border_one.xml │ ├── ph_border_two.xml │ ├── ph_rectangular_border.xml │ ├── ph_rectangular_green_border.xml │ ├── ph_rounded_corner.xml │ ├── ph_rounded_corner_green.xml │ ├── ph_rounded_corner_grey.xml │ ├── ph_rounded_corner_one.xml │ └── ph_rounded_corner_red.xml ├── drawable-mdpi │ └── ic_launcher.png ├── drawable-xhdpi │ └── ic_launcher.png ├── drawable-xxhdpi │ └── ic_launcher.png ├── layout-land │ ├── ph_custom_snep_rtd.xml │ ├── ph_logcat.xml │ ├── ph_phdtaui_main_activity.xml │ └── ph_show_msg_dialog_layout.xml ├── layout-port │ ├── ph_custom_ip_dialog_layout.xml │ ├── ph_custom_snep_rtd.xml │ ├── ph_logcat.xml │ ├── ph_phdtaui_main_activity.xml │ └── ph_show_msg_dialog_layout.xml ├── layout-sw600dp │ ├── ph_custom_ip_dialog_layout.xml │ ├── ph_custom_snep_rtd.xml │ ├── ph_logcat.xml │ ├── ph_phdtaui_main_activity.xml │ └── ph_show_msg_dialog_layout.xml ├── layout-sw720dp │ ├── ph_custom_snep_rtd.xml │ └── ph_phdtaui_main_activity.xml ├── layout │ ├── ph_custom_exit_dialog.xml │ ├── ph_custom_ip_dialog_layout.xml │ ├── ph_custom_lib_dialog.xml │ ├── ph_custom_msg_dialog_layout.xml │ ├── ph_custom_popup_validation.xml │ ├── ph_custom_snep_rtd.xml │ ├── ph_logcat.xml │ └── ph_show_msg_dialog_layout.xml ├── values-v11 │ └── styles.xml ├── values-v14 │ └── styles.xml ├── values-v19 │ └── styles.xml └── values │ ├── arrays.xml │ ├── bools.xml │ ├── colors.xml │ ├── strings.xml │ └── styles.xml └── src └── com └── phdtaui ├── asynctask ├── PhNioClientTask.java └── PhNioServerTask.java ├── customdialogs ├── PhCustomExitDialog.java ├── PhCustomIPDialog.java ├── PhCustomLibDialog.java ├── PhCustomMSGDialog.java ├── PhCustomPopValidation.java └── PhShowMSGDialog.java ├── helper ├── PhDTAJniEvent.java └── PhNXPHelperMainActivity.java ├── mainactivity ├── PhDTAUIMainActivity.java └── PhLogCatActivity.java ├── messenger └── PhMessengerService.java ├── snep └── PhCustomSNEPRTD.java ├── structure └── PhDtaLibStructure.java ├── tcpclient ├── PhChangeRequest.java ├── PhNioClient.java └── PhRspHandler.java ├── tcpserver ├── PhEchoWorker.java ├── PhNioServer.java └── PhServerDataEvent.java └── utils └── PhUtilities.java /README.md: -------------------------------------------------------------------------------- 1 | # NXPAndroidDTA 2 | 3 | 4 | #### Git Repository 5 | 6 | | DESCRIPTION | CHECKOUT COMMAND | 7 | | :-------------: |:-------------:| 8 | | NXPAndroidDTA | git clone https://github.com/NXPNFCProject/NXPAndroidDTA.git | 9 | 10 | #### Supported Android Versions on branch br_ar_new_dta_arch 11 | 12 | | Android Version | NXP Release | NXP Tag | DTA Version | 13 | | :-------------: |:-------------:| :-----:| :------:| 14 | | aosp-main | TR13.2_DTA_1.0_OpnSrc (PN557/SN100/SN110/SN220/SN300) | NFC_AR_00_7E800_15.0B.00_OpnSrc | TR13.2_DTA_1.0 | 15 | | android-15.0.0_r1 | TR13.2_DTA_1.1_OpnSrc (PN557/SN100/SN110/SN220/SN300) | NFC_AR_00_7E800_15.0C.00_OpnSrc | TR13.2_DTA_1.1 | 16 | | aosp-main | TR13.2_DTA_1.2_OpnSrc (PN557/SN100/SN110/SN220/SN300) | NFC_AR_00_7E800_16.02.00_OpnSrc NFC_AR_00_7E800_16.03.00_OpnSrc | TR13.2_DTA_1.2 | 17 | | aosp-main | CR14_DTA1.3_OpnSrc (PN557/SN100/SN110/SN220/SN300) | NFC_AR_00_7E800_16.04.00_OpnSrc | CR14_DTA1.3 | 18 | | aosp-main | CR14_DTA1.3_OpnSrc (PN557/SN100/SN110/SN220/SN300) | NFC_AR_00_7E800_16.05.00_OpnSrc NFC_AR_00_7E800_16.06.00_OpnSrc | CR14_DTA1.3 | 19 | 20 | 21 | 22 | 23 | #### Legacy Android Versions on branch master 24 | 25 | | Android Version | NXP Release | NXP Tag | DTA Version | 26 | | :-------------: |:-------------:| :-----:| :------:| 27 | | android-8.0.0_r4/android-8.1.0_r7 | 11.01 (PN548C2/PN551/PN553/PN557) | NFC_NCIHALx_AR00C0.8.4.0_OpnSrc | DTA 11.01 | 28 | | android-p-preview 2 | 11.06 (PN553/PN557) | NFC_NCIHALx_AR00C0.9.0.D_OpnSrc | DTA 11.06 | 29 | | android-9.0.0_r3 | 11.07 (PN557) | NFC_NCIHALx_AR0800.9.1.0_OpnSrc | DTA 11.07 | 30 | | android-9.0.0_r3 | 11.08 (PN81T/PN557) | NFC_NCIHALx_AR1800.9.2.0_OpnSrc | DTA 11.08 | 31 | | android-p-preview 2 | 11.09 (SN100x/PN553) | NFC_NCIHALx_AR2000.09.00.0C_OpnSrc NFC_NCIHALx_AR2000.09.00.0F_OpnSrc | DTA 11.09 | 32 | | android-p-preview 2 | 11.0A (SN100x) | NFC_NCIHALx_AR2000.09.00.11_OpnSrc | DTA 11.0A | 33 | | android-p-preview 2 | 11.0B (SN100x/PN8xT) | NFC_NCIHALx_AR2000.09.00.13_OpnSrc NFC_NCIHALx_AR0040.9.3.0_OpnSrc NFC_NCIHALx_AR00C0.9.4.0_OpnSrc NFC_NCIHALx_AR1800.9.5.0_OpnSrc NFC_NCIHALx_AR2000.09.00.15_OpnSrc NFC_NCIHALx_AR2000.09.00.16_OpnSrc NFC_NCIHALx_AR2000.09.00.17_OpnSrc NFC_NCIHALx_AR2000.09.00.18_OpnSrc | DTA 11.0B | 34 | | android-p-preview 2 | 11.0C (PN8xT) | NFC_NCIHALx_AR18C0.9.6.0_OpnSrc | DTA 11.0C | 35 | | android-p-preview 2 | 11.0D (SN100x) | NFC_NCIHALx_AR2000.09.00.19_OpnSrc | DTA 11.0D | 36 | | aosp-master | 11.0D (SN100x) | NFC_AR_00_2000_10.00.04_OpnSrc | DTA 11.0D | 37 | | aosp-master | 11.0D (SN100x/PN553/PN557/PN80T/PN81T) | NFC_AR_00_6000_10.00.06_OpnSrc NFC_AR_00_18C0_10.01.00_OpnSrc | DTA 11.0D | 38 | | aosp-master | 11.0F (PN553/PN557/PN80T/PN81T) | NFC_AR_00_18C0_10.02.00_OpnSrc | DTA 11.0F | 39 | | aosp-master | 11.10 (SN110x/SN100) | NFC_AR_00_6000_10.00.0A_OpnSrc NFC_AR_00_6000_10.00.0B_OpnSrc | DTA 11.10 | 40 | | android-10.0.0_r2 | 11.11 (PN553/PN557/PN80T/PN81T) | NFC_AR_00_18C0_10.03.00_OpnSrc | DTA 11.11 | 41 | | android-p-preview 2 | 11.13 (SN100x) | NFC_NCIHALx_AR2000.09.00.1B_OpnSrc | DTA 11.13 | 42 | | android-10.0.0_r2 | 11.13 (PN553/PN557/PN80T/PN81T) | NFC_AR_00_18C0_10.04.00_OpnSrc | DTA 11.13 | 43 | | android-10.0.0_r2 | 11.14 (SN1xx) | NFC_AR_00_6000_10.00.14_OpnSrc NFC_AR_00_6000_10.00.15_OpnSrc | DTA 11.14 | 44 | | aosp-master | 11.15 (SN1xx/PN553/PN557/PN80T/PN81T) | NFC_AR_00_6000_11.02.00_OpnSrc NFC_AR_00_18C0_11.01.01_OpnSrc | DTA 11.15 | 45 | | android-10.0.0_r2 | 11.17 (SN1xx) | NFC_AR_00_6000_10.00.17_OpnSrc | DTA 11.17 | 46 | | aosp-master | 12.11 (SN100/SN110/SN220) | NFC_AR_00_E000_12.02.01_OpnSrc NFC_AR_00_E000_12.04.01_OpnSrc | DTA 12.11 | 47 | | android-11.0.0_r3 / aosp-master (12) | 12.12 (SN1xx) | NFC_AR_00_6000_11.59.00_OpnSrc | DTA 12.12 | 48 | | aosp-master | 12.14 (SN100/SN110/SN220) | NFC_AR_00_E000_12.07.00_OpnSrc | DTA 12.14 | 49 | | aosp-master | 12.15 (PN553/PN557/PN80T/PN81T/SN1xx/SN220) | NFC_AR_00_18C0_12.01.00_OpnSrc NFC_AR_00_E800_12.08.00_OpnSrc | DTA 12.15 | 50 | | aosp-master | 12.16 (PN553/PN557/PN80T/PN81T/PN7160/SN1xx/SN220) | NFC_AR_00_E800_12.09.00_OpnSrc | DTA 12.16 | 51 | | android-12.0.0_r2 | 12.17 (PN557/SN100/SN110) | NFC_AR_00_E800_12.0D.00_OpnSrc | DTA 12.17 | 52 | | android-12.0.0_r2 | 12.18 (PN553/PN557/PN80T/PN81T) | NFC_AR_00_18C0_12.02.00_OpnSrc | DTA 12.18 | 53 | | android-12.0.0_r2 | 12.18 (SN100/SN110/SN220) | NFC_AR_00_E800_12.10.00_OpnSrc | DTA 12.18 | 54 | | android-12.0.0_r2 | 12.18 (PN557/SN100/SN110/SN220) | NFC_AR_00_E800_12.12.00_OpnSrc | DTA 12.18 | 55 | | aosp-master | 12.18 (SN100/SN110/SN220) | NFC_AR_00_E800_13.02.01_OpnSrc NFC_AR_00_E800_13.03.00_OpnSrc | DTA 12.18 | 56 | | android-12.0.0_r2/android-13-preview-1 | 13.00 (PN553/PN557/PN560/PN80T/PN81T/SN100/SN110/SN220) | NFC_AR_00_E800_12.14.00_OpnSrc NFC_AR_00_18C0_13.01.00_OpnSrc NFC_AR_00_1E800_13.09.00_OpnSrc | DTA 13.00 | 57 | | android-13.0.0_r3 | 13.02 (PN553/PN557/PN80T/PN81T/PN557/SN100/SN110/SN220) | NFC_AR_00_18C0_13.02.00_OpnSrc NFC_AR_00_1E800_13.0B.00_OpnSrc | DTA 13.02 | 58 | | aosp-master | 13.02 (PN557/SN100/SN110/SN220) | NFC_AR_00_1E800_14.02.00_OpnSrc NFC_AR_00_1E800_14.03.00_OpnSrc NFC_AR_00_1E800_14.04.00_OpnSrc | DTA 13.02 | 59 | | aosp-master | 13.03 (PN557/SN100/SN110/SN220) | NFC_AR_00_1E800_13.0D.01_OpnSrc NFC_AR_00_1E800_14.05.00_OpnSrc | DTA 13.03 | 60 | | aosp-master | 13.04 (PN557/SN100/SN110/SN220) | NFC_AR_00_1E800_13.0E.00_OpnSrc NFC_AR_00_3E800_14.08.00_OpnSrc | DTA 13.04 | 61 | | aosp-master | 13.05 (PN557/SN100/SN110/SN220) | NFC_AR_00_3E800_14.0B.00_OpnSrc | DTA 13.05 | 62 | | android-14.0.0_r2 | 13.05 (PN557/SN100/SN110/SN220) | NFC_AR_00_3E800_14.0E.00_OpnSrc | DTA 13.05 | 63 | | aosp-main | 13.05 (PN557/SN100/SN110/SN220) | NFC_AR_00_3E800_15.02.00_OpnSrc | DTA 13.05 | 64 | | aosp-main | 13.05 (PN557/SN100/SN110/SN220/SN300) | NFC_AR_00_7E800_15.04.00_OpnSrc | DTA 13.05 | 65 | | android-14.0.0_r2 | 13.05 (PN557/SN100/SN110/SN220) | NFC_AR_00_3E800_14.0F.00_OpnSrc | DTA 13.05 | 66 | -------------------------------------------------------------------------------- /nfc-dta/Android.bp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2020 NXP 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 | subdirs = ["dtaLib", "dtaMwAl", "dtaPlatform", "dtaUI"] 18 | 19 | filegroup { 20 | name: "phDtaLogSrc", 21 | srcs: [ 22 | "dtaPlatform/phDtaLog/src/comps/android/src/*.c", 23 | ], 24 | } 25 | 26 | filegroup { 27 | name: "phDtaInfraSrc", 28 | srcs: [ 29 | "dtaPlatform/phInfra/src/*.c", 30 | ], 31 | } 32 | 33 | filegroup { 34 | name: "phDtaJniSrc", 35 | srcs: [ 36 | "dtaUI/dtaGui/src/comps/android/jni/*.cpp", 37 | "dtaUI/dtaGui/src/comps/android/jni/*.java", 38 | ], 39 | } 40 | -------------------------------------------------------------------------------- /nfc-dta/doc/readme.md: -------------------------------------------------------------------------------- 1 | The ReadMe explains about waht DTA build varients will be build by default and 2 | what changes needed to build DTA for other than default varients. 3 | 4 | 1) By default the DTA build for SNxyz varients with Android-10 / 11. 5 | 6 | 2) By default the DTA build with vendor.nxp.nxpnfc@v2.0. For MW which supports 7 | vendor.nxp.nxpnfclegacy@v1.0 & vendor.nxp.nxpnfc@v1.1 need to build with the 8 | corresponding vendor versions. 9 | -------------------------------------------------------------------------------- /nfc-dta/dtaLib/Android.bp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2020,2023 NXP 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 | * CR12_ON_AR12_CHANGE 19 | * THREAD_PRIO_SUPPORT 20 | * Set it to TRUE if Priority need to be set to phDtaLibi_CbMsgHandleThrd() 21 | */ 22 | 23 | cc_library_shared { 24 | name: "libdta", 25 | 26 | arch: { 27 | arm: { 28 | instruction_set: "arm", 29 | }, 30 | }, 31 | 32 | shared_libs: [ 33 | "libmwif", 34 | "libosal", 35 | ], 36 | include_dirs: [ 37 | "system/nfc-dta/dtaMwAl/inc/", 38 | "system/nfc-dta/dtaLib/inc", 39 | "system/nfc-dta/dtaLib/src/inc", 40 | "system/nfc-dta/dtaPlatform/phInfra/inc", 41 | "system/nfc-dta/dtaPlatform/phDtaOsal/inc", 42 | "system/nfc-dta/dtaPlatform/phDtaOsal/src/comps/android/inc", 43 | "system/nfc/SN100x/src/gki/common/", 44 | "system/nfc/SN100x/src/gki/ulinux/", 45 | ], 46 | local_include_dirs: [ 47 | "inc/", 48 | ], 49 | cflags: [ 50 | "-DTHREAD_PRIO_SUPPORT=FALSE", 51 | "-DNFC_NXP_P2P_PERFORMANCE_TESTING=FALSE", 52 | "-DP2P_ENABLE=TRUE", 53 | ], 54 | srcs: [ 55 | "src/src/*.c", 56 | ], 57 | } 58 | 59 | // Platform or chip specific build 60 | //cc_library_shared { 61 | // name: "libdta_nq", 62 | 63 | // arch: { 64 | // arm: { 65 | // instruction_set: "arm", 66 | // }, 67 | // }, 68 | 69 | // shared_libs: [ 70 | // "libmwif_nq", 71 | // "libosal_nq", 72 | // ], 73 | // include_dirs: [ 74 | // "system/nfc-dta/dtaMwAl/inc/", 75 | // "system/nfc-dta/dtaLib/inc", 76 | // "system/nfc-dta/dtaLib/src/inc", 77 | // "system/nfc-dta/dtaPlatform/phInfra/inc", 78 | // "system/nfc-dta/dtaPlatform/phDtaOsal/inc", 79 | // "system/nfc-dta/dtaPlatform/phDtaOsal/src/comps/android/inc", 80 | // "system/nfc/src/gki/common/", 81 | // "system/nfc/src/gki/ulinux/", 82 | // ], 83 | // local_include_dirs: [ 84 | // "inc/", 85 | // ], 86 | // srcs: [ 87 | // "src/src/*.c", 88 | // ], 89 | //} 90 | -------------------------------------------------------------------------------- /nfc-dta/dtaLib/src/src/phDTA_HCETest.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2018, 2022 NXP 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 | * \file phDTA_HCETest.c 19 | * 20 | * Project: NFC DTA 21 | * 22 | */ 23 | 24 | /* Preprocessor includes for different platform */ 25 | #ifdef WIN32 26 | #include 27 | #else 28 | #include 29 | #include "data_types.h" 30 | #endif 31 | 32 | #include "phDTAOSAL.h" 33 | #include "phMwIf.h" 34 | #include "phDTALib.h" 35 | #include "phOsal_LinkList.h" 36 | #include "phOsal_Queue.h" 37 | #include "phDTATst.h" 38 | 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | /** 44 | * Host Card Emulation related operations 45 | */ 46 | 47 | /*HCE related data*/ 48 | static uint8_t g_P_AidData[] = {0x01,0x00,0x90,0x00}; 49 | static uint8_t g_P_AidDataLength = 0x04; 50 | static uint8_t gStatusWordData [] = {0x90,0x00}; 51 | static uint8_t gStatusWordDataLength = 0x02; 52 | static uint8_t gCApduRespData [] = {0x80,0xA8,0x00,0x00,0x01,0x02}; 53 | static uint8_t gCApduRespDataLength = 6; 54 | static uint8_t gCmdRespXchg1 [] = {0x00,0xB2,0x01,0x0C,0x00}; 55 | static uint8_t gCmdRespXchg2 [] = {0x00,0xB2,0x02,0x0C,0x00}; 56 | static uint8_t gCmdRespXchgLength = 5; 57 | extern phDtaLib_sHandle_t g_DtaLibHdl; 58 | 59 | /** 60 | * Handle Host card emulation related operations 61 | */ 62 | DTASTATUS phDtaLibi_HceOperations() 63 | { 64 | MWIFSTATUS dwMwIfStatus = 0; 65 | phDtaLib_sHandle_t *dtaLibHdl = &g_DtaLibHdl; 66 | uint8_t bSendBuffer[PHMWIF_MAX_LOOPBACK_DATABUF_SIZE]; 67 | uint32_t dwSizeOfSendBuff=0; 68 | uint8_t resultBuffer[PHMWIF_MAX_LOOPBACK_DATABUF_SIZE]; 69 | uint32_t dwSizeOfResultBuff=0; 70 | 71 | LOG_FUNCTION_ENTRY; 72 | 73 | /*Wait for Data Event to start loopback*/ 74 | dwMwIfStatus = phMwIf_ReceiveData(dtaLibHdl->mwIfHdl, resultBuffer, &dwSizeOfResultBuff); 75 | if((!dwSizeOfResultBuff) && (dwMwIfStatus != MWIFSTATUS_SUCCESS)) 76 | { 77 | phOsal_LogError((const uint8_t*)"DTALib>:Invalid Data Recvd"); 78 | return DTASTATUS_FAILED; 79 | } 80 | do 81 | { 82 | if((resultBuffer[0] == 0x00)&&(resultBuffer[1] == 0xA4)&& 83 | (resultBuffer[2] == 0x04)&&(resultBuffer[3] == 0x00)) 84 | { 85 | memcpy(bSendBuffer,g_P_AidData,g_P_AidDataLength); 86 | dwSizeOfSendBuff = g_P_AidDataLength; 87 | dwSizeOfResultBuff = sizeof(resultBuffer); 88 | } 89 | else if((resultBuffer[0] == 0x80)&&(resultBuffer[1] == 0xA8)&& 90 | (resultBuffer[2] == 0x00)&&(resultBuffer[3] == 0x00)) 91 | { 92 | memcpy(bSendBuffer,gCApduRespData,gCApduRespDataLength); 93 | dwSizeOfSendBuff = gCApduRespDataLength; 94 | dwSizeOfResultBuff = sizeof(resultBuffer); 95 | } 96 | else if((resultBuffer[0] == 0x00)&&(resultBuffer[1] == 0xB2)&& 97 | (resultBuffer[2] == 0x01)&&(resultBuffer[3] == 0x0C)) 98 | { 99 | memcpy(bSendBuffer,gCmdRespXchg1,gCmdRespXchgLength); 100 | dwSizeOfSendBuff = gCmdRespXchgLength; 101 | dwSizeOfResultBuff = sizeof(resultBuffer); 102 | } 103 | else if((resultBuffer[0] == 0x00)&&(resultBuffer[1] == 0xB2)&& 104 | (resultBuffer[2] == 0x02)&&(resultBuffer[3] == 0x0C)) 105 | { 106 | memcpy(bSendBuffer,gCmdRespXchg2,gCmdRespXchgLength); 107 | dwSizeOfSendBuff = gCmdRespXchgLength; 108 | dwSizeOfResultBuff = sizeof(resultBuffer); 109 | } 110 | else if((resultBuffer[0] == 0x80)&&(resultBuffer[1] == 0xEE)&& 111 | (resultBuffer[2] == 0x00)&&(resultBuffer[3] == 0x00)) 112 | { 113 | if ((strcmp(dtaLibHdl->sConfigPrms.aCertRelease, "CR12") == 0x00) || 114 | (strcmp(dtaLibHdl->sConfigPrms.aCertRelease, "CR13") == 0x00)) { 115 | phOsal_LogDebug((const uint8_t*)"DTALib> HCE Operations for loopback data"); 116 | memcpy(bSendBuffer,resultBuffer,dwSizeOfResultBuff); 117 | bSendBuffer[dwSizeOfResultBuff] = 0x90; 118 | bSendBuffer[dwSizeOfResultBuff+1] = 0x00; 119 | dwSizeOfResultBuff = dwSizeOfResultBuff+2; 120 | dwSizeOfSendBuff = dwSizeOfResultBuff; 121 | } 122 | else 123 | { 124 | phOsal_LogDebug((const uint8_t*)"DTALib> HCE Operations for Status Word"); 125 | memcpy(bSendBuffer,gStatusWordData,gStatusWordDataLength); 126 | dwSizeOfSendBuff = gStatusWordDataLength; 127 | dwSizeOfResultBuff = sizeof(resultBuffer); 128 | dwMwIfStatus = phMwIf_Transceive(dtaLibHdl->mwIfHdl, 129 | (uint8_t *)bSendBuffer, 130 | dwSizeOfSendBuff, 131 | resultBuffer, 132 | &dwSizeOfResultBuff); 133 | if(dwMwIfStatus != MWIFSTATUS_SUCCESS) 134 | { 135 | phOsal_LogError((const uint8_t*)"DTALib> Error Failed to tranceive data in loop back !! \n"); 136 | break; 137 | } 138 | 139 | memcpy(bSendBuffer,gStatusWordData,gStatusWordDataLength); 140 | dwSizeOfResultBuff = sizeof(resultBuffer); 141 | dwSizeOfSendBuff = gStatusWordDataLength; 142 | dwMwIfStatus = phMwIf_Transceive(dtaLibHdl->mwIfHdl, 143 | (uint8_t *)bSendBuffer, 144 | dwSizeOfSendBuff, 145 | resultBuffer, 146 | &dwSizeOfResultBuff); 147 | if(dwMwIfStatus != MWIFSTATUS_SUCCESS) 148 | { 149 | phOsal_LogError((const uint8_t*)"DTALib> Error Failed to tranceive data in loop back !! \n"); 150 | break; 151 | } 152 | } 153 | } 154 | else 155 | { 156 | /*Do nothing*/ 157 | } 158 | 159 | dwMwIfStatus = phMwIf_Transceive(dtaLibHdl->mwIfHdl, 160 | (uint8_t *)bSendBuffer, 161 | dwSizeOfSendBuff, 162 | resultBuffer, 163 | &dwSizeOfResultBuff); 164 | if(dwMwIfStatus != MWIFSTATUS_SUCCESS) 165 | { 166 | phOsal_LogError((const uint8_t*)"DTALib> Error Failed to tranceive data in loop back !! \n"); 167 | break; 168 | } 169 | } while (dwMwIfStatus == MWIFSTATUS_SUCCESS); 170 | 171 | return dwMwIfStatus; 172 | } 173 | 174 | #ifdef __cplusplus 175 | } 176 | #endif 177 | -------------------------------------------------------------------------------- /nfc-dta/dtaLib/src/src/phDTA_HceFTest.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2018,2021 NXP 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 | * \file phDTA_HCETest.c 19 | * 20 | * Project: NFC DTA 21 | * 22 | */ 23 | 24 | /* Preprocessor includes for different platform */ 25 | #ifdef WIN32 26 | #include 27 | #else 28 | #include 29 | #include "data_types.h" 30 | #endif 31 | 32 | #include "phDTAOSAL.h" 33 | #include "phMwIf.h" 34 | #include "phDTALib.h" 35 | #include "phOsal_LinkList.h" 36 | #include "phOsal_Queue.h" 37 | #include "phDTATst.h" 38 | 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | /** 44 | * Host Card Emulation for Felica related operations 45 | */ 46 | 47 | /* macros */ 48 | #define T3T_NFCID2_SIZE 8 49 | /* end */ 50 | 51 | extern phDtaLib_sHandle_t g_DtaLibHdl; 52 | 53 | 54 | DTASTATUS phDtaLibi_HceFOperations() 55 | { 56 | OSALSTATUS dwOsalStatus = 0; 57 | phDtaLib_sHandle_t *dtaLibHdl = &g_DtaLibHdl; 58 | phDtaLib_sQueueData_t* psQueueData=NULL; 59 | phDtaLib_sQueueData_t sQueueData; 60 | 61 | /* Generic buff declarations */ 62 | uint8_t readBuffer[400]={0}; /* Read the data from update command */ 63 | uint32_t dwSizeOfReadBuff=0; 64 | uint8_t writeBuffer[400] = {0}; /* Write the data as acknowledgment for check command */ 65 | uint32_t dwSizeOfwriteBuffer=0; 66 | uint32_t count=0; 67 | /* end */ 68 | 69 | /* Update command declarations */ 70 | uint8_t readUpdCmdBuffer[400] = {0}; 71 | const int updCmdRsp[2] = {00,00}; /*Response data for update command*/ 72 | uint8_t blkNum=0, chkCmdMask = 0x80; 73 | /* end */ 74 | 75 | /*Check command declarations*/ 76 | uint8_t writeChkCmdBuffer[16] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 77 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}; 78 | /*end*/ 79 | 80 | LOG_FUNCTION_ENTRY; 81 | 82 | while(1) 83 | { 84 | /*Wait for Data Event(Select P_AID) to start CE Operations*/ 85 | do { 86 | dwOsalStatus = phOsal_QueuePull(dtaLibHdl->queueHdl, (void**)&psQueueData, 0); 87 | if (dwOsalStatus != 0) { 88 | phOsal_LogErrorString((const uint8_t*)"DTALib> : Exiting-QueuPull ", (const uint8_t*)__FUNCTION__); 89 | phOsal_LogErrorU32h((const uint8_t*)"Status = ",dwOsalStatus); 90 | 91 | return DTASTATUS_FAILED; 92 | } 93 | 94 | phOsal_LogDebugString((const uint8_t*)"DTALib> : Recvd Object", (const uint8_t*)__FUNCTION__); 95 | phOsal_LogDebugU32h((const uint8_t*)"eEvtType = ", psQueueData->uEvtType.eDpEvtType); 96 | if ((psQueueData->uEvtType.eDpEvtType == PHMWIF_DEACTIVATED_EVT) && (psQueueData->uEvtInfo.uDpEvtInfo.eDeactivateType == PHMWIF_DEACTIVATE_TYPE_IDLE)) 97 | { 98 | phOsal_LogDebug((const uint8_t*)"DTALib>psQueueData->uEvtType.eDpEvtType == PHMWIF_DEACTIVATED_EVT"); 99 | free(psQueueData); 100 | return DTASTATUS_FAILED; 101 | } else if(psQueueData->uEvtType.eDpEvtType == PHMWIF_CE_DEACTIVATED_EVT){ 102 | phOsal_LogDebugString((const uint8_t*)"DTALib> : phDtaLibi_HceFOperations PHMWIF_CE_DEACTIVATED_EVT success", (const uint8_t*)__FUNCTION__); 103 | return DTASTATUS_SUCCESS; 104 | } 105 | 106 | sQueueData = *psQueueData; 107 | /*Free Data if its some other event*/ 108 | if(sQueueData.uEvtType.eDpEvtType != PHMWIF_CE_DATA_EVT) 109 | free(psQueueData); 110 | } while (sQueueData.uEvtType.eDpEvtType != PHMWIF_CE_DATA_EVT); 111 | 112 | phOsal_LogBuffer((const uint8_t*)sQueueData.uEvtInfo.uDpEvtInfo.sData.pvDataBuf, sQueueData.uEvtInfo.uDpEvtInfo.sData.dwSize, (const uint8_t *)"DTALib> Received data pvDataBuf = "); 113 | if(!sQueueData.uEvtInfo.uDpEvtInfo.sData.pvDataBuf) 114 | { 115 | phOsal_LogErrorString((const uint8_t*)"DTALib>:Invalid Data Recvd",(const uint8_t *)sQueueData.uEvtInfo.uDpEvtInfo.sData.pvDataBuf); 116 | return DTASTATUS_FAILED; 117 | } 118 | 119 | memcpy(readBuffer, sQueueData.uEvtInfo.uDpEvtInfo.sData.pvDataBuf, sQueueData.uEvtInfo.uDpEvtInfo.sData.dwSize); 120 | dwSizeOfReadBuff = sQueueData.uEvtInfo.uDpEvtInfo.sData.dwSize; 121 | phOsal_LogDebugU32d((const uint8_t *)"DEBUG> After copy", sQueueData.uEvtInfo.uDpEvtInfo.sData.dwSize); 122 | //blkNum = readBuffer[14]; 123 | if(readBuffer[1] == 0x08){ 124 | phOsal_LogDebug((const uint8_t*)"DEBUG DTALib> Update command received"); 125 | memcpy(readUpdCmdBuffer, readBuffer, dwSizeOfReadBuff); 126 | blkNum = readUpdCmdBuffer[14]; 127 | writeBuffer[count++] = 0x00; 128 | writeBuffer[count++] = 0x09; 129 | memcpy(writeBuffer+2, readBuffer+2, T3T_NFCID2_SIZE); 130 | count += T3T_NFCID2_SIZE; 131 | writeBuffer[count++] = updCmdRsp[0]; 132 | writeBuffer[count++] = updCmdRsp[1]; 133 | dwSizeOfwriteBuffer = count; 134 | writeBuffer[0] = (uint8_t)count; //count = 12 135 | }else if(readBuffer[1] == 0x06){ 136 | phOsal_LogDebug((const uint8_t*)"DEBUG DTALib> preparing buffer to send check response"); 137 | if((blkNum & chkCmdMask) && (memcmp(readUpdCmdBuffer+14, readBuffer+14, 2) == 0x00)){ 138 | phOsal_LogDebug((const uint8_t*)"DEBUG DTALib> block list is 2 bytes"); 139 | writeBuffer[count++] = 0x00; 140 | writeBuffer[count++] = 0x07; 141 | memcpy(writeBuffer+count, readBuffer+2, T3T_NFCID2_SIZE); 142 | count += T3T_NFCID2_SIZE; 143 | writeBuffer[count++] = 0x00; 144 | writeBuffer[count++] = 0x00; 145 | writeBuffer[count++] = 0x01; 146 | memcpy(writeBuffer+count, readUpdCmdBuffer+16, 16); 147 | count += 16; 148 | dwSizeOfwriteBuffer = count; //count = 29 149 | writeBuffer[0] = (uint8_t)count; //count = 29 150 | phOsal_LogBuffer((const uint8_t *)writeBuffer, count, (const uint8_t *)"DTALib> Sending data writeBuffer = "); 151 | }else if(!(blkNum & chkCmdMask) && (memcmp(readUpdCmdBuffer+14, readBuffer+14, 3) == 0x00)){ 152 | phOsal_LogDebug((const uint8_t*)"DEBUG DTALib> block list is 3 bytes"); 153 | writeBuffer[count++] = 0x00; 154 | writeBuffer[count++] = 0x07; 155 | memcpy(writeBuffer+2, readBuffer+2, T3T_NFCID2_SIZE); 156 | count += T3T_NFCID2_SIZE; 157 | writeBuffer[count++] = 0x00; 158 | writeBuffer[count++] = 0x00; 159 | writeBuffer[count++] = 0x01; 160 | memcpy(writeBuffer+13, readUpdCmdBuffer+17, 16); 161 | count += 16; 162 | dwSizeOfwriteBuffer = count;//count = 29 163 | writeBuffer[0] = (uint8_t)count;//count = 29 164 | phOsal_LogBuffer((const uint8_t *)writeBuffer, count, (const uint8_t *)"DTALib> Sending data writeBuffer = "); 165 | }else{ 166 | phOsal_LogInfoString((const uint8_t*)"DEBUG> DTALib>",(const uint8_t*)" Error in block size or check command called before update command!! \n"); 167 | writeBuffer[count++] = 0x00; 168 | writeBuffer[count++] = 0x07; 169 | memcpy(writeBuffer+2, readBuffer+2, T3T_NFCID2_SIZE); 170 | count += T3T_NFCID2_SIZE; 171 | writeBuffer[count++] = 0x00; 172 | writeBuffer[count++] = 0x00; 173 | writeBuffer[count++] = 0x01; 174 | memcpy(writeBuffer+13, writeChkCmdBuffer, 16); 175 | count += 16; 176 | dwSizeOfwriteBuffer = count;//count = 29 177 | writeBuffer[0] = (uint8_t)count;//count = 29 178 | phOsal_LogBuffer((const uint8_t *)writeBuffer, count, (const uint8_t *)"DTALib> Sending data writeBuffer = "); 179 | } 180 | } 181 | gx_status = phMwIf_SendRawFrame(dtaLibHdl->mwIfHdl,writeBuffer,dwSizeOfwriteBuffer); 182 | if(gx_status != MWIFSTATUS_SUCCESS) 183 | { 184 | phOsal_LogError((const uint8_t*)"DTALib> Error Failed to tranceive data in loop back !! \n"); 185 | break; 186 | } 187 | memset(writeBuffer, '\0', sizeof(writeBuffer)); 188 | count = 0x00; 189 | phOsal_LogDebug ((const uint8_t*)"DTALib> Sending R-APDU Init... \n"); 190 | } 191 | return gx_status; 192 | } 193 | 194 | #ifdef __cplusplus 195 | } 196 | #endif 197 | -------------------------------------------------------------------------------- /nfc-dta/dtaLib/src/src/phDTA_P2PTest.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NXPNFCProject/NXPAndroidDTA/8f0c86b3da6273f9c2c29e038421f007813056d4/nfc-dta/dtaLib/src/src/phDTA_P2PTest.c -------------------------------------------------------------------------------- /nfc-dta/dtaLib/src/src/phDTA_UICCTest.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2018 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 | * \file phDTA_HCETest.c 19 | * 20 | * Project: NFC DTA 21 | * 22 | */ 23 | 24 | /* Preprocessor includes for different platform */ 25 | #ifdef WIN32 26 | #include 27 | #else 28 | #include 29 | #include "data_types.h" 30 | #endif 31 | 32 | #include "phDTAOSAL.h" 33 | #include "phMwIf.h" 34 | #include "phDTALib.h" 35 | #include "phOsal_LinkList.h" 36 | #include "phOsal_Queue.h" 37 | #include "phDTATst.h" 38 | 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | extern phDtaLib_sHandle_t g_DtaLibHdl; 44 | 45 | /** 46 | * UICC card emulation related operations 47 | */ 48 | DTASTATUS phDtaLibi_UICCOperations() 49 | { 50 | OSALSTATUS dwOsalStatus = 0; 51 | phDtaLib_sHandle_t *dtaLibHdl = &g_DtaLibHdl; 52 | phDtaLib_sQueueData_t* psQueueData=NULL; 53 | phDtaLib_sQueueData_t sQueueData; 54 | LOG_FUNCTION_ENTRY; 55 | 56 | /*Wait for Data Event(Select P_AID) to start CE Operations*/ 57 | do 58 | { 59 | dwOsalStatus = phOsal_QueuePull(dtaLibHdl->queueHdl, (void**)&psQueueData, 0); 60 | if (dwOsalStatus != 0) 61 | { 62 | phOsal_LogErrorString((const uint8_t*)"DTALib> : Exiting-QueuPull ", (const uint8_t*)__FUNCTION__); 63 | phOsal_LogErrorU32h((const uint8_t*)"Status = ",dwOsalStatus); 64 | 65 | return DTASTATUS_FAILED; 66 | } 67 | sQueueData = *psQueueData; 68 | phOsal_LogDebugString((const uint8_t*)"DTALib> : Recvd Object", (const uint8_t*)__FUNCTION__); 69 | phOsal_LogDebugU32h((const uint8_t*)"eEvtType = ", psQueueData->uEvtType.eDpEvtType); 70 | } while (sQueueData.uEvtType.eDpEvtType != PHMWIF_DEACTIVATED_EVT); 71 | 72 | LOG_FUNCTION_EXIT; 73 | return DTASTATUS_SUCCESS; 74 | } 75 | 76 | #ifdef __cplusplus 77 | } 78 | #endif 79 | -------------------------------------------------------------------------------- /nfc-dta/dtaMwAl/lib/android/sample.txt: -------------------------------------------------------------------------------- 1 | #Please delete this file. 2 | 3 | -------------------------------------------------------------------------------- /nfc-dta/dtaMwAl/src/comps/android/Android.bp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2020-2023 NXP 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 | * CR12_AND_CR13_ON_AR12_AND_A13_CHANGE 19 | * AOSP_MASTER_COMPILATION_SUPPORT 20 | * Set it to TRUE if you are building with Vanilla AOSP 21 | */ 22 | 23 | cc_library_shared { 24 | name: "libmwif", 25 | 26 | arch: { 27 | arm: { 28 | instruction_set: "arm", 29 | }, 30 | }, 31 | 32 | shared_libs: [ 33 | "libnativehelper", 34 | "libcutils", 35 | "libutils", 36 | "libnfc-nci", 37 | "libosal", 38 | "libhardware", 39 | "libc", 40 | "libdl", 41 | "liblog", 42 | "vendor.nxp.nxpnfc@2.0", 43 | "android.hardware.nfc@1.2", 44 | ], 45 | cflags: [ 46 | "-Wall", 47 | "-Wextra", 48 | "-Wno-unused-parameter", 49 | "-Werror", 50 | "-DNXP_EXTNS=TRUE", 51 | "-DAOSP_MASTER_COMPILATION_SUPPORT=TRUE", 52 | "-DANDROID_O=FALSE", 53 | "-DANDROID_P=FALSE", 54 | "-DANDROID_R=FALSE", 55 | "-DANDROID_S=FALSE", 56 | "-DNXP_QTAG=TRUE", 57 | "-DANDROID_U=TRUE", 58 | "-DP2P_ENABLE=TRUE", 59 | ], 60 | srcs: [ 61 | "src/*.cpp" 62 | ], 63 | 64 | include_dirs: [ 65 | "system/nfc-dta/dtaPlatform/phDtaOsal/src/comps/android/inc", 66 | "system/nfc-dta/dtaPlatform/phDtaOsal/inc", 67 | "system/nfc-dta/dtaPlatform/phInfra/inc", 68 | "system/nfc-dta/dtaMwAl/inc", 69 | "frameworks/native/include", 70 | "system/nfc/SN100x/src/include", 71 | "system/nfc/SN100x/src/nfa/include", 72 | "system/nfc/SN100x/src/nfc/include", 73 | "system/nfc/SN100x/src/gki/ulinux", 74 | "system/nfc/SN100x/src/gki/common", 75 | "system/nfc/SN100x/utils/include", 76 | "frameworks/base/media/mca/filterfw/native/base", 77 | ], 78 | local_include_dirs: [ 79 | "inc/", 80 | ], 81 | 82 | product_variables: { 83 | debuggable: { 84 | cflags: ["-DDCHECK_ALWAYS_ON"], 85 | }, 86 | }, 87 | static_libs: [ 88 | "libnfcutils", 89 | ], 90 | } 91 | 92 | // Platform or chip specific build 93 | //cc_library_shared { 94 | // name: "libmwif_nq", 95 | 96 | // arch: { 97 | // arm: { 98 | // instruction_set: "arm", 99 | // }, 100 | // }, 101 | 102 | // shared_libs: [ 103 | // "libnativehelper", 104 | // "libcutils", 105 | // "libutils", 106 | // "libnfc-nci", 107 | // "libosal_nq", 108 | // "libhardware", 109 | // "libc", 110 | // "libdl", 111 | // "liblog", 112 | // "vendor.nxp.nxpnfc@1.0", 113 | // "vendor.nxp.nxpnfclegacy@1.0", 114 | // "android.hardware.nfc@1.0", 115 | // ], 116 | // cflags: [ 117 | // "-Wall", 118 | // "-Wextra", 119 | // "-Wno-unused-parameter", 120 | // "-Werror", 121 | // "-DNXP_EXTNS=TRUE", 122 | // "-DAOSP_MASTER_COMPILATION_SUPPORT=TRUE", 123 | // ], 124 | // srcs: [ 125 | // "src/*.cpp" 126 | // ], 127 | 128 | // include_dirs: [ 129 | // "system/nfc-dta/dtaPlatform/phDtaOsal/src/comps/android/inc", 130 | // "system/nfc-dta/dtaPlatform/phDtaOsal/inc", 131 | // "system/nfc-dta/dtaPlatform/phInfra/inc", 132 | // "system/nfc-dta/dtaMwAl/inc", 133 | // "frameworks/native/include", 134 | // "system/nfc/src/include", 135 | // "system/nfc/src/nfa/include", 136 | // "system/nfc/src/nfc/include", 137 | // "system/nfc/src/gki/ulinux", 138 | // "system/nfc/src/gki/common", 139 | // "system/nfc/utils/include", 140 | // "frameworks/base/media/mca/filterfw/native/base", 141 | // ], 142 | // local_include_dirs: [ 143 | // "inc/", 144 | // ], 145 | 146 | // product_variables: { 147 | // debuggable: { 148 | // cflags: ["-DDCHECK_ALWAYS_ON"], 149 | // }, 150 | // }, 151 | // static_libs: [ 152 | // "libnfcutils", 153 | // ], 154 | //} 155 | -------------------------------------------------------------------------------- /nfc-dta/dtaMwAl/src/comps/android/inc/phMwIfLib_NfcAdaptWrap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2018 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 | * \file phMwIfLib_NFCAdaptWrap.h 19 | * \brief Middleware Library Interface header file. Used as static interface from C 20 | * to C++ NFCAdaptation class 21 | * 22 | * Project: NFC DTA LIB 23 | */ 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | #include "nfc_target.h" 29 | #include "nfc_hal_api.h" 30 | 31 | /** 32 | * \ingroup grp_mwif_lib 33 | * \brief Creates NFC Adaptation Object 34 | * 35 | * This function creates NFCAdaptation Object 36 | * 37 | * \param[in] None 38 | * \retval AdaptHdl Handle for Adaptation object created earlier 39 | * \retval NULL MWIF LIB failed to create NFC Adaptation Object 40 | * 41 | */ 42 | void* NfcAdaptation_Create(); 43 | 44 | /** 45 | * \ingroup grp_mwif_lib 46 | * \brief deletes NFC Adaptation Object 47 | * 48 | * This function deletes NFCAdaptation Object 49 | * 50 | * \param[in] AdaptHdl Handle for Adaptation object created earlier 51 | * \retval #MWIFSTATUS_SUCCESS NFCAdaptation Object destroyed successfully 52 | * \retval #MWIFSTATUS_FAILED MWIF LIB failed to delete NFC Adaptation Object 53 | * 54 | */ 55 | void NfcAdaptation_Destroy( void* AdaptHdl ); 56 | 57 | /** 58 | * \ingroup grp_mwif_lib 59 | * \brief Initializes NFC Adaptation Object 60 | * 61 | * This function initializes NFCAdaptation Object 62 | * 63 | * \param[in] AdaptHdl Handle for Adaptation object created earlier 64 | * \retval None 65 | */ 66 | void NfcAdaptation_Initialize( void* AdaptHdl); 67 | 68 | /** 69 | * \ingroup grp_mwif_lib 70 | * \brief DeInitializes NFC Adaptation Object 71 | * 72 | * This function Deinitializes NFCAdaptation Object 73 | * 74 | * \param[in] AdaptHdl Handle for Adaptation object created earlier 75 | * \retval None 76 | */ 77 | 78 | void NfcAdaptation_DeInitialize( void* AdaptHdl); 79 | 80 | /** 81 | * \ingroup grp_mwif_lib 82 | * \brief Provides the registered HAL function pointers 83 | * 84 | * List of HAL function pointers are returned by this function 85 | * 86 | * \param[in] AdaptHdl Handle for Adaptation object created earlier 87 | * \retval None 88 | */ 89 | tHAL_NFC_ENTRY* NfcAdaptation_GetHalEntryFuncs( void* AdaptHdl); 90 | 91 | #ifdef __cplusplus 92 | } 93 | #endif 94 | -------------------------------------------------------------------------------- /nfc-dta/dtaMwAl/src/comps/android/src/phMwIfLib_NfcAdaptWrap.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2018 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 | * \file phMwIfLib_NFCAdaptWrap.cpp 19 | * \brief Middleware Library Interface source file. 20 | * 21 | * Project: NFC DTA LIB 22 | */ 23 | 24 | #include "nfc_target.h" 25 | #include "nfc_hal_api.h" 26 | #include "NfcAdaptation.h" 27 | #include "phMwIfLib_NfcAdaptWrap.h" 28 | #include 29 | 30 | #ifdef __cplusplus 31 | extern "C" 32 | { 33 | #endif 34 | 35 | void* NfcAdaptation_Create() 36 | { 37 | return static_cast (& NfcAdaptation::GetInstance()); 38 | } 39 | 40 | void NfcAdaptation_Destroy( void* AdaptHdl ) 41 | { 42 | delete static_cast(AdaptHdl); 43 | } 44 | 45 | void NfcAdaptation_Initialize( void* AdaptHdl) 46 | { 47 | return static_cast(AdaptHdl)->Initialize(); 48 | } 49 | 50 | void NfcAdaptation_DeInitialize( void* AdaptHdl) 51 | { 52 | return static_cast(AdaptHdl)->Finalize(); 53 | } 54 | 55 | tHAL_NFC_ENTRY* NfcAdaptation_GetHalEntryFuncs( void* AdaptHdl) 56 | { 57 | return static_cast(AdaptHdl)->GetHalEntryFuncs(); 58 | } 59 | 60 | #ifdef __cplusplus 61 | } 62 | #endif 63 | -------------------------------------------------------------------------------- /nfc-dta/dtaPlatform/phDtaLog/src/comps/android/src/phOsal_Log.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2018 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 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include "phDTAOSAL.h" 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | /*Global log level to filter the type of logs to be published*/ 30 | static phOsal_eLogLevel_t geLogLevel=PHOSAL_LOGLEVEL_NONE; 31 | 32 | /** 33 | * Logging levels 34 | * This function set the type of logs to be enabled 35 | * 36 | * \param[in] eLogLevel Type of logs to be enabled(info,errors,debug,data) 37 | * 38 | */ 39 | void phOsal_SetLogLevel(phOsal_eLogLevel_t eLogLevel) 40 | { 41 | ALOGD("%s:Level=%d",__FUNCTION__,eLogLevel); 42 | geLogLevel = eLogLevel; 43 | phOsal_LogDebugU32h((const uint8_t*)"Osal>Log Level set to:",(uint32_t)eLogLevel); 44 | } 45 | 46 | /** 47 | * Log Error 48 | * This function prints the error message specified 49 | * appropriate log level for error needs to be enabled from phOsal_SetLogLevel 50 | * 51 | * \param[in] pbMsg defines Error log message to be printed 52 | * 53 | */ 54 | void phOsal_LogError(const uint8_t* pbMsg) 55 | { 56 | if(geLogLevel >= PHOSAL_LOGLEVEL_ERROR) 57 | ALOGE("%s",pbMsg); 58 | } 59 | 60 | /** 61 | * Log Error 62 | * This function prints the error message specified along with 32bit value in Hex 63 | * appropriate log level for error needs to be enabled from phOsal_SetLogLevel 64 | * 65 | * \param[in] pbMsg defines Error log message to be printed 66 | * \param[in] wValue defines value to be printed 67 | * 68 | */ 69 | void phOsal_LogErrorU32h(const uint8_t* pbMsg, uint32_t wValue) 70 | { 71 | if(geLogLevel >= PHOSAL_LOGLEVEL_ERROR) 72 | ALOGE("%s:0x%x",pbMsg,wValue); 73 | } 74 | 75 | /** 76 | * Log Error 77 | * This function prints the error message specified along with 32bit value in decimal 78 | * appropriate log level for error needs to be enabled from phOsal_SetLogLevel 79 | * 80 | * \param[in] pbMsg defines Error log message to be printed 81 | * \param[in] wValue defines value to be printed 82 | */ 83 | void phOsal_LogErrorU32d(const uint8_t* pbMsg, uint32_t wValue) 84 | { 85 | if(geLogLevel >= PHOSAL_LOGLEVEL_ERROR) 86 | ALOGE("%s:%d",pbMsg,wValue); 87 | } 88 | 89 | /** 90 | * Log Error String 91 | * This function prints the error message specified along with string 92 | * appropriate log level for error needs to be enabled from phOsal_SetLogLevel 93 | * 94 | * \param[in] pbMsg defines Error log message to be printed 95 | * \param[in] pbString defines pointer to string to be printed 96 | */ 97 | void phOsal_LogErrorString(const uint8_t* pbMsg, const uint8_t* pbString) 98 | { 99 | if(geLogLevel >= PHOSAL_LOGLEVEL_ERROR) 100 | ALOGE("%s:%s",pbMsg,pbString); 101 | } 102 | 103 | /** 104 | * Log Information 105 | * This function prints the information /warning specified 106 | * appropriate log level for info needs to be enabled from phOsal_SetLogLevel 107 | * 108 | * \param[in] pbMsg defines log message to be printed 109 | * 110 | */ 111 | void phOsal_LogInfo(const uint8_t* pbMsg) 112 | { 113 | if(geLogLevel >= PHOSAL_LOGLEVEL_INFO) 114 | ALOGI("%s",pbMsg); 115 | } 116 | 117 | /** 118 | * Log Information 119 | * This function prints the information /warning specified along with 32bit value in Hex 120 | * appropriate log level for info needs to be enabled from phOsal_SetLogLevel 121 | * 122 | * \param[in] pbMsg defines log message to be printed 123 | * \param[in] wValue defines value to be printed 124 | * 125 | */ 126 | void phOsal_LogInfoU32h(const uint8_t* pbMsg, uint32_t wValue) 127 | { 128 | if(geLogLevel >= PHOSAL_LOGLEVEL_INFO) 129 | ALOGI("%s:0x%x",pbMsg,wValue); 130 | } 131 | 132 | /** 133 | * Log Information 134 | * This function prints the information /warning specified along with 32bit value in decimal 135 | * appropriate log level for info needs to be enabled from phOsal_SetLogLevel 136 | * 137 | * \param[in] pbMsg defines log message to be printed 138 | * \param[in] wValue defines value to be printed 139 | * 140 | */ 141 | void phOsal_LogInfoU32d(const uint8_t* pbMsg, uint32_t wValue) 142 | { 143 | if(geLogLevel >= PHOSAL_LOGLEVEL_INFO) 144 | ALOGI("%s:%d",pbMsg,wValue); 145 | } 146 | 147 | /** 148 | * Log Information and String 149 | * This function prints the information specified along with string 150 | * appropriate log level for info needs to be enabled from phOsal_SetLogLevel 151 | * 152 | * \param[in] pbMsg defines log message to be printed 153 | * \param[in] pbString defines pointer to string to be printed 154 | */ 155 | void phOsal_LogInfoString(const uint8_t* pbMsg, const uint8_t* pbString) 156 | { 157 | if(geLogLevel >= PHOSAL_LOGLEVEL_INFO) 158 | ALOGI("%s:%s",pbMsg,pbString); 159 | } 160 | 161 | /** 162 | * Log Debug Information 163 | * This function prints the Debug log message specified 164 | * appropriate log level for debug needs to be enabled from phOsal_SetLogLevel 165 | * 166 | * \param[in] pbMsg defines log message to be printed 167 | * 168 | */ 169 | void phOsal_LogDebug(const uint8_t* pbMsg) 170 | { 171 | if(geLogLevel >= PHOSAL_LOGLEVEL_DEBUG) 172 | ALOGD("%s",pbMsg); 173 | } 174 | 175 | /** 176 | * Log Debug Information 177 | * This function prints the Debug log message specified along with 32bit value in hex 178 | * appropriate log level for debug needs to be enabled from phOsal_SetLogLevel 179 | * 180 | * \param[in] pbMsg defines log message to be printed 181 | * \param[in] wValue defines value to be printed 182 | * 183 | */ 184 | void phOsal_LogDebugU32h(const uint8_t* pbMsg, uint32_t wValue) 185 | { 186 | if(geLogLevel >= PHOSAL_LOGLEVEL_DEBUG) 187 | ALOGD("%s:0x%X",pbMsg,wValue); 188 | } 189 | 190 | /** 191 | * Log Debug Information 192 | * This function prints the Debug log message specified along with 32bit value in decimal 193 | * appropriate log level for debug needs to be enabled from phOsal_SetLogLevel 194 | * 195 | * \param[in] pbMsg defines log message to be printed 196 | * \param[in] wValue defines value to be printed 197 | * 198 | */ 199 | void phOsal_LogDebugU32d(const uint8_t* pbMsg, uint32_t wValue) 200 | { 201 | if(geLogLevel >= PHOSAL_LOGLEVEL_DEBUG) 202 | ALOGD("%s:%d",pbMsg,wValue); 203 | } 204 | 205 | /** 206 | * Log Debug Information 207 | * This function prints the Debug log message specified along with pointer value in hex 208 | * appropriate log level for debug needs to be enabled from phOsal_SetLogLevel 209 | * 210 | * \param[in] pbMsg defines log message to be printed 211 | * \param[in] pValue defines value to be printed 212 | * 213 | */ 214 | void phOsal_LogDebugPtrh(const uint8_t* pbMsg, void* pValue) 215 | { 216 | if(geLogLevel >= PHOSAL_LOGLEVEL_DEBUG) 217 | ALOGD("%s:0x%p",pbMsg,pValue); 218 | } 219 | 220 | /** 221 | * Log Debug Information specified along with the string 222 | * This function prints the Debug log message specified along with 32bit value in decimal 223 | * appropriate log level for debug needs to be enabled from phOsal_SetLogLevel 224 | * 225 | * \param[in] pbMsg defines log message to be printed 226 | * \param[in] wValue defines value to be printed 227 | * 228 | */ 229 | void phOsal_LogDebugString(const uint8_t* pbMsg, const uint8_t* pbString) 230 | { 231 | if(geLogLevel >= PHOSAL_LOGLEVEL_DEBUG) 232 | ALOGD("%s:%s",pbMsg,pbString); 233 | } 234 | 235 | /** 236 | * Log Buffer data 237 | * This function prints the data in the buffers provided in Hex 238 | * appropriate log level for debug needs to be enabled from phOsal_SetLogLevel 239 | * 240 | * \param[in] pbBuffer Buffer data to be logged 241 | * \param[in] dwSizeOfBuffer Size of buffer data. 242 | * \param[in] pbMsg defines message to be printed before printing the buffer data. 243 | * 244 | */ 245 | void phOsal_LogBuffer(const uint8_t* pbBuffer, 246 | uint32_t dwSizeOfBuffer, 247 | const uint8_t* pbMsg) 248 | { 249 | if(geLogLevel >= PHOSAL_LOGLEVEL_DATA_BUFFERS) 250 | { 251 | uint32_t i=0; 252 | ALOGD("%s:BufSize=%d:",pbMsg,dwSizeOfBuffer); 253 | for(i=0;i= PHOSAL_LOGLEVEL_DEBUG) 270 | ALOGD("%s>%s:Enter",pbModuleName,pbFuncName); 271 | } 272 | 273 | /** 274 | * Log function exit point 275 | * This function prints the function name specified prefixed by Module name 276 | * appropriate log level for debug needs to be enabled from phOsal_SetLogLevel 277 | * 278 | * \param[in] pbMsg defines log message to be printed 279 | * \param[in] wValue defines value to be printed 280 | * 281 | */ 282 | void phOsal_LogFunctionExit(const uint8_t* pbModuleName, const uint8_t* pbFuncName) 283 | { 284 | if(geLogLevel >= PHOSAL_LOGLEVEL_DEBUG) 285 | ALOGD("%s>%s:Exit",pbModuleName,pbFuncName); 286 | } 287 | 288 | #ifdef __cplusplus 289 | } 290 | #endif 291 | -------------------------------------------------------------------------------- /nfc-dta/dtaPlatform/phDtaOsal/src/comps/android/Android.bp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2020 NXP 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 | cc_library_shared { 18 | name: "libosal", 19 | 20 | arch: { 21 | arm: { 22 | instruction_set: "arm", 23 | }, 24 | }, 25 | 26 | shared_libs: [ 27 | "libcutils", 28 | "liblog", 29 | "libdl", 30 | "libc", 31 | ], 32 | 33 | cflags: [ 34 | "-DBUILDCFG=1", 35 | "-Wall", 36 | "-Werror", 37 | "-Wimplicit-fallthrough", 38 | ], 39 | 40 | include_dirs: [ 41 | "system/nfc-dta/dtaPlatform/phInfra/inc", 42 | "system/nfc-dta/dtaPlatform/phDtaOsal/src/comps/android/inc", 43 | "system/nfc-dta/dtaPlatform/phDtaOsal/inc", 44 | "system/nfc/SN100x/src/include", 45 | "system/nfc/SN100x/src/nfa/include", 46 | "system/nfc/SN100x/src/nfc/include", 47 | "system/nfc/SN100x/src/gki/ulinux", 48 | "system/nfc/SN100x/src/gki/common", 49 | "system/nfc/SN100x/utils/include", 50 | ], 51 | 52 | srcs: [ 53 | ":phDtaLogSrc", 54 | ":phDtaInfraSrc", 55 | "src/*.c", 56 | ], 57 | } 58 | 59 | // Platform or chip specific build 60 | //cc_library_shared { 61 | // name: "libosal_nq", 62 | 63 | // arch: { 64 | // arm: { 65 | // instruction_set: "arm", 66 | // }, 67 | // }, 68 | 69 | // shared_libs: [ 70 | // "libcutils", 71 | // "liblog", 72 | // "libdl", 73 | // "libc", 74 | // ], 75 | 76 | // cflags: [ 77 | // "-DBUILDCFG=1", 78 | // "-Wall", 79 | // "-Werror", 80 | // "-Wimplicit-fallthrough", 81 | // ], 82 | 83 | // include_dirs: [ 84 | // "system/nfc-dta/dtaPlatform/phInfra/inc", 85 | // "system/nfc-dta/dtaPlatform/phDtaOsal/src/comps/android/inc", 86 | // "system/nfc-dta/dtaPlatform/phDtaOsal/inc", 87 | // "system/nfc/src/include", 88 | // "system/nfc/src/nfa/include", 89 | // "system/nfc/src/nfc/include", 90 | // "system/nfc/src/gki/ulinux", 91 | // "system/nfc/src/gki/common", 92 | // "system/nfc/utils/include", 93 | // ], 94 | 95 | // srcs: [ 96 | // ":phDtaLogSrc", 97 | // ":phDtaInfraSrc", 98 | // "src/*.c", 99 | // ], 100 | //} 101 | -------------------------------------------------------------------------------- /nfc-dta/dtaPlatform/phDtaOsal/src/comps/android/inc/phDTAOSALAndroid.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2018 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 | -------------------------------------------------------------------------------- /nfc-dta/dtaPlatform/phInfra/inc/phOsal_LinkList.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2018 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 | * 19 | * \file phOsalLinkList.h 20 | * \brief OSAL linked list header file. 21 | * 22 | * Project: NFC OSAL LIB 23 | */ 24 | 25 | #ifndef __OSAL_LINKLIST_H 26 | #define __OSAL_LINKLIST_H 27 | 28 | #ifdef __cplusplus 29 | extern "C" 30 | { 31 | #endif 32 | 33 | 34 | typedef enum _PHOSAL_LIST_POSITION 35 | { 36 | PHOSAL_LIST_POS_HEAD, 37 | PHOSAL_LIST_POS_TAIL, 38 | PHOSAL_LIST_POS_CUR, 39 | PHOSAL_LIST_POS_NEXT, 40 | PHOSAL_LIST_POS_PREV 41 | }PHOSAL_LIST_POSITION_T; 42 | 43 | typedef struct phOsal_ListCreateParams 44 | { 45 | void* memHdl; 46 | void* (*MemAllocCb)(void* memHdl, 47 | uint32_t Size); 48 | int32_t (*MemFreeCb)(void* memHdl, 49 | void* ptrToMem); 50 | }phOsal_ListCreateParams_t; 51 | 52 | /** 53 | * \ingroup grp_osal_lib 54 | * \brief creates linked list 55 | * 56 | * This function creates resources for handling linkedlist 57 | * \param[out] phListHandle LinkedList Handle 58 | * \param[in] psCreateParams structure contatinng params to create linkedlist 59 | * \retval #OSALSTATUS_SUCCESS OSAL LIB Linkedlist created successfully 60 | * \retval #OSALSTATUS_FAILED OSAL LIB failed to create linkedlist 61 | * 62 | */ 63 | OSALSTATUS phOsal_ListCreate(void** phListHandle, 64 | phOsal_ListCreateParams_t* psCreateParams); 65 | 66 | /** 67 | * \ingroup grp_osal_lib 68 | * \brief inserts a new element in linked list 69 | * 70 | * This function inserts node to linkedlist 71 | * \param[in] pvListHandle LinkedList Handle 72 | * \param[in] eListPos Position to insert linked list 73 | * \param[in] pvData Data to be inserted in the new node 74 | * \retval #OSALSTATUS_SUCCESS node inserted in Linkedlist successfully 75 | * \retval #OSALSTATUS_FAILED node insertion in Linkedlist failed 76 | * 77 | */ 78 | OSALSTATUS phOsal_ListInsertNode(void* pvListHandle, 79 | PHOSAL_LIST_POSITION_T eListPos, 80 | void* pvData ); 81 | 82 | /** 83 | * \ingroup grp_osal_lib 84 | * \brief removes the node from linked list and provides data of removed node 85 | * 86 | * This function remove node from linkedlist 87 | * \param[in] pvListHandle LinkedList Handle 88 | * \param[in] eListPos Position to remove node from linked list 89 | * \param[in] ppvData Pointer to data of removed node 90 | * \retval #OSALSTATUS_SUCCESS node removed in Linkedlist successfully 91 | * \retval #OSALSTATUS_FAILED node removal in Linkedlist failed 92 | * 93 | */ 94 | OSALSTATUS phOsal_ListRemoveNode(void* pvListHandle, 95 | PHOSAL_LIST_POSITION_T eListPos, 96 | void** ppvData ); 97 | 98 | /** 99 | * \ingroup grp_osal_lib 100 | * \brief Flush all objects/nodes in the linked list 101 | * 102 | * This function removes all nodes from linkedlist 103 | * \param[in] pvListHandle LinkedList Handle 104 | * \retval #OSALSTATUS_SUCCESS node removed in Linkedlist successfully 105 | * \retval #OSALSTATUS_FAILED node removal in Linkedlist failed 106 | * 107 | */ 108 | OSALSTATUS phOsal_ListFlush(void* pvListHandle); 109 | 110 | /** 111 | * \ingroup grp_osal_lib 112 | * \brief Destroys the linked list 113 | * 114 | * This function deletes the linkedlist 115 | * \param[in] pvListHandle LinkedList Handle 116 | * \retval #OSALSTATUS_SUCCESS node removed in Linkedlist successfully 117 | * \retval #OSALSTATUS_FAILED node removal in Linkedlist failed 118 | * 119 | */ 120 | OSALSTATUS phOsal_ListDestroy ( void* pvListHandle); 121 | 122 | 123 | #ifdef __cplusplus 124 | } /* End of extern "C" { */ 125 | #endif /* __cplusplus */ 126 | 127 | #endif 128 | -------------------------------------------------------------------------------- /nfc-dta/dtaPlatform/phInfra/inc/phOsal_Queue.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2018 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 __PH_OSAL_QUEUE_H__ 18 | #define __PH_OSAL_QUEUE_H__ 19 | 20 | #ifdef __cplusplus 21 | extern "C" { /* Assume C declarations for C++ */ 22 | #endif /* __cplusplus */ 23 | 24 | typedef enum phOsal_eQueueOverwriteMode 25 | { 26 | PHOSAL_QUEUE_NO_OVERWRITE, 27 | PHOSAL_QUEUE_OVERWRITE_OLDEST, 28 | PHOSAL_QUEUE_OVERWRITE_NEWEST 29 | }phOsal_eQueueOverwriteMode_t; 30 | 31 | typedef struct phOsal_QueueCreateParams_tag 32 | { 33 | void* memHdl; 34 | void* (*MemAllocCb)(void* memHdl, 35 | uint32_t Size); 36 | int32_t (*MemFreeCb)(void* memHdl, 37 | void* ptrToMem); 38 | uint32_t wQLength; 39 | phOsal_eQueueOverwriteMode_t eOverwriteMode; 40 | 41 | }phOsal_QueueCreateParams_t; 42 | 43 | 44 | /** 45 | * \ingroup grp_osal_lib 46 | * \brief creates queue 47 | * 48 | * This function creates resources for handling queue 49 | * \param[out] pvQueueHandle Queue Handle to be filled 50 | * \param[in] psQueueCreatePrms structure contatinng params to create linkedlist 51 | * \retval #OSALSTATUS_SUCCESS OSAL LIB Queue created successfully 52 | * \retval #OSALSTATUS_FAILED OSAL LIB failed to create queue 53 | * 54 | */ 55 | extern OSALSTATUS phOsal_QueueCreate(void** pvQueueHandle, 56 | phOsal_QueueCreateParams_t* psQueueCreatePrms); 57 | /** 58 | * \ingroup grp_osal_lib 59 | * \brief Destroys queue 60 | * 61 | * This function destroys resources used for handling queue 62 | * \param[out] pvQueueHandle Queue Handle to be filled 63 | * \retval #OSALSTATUS_SUCCESS OSAL LIB Queue created successfully 64 | * \retval #OSALSTATUS_FAILED OSAL LIB failed to create queue 65 | * 66 | */ 67 | extern OSALSTATUS phOsal_QueueDestroy(void* pvQueueHandle); 68 | 69 | /** 70 | * \ingroup grp_osal_lib 71 | * \brief Inserts object into queue 72 | * 73 | * This function inserts objects into queue 74 | 75 | * \param[in] pvQueueHandle Queue Handle to be filled 76 | * \param[out] pvQueueObj Queue object ot be inserted 77 | * \retval #OSALSTATUS_SUCCESS OSAL LIB Queue created successfully 78 | * \retval #OSALSTATUS_FAILED OSAL LIB failed to create queue 79 | * 80 | */ 81 | extern OSALSTATUS phOsal_QueuePush(void* pvQueueHandle, 82 | void *pvQueueObj, 83 | uint32_t u4_time_out_ms); 84 | 85 | /** 86 | * \ingroup grp_osal_lib 87 | * \brief retreive objects from queue 88 | * 89 | * This function retrieves objects from queue 90 | * \param[in] pvQueueHandle Queue Handle to be filled 91 | * \param[out] ppvQueueObj Queue object pulled 92 | * \param[in] u4_time_out_ms time to wait until an object is found in queue 93 | * \retval #OSALSTATUS_SUCCESS OSAL LIB Queue Pulled successfully 94 | * \retval #OSALSTATUS_FAILED OSAL LIB failed to Pull object from queue 95 | * \retval #OSALSTATUS_Q_UNDERFLOW No objects in Q even after timeout 96 | */ 97 | extern OSALSTATUS phOsal_QueuePull(void* pvQueueHandle, 98 | void **ppvQueueObj, 99 | uint32_t u4_time_out_ms); 100 | 101 | /** 102 | * \ingroup grp_osal_lib 103 | * \brief retreive objects from queue 104 | * 105 | * This function retrieves objects from queue 106 | * \param[in] pvQueueHandle Queue Handle to be filled 107 | * \retval #OSALSTATUS_SUCCESS OSAL LIB Queue created successfully 108 | * \retval #OSALSTATUS_FAILED OSAL LIB failed to create queue 109 | * 110 | */ 111 | extern OSALSTATUS phOsal_QueueFlush(void* pvQueueHandle); 112 | 113 | #ifdef __cplusplus 114 | } /* Assume C declarations for C++ */ 115 | #endif /* __cplusplus */ 116 | 117 | #endif /* __PH_OSAL_QUEUE_H__ */ 118 | -------------------------------------------------------------------------------- /nfc-dta/dtaUI/dtaGui/src/comps/android/jni/Android.bp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2020,2023 NXP 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 | cc_library_shared { 18 | name: "libdta_jni", 19 | cflags: [ 20 | "-Wall", 21 | "-Wextra", 22 | "-Wno-unused-parameter", 23 | "-Werror", 24 | "-fexceptions", 25 | "-DP2P_ENABLE=TRUE", 26 | ], 27 | 28 | arch: { 29 | arm: { 30 | instruction_set: "arm", 31 | }, 32 | }, 33 | 34 | include_dirs: [ 35 | "system/nfc-dta/dtaUI/dtaGui/src/comps/android/jni", 36 | "system/nfc-dta/dtaLib/src/inc", 37 | "system/nfc-dta/dtaLib/inc", 38 | "system/nfc-dta/dtaPlatform/phDtaOsal/inc", 39 | "system/nfc-dta/dtaPlatform/phDtaOsal/src/comps/android/inc", 40 | "system/nfc-dta/dtaMwAl/inc/", 41 | "system/nfc/SN100x/src/gki/common/", 42 | "system/nfc/SN100x/src/gki/ulinux/", 43 | ], 44 | srcs: ["*.cpp"], 45 | 46 | shared_libs: [ 47 | "libandroidicu", 48 | "libnativehelper", 49 | "libdta", 50 | "libcutils", 51 | "libosal", 52 | ], 53 | } 54 | 55 | // Platform or chip specific build 56 | //cc_library_shared { 57 | // name: "libdta_jni_nq", 58 | 59 | // arch: { 60 | // arm: { 61 | // instruction_set: "arm", 62 | // }, 63 | // }, 64 | 65 | // include_dirs: [ 66 | // "system/nfc-dta/dtaUI/dtaGui/src/comps/android/jni", 67 | // "system/nfc-dta/dtaLib/src/inc", 68 | // "system/nfc-dta/dtaLib/inc", 69 | // "system/nfc-dta/dtaPlatform/phDtaOsal/inc", 70 | // "system/nfc-dta/dtaPlatform/phDtaOsal/src/comps/android/inc", 71 | // "system/nfc-dta/dtaMwAl/inc/", 72 | // "system/nfc/src/gki/common/", 73 | // "system/nfc/src/gki/ulinux/", 74 | // ], 75 | 76 | // srcs: ["*.cpp"], 77 | 78 | // shared_libs: [ 79 | // "libdta_nq", 80 | // "libcutils", 81 | // "libosal_nq", 82 | // ], 83 | //} 84 | -------------------------------------------------------------------------------- /nfc-dta/dtaUI/dtaGui/src/comps/android/jni/PhNXPJniHelper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2020 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 | package com.phdtaui.helper; 18 | 19 | import android.util.Log; 20 | import android.os.DeadObjectException; 21 | import com.phdtaui.mainactivity.PhDTAUIMainActivity; 22 | import com.phdtaui.structure.PhDtaLibStructure; 23 | import com.phdtaui.utils.PhUtilities; 24 | 25 | public class PhNXPJniHelper { 26 | 27 | public native int TestJNI(int param); 28 | public native int phDtaLibInitJNI(); 29 | public native int phDtaLibDisableDiscoveryJNI(); 30 | 31 | public native int phDtaLibDeInitJNI(); 32 | 33 | public native int phDtaLibEnableDiscoveryJNI( 34 | PhDtaLibStructure phDtaLibStructure); 35 | 36 | public native int phDtaLibConfigureP2PJNI( 37 | PhDtaLibStructure phDtaLibStructure); 38 | 39 | public native int phDtaLibGetIUTInfoJNI(PhDtaLibStructure phDtaLibStructure); 40 | 41 | /*create singleton*/ 42 | protected PhNXPJniHelper(){ 43 | } 44 | 45 | private static PhNXPJniHelper jniHelperObjRef; 46 | public static PhNXPJniHelper getInstance(){ 47 | if(jniHelperObjRef == null) 48 | jniHelperObjRef = new PhNXPJniHelper(); 49 | return jniHelperObjRef; 50 | } 51 | 52 | static { 53 | try { 54 | if (PhUtilities.NDK_IMPLEMENTATION) { 55 | String PATH = System.getProperty("java.library.path"); 56 | Log.d(PhUtilities.UI_TAG, "The library path = "+PATH); 57 | Log.d(PhUtilities.UI_TAG, "Trying to load "+"dta_jni"); 58 | System.loadLibrary("dta_jni"); 59 | 60 | Log.d(PhUtilities.UI_TAG, "Initializing System Load Library"); 61 | } else { 62 | Log.d(PhUtilities.UI_TAG, "NDK is Disabled"); 63 | } 64 | } catch (UnsatisfiedLinkError ule) { 65 | /** 66 | * UnstaisfiedLinkErrorhandled here 67 | */ 68 | PhUtilities.NDK_IMPLEMENTATION = false; 69 | Log.d(PhUtilities.UI_TAG, 70 | " Could not load native library: " + ule.getMessage()); 71 | } catch (NoClassDefFoundError error) { 72 | /** 73 | * NoClassDefFoundError Path mismatch error 74 | */ 75 | 76 | PhUtilities.NDK_IMPLEMENTATION = false; 77 | Log.d(PhUtilities.UI_TAG, error.getMessage()); 78 | } catch (NoSuchMethodError e) { 79 | /** 80 | * NoSuchMethodError Library not loaded correctly 81 | */ 82 | Log.d(PhUtilities.UI_TAG, e.getMessage()); 83 | } 84 | } 85 | public void enableDiscovery(PhDtaLibStructure phDtaLibStructureObjRef) { 86 | phDtaLibEnableDiscoveryJNI(phDtaLibStructureObjRef); 87 | } 88 | 89 | public PhDtaLibStructure versionLib(PhDtaLibStructure phDtaLibStructureObjRef){ 90 | phDtaLibGetIUTInfoJNI(phDtaLibStructureObjRef); 91 | return phDtaLibStructureObjRef; 92 | } 93 | 94 | public int phDtaLibDeInit(){ 95 | return phDtaLibDeInitJNI(); 96 | } 97 | public int phDtaLibDisableDiscovery(){ 98 | return phDtaLibDisableDiscoveryJNI(); 99 | } 100 | 101 | public int startPhDtaLibInit() { 102 | return phDtaLibInitJNI(); 103 | } 104 | public int startTest() { 105 | return TestJNI(10); 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /nfc-dta/dtaUI/dtaGui/src/comps/android/jni/phDTALibJNI.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2018 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 | * 19 | * 20 | * \file phDtaLibJNI.h 21 | * \brief DTA LIB Interface header file. 22 | * 23 | * Project: NFC DTA LIB 24 | */ 25 | #include 26 | #ifdef __cplusplus 27 | extern "C" 28 | { 29 | #endif 30 | 31 | /** \ingroup grp_dta_lib 32 | Indicates DTA initialization status. */ 33 | #define DTAJNISTATUS_SUCCESS 0x00 34 | #define DTAJNISTATUS_FAILED 0xFF 35 | #define DTAJNISTATUS_ALREADY_INITIALIZED 100 36 | #define DTAJNISTATUS_ALREADY_DEINITIALIZED 200 37 | /*State of DTA Lib */ 38 | #define DTALIB_STATE_INITIALIZED 1 39 | #define DTALIB_STATE_DEINITIALIZED 0 40 | 41 | typedef jint dtaJniHandle; 42 | 43 | /* Configuration for extending symbols for different platform */ 44 | #ifndef DTAJNI_LIB_EXTEND 45 | #define DTAJNI_LIB_EXTEND extern 46 | #endif 47 | 48 | /** 49 | * \ingroup grp_dta_lib 50 | * \brief Initializes the DTA and NFC library 51 | * 52 | * This function initializes DTA library and NFC including underlying layers. 53 | * A session with NFC hardware will be established. 54 | * 55 | * \note Before successful initialization other NFC functionalities are not enabled. 56 | * this function doesn't initialise NFCEE. 57 | * \param[in] None 58 | * \retval #DTASTATUS_SUCCESS DTA LIB Initialised successfully 59 | * \retval #DTASTATUS_FAILED DTA LIB failed to initialise. 60 | * 61 | */ 62 | DTAJNI_LIB_EXTEND JNIEXPORT jint JNICALL Java_com_phdtaui_helper_PhNXPJniHelper_phDtaLibInitJNI(JNIEnv* e, jobject obj); 63 | 64 | /** 65 | * \ingroup grp_dta_lib 66 | * \brief DeInitializes the DTA and NFC library 67 | * 68 | * This function DeInitializes DTA library and NFC including underlying layers. 69 | * A session with NFC hardware will be closed. 70 | * 71 | * \param[in] None 72 | * \retval #DTASTATUS_SUCCESS DTA LIB De-Initialised successfully 73 | * \retval #DTASTATUS_FAILED DTA LIB failed to De-initialise. 74 | * 75 | */ 76 | DTAJNI_LIB_EXTEND JNIEXPORT jint JNICALL Java_com_phdtaui_helper_PhNXPJniHelper_phDtaLibDeInitJNI(JNIEnv* e, jobject obj); 77 | 78 | /** 79 | * \ingroup grp_dta_lib 80 | * \brief Enable discovery(Poll + Listen) 81 | * 82 | * This function configures enables NFCC to run discovery wheel. 83 | * 84 | * \param[in] DiscMask Technology types for poll and listen modes #phDtaLib_DiscMask_t 85 | DiscMask = 0 (Disable Discovery) 86 | * \retval #DTASTATUS_SUCCESS Discovery enabled successfully 87 | * \retval #DTASTATUS_FAILED Failed to enable discovery 88 | * 89 | */ 90 | DTAJNI_LIB_EXTEND JNIEXPORT jint JNICALL Java_com_phdtaui_helper_PhNXPJniHelper_phDtaLibEnableDiscoveryJNI(JNIEnv *env, jobject obj, jobject phDtaLibsDiscParamst); 91 | 92 | /** 93 | * \ingroup grp_dta_lib 94 | * \brief Disable discovery(Poll + Listen) 95 | * 96 | * This function Disables NFCC to run discovery wheel. 97 | * 98 | * \param[in] DiscMask Technology types for poll and listen modes #phDtaLib_DiscMask_t 99 | DiscMask = 0 (Disable Discovery) 100 | * \retval #DTASTATUS_SUCCESS Discovery disabled successfully 101 | * \retval #DTASTATUS_FAILED Failed to disable discovery 102 | * 103 | */ 104 | DTAJNI_LIB_EXTEND JNIEXPORT jint JNICALL Java_com_phdtaui_helper_PhNXPJniHelper_phDtaLibDisableDiscoveryJNI(JNIEnv *env, jobject obj); 105 | 106 | /** 107 | * \ingroup grp_dta_lib 108 | * \brief Get IUT Information. 109 | * 110 | * This function Retrieves Version information of DTA LIB, MW and FW. 111 | * 112 | * \param[in] IUTInfo Pointer to #phDtaLib_IUTInfo_t, Memory shall be allocated by caller. 113 | * \retval #DTASTATUS_SUCCESS IUT information retrieved successfully. 114 | * \retval #DTASTATUS_FAILED Failed to get IUT information 115 | * \retval #DTASTATUS_INVALID_PARAM Invalid parameter to function 116 | */ 117 | DTAJNI_LIB_EXTEND JNIEXPORT jint JNICALL Java_com_phdtaui_helper_PhNXPJniHelper_phDtaLibGetIUTInfoJNI(JNIEnv *env, jobject obj, jobject phDtaLibsIUTInfot); 118 | 119 | /* P2P LLCP and SNEP*/ 120 | #ifdef __cplusplus 121 | }; 122 | #endif 123 | -------------------------------------------------------------------------------- /nfc-dta/dtaUI/dtaGui/src/comps/android/ui/Android.bp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2020 NXP 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 | android_app { 18 | name: "NxpDTA", 19 | 20 | certificate: "platform", 21 | platform_apis: true, 22 | 23 | jni_libs: ["libdta_jni"], 24 | 25 | srcs: [ 26 | ":phDtaJniSrc", 27 | "src/**/*.java", 28 | ], 29 | 30 | libs: ["com.nxp.nfc"], 31 | 32 | static_libs: [ 33 | "android-support-v4", 34 | "android-support-core-utils", 35 | ], 36 | uses_libs: [ 37 | "com.nxp.nfc", 38 | ], 39 | } 40 | 41 | // Platform or chip specific build 42 | //android_app { 43 | // name: "NxpDTA_NQ", 44 | 45 | // certificate: "platform", 46 | // platform_apis: true, 47 | 48 | // jni_libs: ["libdta_jni_nq"], 49 | 50 | // srcs: [ 51 | // ":phDtaJniSrc", 52 | // "src/**/*.java", 53 | // ], 54 | 55 | // libs: ["com.nxp.nfc"], 56 | // static_libs: [ 57 | // "android-support-v4", 58 | // "android-support-core-utils", 59 | // ], 60 | //} 61 | -------------------------------------------------------------------------------- /nfc-dta/dtaUI/dtaGui/src/comps/android/ui/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 15 | 16 | 21 | 22 | 23 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 59 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 75 | 76 | 81 | 82 | 83 | 84 | 85 | 86 | 89 | 90 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /nfc-dta/dtaUI/dtaGui/src/comps/android/ui/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NXPNFCProject/NXPAndroidDTA/8f0c86b3da6273f9c2c29e038421f007813056d4/nfc-dta/dtaUI/dtaGui/src/comps/android/ui/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /nfc-dta/dtaUI/dtaGui/src/comps/android/ui/res/drawable-hdpi/nxp_img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NXPNFCProject/NXPAndroidDTA/8f0c86b3da6273f9c2c29e038421f007813056d4/nfc-dta/dtaUI/dtaGui/src/comps/android/ui/res/drawable-hdpi/nxp_img.png -------------------------------------------------------------------------------- /nfc-dta/dtaUI/dtaGui/src/comps/android/ui/res/drawable-hdpi/ph_border.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 24 | 27 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /nfc-dta/dtaUI/dtaGui/src/comps/android/ui/res/drawable-hdpi/ph_border_circle.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 24 | 27 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /nfc-dta/dtaUI/dtaGui/src/comps/android/ui/res/drawable-hdpi/ph_border_different_color_one.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 24 | 27 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /nfc-dta/dtaUI/dtaGui/src/comps/android/ui/res/drawable-hdpi/ph_border_different_color_orange.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 24 | 27 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /nfc-dta/dtaUI/dtaGui/src/comps/android/ui/res/drawable-hdpi/ph_border_different_color_three.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 24 | 27 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /nfc-dta/dtaUI/dtaGui/src/comps/android/ui/res/drawable-hdpi/ph_border_different_color_two.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 24 | 27 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /nfc-dta/dtaUI/dtaGui/src/comps/android/ui/res/drawable-hdpi/ph_border_different_transparent_color_one.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 24 | 27 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /nfc-dta/dtaUI/dtaGui/src/comps/android/ui/res/drawable-hdpi/ph_border_line.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 23 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /nfc-dta/dtaUI/dtaGui/src/comps/android/ui/res/drawable-hdpi/ph_border_one.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 24 | 27 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /nfc-dta/dtaUI/dtaGui/src/comps/android/ui/res/drawable-hdpi/ph_border_two.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 24 | 27 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /nfc-dta/dtaUI/dtaGui/src/comps/android/ui/res/drawable-hdpi/ph_rectangular_border.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 19 | 20 | 21 | 22 | 23 | 26 | 27 | 28 | 29 | 34 | 35 | 36 | 37 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /nfc-dta/dtaUI/dtaGui/src/comps/android/ui/res/drawable-hdpi/ph_rectangular_green_border.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 19 | 20 | 21 | 22 | 23 | 26 | 27 | 28 | 29 | 34 | 35 | 36 | 37 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /nfc-dta/dtaUI/dtaGui/src/comps/android/ui/res/drawable-hdpi/ph_rounded_corner.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 24 | 25 | 26 | 27 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /nfc-dta/dtaUI/dtaGui/src/comps/android/ui/res/drawable-hdpi/ph_rounded_corner_green.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 24 | 25 | 26 | 27 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /nfc-dta/dtaUI/dtaGui/src/comps/android/ui/res/drawable-hdpi/ph_rounded_corner_grey.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 24 | 25 | 26 | 27 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /nfc-dta/dtaUI/dtaGui/src/comps/android/ui/res/drawable-hdpi/ph_rounded_corner_one.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 24 | 25 | 26 | 27 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /nfc-dta/dtaUI/dtaGui/src/comps/android/ui/res/drawable-hdpi/ph_rounded_corner_red.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 24 | 25 | 26 | 27 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /nfc-dta/dtaUI/dtaGui/src/comps/android/ui/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NXPNFCProject/NXPAndroidDTA/8f0c86b3da6273f9c2c29e038421f007813056d4/nfc-dta/dtaUI/dtaGui/src/comps/android/ui/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /nfc-dta/dtaUI/dtaGui/src/comps/android/ui/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NXPNFCProject/NXPAndroidDTA/8f0c86b3da6273f9c2c29e038421f007813056d4/nfc-dta/dtaUI/dtaGui/src/comps/android/ui/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /nfc-dta/dtaUI/dtaGui/src/comps/android/ui/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NXPNFCProject/NXPAndroidDTA/8f0c86b3da6273f9c2c29e038421f007813056d4/nfc-dta/dtaUI/dtaGui/src/comps/android/ui/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /nfc-dta/dtaUI/dtaGui/src/comps/android/ui/res/layout-land/ph_logcat.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 20 | 21 | 26 | 27 | 33 | 34 | 46 | 47 | 48 | 56 | 57 | 71 | 72 |