Renesas PTX1xxR IoT-Reader API Version 7.3.1
Renesas Software Stack for IoT-Reader Applications
Data Structures | Macros | Typedefs | Enumerations | Functions
Collaboration diagram for HCE API:

Data Structures

struct  ptxHCE_EventRecord_t
 HCE Event Record Type. More...
 
struct  ptxHCE_EventQueue_t
 HCE Event Queue. More...
 
struct  ptxHCE
 Main Component Struture. More...
 
struct  ptxHCE_InitParams
 Main Component Struture. More...
 

Macros

#define PTX_HCE_RF_MSG_MAX_SIZE   (512U)
 
#define PTX_HCE_RF_DISCOVERY_STATE_NO_CARD   (0u)
 
#define PTX_HCE_RF_DISCOVER_STATE_LISTEN_A   (1u)
 

Typedefs

typedef enum ptxHCE_EventType ptxHCE_EventType_t
 HCE Event Identifiers.
 
typedef struct ptxHCE ptxHCE_t
 Main Component Struture.
 
typedef struct ptxHCE_InitParams ptxHCE_InitParams_t
 Main Component Struture.
 

Enumerations

enum  ptxHCE_RfProtocol_t { HceRfProt_Undefined = 0x00 , HceRfProt_T2T = 0x02 , HceRfProt_IsoDep = 0x04 }
 HCE RF-Protocol Type(s) More...
 
enum  ptxHCE_EventType {
  HCEEvent_ExtFieldOn , HCEEvent_ExtFieldOff , HCEEvent_Activated_ListenA , HCEEvent_Data ,
  HCEEvent_Deactivated , HCEEvent_NoEvent
}
 HCE Event Identifiers.
 

Functions

ptxStatus_t ptxHCE_Init (ptxHCE_t *hceCtx, ptxHCE_InitParams_t *initParams)
 Component Initialization.
 
ptxStatus_t ptxHCE_Deinit (ptxHCE_t *hceCtx)
 Component De-Initialization.
 
ptxStatus_t ptxHCE_GetEvent (ptxHCE_t *hceCtx, ptxHCE_EventRecord_t **event)
 This function allows the user to request latest event notification data received from the PTX card emulation device.
 
ptxStatus_t ptxHCE_ReserveEventRecord (ptxHCE_t *hce, ptxHCE_EventRecord_t **evtRecord, uint16_t *evtRecordIndex)
 Reserves an Event Record at the Tail of the Event Queue.
 
ptxStatus_t ptxHCE_AddNewEventPending (ptxHCE_t *hce, uint16_t recordIndex)
 Adds a new pending Event Record at the Tail of the Event Queue.
 
uint16_t ptxHCE_SendData (void *stackComp, ptxHCE_t *hce, uint8_t *tx, uint32_t txLength)
 Send Tx Data.
 

NSC DEACTIVATE-Reasons.

#define PTX_HCE_DEACTIVATE_REASON_DESELECT   (uint8_t)0x01
 
#define PTX_HCE_DEACTIVATE_REASON_RELEASE   (uint8_t)0x02
 
#define PTX_HCE_DEACTIVATE_REASON_FIELD_OFF   (uint8_t)0x03
 

HCE Event Queue Management (Dimensions)

#define PTX_HCE_MAX_NR_EVENT_RECORDS   (32u)
 
#define PTX_HCE_SIZE_SHORT_MSG_BUFFER   (3u)
 
#define PTX_HCE_SIZE_ACTIVATION_BUFFER   (16u)
 

HCE Event Queue Management (Ranges)

#define PTX_HCE_EVENT_RECORD_INDEX_MIN   (0u)
 
#define PTX_HCE_EVENT_RECORD_INDEX_MAX   PTX_HCE_MAX_NR_EVENT_RECORDS - (1u)
 
#define PTX_HCE_EVENT_RECORD_NOT_SET   (0u)
 

Detailed Description

Macro Definition Documentation

◆ PTX_HCE_DEACTIVATE_REASON_DESELECT

#define PTX_HCE_DEACTIVATE_REASON_DESELECT   (uint8_t)0x01

HCE Deactivation reason Deselect

◆ PTX_HCE_DEACTIVATE_REASON_FIELD_OFF

#define PTX_HCE_DEACTIVATE_REASON_FIELD_OFF   (uint8_t)0x03

HCE Deactivation reason Field off

◆ PTX_HCE_DEACTIVATE_REASON_RELEASE

#define PTX_HCE_DEACTIVATE_REASON_RELEASE   (uint8_t)0x02

HCE Deactivation reason Release

◆ PTX_HCE_EVENT_RECORD_INDEX_MAX

#define PTX_HCE_EVENT_RECORD_INDEX_MAX   PTX_HCE_MAX_NR_EVENT_RECORDS - (1u)

