SysMemForceSwap (FUN)

FUNCTION SysMemForceSwap : DINT

Routine to force swapping memory independant of the byteorder of the system! RETURN: Number of bytes swapped:

  • -1 = failed (size too large)

  • >0 = Number of bytes swapped

InOut:

Scope

Name

Type

Comment

Return

SysMemForceSwap

DINT

Input

pbyBuffer

POINTER TO BYTE

POINTER TO data TO swap. You can check, which order is selected by calling the routine with pbyBuffer=0

udiSize

UDINT

Size of one element to swap

udiCount

UDINT

Number of elements to swap