PwmParsePinPath function

Parses a pin path under the Pulse Width Modulation (PWM) controller namespace to validate its format and extract the pin number.

Syntax

NTSTATUS PwmParsePinPath(
  UNICODE_STRING *PinPath,
  ULONG          *PinNumber
);

Parameters

PinPath

A pointer to pin path as a Unicode character string.

PinNumber

A pointer to variable that receives a pin number.

Return Value

PwmParsePinPath returns the following values:

Return code Description
STATUS_SUCCESS
Extracted pin path successfully from supplied pin path.
STATUS_INVALID_PARAMETER
The specified pin path pointer is invalid or its Unicode string is invalid.
STATUS_NO_SUCH_FILE
The specified pin path does not constitute a valid pin path.

Remarks

The pin path must be a Unicode character string that ends in the pin number as follows: ...<PinNumber>.

Requirements

   
Minimum supported client Windows 10, version 1709
Minimum supported server Windows Server 2016
Target Platform Windows
Minimum KMDF version 1.19
Minimum UMDF version 2.19
Header pwmutil.h (include Pwm.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe (kernel mode)