From 035bf84d4294bcff0d1e7d99943bf689a874dd33 Mon Sep 17 00:00:00 2001 From: imi415 Date: Sat, 5 Mar 2022 22:09:20 +0800 Subject: [PATCH] NxpBuild: Added skeleton for custom build. --- .../comps/phOsal/src/Custom/phOsal_Custom.c | 0 .../comps/phOsal/src/Custom/phOsal_Custom.h | 6 ++ .../src/Port/Custom/phPlatform_Port_Custom.c | 55 +++++++++++++++++++ NxpNfcRdLib/intfs/phOsal.h | 3 + NxpNfcRdLib/intfs/phPlatform.h | 2 + NxpNfcRdLib/intfs/phPlatform_Port_Custom.h | 6 ++ 6 files changed, 72 insertions(+) create mode 100644 NxpNfcRdLib/comps/phOsal/src/Custom/phOsal_Custom.c create mode 100644 NxpNfcRdLib/comps/phOsal/src/Custom/phOsal_Custom.h create mode 100644 NxpNfcRdLib/comps/phPlatform/src/Port/Custom/phPlatform_Port_Custom.c create mode 100644 NxpNfcRdLib/intfs/phPlatform_Port_Custom.h diff --git a/NxpNfcRdLib/comps/phOsal/src/Custom/phOsal_Custom.c b/NxpNfcRdLib/comps/phOsal/src/Custom/phOsal_Custom.c new file mode 100644 index 0000000..e69de29 diff --git a/NxpNfcRdLib/comps/phOsal/src/Custom/phOsal_Custom.h b/NxpNfcRdLib/comps/phOsal/src/Custom/phOsal_Custom.h new file mode 100644 index 0000000..31f1822 --- /dev/null +++ b/NxpNfcRdLib/comps/phOsal/src/Custom/phOsal_Custom.h @@ -0,0 +1,6 @@ +#ifndef PHOSAL_CUSTOM_H +#define PHOSAL_CUSTOM_H + + + +#endif \ No newline at end of file diff --git a/NxpNfcRdLib/comps/phPlatform/src/Port/Custom/phPlatform_Port_Custom.c b/NxpNfcRdLib/comps/phPlatform/src/Port/Custom/phPlatform_Port_Custom.c new file mode 100644 index 0000000..75b6f87 --- /dev/null +++ b/NxpNfcRdLib/comps/phPlatform/src/Port/Custom/phPlatform_Port_Custom.c @@ -0,0 +1,55 @@ +#include + +#ifdef NXPBUILD__PH_CUSTOM + +#include +#include +#include + +void phPlatform_Controller_Init(void) { + // + return; +} + +void phPlatform_Config_FE_Device(phPlatform_DataParams_t *pHal) { + // +#ifdef NXPBUILD__PHHAL_HW_RC523 +#endif +} + +/* GPIO Related */ + +phStatus_t phPlatform_Port_Host_SetPinConfig(phPlatform_Port_Host_config_t bConfig) { + phStatus_t wStatus; + + return wStatus; +} + +void phPlatform_Port_Host_SetPinValue(phPlatform_Port_Host_config_t bConfig, uint8_t bVal) { + // +} + +bool phPlatform_Port_Host_GetPinValue(phPlatform_Port_Host_config_t bConfig) { + // + + return false; +} + +void phPlatform_Port_Host_ClearInt(void) { + // +} + +/* HW Timer related */ + +phStatus_t phPlatform_Port_Host_HwTimer_Init(void) { + // + return PH_ERR_SUCCESS; +} + +phStatus_t phPlatform_Port_Host_HwTimer_Create(uint32_t dwUnits, uint8_t bTimerId, void** ppTimerHandle) { +} + +phStatus_t phPlatform_Port_Host_HwTimer_Configure(void *pTimerHandle, uint32_t dwUnits, uint32_t dwTimePeriod) { + return PH_ERR_SUCCESS; +} + diff --git a/NxpNfcRdLib/intfs/phOsal.h b/NxpNfcRdLib/intfs/phOsal.h index b50b624..ae58602 100644 --- a/NxpNfcRdLib/intfs/phOsal.h +++ b/NxpNfcRdLib/intfs/phOsal.h @@ -795,6 +795,9 @@ extern void phOsal_StartScheduler(void); #include "../comps/phOsal/src/NullOs/phOsal_NullOs.h" #endif /* NXPBUILD__PH_OSAL_NULLOS */ +#ifdef NXPBUILD__PH_OSAL_CUSTOM +#include "phOsal_Custom.h" +#endif /** @} */ #endif /* NXPBUILD__PH_OSAL */ diff --git a/NxpNfcRdLib/intfs/phPlatform.h b/NxpNfcRdLib/intfs/phPlatform.h index 3268afa..ace0ef2 100644 --- a/NxpNfcRdLib/intfs/phPlatform.h +++ b/NxpNfcRdLib/intfs/phPlatform.h @@ -482,6 +482,8 @@ extern phStatus_t phPlatform_StopTickTimer(void); # include #elif defined (NXPBUILD__PH_RASPBERRY_PI) # include +#elif defined (NXPBUILD__PH_CUSTOM) +# include #else # error "Enable any Platform." #endif diff --git a/NxpNfcRdLib/intfs/phPlatform_Port_Custom.h b/NxpNfcRdLib/intfs/phPlatform_Port_Custom.h new file mode 100644 index 0000000..c53b49c --- /dev/null +++ b/NxpNfcRdLib/intfs/phPlatform_Port_Custom.h @@ -0,0 +1,6 @@ +#ifndef PHPLATFORM_PORT_CUSTOM_H +#define PHPLATFORM_PORT_CUSTOM_H + + + +#endif \ No newline at end of file