1.28.12.4 OTPC_ReadPacket Function

C

otpc_error_code_t OTPC_ReadPacket( uint16_t headerAddress,
uint32_t *readBuffer,
uint16_t bufferSize,
uint16_t *sizeRead);

Summary

Reads a User packet from OTPC from a given address.

Description

Reads a packet from a given packet header address.

Precondition

OTPC_Initialize() function must have been called first and a valid packet should exist at the address.

Parameters

Param Description
headerAddress Address of the packet
readBuffer Pointer to the read buffer address
bufferSize Size of the read buffer
sizeRead Number of bytes read (output)

Returns

OTPC error code

Example

OTPC_Initialize();
OTPC_ReadPacket(&packet, &payload, &headerAddress, &sizeWritten);

Remarks

None