2.73.2 OTPC_WritePacket Function

C

otpc_error_code_t OTPC_WritePacket(const OTPC_NEW_PACKET *packet,
const uint32_t *payload,
uint16_t *headerAddress,
uint16_t *sizeWritten);

Summary

Perform an OTPC packet write.

Description

Create a new packet with the given payload. Returns the address of the packet and size written (in number of bytes).

Precondition

OTPC_Initialize() function must have been called first.

Parameters

ParamDescription
packetPointer to the structure defining the packet attributes
payloadPointer to the address of new payload
headerAddressAddress of the newly created packet(output)}
sizeWrittennumber of bytes written into the new packet

Returns

otpc error code.

Example

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

Remarks

None