Renesas PTX1xxR IoT-Reader API Version 7.3.1
Renesas Software Stack for IoT-Reader Applications
Macros | Functions
NSC Processing Functions
Collaboration diagram for NSC Processing Functions:

Macros

#define PTX_NSC_LENGTH_MAX   (255u)
 
#define PTX_NSC_HAL_DUMMY_VALUE   (0xFFu)
 Dummy value for padding data.
 
#define PTX_NSC_HAL_BUFFER_LENGTH_RX_MAX   256
 

Functions

ptxStatus_t ptxNSC_NTFProcess (struct ptxNSC *nscCtx, uint8_t *payload, size_t length, ptxNSC_Event_t *event)
 NTF Dispatcher.
 
ptxStatus_t ptxNSC_DataMsgProcess (struct ptxNSC *nscCtx, uint8_t *payload, size_t length, ptxNSC_Event_t *event)
 NTF Process NSC_DATA_MSG.
 
ptxStatus_t ptxNSC_ProcessRspErrorCode (ptxNsc_ErrorCodes_t NscRspErrorCode)
 Helper function that process ErrorCode in NSC RESPONSE messages.
 
ptxStatus_t ptxNSC_SendCommand (struct ptxNSC *nscCtx, uint8_t *pPayload, ptxNscWriteBufferId_t BufferId, size_t txLen)
 Function used to send NSC Command to the chip.
 
ptxStatus_t ptxNSC_ProcessNscResetRsp (struct ptxNSC *nscCtx, uint8_t *payload, size_t length)
 Function used for processing NSC_RESET_RSP.
 
ptxStatus_t ptxNSC_NscDataMsg_Send (struct ptxNSC *nscCtx, uint8_t *payload, size_t payloadLength, uint8_t chaining)
 Function used for sending NSC_DATA_CMD.
 
ptxStatus_t ptxNSC_NscDataMsg_SendEmptyData (struct ptxNSC *nscCtx, uint8_t chaining)
 Function used for sending empty Nsc Data command.
 
void ptxNSC_WfNtfClear (struct ptxNSC *nscCtx)
 Clear Ntf State: set the state of the WfNtf to Not Expected.
 
void ptxNSC_RfSpecialCasePost (struct ptxNSC *nscCtx, uint8_t *buffIn, size_t buffInLen)
 This is a call Out function (e.g. used as delegation approach).
 
ptxStatus_t ptxNSC_Common_Post (struct ptxNSC *nscCtx, ptxIoRq_t *ioCpl, ptxStatus_t ret, pptxIoRqCompletion_t ptxNSCCompletion)
 
ptxStatus_t ptxNSC_Comon_DataMsgRx (struct ptxNSC *nscCtx, ptxIoRq_t *ioCpl)
 
ptxStatus_t ptxNSC_CltMsgRx (ptxNSC_t *nscCtx, ptxIoRq_t *ioCpl)
 

Detailed Description

Macro Definition Documentation

◆ PTX_NSC_HAL_BUFFER_LENGTH_RX_MAX

#define PTX_NSC_HAL_BUFFER_LENGTH_RX_MAX   256

Maximum number of bytes that can be read out in one raw in Read Buffer Command in Uart.

◆ PTX_NSC_LENGTH_MAX

#define PTX_NSC_LENGTH_MAX   (255u)

Maximum size of NSC_CMD. 256 (Maximun on Uart - 1 Opcode for Write buffer operation)

Function Documentation

◆ ptxNSC_DataMsgProcess()

ptxStatus_t ptxNSC_DataMsgProcess ( struct ptxNSC * nscCtx,
uint8_t * payload,
size_t length,
ptxNSC_Event_t * event )

NTF Process NSC_DATA_MSG.

Parameters
[in]nscCtxPointer to the component structure.
[in]payloadPointer to the upcoming NSC Command (already allocated).
[in]lengthLength of payload.
[in]eventPointer to the NSC event to fill it (already allocated).
Returns
Status, indicating whether the operation was successful. See ptxStatus_t.

