DlnPwmSetDutyCycle() Function
DLN_RESULT DlnPwmSetDutyCycle(
HDLN handle,
uint8_t port,
uint8_t channel,
double dutyCycle,
double* actualDutyCycle
);
The DlnPwmSetDutyCycle() function sets a PWM duty cycle, which is the ratio of the high time to the PWM period.
Parameters:
- handle
- A handle to the DLN-series adapter.
- port
- A number of the PWM port to set the duty cycle for.
- channel
- A number of the PWM channel to set the duty cycle for.
- dutyCycle
- A double precision floating point number. Must contain a duty cycle to be set.
- actualDutyCycle
- A pointer to a double precision floating point number. This number will be filled with actually set duty cycle after the function execution.
Results:
| Result | Description |
|---|---|
| DLN_RES_SUCCESS | Function was succesfully executed. |
This function is defined in the dln_pwm.h file.
2006-2012