EVE 1.0
Operating System Abstraction Layer

These Components implement the Osal commands. More...

Collaboration diagram for Operating System Abstraction Layer:

Macros

#define PH_PLATFORM_TIMER_UNIT_US   0x00U
 
#define PH_PLATFORM_TIMER_UNIT_MS   0x01U
 
#define PH_PLATFORM_INVALID_TIMER_ID   0xFFFFFFFF
 

Functions

phStatus_t phPlatform_Timer_Init (phPlatform_DataParams_t *pDataParams)
 Initialize platform timers. More...
 
phStatus_t phPlatform_Timer_Create (phPlatform_DataParams_t *pDataParams, uint32_t *timerId)
 Allocates a free timer. Note: More...
 
phStatus_t phPlatform_Timer_Start (phPlatform_DataParams_t *pDataParams, uint32_t dwTimerId, uint32_t dwRegTimeCnt, uint16_t wOption, ppCallBck_t pApplication_callback, void *pContext)
 Start the timer. Note: Valid Timer ID should be provided. Timer ID is provided by calling phPlatform_Timer_Create function. More...
 
phStatus_t phPlatform_Timer_GetElapsedDelay (phPlatform_DataParams_t *pDataParams, uint32_t dwTimerId, uint16_t wOption, uint32_t *dwGetElapsedDelay)
 Get Elapsed Delay from timer which is created and started before calling this API. More...
 
phStatus_t phPlatform_Timer_Stop (phPlatform_DataParams_t *pDataParams, uint32_t dwTimerId)
 Stop the timer. More...
 
phStatus_t phPlatform_Timer_Wait (phPlatform_DataParams_t *pDataParams, uint8_t bTimerDelayUnit, uint16_t wDelay)
 Timer wait function. More...
 
phStatus_t phPlatform_Timer_Reset (phPlatform_DataParams_t *pDataParams, uint32_t dwtimerId)
 Resets the timer allocated to the application which is created by phPlatform_Timer_Create. More...
 
phStatus_t phPlatform_Timer_Delete (phPlatform_DataParams_t *pDataParams, uint32_t dwTimerId)
 Delete or Deallocate the timer. More...
 
phStatus_t phPlatform_Timer_ExecCallback (phPlatform_DataParams_t *pDataParams, uint32_t dwTimerId)
 Execute the Callback registered to the timer. More...
 

Platform error codes

#define PH_PLATFORM_ERR_NO_FREE_TIMER   (PH_ERR_CUSTOM_BEGIN + 0)
 
#define PH_PLATFORM_ERR_INVALID_TIMER   (PH_ERR_CUSTOM_BEGIN + 1)
 

Detailed Description

These Components implement the Osal commands.

Macro Definition Documentation

#define PH_PLATFORM_TIMER_UNIT_US   0x00U

Indicates that the specified delay is in microseconds.

Definition at line 93 of file nfc-nxp-hal.h.

#define PH_PLATFORM_TIMER_UNIT_MS   0x01U

Indicates that the specified delay is in milliseconds.

Definition at line 94 of file nfc-nxp-hal.h.

#define PH_PLATFORM_INVALID_TIMER_ID   0xFFFFFFFF

Invalid Timer Id.

Definition at line 95 of file nfc-nxp-hal.h.

#define PH_PLATFORM_ERR_NO_FREE_TIMER   (PH_ERR_CUSTOM_BEGIN + 0)

Error condition indicating that no timer is available for allocation.

Definition at line 102 of file nfc-nxp-hal.h.

#define PH_PLATFORM_ERR_INVALID_TIMER   (PH_ERR_CUSTOM_BEGIN + 1)

Indicates that the timer ID that was supplied was invalid.

Definition at line 103 of file nfc-nxp-hal.h.

Function Documentation

phStatus_t phPlatform_Timer_Init ( phPlatform_DataParams_t pDataParams)

