Renesas PTX1xxR IoT-Reader API (non-OS) Version 7.3.1
Renesas Software Stack for IoT-Reader Applications (non-OS)
Macros | Typedefs | Enumerations | Functions
PTX NSC Stack HAL
Collaboration diagram for PTX NSC Stack HAL:

Macros

#define PTX_HAL_WRITE_TIMEOUT   (500u)
 
#define PTX_HAL_READ_TIMEOUT   (500u)
 
#define PTX_NSC_RESPONSE_TIMEOUT   (uint32_t)(20 * PTX_HAL_READ_TIMEOUT)
 
#define PTX_NSC_HAL_ADDRESS_LENGTH   (0x02u)
 
#define PTX_NSC_HAL_BUFFER_LENGTH_RX_MAX   (256u)
 
#define PTX_NSC_HAL_DUMMY_VALUE   (0xFFu)
 
#define PTX_NSC_LENGTH_MAX   (255u)
 
#define PTX_NSC_HAL_PAYLOAD_LENGTH_WI_MAX   (252u)
 
#define PTX_NSC_HAL_WRITE_INSTRUCTION_MASK   (0x04u)
 
#define PTX_NSC_HAL_WRITE_RANDOM_ADDRESS_MASK   (0x05u)
 
#define PTX_NSC_HAL_READ_BUFFER_MASK   (0x03u)
 
#define PTX_NSC_HAL_WRITE_BUFFER_MASK   (0x07u)
 
#define PTX_NSC_HAL_READ_RANDOM_ADDRESS_MASK   (0x01u)
 
#define PTX_NSC_HAL_READ_CONTINUOUS_ADDRESS_MASK   (0x02u)
 
#define PTX_NSC_HAL_WRITE_CONTINUOUS_ADDRESS_MASK   (0x06u)
 
#define PTX_NSC_HAL_BUFFER_ADDRESS_MASK   (0x1Fu)
 

Typedefs

typedef enum ptxNscHal_BufferId ptxNscHal_BufferId_t
 ID of buffers handled by Hardware.
 

Enumerations

enum  ptxNscHal_BufferId {
  NscWriteBuffer_0 , NscWriteBuffer_1 , NscWriteBuffer_2 , NscWriteBuffer_3 ,
  NscWriteBuffer_4 , NscWriteBuffer_5 , NscWriteBuffer_6 , NscWriteBuffer_7 ,
  NscWriteBuffer_8 , NscWriteBuffer_9 , NscWriteBuffer_10 , NscWriteBuffer_11 ,
  NscWriteBuffer_12 , NscWriteBuffer_13 , NscWriteBuffer_14 , NscWriteBuffer_15 ,
  NscWriteBuffer_Max
}
 ID of buffers handled by Hardware.
 

Functions

ptxStatus_t ptxNSC_HAL_WriteBuffer (struct ptxNSC *nscCtx, ptxNscHal_BufferId_t bufferId, uint8_t *txBuf[], size_t txLen[], size_t numBuffers)
 Internal command to exchange NSC-commands using buffers.
 
ptxStatus_t ptxNSC_HAL_Wra (struct ptxNSC *nscCtx, uint16_t address, uint8_t value)
 Internal command to write certain SFRs.
 
ptxStatus_t ptxNSC_HAL_Wra_NoWait (struct ptxNSC *nscCtx, uint16_t address, uint8_t value)
 Internal command to write certain SFRs (operating-mode dependent).
 
ptxStatus_t ptxNSC_HAL_Wra_NoCheck (struct ptxNSC *nscCtx, uint16_t address, uint8_t value)
 Internal command to write certain SFRs (operating-mode dependent).
 
ptxStatus_t ptxNSC_HAL_Rra (struct ptxNSC *nscCtx, uint16_t address, uint8_t *value)
 Internal command to read certain SFRs.
 
ptxStatus_t ptxNSC_HAL_WriteInstruction (struct ptxNSC *nscCtx, uint16_t address, uint8_t *pPayload, size_t txLen)
 Internal command to write NSC-instructions.
 

Detailed Description

Macro Definition Documentation

◆ PTX_HAL_READ_TIMEOUT

#define PTX_HAL_READ_TIMEOUT   (500u)

Hal read timeout in ms.

◆ PTX_HAL_WRITE_TIMEOUT

#define PTX_HAL_WRITE_TIMEOUT   (500u)

Hal write timeout in ms.

◆ PTX_NSC_HAL_ADDRESS_LENGTH

#define PTX_NSC_HAL_ADDRESS_LENGTH   (0x02u)

Hal Address length.

◆ PTX_NSC_HAL_BUFFER_ADDRESS_MASK

#define PTX_NSC_HAL_BUFFER_ADDRESS_MASK   (0x1Fu)

HAL buffer address mask

◆ PTX_NSC_HAL_BUFFER_LENGTH_RX_MAX

#define PTX_NSC_HAL_BUFFER_LENGTH_RX_MAX   (256u)

HAL Maximum RX buffer length.

◆ PTX_NSC_HAL_DUMMY_VALUE

#define PTX_NSC_HAL_DUMMY_VALUE   (0xFFu)

