1.5.4.1 AL_Initialize Function

C

SYS_MODULE_OBJ AL_Initialize (
      const SYS_MODULE_INDEX index,
      const SYS_MODULE_INIT * const init
);

Summary

Initializes the Meters And More AL module according to initialization parameters.

Description

This routine initializes the Meters And More AL module.

The initialization data is specified by the init parameter.

It is a single instance module and thus only one index is allowed.

Parameters

Param Description

index

Identifier for the instance to be initialized (single instance allowed)

init

Pointer to the init data structure containing any data necessary to initialize the module.

See AL_INIT Struct

Returns

If successful, returns a valid handle to a module instance object.

Otherwise, it returns SYS_MODULE_OBJ_INVALID.

Example

    SYS_MODULE_OBJ   sysObjMetersandmore;

    AL_INIT alInitData = {
        .taskRateMs = 5U,
        .isMaster = false
    };

    sysObjMetersandmore = AL_Initialize(0, (SYS_MODULE_INIT *)&alInitData);

Remarks

This routine must be called before any other AL routine is called.

It is called from System Initialize module. User Application does not need to call this function.