Renesas PTX1xxR IoT-Reader API Version 7.3.1
Renesas Software Stack for IoT-Reader Applications
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 "ptx_Status.h"
61#include "ptxOsal.h"
62#include "ptxLog.h"
63
64#ifdef __cplusplus
65extern "C" {
66#endif
67
68/*
69 * ####################################################################################################################
70 * DEFINES / TYPES
71 * ####################################################################################################################
72 */
73#if defined (_WIN32) || defined (_WIN64) || defined (ming) || defined (__MINGW32__) || defined (__GNUWIN32__)
74 #define PTX_API_LIBFUNC __declspec(dllexport) /* */
75#else
76
77 #if defined (__GNUC__) /* GCC */
78 #define PTX_API_LIBFUNC __attribute__ ((visibility("default"))) /* requires -fvisibility=hidden as compiler option */
79 #elif defined (_linux) || defined (__linux) /* Linux with some other compiler */
80 #error Missing Platform Specification /* To be added */
81 #else
82 #error Missing Platform Specification
83 #endif
84#endif
85
89#define PTX_TDC_BUFFER_LEN_MASK (0x3F)
90#define PTX_TDC_MAX_BUFFER_LEN (0x3F)
91#define PTX_TDC_DEFAULT_TIMEOUT (20u)
92#define PTX_TDC_CMD_NFC_FORUM_T2T_WRITE (0xA2)
93#define PTX_TDC_CMD_NFC_FORUM_T2T_READ (0x30)
94#define PTX_TDC_LEN_NFC_FORUM_T2T_READ (16u)
95#define PTX_TDC_CMD_PROP_WRITE (0xAF)
96#define PTX_TDC_CMD_PROP_READ (0x3F)
97#define PTX_TDC_LEN_PROP_WRITE (64u)
98#define PTX_TDC_LEN_PROP_READ (64u)
99#define PTX_TDC_PROP_BLOCK_SIZE (4u)
100#define PTX_TDC_BLOCK_NUM_POL_BUFF (48u)
101#define PTX_TDC_BLOCK_NUM_LIS_BUFF (64u)
102#define PTX_TDC_CMD_NSC_DATA_MSG (0x80)
104/*
105 * ####################################################################################################################
106 * TYPES
107 * ####################################################################################################################
108 */
109
118
122typedef struct ptxTDC
123{
124 /* Components */
127 struct ptxOsal *OS;
128 void *StackComp;
131
132/*
133 * ####################################################################################################################
134 * API FUNCTIONS
135 * ####################################################################################################################
136 */
137
146PTX_API_LIBFUNC ptxStatus_t ptxTDC_Init (ptxTDC_t *tdcComp, ptxTDC_InitParams_t *initParams);
147
155PTX_API_LIBFUNC ptxStatus_t ptxTDC_Deinit (ptxTDC_t *tdcComp);
167PTX_API_LIBFUNC ptxStatus_t ptxWLCN_TDC_Write(ptxTDC_t *tdcComp, uint8_t *txData, uint8_t txLen, uint32_t ackTimeoutMs);
168
180PTX_API_LIBFUNC ptxStatus_t ptxWLCN_TDC_Read(ptxTDC_t *tdcComp, uint8_t *rxData, uint8_t *rxDataLen, uint32_t rxTimeoutMs);
181
190PTX_API_LIBFUNC ptxStatus_t ptxWLCN_TDC_IsReceived(ptxTDC_t *tdcComp, uint8_t *received);
191
192#ifdef __cplusplus
193}
194#endif
195
198#endif /* Guard */
199
PTX_API_LIBFUNC ptxStatus_t ptxTDC_Init(ptxTDC_t *tdcComp, ptxTDC_InitParams_t *initParams)
Initializes the TDC Component.
PTX_API_LIBFUNC ptxStatus_t ptxWLCN_TDC_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...
struct ptxTDC_InitParams ptxTDC_InitParams_t
Transparent-Mode Initialization Parameters.
PTX_API_LIBFUNC ptxStatus_t ptxWLCN_TDC_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...
PTX_API_LIBFUNC ptxStatus_t ptxTDC_Deinit(ptxTDC_t *tdcComp)
Deinitializes the TDC Component.
struct ptxTDC ptxTDC_t
Transparent-Mode Component.
PTX_API_LIBFUNC ptxStatus_t ptxWLCN_TDC_IsReceived(ptxTDC_t *tdcComp, uint8_t *received)
Checks if the Listener's host MCU has read the previously sent message.
uint16_t ptxStatus_t
Status Type.
Definition ptx_Status.h:82
enum ptxStatus_Comps ptxStatus_Comps_t
Component Definitions.
Transparent-Mode Initialization Parameters.
Definition ptxTDC.h:114
void * StackComp
Definition ptxTDC.h:115
Transparent-Mode Component.
Definition ptxTDC.h:123
void * StackComp
Definition ptxTDC.h:128
ptxStatus_Comps_t CompId
Definition ptxTDC.h:125
struct ptxOsal * OS
Definition ptxTDC.h:127