RtfwSetWindowsIdleDetection

RtfwSetWindowsIdleDetection configures whether the wRTOS Subsystem disables Windows idle detection power optimization while the wRTOS Subsystem is running. When Windows idle detection is disabled, power state transitions are prevented on Windows processors, because they can cause loss of determinism on real-time processors.

Syntax

Copy
bool RtfwSetWindowsIdleDetection(
    [in]    bool disableIdleDetection
);

Parameters

[in] disableIdleDetection

If TRUE, Windows idle detection power optimization is disabled while the wRTOS Subsystem is running. Otherwise, it is not disabled.

Return Value

If the function succeeds, it returns TRUE. If the function fails, it returns FALSE. Call GetLastError to obtain an error code.

Remarks

If the Subsystem is running when this function succeeds, the last error is set to RT_ERROR_RESTART_SUBSYSTEM. RtfwRestartRequired will report that the Subsystem must be restarted.

Note: The Subsystem must be restarted for the change to take effect.

Requirements

Minimum supported version Header Library

wRTOS 1.0 SDK

RtfwApi.h

RtfwApi.lib

See Also: