42 #define IOT_PWM_SUCCESS ( 0 ) 43 #define IOT_PWM_INVALID_VALUE ( 1 ) 44 #define IOT_PWM_NOT_CONFIGURED ( 2 ) 45 #define IOT_PWM_FUNCTION_NOT_SUPPORTED ( 3 ) 51 typedef struct IotPwmConfig 63 struct IotPwmDescriptor;
PWM configuration type.
Definition: iot_pwm.h:51
int32_t iot_pwm_set_config(IotPwmHandle_t const pxPwmHandle, const IotPwmConfig_t xConfig)
iot_pwm_set_config sets up the PWM frequency and duty cycle to generate the PWM pulses required...
int32_t iot_pwm_stop(IotPwmHandle_t const pxPwmHandle)
Stop the PWM hardware.
IotPwmHandle_t iot_pwm_open(int32_t lPwmInstance)
iot_pwm_open is used to initialize the PWM driver instance. this API will configure PWM and may reset...
uint32_t ulPwmFrequency
Definition: iot_pwm.h:53
int32_t iot_pwm_close(IotPwmHandle_t const pxPwmHandle)
iot_pwm_close de-initializes the PWM.
IotPwmConfig_t * iot_pwm_get_config(IotPwmHandle_t const pxPwmHandle)
iot_pwm_get_config returns the current PWM configuration
uint8_t ucPwmDutyCycle
Definition: iot_pwm.h:54
struct IotPwmDescriptor * IotPwmHandle_t
IotPwmHandle_t type is the PWM handle returned by calling iot_pwm_open() this is initialized in open ...
Definition: iot_pwm.h:70
int32_t iot_pwm_start(IotPwmHandle_t const pxPwmHandle)
Start the PWM hardware. PWM configuration must be set before PWM is started. PWM signal availability ...
uint8_t ucPwmChannel
Definition: iot_pwm.h:55