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

Functions

ptxStatus_t ptxNSC_Hal_WriteBuffer_Async (struct ptxNSC *nscCtx, uint8_t addressOfBuffer, uint8_t *pPayload, size_t txLen)
 Do a write buffer operation on the chip.
 
ptxStatus_t ptxNSC_Hal_WriteRawData (struct ptxNSC *nscCtx, uint8_t *pPayload, size_t txLen)
 Send raw data directly to the chip. Do a Write Buffer operation.
 
ptxStatus_t ptxNSC_Hal_WriteInstruction_Synchronous (struct ptxNSC *nscCtx, uint16_t address, uint8_t *pPayload, size_t txLen)
 Do a Write Instruction operation on the chip and wait for the ACK (0x00). This function stop the receiving thread so it works in HW_CONTROL_MODE.
 
ptxStatus_t ptxNSC_Hal_WRA (struct ptxNSC *nscCtx, uint16_t address, uint8_t value)
 
ptxStatus_t ptxNSC_Hal_WRA_HwAck (struct ptxNSC *nscCtx, uint16_t address, uint8_t value)
 
ptxStatus_t ptxNSC_Hal_WriteRandomAddressMulti_Synchronous (struct ptxNSC *nscCtx, ptxTypes_WRA_t *pWRA)
 
ptxStatus_t ptxNSC_Hal_WriteContinuousAddress_Synchronous (struct ptxNSC *nscCtx, uint16_t address, uint8_t *value, size_t length)
 
ptxStatus_t ptxNSC_Hal_WriteBuffer_Synchronous (struct ptxNSC *nscCtx, uint8_t addressOfBuffer, uint8_t *pPayload, size_t txLen)
 
ptxStatus_t ptxNSC_Hal_ReadRandomAddress_Synchronous (struct ptxNSC *nscCtx, uint16_t address, uint8_t *value)
 
ptxStatus_t ptxNSC_Hal_WriteInstruction_Framing (struct ptxNSC *nscCtx, uint16_t address, uint8_t *pPayload, size_t txLen)
 Split the payload to write to memory program in chunks of 252 B and update memory address accordingly. This function call ptxNSC_Hal_WriteRawData as many times as needed accordingly to the length of payload.
 
ptxStatus_t ptxNSC_Hal_ReadBuffer_Synchronous (struct ptxNSC *nscCtx, uint8_t *payload, size_t *length)
 
ptxStatus_t ptxNSC_Hal_ReadContinuousAddress_Synchronous (struct ptxNSC *nscCtx, uint16_t address, size_t length, uint8_t *bytesReceived)
 
ptxHal_InterfaceType_t ptxNSC_Hal_GetActiveIfType (struct ptxNSC *nscCtx)
 Wrapper function used to get the Active Interface at Hal.
 
ptxStatus_t ptxNSC_Hal_Cancel (struct ptxNSC *nscCtx)
 Wrapper function used to call Cancel Operation at Hal.
 
ptxStatus_t ptxNSC_Hal_TRx (struct ptxNSC *nscCtx, uint8_t *txBuf[], size_t txLen[], size_t numBuffers, uint8_t *rxBuf, size_t *rxLen)
 Wrapper function used to call Trx at Hal.
 

Maximum payload for a Write Instruction

#define PTX_NSC_HAL_PAYLOAD_LENGTH_WI_MAX   (252u)
 

Masks for write and read operations

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

Masks for map addresses

#define PTX_NSC_HAL_ADDRESS_RAM_INITIAL   (0x0000u)
 
#define PTX_NSC_HAL_ADDRES_RAM_END   (0x0FFFu)
 
#define PTX_NSC_HAL_ADDRESS_SFR_INITIAL   (0x1000u)
 
#define PTX_NSC_HAL_ADDRES_SFR_END   (0x10FFu)
 

Detailed Description

Macro Definition Documentation

◆ PTX_NSC_HAL_ADDRES_RAM_END

#define PTX_NSC_HAL_ADDRES_RAM_END   (0x0FFFu)

Mask for RAM end address map addresses

◆ PTX_NSC_HAL_ADDRES_SFR_END

#define PTX_NSC_HAL_ADDRES_SFR_END   (0x10FFu)

Mask for SFR end address map addresses

◆ PTX_NSC_HAL_ADDRESS_RAM_INITIAL

#define PTX_NSC_HAL_ADDRESS_RAM_INITIAL   (0x0000u)

Mask for initial RAM address map addresses

◆ PTX_NSC_HAL_ADDRESS_SFR_INITIAL

#define PTX_NSC_HAL_ADDRESS_SFR_INITIAL   (0x1000u)

Mask for initial SFR address map addresses

◆ PTX_NSC_HAL_BUFFER_ADDRESS_MASK