Initialize platform timers.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful. USED BY APP ONLY[In] Pointer to this layers parameter structure.
phStatus_t phPlatform_Timer_Create ( phPlatform_DataParams_t pDataParams,
uint32_t *  timerId 
)

Allocates a free timer. Note:

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_PLATFORM_ERR_NO_FREE_TIMERNo Free Timer available to create.
Parameters
[in]pDataParamsPointer to this layers parameter structure.
[out]timerIdTimer Id
phStatus_t phPlatform_Timer_Start ( phPlatform_DataParams_t pDataParams,
uint32_t  dwTimerId,
uint32_t  dwRegTimeCnt,
uint16_t  wOption,
ppCallBck_t  pApplication_callback,
void *  pContext 
)

Start the timer. Note: Valid Timer ID should be provided. Timer ID is provided by calling phPlatform_Timer_Create function.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_PARAMETERInvalid input parameter.
PH_PLATFORM_ERR_INVALID_TIMERProvided Timer ID is not created.
Parameters
[in]pDataParamsPointer to this layers parameter structure.
[in]dwTimerIdTimer Id
[in]dwRegTimeCntTime delay count
[in]wOptionOption parameter to mention delay in Units (either PH_PLATFORM_TIMER_UNIT_US or PH_PLATFORM_TIMER_UNIT_MS).
[in]pApplication_callbackCallback to be called on time out
[in]pContextCallback function context
phStatus_t phPlatform_Timer_GetElapsedDelay ( phPlatform_DataParams_t pDataParams,
uint32_t  dwTimerId,
uint16_t  wOption,
uint32_t *  dwGetElapsedDelay 
)

Get Elapsed Delay from timer which is created and started before calling this API.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_PARAMETERInvalid input parameter.
PH_PLATFORM_ERR_INVALID_TIMERProvided Timer ID is not created. NOT USED
Parameters
[in]pDataParamsPointer to this layers parameter structure.
[in]dwTimerIdTimer Id
[in]wOptionOption parameter to mention delay in Units (either PH_PLATFORM_TIMER_UNIT_US or PH_PLATFORM_TIMER_UNIT_MS).
[out]dwGetElapsedDelayMeasured Delay after Timer Start in milli/micro seconds based on input option.
phStatus_t phPlatform_Timer_Stop ( phPlatform_DataParams_t pDataParams,
uint32_t  dwTimerId 
)

Stop the timer.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParamsPointer to this layers parameter structure.
[in]dwTimerIdTimer Id
phStatus_t phPlatform_Timer_Wait ( phPlatform_DataParams_t pDataParams,
uint8_t  bTimerDelayUnit,
uint16_t  wDelay 
)

Timer wait function.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_PLATFORM_ERR_NO_FREE_TIMERNo Free Timer available to create. NOT USED
Parameters
[in]pDataParamsPointer to this layers parameter structure.
[in]bTimerDelayUnitDelay value unit could be in microseconds or milliseconds
[in]wDelayTime Delay
phStatus_t phPlatform_Timer_Reset ( phPlatform_DataParams_t pDataParams,
uint32_t  dwtimerId 
)

Resets the timer allocated to the application which is created by phPlatform_Timer_Create.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_PLATFORM_ERR_INVALID_TIMERProvided Timer ID is not created.
Parameters
[in]pDataParamsPointer to this layers parameter structure.
[in]dwtimerIdTimer Id
phStatus_t phPlatform_Timer_Delete ( phPlatform_DataParams_t pDataParams,
uint32_t  dwTimerId 
)

Delete or Deallocate the timer.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_PLATFORM_ERR_INVALID_TIMERProvided Timer ID is not created.
Parameters
[in]pDataParamsPointer to this layers parameter structure.
[in]dwTimerIdTimer Id
phStatus_t phPlatform_Timer_ExecCallback ( phPlatform_DataParams_t pDataParams,
uint32_t  dwTimerId 
)

Execute the Callback registered to the timer.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component. NOT USED
Parameters
[in]pDataParamsPointer to this layers parameter structure.
[in]dwTimerIdTimer Id