DriverOpenP (FUN)ΒΆ

FUNCTION DriverOpenP : CAA.HANDLE

See DriverOpenH for details. In contrast to DriverOpenH no dynamic memory will be allocated. Memory specified by pMemory and szMemSize is used. Use DriverGetSize to calculate the required memory size. Please note that required memory size can change with new runtime version.

Note

pMemory should be aligned to a 4 byte address on 32 bit systems and an 8 byte address on 64 bit systems. To ensure this alignment, you can declare the memory with ARRAY [0..n] of __XWORD. Please keep in mind that the required memory size is different for 32 and 64-bit systems.

InOut:

Scope

Name

Type

Comment

Return

DriverOpenP

CAA.HANDLE

handle of CAN interface or CAA.gc_hINVALID if failed.

Input

usiNetId

USINT

number of CAN interface [0..n]

uiBaudrate

UINT

Baudrate in kBit/s e.g. 1000 for 1 Mbit

xSupport29Bits

BOOL

FALSE: only 11-Bit IDs, TRUE: support also 29-Bit

szMemSize

CAA.SIZE

size of allocated memory

pMemory

CAA.PVOID

pointer to aligned memory

peError

POINTER TO ERROR

optional pointer to error enum