1.2.4.4.4 SYS_CONSOLE_HandleGet Function

C

SYS_CONSOLE_HANDLE SYS_CONSOLE_HandleGet( const SYS_MODULE_INDEX index)

Summary

Returns a handle to the requested console instance

Description

This function returns a handle to the requested console instance.

Preconditions

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

Parameters

ParamDescription
indexindex of the console instance

Returns

SYS_CONSOLE_HANDLE - Handle to the requested console instance

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);
}

Remarks

None.