Renesas PTX1xxR IoT-Reader API Version 7.3.1
Renesas Software Stack for IoT-Reader Applications
Data Structures | Macros | Typedefs | Functions
ptxNSC_Interface.h File Reference
#include "ptxNSC_InternalTypes.h"
#include "ptxHal.h"
#include "ptxBufferPool.h"
Include dependency graph for ptxNSC_Interface.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ptxNSC_InitParam
 
struct  ptxNSC
 

Macros

#define PTX_NSC_MIN_IO_BUFFER_SIZE   280
 
#define PTX_NSC_RFCONFIG_NAME_CAPACITY   64
 
#define PTX_NSC_IC_SERIAL_NUMBER_LENGTH   10
 

Typedefs

typedef ptxStatus_t(* pptxTbInt_GetIORQNtf_t) (void *cpLayer, struct ptxIoRq *io_rq)
 Integration get IO RQ Ntf.
 
typedef struct ptxNSCpptxNSC_t
 
typedef struct ptxNSC_InitParam ptxNSC_InitParam_t
 
typedef struct ptxNSC ptxNSC_t
 

Functions

ptxStatus_t ptxNSC_Init (ptxNSC_t *nscCtx, ptxNSC_InitParam_t *initParam)
 Initialization function for NSC component.
 
ptxStatus_t ptxNSC_DeInit (ptxNSC_t *nscCtx)
 Shutdown function for NSC component.
 
ptxStatus_t ptxNSC_Pause (ptxNSC_t *nscCtx, ptxNSC_Pause_Options pauseMode)
 Suspend or resume thread for the interface device.
 
ptxStatus_t ptxNSC_HALSetFlowCtrlState (ptxNSC_t *nscCtx, uint8_t enableTRx)
 Enable/disable flow control mode for the interface device.
 
ptxStatus_t ptxNSC_HALSetSpeed (ptxNSC_t *nscCtx, uint32_t bdSpeed)
 Set speed for interface with the chip.
 
ptxStatus_t ptxNSC_SetState (ptxNSC_t *nscCtx, ptxNSC_States_t state)
 Set NSC State.
 
ptxNSC_States_t ptxNSC_GetState (ptxNSC_t *nscCtx)
 Get NSC State.
 
ptxStatus_t ptxNSC_GetMiscRFConfig (ptxNSC_t *nscCtx, uint8_t *configBuffer, size_t *configBufferLen)
 NSC Get last loaded Misc. RF-Configuration.
 
ptxStatus_t ptxNSC_GetIORQNtf (ptxNSC_t *nscCtx, struct ptxIoRq *ioCpl)
 NSC Get IO RQ Notification.
 
ptxStatus_t ptxNSC_FwDownload (ptxNSC_t *nscCtx, struct ptxIoRq *ioCpl, uint8_t *pData, size_t length, uint8_t forceDwnld)
 NSC FW Download.
 
ptxStatus_t ptxNSC_Hal_Read_Synchronous (ptxNSC_t *nscCtx, uint8_t *rxBuf, size_t *rxLen)
 Read upcoming data from the chip.
 
ptxStatus_t ptxNSC_WRA (ptxNSC_t *nscCtx, struct ptxIoRq *ioCpl, uint16_t address, uint8_t valueToWrite)
 NSC WRA.
 
ptxStatus_t ptxNSC_WRAMulti (ptxNSC_t *nscCtx, struct ptxIoRq *ioCpl, ptxTypes_WRA_t *pWRA, size_t WRASize)
 NSC WRA Multiple values.
 
ptxStatus_t ptxNSC_WCA (ptxNSC_t *nscCtx, struct ptxIoRq *ioCpl, uint16_t Address, uint8_t *pData, size_t length)
 NSC WCA.
 
ptxStatus_t ptxNSC_RCA (ptxNSC_t *nscCtx, struct ptxIoRq *ioCpl, uint16_t regAddress, size_t length)
 NSC read continuous Address.
 
ptxStatus_t ptxNSC_RRA (ptxNSC_t *nscCtx, struct ptxIoRq *ioCpl, uint16_t regAddress)
 NSC Read Random Address (just read one byte)
 
ptxStatus_t ptxNSC_RRA_Multi (ptxNSC_t *nscCtx, struct ptxIoRq *ioCpl, uint16_t *addresses, size_t numberOfAddresses)
 NSC Read Random Address Multiple addresses to read from.
 
ptxStatus_t ptxNSC_NscResetCmd (ptxNSC_t *nscCtx, struct ptxIoRq *ioCpl, ptxNSC_ResetCpuEn_t cpuEn)
 Function for NSC_RESET_CMD.
 