#define PTX_NSC_HAL_BUFFER_ADDRESS_MASK   (0x1Fu)

Buffer Address mask

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

Read buffer mask

◆ PTX_NSC_HAL_READ_CONTINUOUS_ADDRESS_MASK

#define PTX_NSC_HAL_READ_CONTINUOUS_ADDRESS_MASK   (0x02u)

Read Instruction mask

◆ PTX_NSC_HAL_READ_RANDOM_ADDRESS_MASK

#define PTX_NSC_HAL_READ_RANDOM_ADDRESS_MASK   (0x01u)

Read random access mask

◆ PTX_NSC_HAL_WRITE_BUFFER_MASK

#define PTX_NSC_HAL_WRITE_BUFFER_MASK   (0x07u)

Write buffer mask

◆ PTX_NSC_HAL_WRITE_CONTINUOUS_ADDRESS_MASK

#define PTX_NSC_HAL_WRITE_CONTINUOUS_ADDRESS_MASK   (0x06u)

Wite cntinuous mask

◆ PTX_NSC_HAL_WRITE_INSTRUCTION_MASK

#define PTX_NSC_HAL_WRITE_INSTRUCTION_MASK   (0x04u)

Write Instruction mask

◆ PTX_NSC_HAL_WRITE_RANDOM_ADDRESS_MASK

#define PTX_NSC_HAL_WRITE_RANDOM_ADDRESS_MASK   (0x05u)

Write random access mask

Function Documentation

◆ ptxNSC_Hal_Cancel()

ptxStatus_t ptxNSC_Hal_Cancel ( struct ptxNSC * nscCtx)

Wrapper function used to call Cancel Operation at Hal.

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

◆ ptxNSC_Hal_GetActiveIfType()

ptxHal_InterfaceType_t ptxNSC_Hal_GetActiveIfType ( struct ptxNSC * nscCtx)

Wrapper function used to get the Active Interface at Hal.

Parameters
[in]nscCtxPointer to the component structure.
Returns
Currently active interface type, one of the ptxHal_InterfaceType_t values.

◆ ptxNSC_Hal_TRx()

ptxStatus_t ptxNSC_Hal_TRx ( struct ptxNSC * nscCtx,
uint8_t * txBuf[],
size_t txLen[],
size_t numBuffers,
uint8_t * rxBuf,
size_t * rxLen )

Wrapper function used to call Trx at Hal.

Note
see ptxHal_TRx
Returns
Status, indicating whether the operation was successful. See ptxStatus_t.

◆ ptxNSC_Hal_WriteBuffer_Async()

ptxStatus_t ptxNSC_Hal_WriteBuffer_Async ( struct ptxNSC * nscCtx,
uint8_t addressOfBuffer,
uint8_t * pPayload,
size_t txLen )

Do a write buffer operation on the chip.

Used in operational mode.

Parameters
[in]nscCtxPointer to the component structure.
[in]addressOfBufferAddress of the buffer to write to on the chip (5 most significant bits).
[in]pPayloadPointer to the data to send to the chip.
[in]txLenNumber of bytes to write.
Returns
Status, indicating whether the operation was successful. See ptxStatus_t.

◆ ptxNSC_Hal_WriteInstruction_Framing()

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

Split the payload to write to memory program in chunks of 252 B and update memory address accordingly. This function call ptxNSC_Hal_WriteRawData as many times as needed accordingly to the length of payload.

Parameters
[in]nscCtxPointer to the component structure.
[in]addressMemory address to write to on the chip.
[in]pPayloadPointer to data to write on the chip.
[in]txLenNumber of bytes to write on the chip.
Returns
Status, indicating whether the operation was successful. See ptxStatus_t.

◆ ptxNSC_Hal_WriteInstruction_Synchronous()

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

Do a Write Instruction operation on the chip and wait for the ACK (0x00). This function stop the receiving thread so it works in HW_CONTROL_MODE.

Parameters
[in]nscCtxPointer to the component structure.
[in]addressMemory address to write to on the chip.
[in]pPayloadPointer to data to write on the chip.
[in]txLenNumber of bytes to write on the chip.
Returns
Status, indicating whether the operation was successful. See ptxStatus_t.

◆ ptxNSC_Hal_WriteRawData()

ptxStatus_t ptxNSC_Hal_WriteRawData ( struct ptxNSC * nscCtx,
uint8_t * pPayload,
size_t txLen )

Send raw data directly to the chip. Do a Write Buffer operation.

Parameters
[in]nscCtxPointer to the component structure.
[in]pPayloadPointer to the data to send to the chip.
[in]txLenNumber of bytes to send.
Returns
Status, indicating whether the operation was successful. See ptxStatus_t.