NxpBuild: Added skeleton for custom build.

This commit is contained in:
imi415 2022-03-05 22:09:20 +08:00
parent ca5a6719a9
commit 035bf84d42
Signed by: imi415
GPG Key ID: 17F01E106F9F5E0A
6 changed files with 72 additions and 0 deletions

View File

@ -0,0 +1,6 @@
#ifndef PHOSAL_CUSTOM_H
#define PHOSAL_CUSTOM_H
#endif

View File

@ -0,0 +1,55 @@
#include <ph_Status.h>
#ifdef NXPBUILD__PH_CUSTOM
#include <phPlatform.h>
#include <phPlatform_Port_Host.h>
#include <phhalHw_Rc523_Reg.h>
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;
}

View File

@ -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 */

View File

@ -482,6 +482,8 @@ extern phStatus_t phPlatform_StopTickTimer(void);
# include <phPlatform_Port_Cortex.h>
#elif defined (NXPBUILD__PH_RASPBERRY_PI)
# include <phPlatform_Port_Pi.h>
#elif defined (NXPBUILD__PH_CUSTOM)
# include <phPlatform_Port_Custom.h>
#else
# error "Enable any Platform."
#endif

View File

@ -0,0 +1,6 @@
#ifndef PHPLATFORM_PORT_CUSTOM_H
#define PHPLATFORM_PORT_CUSTOM_H
#endif