Renesas PTX1xxR IoT-Reader API (non-OS) Version 7.3.1
Renesas Software Stack for IoT-Reader Applications (non-OS)
ptxTDC.h
Go to the documentation of this file.
1
50#ifndef APIS_PTX_TDC_H_
51#define APIS_PTX_TDC_H_
52
53/*
54 * ####################################################################################################################
55 * INCLUDES
56 * ####################################################################################################################
57 */
58
59#include <stdint.h>
60#include "ptxStatus.h"
61
62#ifdef __cplusplus
63extern "C" {
64#endif
65
66/*
67 * ####################################################################################################################
68 * DEFINES / TYPES
69 * ####################################################################################################################
70 */
71
75#define PTX_TDC_BUFFER_LEN_MASK (0x3F)
76#define PTX_TDC_MAX_BUFFER_LEN (0x3F)
77#define PTX_TDC_DEFAULT_TIMEOUT (20u)
78#define PTX_TDC_CMD_NFC_FORUM_T2T_WRITE (0xA2)
79#define PTX_TDC_CMD_NFC_FORUM_T2T_READ (0x30)
80#define PTX_TDC_LEN_NFC_FORUM_T2T_READ (16u)
81#define PTX_TDC_CMD_PROP_WRITE (0xAF)
82#define PTX_TDC_CMD_PROP_READ (0x3F)
83#define PTX_TDC_LEN_PROP_WRITE (64u)
84#define PTX_TDC_LEN_PROP_READ (64u)
85#define PTX_TDC_PROP_BLOCK_SIZE (4u)
86#define PTX_TDC_BLOCK_NUM_POL_BUFF (48u)
87#define PTX_TDC_BLOCK_NUM_LIS_BUFF (64u)
88#define PTX_TDC_CMD_NSC_DATA_MSG (0x80)
90/*
91 * ####################################################################################################################
92 * TYPES
93 * ####################################################################################################################
94 */
95
99typedef struct ptxTDC_InitParams
100{
101#ifdef PTX_PRODUCT_TYPE_IOT_READER
102 struct ptxIoTRd *IoTRdComp;
103#else
104 struct ptxPOS *POSComp;
105#endif
107
111typedef struct ptxTDC
112{
113 /* Components */
116#ifdef PTX_PRODUCT_TYPE_IOT_READER
117 struct ptxIoTRd *IoTRdComp;
118#else
119 struct ptxPOS *POSComp;
120#endif
121
123
124/*
125 * ####################################################################################################################
126 * API FUNCTIONS
127 * ####################################################################################################################
128 */
129
139
148
160ptxStatus_t ptxTDC_Write(ptxTDC_t *tdcComp, uint8_t *txData, uint8_t txLen, uint32_t ackTimeoutMs);
161
173ptxStatus_t ptxTDC_Read(ptxTDC_t *tdcComp, uint8_t *rxData, uint8_t *rxDataLen, uint32_t rxTimeoutMs);
174
183ptxStatus_t ptxTDC_IsReceived(ptxTDC_t *tdcComp, uint8_t *received);
184
195ptxStatus_t ptxTDC_ReadT2T(ptxTDC_t *tdcComp, uint8_t block, uint8_t *rxData, uint32_t *rxDataLen);
196
207ptxStatus_t ptxTDC_WriteT2T(ptxTDC_t *tdcComp, uint8_t block, uint8_t *txData, uint32_t txLen);
208
219ptxStatus_t ptxTDC_ReadProprietary(ptxTDC_t *tdcComp, uint8_t block, uint8_t *rxData, uint32_t *rxDataLen);
220
231ptxStatus_t ptxTDC_WriteProprietary(ptxTDC_t *tdcComp, uint8_t block, uint8_t *txData, uint32_t txLen);
232
233#ifdef __cplusplus
234}
235#endif
236
239#endif /* Guard */
240
ptxStatus_t ptxTDC_Deinit(ptxTDC_t *tdcComp)
Deinitializes the TDC Component.
ptxStatus_t ptxTDC_Init(ptxTDC_t *tdcComp, ptxTDC_InitParams_t *initParams)
Initializes the TDC Component.
ptxStatus_t ptxTDC_ReadT2T(ptxTDC_t *tdcComp, uint8_t block, uint8_t *rxData, uint32_t *rxDataLen)
Issues a T2T read command over the RF interface.
struct ptxTDC_InitParams ptxTDC_InitParams_t
Transparent-Mode Initialization Parameters.
ptxStatus_t ptxTDC_Read(ptxTDC_t *tdcComp, uint8_t *rxData, uint8_t *rxDataLen, uint32_t rxTimeoutMs)
Reads messages from the listener's buffer. Customer can choose between NFC Forum compliant read acces...
ptxStatus_t ptxTDC_WriteProprietary(ptxTDC_t *tdcComp, uint8_t block, uint8_t *txData, uint32_t txLen)
Issues a proprietary write command over the RF interface.
ptxStatus_t ptxTDC_IsReceived(ptxTDC_t *tdcComp, uint8_t *received)
Checks if the Listener's host MCU has read the previously sent message.
struct ptxTDC ptxTDC_t
Transparent-Mode Component.
ptxStatus_t ptxTDC_ReadProprietary(ptxTDC_t *tdcComp, uint8_t block, uint8_t *rxData, uint32_t *rxDataLen)
Issues a proprietary read command over the RF interface.
ptxStatus_t ptxTDC_WriteT2T(ptxTDC_t *tdcComp, uint8_t block, uint8_t *txData, uint32_t txLen)
Issues a T2T write command over the RF interface.
ptxStatus_t ptxTDC_Write(ptxTDC_t *tdcComp, uint8_t *txData, uint8_t txLen, uint32_t ackTimeoutMs)
Writes messages to the listener's buffer. Customer can choose between NFC Forum compliant write acces...
uint16_t ptxStatus_t
Status Type.
Definition ptxStatus.h:70
enum ptxStatus_Comps ptxStatus_Comps_t
Component Definitions.
IOT Reader Main Structure (Context).
Definition ptx_IOT_READER.h:757
Transparent-Mode Initialization Parameters.
Definition ptxTDC.h:100
struct ptxPOS * POSComp
Definition ptxTDC.h:104
Transparent-Mode Component.
Definition ptxTDC.h:112
ptxStatus_Comps_t CompId
Definition ptxTDC.h:114
struct ptxPOS * POSComp
Definition ptxTDC.h:119