|
NXP NFC Reader Library
v4.040.05.011646
|
These Components implement the Platform abstraction layer. More...
|
Data Structures | |
| struct | phPlatform_DataParams_t |
| OSAL parameter structure. More... | |
Macros | |
| #define | PH_PLATFORM_SET_HIGH 1 |
| Logic High. More... | |
| #define | PH_PLATFORM_SET_LOW 0 |
| Logic Low. More... | |
| #define | PH_PLATFORM_MAX_TIMERS 4U |
| Maximum number of timers available. More... | |
Typedefs | |
| typedef void(* | pphPlatform_TickTimerISRCallBck_t) (void) |
| Tick Timer ISR callback which will be called by ISR handler implementation in Platform Layer. More... | |
| typedef void(* | pphPlatform_CallBck_t) (uint8_t bTimerId) |
| Timer callback interface which will be called once registered timer timeout expires. More... | |
| typedef enum phPlatform_Timer_Status | phPlatform_Timer_Status_t |
| Status of the timer. | |
Enumerations | |
| enum | phPlatform_Timer_Status { E_TIMER_FREE = 0, E_TIMER_ACTIVE, E_TIMER_RUNNING, E_TIMER_STOPPED } |
| Status of the timer. More... | |
Functions | |
| phStatus_t | phPlatform_Init (phPlatform_DataParams_t *pDataParams, uint8_t *pTxBuffer, uint16_t wTxBufSize, uint8_t *pRxBuffer, uint16_t wRxBufSize) |
| Initializes the Platform component. More... | |
| phStatus_t | phPlatform_DeInit (phPlatform_DataParams_t *pDataParams) |
| De-initialize the Platform component. More... | |
| void | phPlatform_FE_Reset (void) |
| Performs Front-end reset. More... | |
| void | phPlatform_FE_Powerdown (void) |
| Performs Front-end power-down. More... | |
| void | phPlatform_EnterCriticalSection (void) |
| Enter critical section. More... | |
| void | phPlatform_ExitCriticalSection (void) |
| Exit critical section. More... | |
| uint32_t | phPlatform_Is_Irq_Context (void) |
| Returns whether Controller is in ISR mode or NOT. More... | |
| void | phPlatform_Sleep (void) |
| Enter sleep mode. More... | |
| void | phPlatform_WakeUp (void) |
| Exit sleep mode. More... | |
| phStatus_t | phPlatform_Timer_Init (phPlatform_DataParams_t *pDataParams) |
| Initializes the Timer component. More... | |
| void | phPlatform_Timer_Create (phPlatform_DataParams_t *pDataParams, uint32_t dwUnits, phPlatform_Timer_Struct_t **ppTimerHandle) |
| Allocates a free timer. More... | |
| phStatus_t | phPlatform_Timer_Configure (phPlatform_Timer_Struct_t *pTimerHandle, uint32_t dwTimePeriod, pphPlatform_CallBck_t pCallBackFunc) |
| This API configures the acquired timer with timeout duration and callback to be called upon timer expire. More... | |
| phStatus_t | phPlatform_Timer_Start (phPlatform_Timer_Struct_t *pTimerHandle, uint16_t wOption) |
| Start the timer. More... | |
| phStatus_t | phPlatform_Timer_GetElapsedDelay (phPlatform_Timer_Struct_t *pTimerHandle, uint32_t *dwGetElapsedDelay) |
| Get Elapsed Delay from timer which is created and started before calling this API. More... | |
| phStatus_t | phPlatform_Timer_Stop (phPlatform_Timer_Struct_t *pTimerHandle) |
| Stop the timer. More... | |
| phStatus_t | phPlatform_Timer_Reset (phPlatform_Timer_Struct_t *pTimerHandle) |
| Resets the timer allocated to the application which is created by phPlatform_Timer_Create. More... | |
| phStatus_t | phPlatform_Timer_Delete (phPlatform_Timer_Struct_t *pTimerHandle) |
| Delete or Deallocate the timer. More... | |
| void | phPlatform_Timer_DeInit (phPlatform_DataParams_t *pDataParams) |
| DeInitializes the Timer component. More... | |
| void | phPlatform_Controller_Init (void) |
| Initialize Controller related IPs or clock. More... | |
Platform Ports | |
| #define | PH_PLATFORM_PORT0 0 |
| Platform Host Port Abstraction for Port0. More... | |
| #define | PH_PLATFORM_PORT1 1 |
| Platform Host Port Abstraction for Port1. More... | |
| #define | PH_PLATFORM_PORT2 2 |
| Platform Host Port Abstraction for Port2. More... | |
| #define | PH_PLATFORM_PORT3 3 |
| Platform Host Port Abstraction for Port3. More... | |
| #define | PH_PLATFORM_PORT4 4 |
| Platform Host Port Abstraction for Port4. More... | |
Timer Configuration | |
| #define | PH_PLATFORM_TIMER_SINGLE_SHOT 0x0000U |
| On Timer expire it will be Stopped and Timercallback will be called. More... | |
| #define | PH_PLATFORM_TIMER_FREE_RUN 0x0001U |
| Auto reloads on expire of the Timer and Timercallback will be called. More... | |
Timer Units | |
| #define | PH_PLATFORM_TIMER_UNIT_US 1000000U |
| Indicates that the specified delay is in microseconds. More... | |
| #define | PH_PLATFORM_TIMER_UNIT_MS 1000U |
| Indicates that the specified delay is in milliseconds. More... | |
| #define | PH_PLATFORM_TIMER_UNIT_S 1U |
| Indicates that the specified delay is in seconds. More... | |
These Components implement the Platform abstraction layer.
| #define PH_PLATFORM_PORT0 0 |
Platform Host Port Abstraction for Port0.
| #define PH_PLATFORM_PORT1 1 |
Platform Host Port Abstraction for Port1.
| #define PH_PLATFORM_PORT2 2 |
Platform Host Port Abstraction for Port2.
| #define PH_PLATFORM_PORT3 3 |
Platform Host Port Abstraction for Port3.
| #define PH_PLATFORM_PORT4 4 |
Platform Host Port Abstraction for Port4.
| #define PH_PLATFORM_SET_HIGH 1 |
Logic High.
| #define PH_PLATFORM_SET_LOW 0 |
Logic Low.
| #define PH_PLATFORM_MAX_TIMERS 4U |
Maximum number of timers available.
| #define PH_PLATFORM_TIMER_SINGLE_SHOT 0x0000U |
On Timer expire it will be Stopped and Timercallback will be called.
| #define PH_PLATFORM_TIMER_FREE_RUN 0x0001U |
Auto reloads on expire of the Timer and Timercallback will be called.
| #define PH_PLATFORM_TIMER_UNIT_US 1000000U |
Indicates that the specified delay is in microseconds.
| #define PH_PLATFORM_TIMER_UNIT_MS 1000U |
Indicates that the specified delay is in milliseconds.
| #define PH_PLATFORM_TIMER_UNIT_S 1U |
Indicates that the specified delay is in seconds.
| typedef void(* pphPlatform_TickTimerISRCallBck_t) (void) |
Tick Timer ISR callback which will be called by ISR handler implementation in Platform Layer.
| None |
| typedef void(* pphPlatform_CallBck_t) (uint8_t bTimerId) |
Timer callback interface which will be called once registered timer timeout expires.
| [in] | TimerId | Timer Id for which callback is called. |
| None |
| phStatus_t phPlatform_Init | ( | phPlatform_DataParams_t * | pDataParams, |
| uint8_t * | pTxBuffer, | ||
| uint16_t | wTxBufSize, | ||
| uint8_t * | pRxBuffer, | ||
| uint16_t | wRxBufSize | ||
| ) |
Initializes the Platform component.
a. Performs Front-end initialization required to configure reset pins and interrupt pins of Controller connected to a particular front-end. b. Initialize BAL. c. Initialize OSAL. d. Initialize HAL. e. Initialize Platform Timers.
| [in] | pDataParams | Data parameters representing this component. Application allocates this Data structure and passes the pointer of the same. |
| [in] | pISRCallBack | Application callback that needs to be called by RF ISR Handler. |
| [in] | pTxBuffer | Pointer to application allocated transmit buffer used by the phhalHw functions. |
| [in] | wTxBufSize | Size of the application allocated transmit buffer. |
| [in] | pRxBuffer | Pointer to application allocated receive buffer used by the phhalHw functions. |
| [in] | wRxBufSize | Size of the application allocated receive buffer. Specify the buffer+1 byte, because one byte is reserved for SPI communication. |
| PH_ERR_SUCCESS | Operation successful. |
| phStatus_t phPlatform_DeInit | ( | phPlatform_DataParams_t * | pDataParams | ) |
De-initialize the Platform component.
a. Performs Front-end power down. b. De-initialize HAL.
| [in] | pDataParams | Data parameters representing this component. |
| PH_ERR_SUCCESS | Operation successful. |
| void phPlatform_FE_Reset | ( | void | ) |
Performs Front-end reset.
When this API is called a pulse will be triggered on "NRSTPD" PIN (Not Reset and Power Down) to reset front-end device.
| void phPlatform_FE_Powerdown | ( | void | ) |
Performs Front-end power-down.
When this API is called a "NRSTPD" PIN (Not Reset and Power Down) will be configured to power-down the front-end device.
| void phPlatform_EnterCriticalSection | ( | void | ) |
Enter critical section.
| void phPlatform_ExitCriticalSection | ( | void | ) |
Exit critical section.
| uint32_t phPlatform_Is_Irq_Context | ( | void | ) |
Returns whether Controller is in ISR mode or NOT.
| void phPlatform_Sleep | ( | void | ) |
Enter sleep mode.
| void phPlatform_WakeUp | ( | void | ) |
Exit sleep mode.
| phStatus_t phPlatform_Timer_Init | ( | phPlatform_DataParams_t * | pDataParams | ) |
Initializes the Timer component.
| [in] | pDataParams | Pointer to this layers parameter structure. |
| PH_ERR_SUCCESS | Operation successful. |
| void phPlatform_Timer_Create | ( | phPlatform_DataParams_t * | pDataParams, |
| uint32_t | dwUnits, | ||
| phPlatform_Timer_Struct_t ** | ppTimerHandle | ||
| ) |
Allocates a free timer.
| [in] | pDataParams | Pointer to this layers parameter structure. |
| [in] | dwUnits | Timer tick units. |
| [out] | ppTimerHandle | Timer handle in case of success else NULL. |
| phStatus_t phPlatform_Timer_Configure | ( | phPlatform_Timer_Struct_t * | pTimerHandle, |
| uint32_t | dwTimePeriod, | ||
| pphPlatform_CallBck_t | pCallBackFunc | ||
| ) |
This API configures the acquired timer with timeout duration and callback to be called upon timer expire.
| [in] | pTimerHandle | Timer handle returned by phPlatform_Timer_Create. |
| [in] | dwTimePeriod | Time delay count. |
| [in] | pCallBackFunc | Callback to be called on time out. |
| PH_ERR_SUCCESS | Operation successful. |
| PH_ERR_INVALID_PARAMETER | Invalid input parameter. |
| PH_ERR_PARAMETER_OVERFLOW | If timer cannot be configured to the provide time by parameter dwTimePeriod. |
| phStatus_t phPlatform_Timer_Start | ( | phPlatform_Timer_Struct_t * | pTimerHandle, |
| uint16_t | wOption | ||
| ) |
Start the timer.
| [in] | pTimerHandle | Timer handle returned by phPlatform_Timer_Create. |
| [in] | wOption | Parameter to mention Single shot PH_PLATFORM_TIMER_SINGLE_SHOT or Free running timer PH_PLATFORM_TIMER_FREE_RUN. |
| PH_ERR_SUCCESS | Operation successful. |
| PH_ERR_INVALID_PARAMETER | Invalid input parameter. |
| PH_ERR_RESOURCE_ERROR | Timer could not be started. |
| phStatus_t phPlatform_Timer_GetElapsedDelay | ( | phPlatform_Timer_Struct_t * | pTimerHandle, |
| uint32_t * | dwGetElapsedDelay | ||
| ) |
Get Elapsed Delay from timer which is created and started before calling this API.
| [in] | pTimerHandle | Timer handle returned by phPlatform_Timer_Create. |
| [out] | dwGetElapsedDelay | Measured Delay after Timer Start in sec/milli/micro seconds based on input option. |
| PH_ERR_SUCCESS | Operation successful. |
| PH_ERR_INVALID_PARAMETER | Invalid input parameter. |
| phStatus_t phPlatform_Timer_Stop | ( | phPlatform_Timer_Struct_t * | pTimerHandle | ) |
Stop the timer.
| [in] | pTimerHandle | Timer handle returned by phPlatform_Timer_Create. |
| PH_ERR_SUCCESS | Operation successful. |
| PH_ERR_INVALID_PARAMETER | Invalid input parameter. |
| PH_ERR_RESOURCE_ERROR | Timer could not be stopped. |
| phStatus_t phPlatform_Timer_Reset | ( | phPlatform_Timer_Struct_t * | pTimerHandle | ) |
Resets the timer allocated to the application which is created by phPlatform_Timer_Create.
| [in] | pTimerHandle | Timer handle returned by phPlatform_Timer_Create. |
| PH_ERR_SUCCESS | Operation successful. |
| PH_ERR_INVALID_PARAMETER | Invalid input parameter. |
| PH_ERR_RESOURCE_ERROR | Timer could not be stopped. |
| phStatus_t phPlatform_Timer_Delete | ( | phPlatform_Timer_Struct_t * | pTimerHandle | ) |
Delete or Deallocate the timer.
| [in] | pTimerHandle | Timer handle returned by phPlatform_Timer_Create. |
| PH_ERR_SUCCESS | Operation successful. |
| PH_ERR_INVALID_PARAMETER | Invalid input parameter. |
| PH_ERR_RESOURCE_ERROR | Timer could not be stopped. |
| void phPlatform_Timer_DeInit | ( | phPlatform_DataParams_t * | pDataParams | ) |
DeInitializes the Timer component.
| [in] | pDataParams | Pointer to this layers parameter structure. |
| void phPlatform_Controller_Init | ( | void | ) |
Initialize Controller related IPs or clock.