summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/phDal4Nfc_messageQueueLib.h8
-rw-r--r--src/phLibNfc.h2
-rw-r--r--src/phLibNfc_Internal.h4
-rw-r--r--src/phLibNfc_initiator.c30
-rw-r--r--src/phLibNfc_ndef_raw.c2
5 files changed, 23 insertions, 23 deletions
diff --git a/src/phDal4Nfc_messageQueueLib.h b/src/phDal4Nfc_messageQueueLib.h
index 0bf2ba4..b13823b 100644
--- a/src/phDal4Nfc_messageQueueLib.h
+++ b/src/phDal4Nfc_messageQueueLib.h
@@ -41,10 +41,10 @@ typedef struct phDal4Nfc_Message_Wrapper
phLibNfc_Message_t msg;
} phDal4Nfc_Message_Wrapper_t;
-int phDal4Nfc_msgget(key_t key, int msgflg);
-int phDal4Nfc_msgctl(int msqid, int cmd, void *buf);
-int phDal4Nfc_msgsnd(int msqid, void * msgp, size_t msgsz, int msgflg);
-int phDal4Nfc_msgrcv (int msqid, void * msgp, size_t msgsz, long msgtyp, int msgflg);
+intptr_t phDal4Nfc_msgget(key_t key, int msgflg);
+int phDal4Nfc_msgctl(intptr_t msqid, int cmd, void *buf);
+int phDal4Nfc_msgsnd(intptr_t msqid, void * msgp, size_t msgsz, int msgflg);
+int phDal4Nfc_msgrcv(intptr_t msqid, void * msgp, size_t msgsz, long msgtyp, int msgflg);
#endif
#endif /* PHDAL4NFC_MESSAGEQUEUE_H */
diff --git a/src/phLibNfc.h b/src/phLibNfc.h
index 6111a93..ddce262 100644
--- a/src/phLibNfc.h
+++ b/src/phLibNfc.h
@@ -49,7 +49,7 @@
#define LIBNFC_READONLY_NDEF
#define PHLIBNFC_MAXNO_OF_SE (0x02)
-typedef uint32_t phLibNfc_Handle;
+typedef uintptr_t phLibNfc_Handle;
extern const unsigned char *nxp_nfc_full_version;
diff --git a/src/phLibNfc_Internal.h b/src/phLibNfc_Internal.h
index c136032..368c6c9 100644
--- a/src/phLibNfc_Internal.h
+++ b/src/phLibNfc_Internal.h
@@ -222,11 +222,11 @@ typedef struct phLibNfc_LibContext
/*To re configure the discovery wheel*/
phLibNfc_sADD_Cfg_t sADDconfig;
- uint32_t Connected_handle,
+ uintptr_t Connected_handle,
Discov_handle[MAX_REMOTE_DEVICES];
/* To store the previous connected handle in case of Multiple protocol tags */
- uint32_t Prev_Connected_handle;
+ uintptr_t Prev_Connected_handle;
/*Call back function pointers */
diff --git a/src/phLibNfc_initiator.c b/src/phLibNfc_initiator.c
index 6bd48b8..ab4d766 100644
--- a/src/phLibNfc_initiator.c
+++ b/src/phLibNfc_initiator.c
@@ -155,7 +155,7 @@ void phLibNfc_NotificationRegister_Resp_Cb (
gpphLibContext->psRemoteDevList[DeviceIndx1].psRemoteDevInfo=
info.psDiscoveryInfo->ppRemoteDevInfo[DeviceIndx];
gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev =
- (uint32_t)gpphLibContext->psRemoteDevList[DeviceIndx].psRemoteDevInfo;
+ (phLibNfc_Handle)gpphLibContext->psRemoteDevList[DeviceIndx].psRemoteDevInfo;
gpphLibContext->Discov_handle[DeviceIndx1] =
gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev;
DeviceIndx1++;
@@ -170,7 +170,7 @@ void phLibNfc_NotificationRegister_Resp_Cb (
gpphLibContext->psRemoteDevList[DeviceIndx1].psRemoteDevInfo=
info.psDiscoveryInfo->ppRemoteDevInfo[DeviceIndx];
gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev =
- (uint32_t)gpphLibContext->psRemoteDevList[DeviceIndx].psRemoteDevInfo;
+ (phLibNfc_Handle)gpphLibContext->psRemoteDevList[DeviceIndx].psRemoteDevInfo;
gpphLibContext->Discov_handle[DeviceIndx1]=
gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev;
DeviceIndx1++;
@@ -187,7 +187,7 @@ void phLibNfc_NotificationRegister_Resp_Cb (
gpphLibContext->psRemoteDevList[DeviceIndx1].psRemoteDevInfo=
info.psDiscoveryInfo->ppRemoteDevInfo[DeviceIndx];
gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev =
- (uint32_t)gpphLibContext->psRemoteDevList[DeviceIndx].psRemoteDevInfo;
+ (phLibNfc_Handle)gpphLibContext->psRemoteDevList[DeviceIndx].psRemoteDevInfo;
gpphLibContext->Discov_handle[DeviceIndx1] =
gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev;
DeviceIndx1++;
@@ -203,7 +203,7 @@ void phLibNfc_NotificationRegister_Resp_Cb (
gpphLibContext->psRemoteDevList[DeviceIndx1].psRemoteDevInfo=
info.psDiscoveryInfo->ppRemoteDevInfo[DeviceIndx];
gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev =
- (uint32_t)gpphLibContext->psRemoteDevList[DeviceIndx].psRemoteDevInfo;
+ (phLibNfc_Handle)gpphLibContext->psRemoteDevList[DeviceIndx].psRemoteDevInfo;
gpphLibContext->Discov_handle[DeviceIndx1] =
gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev;
DeviceIndx1++;
@@ -219,7 +219,7 @@ void phLibNfc_NotificationRegister_Resp_Cb (
gpphLibContext->psRemoteDevList[DeviceIndx1].psRemoteDevInfo=
info.psDiscoveryInfo->ppRemoteDevInfo[DeviceIndx];
gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev =
- (uint32_t)gpphLibContext->psRemoteDevList[DeviceIndx].psRemoteDevInfo;
+ (phLibNfc_Handle)gpphLibContext->psRemoteDevList[DeviceIndx].psRemoteDevInfo;
gpphLibContext->Discov_handle[DeviceIndx1] =
gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev;
DeviceIndx1++;
@@ -235,7 +235,7 @@ void phLibNfc_NotificationRegister_Resp_Cb (
gpphLibContext->psRemoteDevList[DeviceIndx1].psRemoteDevInfo=
info.psDiscoveryInfo->ppRemoteDevInfo[DeviceIndx];
gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev =
- (uint32_t)gpphLibContext->psRemoteDevList[DeviceIndx].psRemoteDevInfo;
+ (phLibNfc_Handle)gpphLibContext->psRemoteDevList[DeviceIndx].psRemoteDevInfo;
gpphLibContext->Discov_handle[DeviceIndx1] =
gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev;
DeviceIndx1++;
@@ -251,7 +251,7 @@ void phLibNfc_NotificationRegister_Resp_Cb (
gpphLibContext->psRemoteDevList[DeviceIndx1].psRemoteDevInfo=
info.psDiscoveryInfo->ppRemoteDevInfo[DeviceIndx];
gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev =
- (uint32_t)gpphLibContext->psRemoteDevList[DeviceIndx].psRemoteDevInfo;
+ (phLibNfc_Handle)gpphLibContext->psRemoteDevList[DeviceIndx].psRemoteDevInfo;
gpphLibContext->Discov_handle[DeviceIndx1] =
gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev;
DeviceIndx1++;
@@ -268,7 +268,7 @@ void phLibNfc_NotificationRegister_Resp_Cb (
gpphLibContext->psRemoteDevList[DeviceIndx1].psRemoteDevInfo=
info.psDiscoveryInfo->ppRemoteDevInfo[DeviceIndx];
gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev =
- (uint32_t)gpphLibContext->psRemoteDevList[DeviceIndx].psRemoteDevInfo;
+ (phLibNfc_Handle)gpphLibContext->psRemoteDevList[DeviceIndx].psRemoteDevInfo;
gpphLibContext->Discov_handle[DeviceIndx1] =
gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev;
DeviceIndx1++;
@@ -283,7 +283,7 @@ void phLibNfc_NotificationRegister_Resp_Cb (
gpphLibContext->psRemoteDevList[DeviceIndx1].psRemoteDevInfo=
info.psDiscoveryInfo->ppRemoteDevInfo[DeviceIndx];
gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev =
- (uint32_t)gpphLibContext->psRemoteDevList[DeviceIndx].psRemoteDevInfo;
+ (phLibNfc_Handle)gpphLibContext->psRemoteDevList[DeviceIndx].psRemoteDevInfo;
gpphLibContext->Discov_handle[DeviceIndx1] =
gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev;
DeviceIndx1++;
@@ -299,7 +299,7 @@ void phLibNfc_NotificationRegister_Resp_Cb (
gpphLibContext->psRemoteDevList[DeviceIndx1].psRemoteDevInfo=
info.psDiscoveryInfo->ppRemoteDevInfo[DeviceIndx];
gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev =
- (uint32_t)gpphLibContext->psRemoteDevList[DeviceIndx1].psRemoteDevInfo;
+ (phLibNfc_Handle)gpphLibContext->psRemoteDevList[DeviceIndx1].psRemoteDevInfo;
gpphLibContext->sNfcIp_Context.Rem_Initiator_Handle=
gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev;
DeviceIndx1++;
@@ -756,7 +756,7 @@ STATIC void phLibNfc_RemoteDev_Connect_Cb(
else if(PHNFCSTATUS(status)==NFCSTATUS_SUCCESS)
{
/* Copy the Remote device address as connected handle*/
- gpphLibContext->Connected_handle =(uint32_t) pRmtdev_info;
+ gpphLibContext->Connected_handle = (uintptr_t)pRmtdev_info;
/* Update the state to connected and return status as SUCCESS*/
gpphLibContext->LibNfcState.next_state = eLibNfcHalStateConnect;
Connect_status = NFCSTATUS_SUCCESS;
@@ -774,7 +774,7 @@ STATIC void phLibNfc_RemoteDev_Connect_Cb(
/* Call the upper layer callback*/
gpphLibContext->CBInfo.pClientConnectCb(
gpphLibContext->CBInfo.pClientConCntx,
- (uint32_t)pRmtdev_info,
+ (phLibNfc_Handle)pRmtdev_info,
(phLibNfc_sRemoteDevInformation_t*)pRmtdev_info,
Connect_status);
}
@@ -948,7 +948,7 @@ STATIC void phLibNfc_RemoteDev_Disconnect_cb(
}
/* Call the upper layer Callback */
(*pUpper_NtfCb)(pUpper_Context,
- (uint32_t)reg_handle,
+ (phLibNfc_Handle)reg_handle,
DisCnct_status);
return;
}
@@ -1197,7 +1197,7 @@ void phLibNfc_RemoteDev_Transceive_Cb(void *context,
PHDBG_INFO("LibNfc:Transceive Complete");
/* Notify the Transceive Completion to upper layer */
gpphLibContext->CBInfo.pClientTransceiveCb(pUpper_Context,
- (uint32_t)pRmtdev_info,
+ (phLibNfc_Handle)pRmtdev_info,
trans_resp,
trans_status);
}
@@ -1210,7 +1210,7 @@ void phLibNfc_RemoteDev_Transceive_Cb(void *context,
PHDBG_INFO("LibNfc:Transceive Complete");
/* Notify the Transceive Completion to upper layer */
gpphLibContext->CBInfo.pClientTransceiveCb(pUpper_Context,
- (uint32_t)pRmtdev_info,
+ (phLibNfc_Handle)pRmtdev_info,
trans_resp,
trans_status);
}
diff --git a/src/phLibNfc_ndef_raw.c b/src/phLibNfc_ndef_raw.c
index 31dbbac..4b87d31 100644
--- a/src/phLibNfc_ndef_raw.c
+++ b/src/phLibNfc_ndef_raw.c
@@ -1228,7 +1228,7 @@ void phLibNfc_Reconnect_Mifare_Cb (
NFCSTATUS_FAILED:NFCSTATUS_TARGET_LOST);
/* call the upper transceive callback */
pClientCb(pUpperLayerContext,
- (uint32_t)psRemoteDevInfo,
+ (phLibNfc_Handle)psRemoteDevInfo,
& trans_resp,
status);
}