◆ ptxNSC_NscDataMsg_Send()

ptxStatus_t ptxNSC_NscDataMsg_Send ( struct ptxNSC * nscCtx,
uint8_t * payload,
size_t payloadLength,
uint8_t chaining )

Function used for sending NSC_DATA_CMD.

Parameters
[in]nscCtxPointer to the component structure.
[in]payloadPayload to be sent.
[in]payloadLengthLength of payload.
[in]chainingIs chaining ?.
Returns
Status, indicating whether the operation was successful. See ptxStatus_t.

◆ ptxNSC_NscDataMsg_SendEmptyData()

ptxStatus_t ptxNSC_NscDataMsg_SendEmptyData ( struct ptxNSC * nscCtx,
uint8_t chaining )

Function used for sending empty Nsc Data command.

Parameters
[in]nscCtxPointer to the component structure.
[in]chainingIs chaining ?
Returns
Status, indicating whether the operation was successful. See ptxStatus_t.

◆ ptxNSC_NTFProcess()

ptxStatus_t ptxNSC_NTFProcess ( struct ptxNSC * nscCtx,
uint8_t * payload,
size_t length,
ptxNSC_Event_t * event )

NTF Dispatcher.

This function calls the corresponding function accordingly with the NTF received.

Parameters
[in]nscCtxPointer to the component structure.
[in]payloadPointer to the upcoming NSC Command (already allocated).
[in]lengthLength of payload.
[in]eventPointer to the NSC event to fill it (already allocated).
Returns
Status, indicating whether the operation was successful. See ptxStatus_t.

◆ ptxNSC_ProcessNscResetRsp()

ptxStatus_t ptxNSC_ProcessNscResetRsp ( struct ptxNSC * nscCtx,
uint8_t * payload,
size_t length )

Function used for processing NSC_RESET_RSP.

Parameters
[in]nscCtxPointer to the component structure.
[in]payloadPayload to be processed.
[in]lengthLength of payload .
Returns
Status, indicating whether the operation was successful. See ptxStatus_t.

◆ ptxNSC_ProcessRspErrorCode()

ptxStatus_t ptxNSC_ProcessRspErrorCode ( ptxNsc_ErrorCodes_t NscRspErrorCode)

Helper function that process ErrorCode in NSC RESPONSE messages.

Parameters
[in]NscRspErrorCodeError Code to be processed.
Returns
The error code that is going to be forwarded up to the layers above. See definition of ptxStatus_t.

◆ ptxNSC_RfSpecialCasePost()

void ptxNSC_RfSpecialCasePost ( struct ptxNSC * nscCtx,
uint8_t * buffIn,
size_t buffInLen )

This is a call Out function (e.g. used as delegation approach).

   It checks if RF ERROR or some RF_CNTRL_MSG shall be used to unlock a certain operations in the FIFO thread.
   This functions is called from NSC thread as Fifo Thread is already locked waiting to be signaled.
Parameters
[in]nscCtxPointer to the component structure.
[in]buffInPointer to the buffer containing the NSC Command.
[in]buffInLenLength of the buffer.

◆ ptxNSC_SendCommand()

ptxStatus_t ptxNSC_SendCommand ( struct ptxNSC * nscCtx,
uint8_t * pPayload,
ptxNscWriteBufferId_t BufferId,
size_t txLen )

Function used to send NSC Command to the chip.

Parameters
[in]nscCtxPointer to the component structure.
[in]pPayloadPointer to the I/O Completion structure.
[in]BufferIdBuffer used to send to the chip.
[in]txLenLength of pPayload .
Returns
Status, indicating whether the operation was successful. See ptxStatus_t.

◆ ptxNSC_WfNtfClear()

void ptxNSC_WfNtfClear ( struct ptxNSC * nscCtx)

Clear Ntf State: set the state of the WfNtf to Not Expected.

Parameters
[in]nscCtxPointer to the component structure.