|
SDK3.5
This document shows Ameba SDK 3.5 APIs
|
pwm functions More...
Ameba Common | |
| typedef struct pwmout_s | pwmout_t |
| void | pwmout_init (pwmout_t *obj, PinName pin) |
| Initializes the PWM function/registers of the specified pin with default parameters. More... | |
| void | pwmout_free (pwmout_t *obj) |
| Deinitializes the PWM device of the specified channel. More... | |
| void | pwmout_write (pwmout_t *obj, float percent) |
| Set the duty cycle of the specified channel. More... | |
| float | pwmout_read (pwmout_t *obj) |
| Get the duty cycle value of the specified channel. More... | |
| void | pwmout_period (pwmout_t *obj, float seconds) |
| Set the period of the specified channel in seconds. More... | |
| void | pwmout_period_ms (pwmout_t *obj, int ms) |
| Set the period of the specified channel in millseconds. More... | |
| void | pwmout_period_us (pwmout_t *obj, int us) |
| Set the period of the specified channel in microseconds. More... | |
| void | pwmout_pulsewidth (pwmout_t *obj, float seconds) |
| Set the pulse width of the specified channel in seconds. More... | |
| void | pwmout_pulsewidth_ms (pwmout_t *obj, int ms) |
| Set the pulse width of the specified channel in milliseconds. More... | |
| void | pwmout_pulsewidth_us (pwmout_t *obj, int us) |
| Set the pulse width of the specified channel in microseconds. More... | |
pwm functions
| void pwmout_free | ( | pwmout_t * | obj | ) |
Deinitializes the PWM device of the specified channel.
| obj | PWM object define in application software. |
| none |
| void pwmout_init | ( | pwmout_t * | obj, |
| PinName | pin | ||
| ) |
Initializes the PWM function/registers of the specified pin with default parameters.
| obj | PWM object define in application software. |
| pin | the pinname of specified channel to be set. |
| none |
| void pwmout_period | ( | pwmout_t * | obj, |
| float | seconds | ||
| ) |
Set the period of the specified channel in seconds.
| obj | PWM object define in application software. |
| seconds | The period value to be set in seconds. |
| none |
| void pwmout_period_ms | ( | pwmout_t * | obj, |
| int | ms | ||
| ) |
Set the period of the specified channel in millseconds.
| obj | PWM object define in application software. |
| ms | The period value to be set in millseconds. |
| none |
| void pwmout_period_us | ( | pwmout_t * | obj, |
| int | us | ||
| ) |
Set the period of the specified channel in microseconds.
| obj | PWM object define in application software. |
| us | The period value to be set in microseconds. |
| none |
| void pwmout_pulsewidth | ( | pwmout_t * | obj, |
| float | seconds | ||
| ) |
Set the pulse width of the specified channel in seconds.
| obj | PWM object define in application software. |
| seconds | The pulse width value to be set in seconds. |
| none |
| void pwmout_pulsewidth_ms | ( | pwmout_t * | obj, |
| int | ms | ||
| ) |
Set the pulse width of the specified channel in milliseconds.
| obj | PWM object define in application software. |
| ms | The pulse width value to be set in milliseconds. |
| none |
| void pwmout_pulsewidth_us | ( | pwmout_t * | obj, |
| int | us | ||
| ) |
Set the pulse width of the specified channel in microseconds.
| obj | PWM object define in application software. |
| us | The pulse width value to be set in microseconds. |
| none |
| float pwmout_read | ( | pwmout_t * | obj | ) |
Get the duty cycle value of the specified channel.
| obj | PWM object define in application software. |
| the duty cycle value of the specified channel. |
| void pwmout_write | ( | pwmout_t * | obj, |
| float | percent | ||
| ) |
Set the duty cycle of the specified channel.
| obj | PWM object define in application software. |
| percent | The duty cycle value to be set. |
| none |
1.8.11