DlnPwmSetFrequency() Function

 DLN_RESULT DlnPwmSetFrequency(
    HDLN handle, 
    uint8_t port,
    uint8_t channel,
    uint32_t frequency,
    uint32_t* actualFrequency
 );

The DlnPwmSetFrequency() function sets the PWM frequency.

Parameters:

handle
A handle to the DLN-series adapter.
port
A number of the PWM port to be configured.
channel
A number of the PWM channel to be configured.
frequency
The frequency value, specified in Hz. A user may specify any value within the range, supported by the DLN-series adapter. This range can be retrieved using the respective function. In case a user enters an incompatible value, it will be approximated as the closest lower frequency value, supported by the adapter.
actualFrequency
A pointer to an unsigned 32-bit integer. This integer will be filled with the actually set frequency approximated as the closest to user-defined lower value.

Results:

Result Description
DLN_RES_SUCCESS Function was succesfully executed.

This function is defined in the dln_pwm.h file.