DlnPwmGetChannelCount() Function

The DlnPwmGetChannelCount() function retrieves the number of PWM channels available in the specified PWM-port of your DLN-series adapter.

Syntax
C/C++
DLN_RESULT DlnPwmGetChannelCount(
    HDLN handle,
    uint8_t port,
    uint8_t* count
);
Parameters
handle

A handle to the DLN-series adapter.

port

A PWM port to retrieve the number of channels from.

count

A pointer to an unsigned 8-bit integer that receives the available number of channels in the specified PWM port of the DLN-series adapter.

Return Value
DLN_RES_SUCCESS (0x00)

The function successfully retrieved the number of channels.

DLN_RES_INVALID_PORT_NUMBER (0xA8)

The port number is not valid. Use the DlnPwmGetPortCount() function to find the maximum possible port number.

Remarks

The DlnPwmGetChannelCount() function is defined in the dln_pwm.h file.