ptxStatus_t ptxNSC_DFY_Activation (ptxNSC_t *nscCtx, struct ptxIoRq *ioCpl)
 Function for DFY Activation. (Performed as synchronous operation).
 
ptxStatus_t ptxNSC_DFY_Init (ptxNSC_t *nscCtx, struct ptxIoRq *ioCpl)
 Function for filling NSC_INIT_CMD.
 
ptxStatus_t ptxNSC_InitCmd (ptxNSC_t *nscCtx, struct ptxIoRq *ioCpl, ptxNSC_Init_Param_t *initParams)
 Function for NSC_INIT_CMD.
 
ptxStatus_t ptxNSC_ReadTempSensor (ptxNSC_t *nscCtx, struct ptxIoRq *ioCpl)
 Function for internal temperature sensor readout.
 
ptxStatus_t ptxNSC_WriteCmd (ptxNSC_t *nscCtx, struct ptxIoRq *ioCpl, ptxNSC_WriteCmd_Par_t nscWritePar)
 Function used to build and send NSC_WRITE_CMD.
 
ptxStatus_t ptxNSC_ReadCmd (ptxNSC_t *nscCtx, struct ptxIoRq *ioCpl, ptxNSC_ReadCmd_Par_t nscReadPar)
 Function used to build and send NSC_READ_CMD.
 
ptxStatus_t ptxNSC_DiscoverCmd (ptxNSC_t *nscCtx, struct ptxIoRq *ioCpl, ptxNSC_Discover_Param_t *discoverParams)
 Function for NSC_RF_DISCOVER_CMD.
 
ptxStatus_t ptxNSC_NSCRfDeactivateCmd (ptxNSC_t *nscCtx, struct ptxIoRq *ioCpl, ptxNSC_Rf_Deact_Param_t *rfDeactParam)
 Function for NSC_RF_DEACTIVATE_CMD.
 
ptxStatus_t ptxNSC_RfActivate (ptxNSC_t *nscCtx, struct ptxIoRq *ioCpl, ptxNSC_RfActiv_Param_t *actParams)
 Function used to select card to activate when chip is Reader and there are more than one card on the field.
 
ptxStatus_t ptxNSC_RfConfig (ptxNSC_t *nscCtx, struct ptxIoRq *ioCpl, ptxNSC_RfConfig_Param_t *rfConfigParams)
 Function used to build and send NSC_RF_CONFIG_REG.
 
ptxStatus_t ptxNSC_RfConfig_NvmLoad (ptxNSC_t *nscCtx, ptxNSC_RfConfig_Param_t *rfConfParams)
 Function used to load RF-Config parameters from NVM to given parameter structure.
 
ptxStatus_t ptxNSC_NscDataMsg (ptxNSC_t *nscCtx, struct ptxIoRq *ioCpl, uint8_t *payload, size_t length, uint8_t isChained)
 Function used to send NSC Data Msg to the chip.
 
ptxStatus_t ptxNSC_NscCltMsg (ptxNSC_t *nscCtx, struct ptxIoRq *ioCpl, uint8_t *pldBytes, uint8_t *pldParityBits, size_t length)
 Function used to send NSC Data Msg to the chip.
 
size_t ptxNSC_NscDataMsg_GetMaxPayload (ptxNSC_t *nscCtx)
 Get Maximum payload length that can be transmitted to the NSC component.
 
ptxStatus_t ptxNSC_SoftReset (ptxNSC_t *nscCtx, ptxNSC_SoftReset_t setUpNsc)
 Performs a Soft Reset on the NSC.
 
ptxStatus_t ptxNSC_SetUcodeActive (ptxNSC_t *nscCtx)
 Set the uCode Image as Active.
 
ptxStatus_t ptxNSC_SetUcodeInactive (ptxNSC_t *nscCtx)
 Set the uCode Image as Inactive.
 
ptxStatus_t ptxNSC_StandbyCmd (ptxNSC_t *nscCtx, struct ptxIoRq *ioCpl)
 NSC_STANDY_CMD.
 
ptxStatus_t ptxNSC_WakeupCmd (ptxNSC_t *nscCtx, struct ptxIoRq *ioCpl)
 NSC_WAKEUP_CMD.
 
ptxStatus_t ptxNSC_PresCheck_IsoDep_Nack (struct ptxNSC *nscCtx, struct ptxIoRq *ioCpl)
 ISO-DEP Presence Check (NACK).
 
ptxStatus_t ptxNSC_PresCheck_IsoDep_EmptyBlock (struct ptxNSC *nscCtx, struct ptxIoRq *ioCpl)
 ISO-DEP Presence Check (Empty Block).
 
ptxStatus_t ptxNSC_PresCheck_NfcDep_AttentionCmd (struct ptxNSC *nscCtx, struct ptxIoRq *ioCpl)
 ISO-DEP Presence Check (Attention Command).
 