HAL Dummy Value.

◆ PTX_NSC_HAL_PAYLOAD_LENGTH_WI_MAX

#define PTX_NSC_HAL_PAYLOAD_LENGTH_WI_MAX   (252u)

Maximum payload that can be taken by Write Instruction on Uart (used as well for other interfaces.)

◆ PTX_NSC_HAL_READ_BUFFER_MASK

#define PTX_NSC_HAL_READ_BUFFER_MASK   (0x03u)

HAL read buffer mask

◆ PTX_NSC_HAL_READ_CONTINUOUS_ADDRESS_MASK

#define PTX_NSC_HAL_READ_CONTINUOUS_ADDRESS_MASK   (0x02u)

HAL read continuous address mask

◆ PTX_NSC_HAL_READ_RANDOM_ADDRESS_MASK

#define PTX_NSC_HAL_READ_RANDOM_ADDRESS_MASK   (0x01u)

HAL read random address mask

◆ PTX_NSC_HAL_WRITE_BUFFER_MASK

#define PTX_NSC_HAL_WRITE_BUFFER_MASK   (0x07u)

HAL write buffer mask

◆ PTX_NSC_HAL_WRITE_CONTINUOUS_ADDRESS_MASK

#define PTX_NSC_HAL_WRITE_CONTINUOUS_ADDRESS_MASK   (0x06u)

HAL write continuous address mask

◆ PTX_NSC_HAL_WRITE_INSTRUCTION_MASK

#define PTX_NSC_HAL_WRITE_INSTRUCTION_MASK   (0x04u)

HAL write instruction mask

◆ PTX_NSC_HAL_WRITE_RANDOM_ADDRESS_MASK

#define PTX_NSC_HAL_WRITE_RANDOM_ADDRESS_MASK   (0x05u)

HAL write Random address mask

◆ 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)

◆ PTX_NSC_RESPONSE_TIMEOUT

#define PTX_NSC_RESPONSE_TIMEOUT   (uint32_t)(20 * PTX_HAL_READ_TIMEOUT)

Hal response timeout in ms.

Function Documentation

◆ ptxNSC_HAL_Rra()

ptxStatus_t ptxNSC_HAL_Rra ( struct ptxNSC * nscCtx,
uint16_t address,
uint8_t * value )

Internal command to read certain SFRs.

Parameters
[in]nscCtxPointer to an initialized instance of the NSC.
[in]addressAddress of SFR.
[out]valueValue read.
Returns
Status, indicating whether the operation was successful.See ptxStatus_t.

◆ ptxNSC_HAL_Wra()

ptxStatus_t ptxNSC_HAL_Wra ( struct ptxNSC * nscCtx,
uint16_t address,
uint8_t value )

Internal command to write certain SFRs.

Parameters
[in]nscCtxPointer to an initialized instance of the NSC.
[in]addressAddress of SFR.
[in]valueValue to write.
Returns
Status, indicating whether the operation was successful.See ptxStatus_t.

◆ ptxNSC_HAL_Wra_NoCheck()

ptxStatus_t ptxNSC_HAL_Wra_NoCheck ( struct ptxNSC * nscCtx,
uint16_t address,
uint8_t value )

Internal command to write certain SFRs (operating-mode dependent).

Parameters
[in]nscCtxPointer to an initialized instance of the NSC.
[in]addressAddress of SFR.
[in]valueValue to write.
Returns
Status, indicating whether the operation was successful.See ptxStatus_t.

◆ ptxNSC_HAL_Wra_NoWait()

ptxStatus_t ptxNSC_HAL_Wra_NoWait ( struct ptxNSC * nscCtx,
uint16_t address,
uint8_t value )

Internal command to write certain SFRs (operating-mode dependent).

Parameters
[in]nscCtxPointer to an initialized instance of the NSC.
[in]addressAddress of SFR.
[in]valueValue to write.
Returns
Status, indicating whether the operation was successful.See ptxStatus_t.

◆ ptxNSC_HAL_WriteBuffer()

ptxStatus_t ptxNSC_HAL_WriteBuffer ( struct ptxNSC * nscCtx,
ptxNscHal_BufferId_t bufferId,
uint8_t * txBuf[],
size_t txLen[],
size_t numBuffers )

Internal command to exchange NSC-commands using buffers.

Parameters
[in]nscCtxPointer to an initialized instance of the NSC.
[in]bufferIdBuffer identifier.
[in]txBufPointer to an array of buffers.
[in]txLenPointer to an array containing length-information for each buffer.
[in]numBuffersNumber of buffers.
Returns
Status, indicating whether the operation was successful.See ptxStatus_t.

◆ ptxNSC_HAL_WriteInstruction()

ptxStatus_t ptxNSC_HAL_WriteInstruction ( struct ptxNSC * nscCtx,
uint16_t address,
uint8_t * pPayload,
size_t txLen )

Internal command to write NSC-instructions.

Parameters
[in]nscCtxPointer to an initialized instance of the NSC.
[in]addressInstruction address.
[in]pPayloadPointer to buffer containing instructions.
[in]txLenNumber of instructions.
Returns
Status, indicating whether the operation was successful.See ptxStatus_t.