This is the PWM Subsystem for controlling PWM of a SOC.
The most PWM Driver need a Timer! See TIMER Interface
◆ pwm_deinit()
int32_t pwm_deinit |
( |
struct pwm * |
pwm | ) |
|
Deinit PWM
- Parameters
-
- Returns
- -1 on error 0 on ok
◆ pwm_init()
struct pwm* pwm_init |
( |
uint32_t |
index | ) |
|
Init PWM instances
- Parameters
-
- Returns
- PWM Instance NULL on Error
◆ pwm_setDutyCycle()
int32_t pwm_setDutyCycle |
( |
struct pwm * |
pwm, |
|
|
uint64_t |
us |
|
) |
| |
Set Duty Cycle of PWM
| ______________ ______________
| | | | |
| | | | |
|__| |___________| |
+--------------------------------------------
| Period |
| Duty Cycle |
- Parameters
-
- Returns
- -1 on error 0 on ok
◆ pwm_setPeriod()
int32_t pwm_setPeriod |
( |
struct pwm * |
pwm, |
|
|
uint64_t |
us |
|
) |
| |
Set Period of PWM
| ______________ ______________
| | | | |
| | | | |
|__| |___________| |
+--------------------------------------------
| Period |
| Duty Cycle |
- Parameters
-
- Returns
- -1 on error 0 on ok