ptxStatus_t ptxNSC_T5T_IsolatedEoF (struct ptxNSC *nscCtx, struct ptxIoRq *ioCpl)
 T5T Isolated EoF.
 
ptxStatus_t ptxNSC_WriteSystemCfg (ptxNSC_t *nscCtx, struct ptxNSC_System *sysCfgParams)
 Writes NSC System-Configuration parameters.
 
ptxStatus_t ptxNSC_ReadSystemCfg (ptxNSC_t *nscCtx, struct ptxNSC_System *sysCfgParams)
 Reads the current NSC System-Configuration parameters.
 
ptxStatus_t ptxNSC_RfSetParamsCmd (ptxNSC_t *nscCtx, struct ptxIoRq *ioCpl, ptxNsc_RfPar_t *rfPar, size_t rfParLen)
 Function for NSC_RF_SET_PARAMETER_CMD.
 
ptxStatus_t ptxNSC_RfTestRun (ptxNSC_t *nscCtx, struct ptxIoRq *ioCpl, ptxNsc_RfTest_Id_t rfTestId, uint8_t *rfTestParams, size_t rfTestParamsLen)
 Function for NSC_RF_RUN_CMD.
 
ptxStatus_t ptxNSC_RfTestStop (ptxNSC_t *nscCtx, struct ptxIoRq *ioCpl)
 Function for NSC_RF_STOP_CMD.
 
ptxStatus_t ptxNSC_LoadSystemCfg (ptxNSC_t *nscCtx, struct ptxNSC_System *sysCfgParams, uint8_t paramSource)
 Loads NSC System-Configuration parameters and Reads them.
 
ptxStatus_t ptxNSC_EmvGetDiscParams (struct ptxNSC *nscCtx, struct ptxNSC_Discover_Param *discoverParams)
 Get discovery loop parameters for EMV.
 
ptxStatus_t ptxNSC_NfcForumGetDiscParams (struct ptxNSC *nscCtx, struct ptxNSC_Discover_Param *discoverParams)
 Get discovery loop parameters for NFC-Forum.
 
ptxStatus_t ptxNSC_GetRevisionInfo (struct ptxNSC *nscCtx, ptxNSC_RevisionType_t revisionType, uint32_t *revisionInfo)
 Get various revisions of system (C-Stack, DFY-Code/-Toochain, Chip-ID, Local changes etc.
 
ptxStatus_t ptxNSC_SetGPIOMode (struct ptxNSC *nscCtx, struct ptxIoRq *ioCpl, uint8_t gpioNr, ptxNSC_GPIO_Mode_t gpioMode, uint8_t gpioFlags)
 Configures a selected GPIO-pin to work as output, output or special function.
 
ptxStatus_t ptxNSC_SetGPIOOutput (struct ptxNSC *nscCtx, struct ptxIoRq *ioCpl, uint8_t gpioNr, uint8_t gpioValue)
 Sets the selected GPIO-pin high or low.
 
ptxStatus_t ptxNSC_GetGPIOInput (struct ptxNSC *nscCtx, struct ptxIoRq *ioCpl, uint8_t gpioNr)
 Gets the current value of a selected GPIO-pin (value returned in Completion-path).
 
ptxStatus_t ptxNSC_GetDeactivateTimeout (struct ptxNSC *nscCtx, uint32_t *currentTimeout)
 Function to retrieve the current timeout value in [ms] to wait for a NSC.RF_DEACTIVATE_RSP.
 
ptxStatus_t ptxNSC_SetDeactivateTimeout (struct ptxNSC *nscCtx, uint32_t *currentTimeout)
 Function to set the current timeout value in [ms] to wait for a NSC.RF_DEACTIVATE_RSP.
 
ptxStatus_t ptxNSC_SetNrResidualTxBits (ptxNSC_t *nscCtx, uint8_t transparentModeEnabled, uint8_t nrTxBits)
 Enables or disables the NFC Type-A Transparent Mode and allows to set the number of residual Tx-bits if enabled.
 
ptxStatus_t ptxNSC_RegisterExtension (ptxNSC_t *nscCtx, ptxNSC_Custom_Extension_t *extension)
 Register an NSC-Extension (Prototype/RFU).
 
ptxStatus_t ptxNSC_DeRegisterExtension (ptxNSC_t *nscCtx, uint8_t extensionID)
 De-Register an NSC-Extension (Prototype/RFU).
 

Detailed Description

SPDX-License-Identifier: BSD-3-Clause

Copyright (c) 2026, Renesas Electronics Corporation and/or its affiliates

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of Renesas nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY Renesas "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RENESAS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT

OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Project : PTX1K Module : NSC File : ptxNSC_Interface.h

Description :