1.2.4.4.4 SYS_CONSOLE_HandleGet Function

1.2.4.4.4 C

SYS_CONSOLE_HANDLE SYS_CONSOLE_HandleGet( const SYS_MODULE_INDEX index)

1.2.4.4.4 Summary

Returns a handle to the requested console instance.

1.2.4.4.4 Description

This function returns a handle to the requested console instance.

1.2.4.4.4 Preconditions

The SYS_CONSOLE_Initialize function should have been called before calling this function.

1.2.4.4.4 Parameters

ParametersDescription
indexIndex of the console instance

1.2.4.4.4 Returns

SYS_CONSOLE_HANDLE - Handle to the requested console instance.

1.2.4.4.4 Example

SYS_CONSOLE_HANDLE myConsoleHandle;
myConsoleHandle = SYS_CONSOLE_HandleGet(SYS_CONSOLE_INDEX_0);

if (myConsoleHandle != SYS_CONSOLE_HANDLE_INVALID)
{
    // Found a valid handle to the console instance

    // Write some data over the USB console
    SYS_CONSOLE_Write(myConsoleHandle, data, 10);
}

1.2.4.4.4 Remarks

None.