Tizen RT Public API  v1.0 D5

Provides APIs for PWM (Pulse Width Modulation) More...

Collaboration diagram for PWM:

Files

file  iotbus_pwm.h
 Iotbus APIs for PWM.
 

Typedefs

typedef struct _iotbus_pwm_s * iotbus_pwm_context_h
 Pointer definition to the internal struct _iotbus_pwm_s. More...
 

Enumerations

Functions

iotbus_pwm_context_h iotbus_pwm_open (int device, int channel)
 closes the pwm_context. More...
 
int iotbus_pwm_close (iotbus_pwm_context_h pwm)
 closes the pwm_context. More...
 
int iotbus_pwm_set_duty_cycle (iotbus_pwm_context_h pwm, uint32_t duty_cycle)
 sets the pwm duty cycle. More...
 
int iotbus_pwm_set_period (iotbus_pwm_context_h pwm, uint32_t period)
 sets the pwm period. More...
 
int iotbus_pwm_set_enabled (iotbus_pwm_context_h pwm, iotbus_pwm_state_e enable)
 sets the pwm state. More...
 
int iotbus_pwm_is_enabled (iotbus_pwm_context_h pwm)
 checks if pwm state is enabled. More...
 
int iotbus_pwm_get_duty_cycle (iotbus_pwm_context_h pwm)
 gets the pwm duty cycle. More...
 
int iotbus_pwm_get_period (iotbus_pwm_context_h pwm)
 gets the pwm period. More...
 

Detailed Description

Provides APIs for PWM (Pulse Width Modulation)

Typedef Documentation

typedef struct _iotbus_pwm_s* iotbus_pwm_context_h

Pointer definition to the internal struct _iotbus_pwm_s.

Definition at line 42 of file iotbus_pwm.h.

Enumeration Type Documentation

Enumeration of PWM state.

Enumeration Details:
IOTBUS_PWM_DISABLE
IOTBUS_PWM_ENABLE

Definition at line 51 of file iotbus_pwm.h.

Function Documentation

int iotbus_pwm_close ( iotbus_pwm_context_h  pwm)

closes the pwm_context.

Parameters
[in]pwmhandle of pwm_context
Returns
On success, 0 is returned. On failure, a negative value is returned.
Since
Tizen RT v1.0
int iotbus_pwm_get_duty_cycle ( iotbus_pwm_context_h  pwm)

gets the pwm duty cycle.

Parameters
[in]pwmhandle of pwm_context
Returns
On success, current pwm duty cycle is returned. On failure, a negative value is returned.
Since
Tizen RT v1.0
int iotbus_pwm_get_period ( iotbus_pwm_context_h  pwm)

gets the pwm period.

Parameters
[in]pwmhandle of pwm_context
Returns
On success, current pwm period is returned. On failure, a negative value is returned.
Since
Tizen RT v1.0
int iotbus_pwm_is_enabled ( iotbus_pwm_context_h  pwm)

checks if pwm state is enabled.

Parameters
[in]pwmhandle of pwm_context
Returns
On success, current pwm state value is returned. On failure, a negative value is returned.
Since
Tizen RT v1.0
iotbus_pwm_context_h iotbus_pwm_open ( int  device,
int  channel 
)

closes the pwm_context.

Parameters
[in]deviceN/A
[in]channelpwm channel number
Returns
On success, handle of pwm_context is returned. On failure, NULL is returned.
Since
Tizen RT v1.0
int iotbus_pwm_set_duty_cycle ( iotbus_pwm_context_h  pwm,
uint32_t  duty_cycle 
)

sets the pwm duty cycle.

Parameters
[in]pwmhandle of pwm_context
[in]duty_cyclepwm duty cycle
Returns
On success, 0 is returned. On failure, a negative value is returned.
Since
Tizen RT v1.0
int iotbus_pwm_set_enabled ( iotbus_pwm_context_h  pwm,
iotbus_pwm_state_e  enable 
)

sets the pwm state.

Parameters
[in]pwmhandle of pwm_context
[in]enablepwm enable/disabled state value
Returns
On success, 0 is returned. On failure, a negative value is returned.
Since
Tizen RT v1.0
int iotbus_pwm_set_period ( iotbus_pwm_context_h  pwm,
uint32_t  period 
)

sets the pwm period.

Parameters
[in]pwmhandle of pwm_context
[in]periodpwm duty period
Returns
On success, 0 is returned. On failure, a negative value is returned.
Since
Tizen RT v1.0