SysMemSwap (FUN)
FUNCTION SysMemSwap : DINT
Routine to swap memory into littel endian. If little endian (intel) byteorder is received and platform has big endian (motorola) byteorder. On little endian byteorder platforms, routine does nothing RETURN: Number of bytes swapped:
-1 = failed (iSize too large)
0 = no swapping necessary (little endian byteorder)
>0 = Number of bytes swapped (big endian byteorder)
- InOut:
Scope
Name
Type
Comment
Return
SysMemSwapDINTInput
pbyBufferPOINTER TO BYTE
Pointer to data to swap. You can check, which order is selected by calling the routine with pbyBuffer=0
udiSizeUDINTSize of one element to swap
udiCountUDINTNumber of elements to swap