Maximum HCE event record index

◆ PTX_HCE_EVENT_RECORD_INDEX_MIN

#define PTX_HCE_EVENT_RECORD_INDEX_MIN   (0u)

Minimum HCE event record index

◆ PTX_HCE_EVENT_RECORD_NOT_SET

#define PTX_HCE_EVENT_RECORD_NOT_SET   (0u)

HCE event record not set

◆ PTX_HCE_MAX_NR_EVENT_RECORDS

#define PTX_HCE_MAX_NR_EVENT_RECORDS   (32u)

Maximum number of event records

◆ PTX_HCE_RF_DISCOVER_STATE_LISTEN_A

#define PTX_HCE_RF_DISCOVER_STATE_LISTEN_A   (1u)

HCE Rf discover state Listen A

◆ PTX_HCE_RF_DISCOVERY_STATE_NO_CARD

#define PTX_HCE_RF_DISCOVERY_STATE_NO_CARD   (0u)

HCE Rf discovery state no card

◆ PTX_HCE_RF_MSG_MAX_SIZE

#define PTX_HCE_RF_MSG_MAX_SIZE   (512U)

INCLUDES

DEFINES

HCE Rf message size

◆ PTX_HCE_SIZE_ACTIVATION_BUFFER

#define PTX_HCE_SIZE_ACTIVATION_BUFFER   (16u)

pay-load of medium size data message buffers.

◆ PTX_HCE_SIZE_SHORT_MSG_BUFFER

#define PTX_HCE_SIZE_SHORT_MSG_BUFFER   (3u)

pay-load of medium size data message buffers.

Enumeration Type Documentation

◆ ptxHCE_RfProtocol_t

HCE RF-Protocol Type(s)

TYPES

Function Documentation

◆ ptxHCE_AddNewEventPending()

ptxStatus_t ptxHCE_AddNewEventPending ( ptxHCE_t * hce,
uint16_t recordIndex )

Adds a new pending Event Record at the Tail of the Event Queue.

Parameters
[in]hcePointer to componenet
[out]recordIndexPointer to the Index of the added Event
Returns
Status, indicating whether the operation was successful. See ptxStatus_t.

◆ ptxHCE_Deinit()

ptxStatus_t ptxHCE_Deinit ( ptxHCE_t * hceCtx)

Component De-Initialization.

Parameters
[in]hceCtxPointer to component.
Returns
Status, indicating whether the operation was successful. See ptxStatus_t.

◆ ptxHCE_GetEvent()

ptxStatus_t ptxHCE_GetEvent ( ptxHCE_t * hceCtx,
ptxHCE_EventRecord_t ** event )

This function allows the user to request latest event notification data received from the PTX card emulation device.

Events relevant to the HCE application are;

  • a remote RF field has been detected or lost,
  • a remote RF device has been detected (discovered),
  • a remote RF device previously detected has now been activated,
  • a remote RF device previously activated has now been deactivated,
  • an error has occurred in the PTX subsystem,
  • debug information regarding the NSC stack is available.
  • an RF data message has been received.
Parameters
[in]hceCtxPointer to an allocated instance of the HCE stack controller record. 'ptxNsc_EventRecord_t *nscEventRep' is embedded in this structure for the user to read.
[in,out]eventReference to an event record supplied by the AP into which event details can be entered.
Returns
Status, indicating whether the operation was successful. See ptxStatus_t.

◆ ptxHCE_Init()

ptxStatus_t ptxHCE_Init ( ptxHCE_t * hceCtx,
ptxHCE_InitParams_t * initParams )

Component Initialization.

API FUNCTIONS

Parameters
[in]hceCtxPointer to allocated HCE component.
[in]initParamsPointer to initialization parameters.
Returns
Status, indicating whether the operation was successful. See ptxStatus_t.

◆ ptxHCE_ReserveEventRecord()

ptxStatus_t ptxHCE_ReserveEventRecord ( ptxHCE_t * hce,
ptxHCE_EventRecord_t ** evtRecord,
uint16_t * evtRecordIndex )

Reserves an Event Record at the Tail of the Event Queue.

Parameters
[in]hcePointer to componenet
[in]evtRecordReference to the Event Record to be reserved at the end of the Event Queue
[out]evtRecordIndexIndex of the reserved event
Returns
Status, indicating whether the operation was successful. See ptxStatus_t.

◆ ptxHCE_SendData()

uint16_t ptxHCE_SendData ( void * stackComp,
ptxHCE_t * hce,
uint8_t * tx,
uint32_t txLength )

Send Tx Data.

Parameters
[in]stackCompPointer to an initialized instance of the main component in the stack.
[in]hcePointer to an initialized instance of the hce component in the stack.
[in]txBuffer containing the data to transmit.
[in]txLengthLength of "tx".
Returns
Status, indicating whether the operation was successful.