These Components implement the Osal commands.
More...
|
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...
|
|
These Components implement the Osal commands.
#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 |
#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.
Initialize platform timers.
- Returns
- Status code
- Return values
-
PH_ERR_SUCCESS | Operation successful. USED BY APP ONLY[In] Pointer to this layers parameter structure. |
Allocates a free timer. Note:
- Returns
- Status code
- Return values
-
PH_ERR_SUCCESS | Operation successful. |
PH_PLATFORM_ERR_NO_FREE_TIMER | No Free Timer available to create. |
- Parameters
-
[in] | pDataParams | Pointer to this layers parameter structure. |
[out] | timerId | Timer 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_SUCCESS | Operation successful. |
PH_ERR_INVALID_PARAMETER | Invalid input parameter. |
PH_PLATFORM_ERR_INVALID_TIMER | Provided Timer ID is not created. |
- Parameters
-
[in] | pDataParams | Pointer to this layers parameter structure. |
[in] | dwTimerId | Timer Id |
[in] | dwRegTimeCnt | Time delay count |
[in] | wOption | Option parameter to mention delay in Units (either PH_PLATFORM_TIMER_UNIT_US or PH_PLATFORM_TIMER_UNIT_MS). |
[in] | pApplication_callback | Callback to be called on time out |
[in] | pContext | Callback 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_SUCCESS | Operation successful. |
PH_ERR_INVALID_PARAMETER | Invalid input parameter. |
PH_PLATFORM_ERR_INVALID_TIMER | Provided Timer ID is not created. NOT USED |
- Parameters
-
[in] | pDataParams | Pointer to this layers parameter structure. |
[in] | dwTimerId | Timer Id |
[in] | wOption | Option parameter to mention delay in Units (either PH_PLATFORM_TIMER_UNIT_US or PH_PLATFORM_TIMER_UNIT_MS). |
[out] | dwGetElapsedDelay | Measured Delay after Timer Start in milli/micro seconds based on input option. |
Stop the timer.
- Returns
- Status code
- Return values
-
PH_ERR_SUCCESS | Operation successful. |
Other | Depending on implementation and underlying component. |
- Parameters
-
[in] | pDataParams | Pointer to this layers parameter structure. |
[in] | dwTimerId | Timer 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_SUCCESS | Operation successful. |
PH_PLATFORM_ERR_NO_FREE_TIMER | No Free Timer available to create. NOT USED |
- Parameters
-
[in] | pDataParams | Pointer to this layers parameter structure. |
[in] | bTimerDelayUnit | Delay value unit could be in microseconds or milliseconds |
[in] | wDelay | Time Delay |
Resets the timer allocated to the application which is created by phPlatform_Timer_Create.
- Returns
- Status code
- Return values
-
PH_ERR_SUCCESS | Operation successful. |
PH_PLATFORM_ERR_INVALID_TIMER | Provided Timer ID is not created. |
- Parameters
-
[in] | pDataParams | Pointer to this layers parameter structure. |
[in] | dwtimerId | Timer Id |
Delete or Deallocate the timer.
- Returns
- Status code
- Return values
-
PH_ERR_SUCCESS | Operation successful. |
PH_PLATFORM_ERR_INVALID_TIMER | Provided Timer ID is not created. |
- Parameters
-
[in] | pDataParams | Pointer to this layers parameter structure. |
[in] | dwTimerId | Timer Id |
Execute the Callback registered to the timer.
- Returns
- Status code
- Return values
-
PH_ERR_SUCCESS | Operation successful. |
Other | Depending on implementation and underlying component. NOT USED |
- Parameters
-
[in] | pDataParams | Pointer to this layers parameter structure. |
[in] | dwTimerId | Timer Id |