PM5358 S/UNI-4x622 Driver Manual

RTOS Interface

6RTOS INTERFACE

The S/UNI-4x622 driver requires the use of some RTOS resources. In this section, a listing of each required resource is shown, along with a declaration and any specific porting instructions. It is the responsibility of the USER to connect these requirements into the RTOS, either by defining a macro or writing a function for each item listed. Care should be taken when matching parameters and return values.

6.1Memory Allocation / De-Allocation

Allocating Memory: sysSuni4x622MemAlloc

This function allocates specified number of bytes of memory.

Format

Prototype

Inputs

Outputs

Returns

#define sysSuni4x622MemAlloc(numBytes)

UINT1 *sysSuni4x622MemAlloc(UINT4 numBytes)

numBytes : number of bytes to be allocated

None

Success = Pointer to first byte of allocated memory Failure = NULL pointer (memory allocation failed)

Initialize Memory: sysSuni4x622MemSet

This function initialize a block of memory with a given value.

Format Prototype

Inputs

Outputs Returns

#define sysSuni4x622MemSet(pmem, val, sz)

void sysSuni4x622MemSet(UINT1 *pmem, UINT1 val, UINT2 sz)

pmem

: (pointer to) the first byte of the memory

val

: value to set

sz

: size

None

 

None

 

Copy Memory: sysSuni4x622MemCpy

This function copies a block of memory.

Format

#define sysSuni4x622MemSet(pdst, psrc, sz)

Proprietary and Confidential to PMC-Sierra, Inc.

112

Document ID: PMC-2010419, Issue 1

 

Page 112
Image 112
PMC-Sierra PM5358 S/UNI 4x622 manual Memory Allocation / De-Allocation, Allocating Memory sysSuni4x622MemAlloc