MATSU-bed(LPC1549)でPWMを4つ以上出すプログラム
Dependents: servo_controller_1549
Pwmout hal functions
Functions | |
| void | pwmout_all_init (pwmout_all_t *obj, PinName pin) |
| Initialize the pwm out peripheral and configure the pin. | |
| void | pwmout_all_free (pwmout_all_t *obj) |
| Deinitialize the pwmout object. | |
| void | pwmout_all_write (pwmout_all_t *obj, float percent) |
| Set the output duty-cycle in range <0.0f, 1.0f> | |
| float | pwmout_all_read (pwmout_all_t *obj) |
| Read the current float-point output duty-cycle. | |
| void | pwmout_all_period (pwmout_all_t *obj, float seconds) |
| Set the PWM period specified in seconds, keeping the duty cycle the same. | |
| void | pwmout_all_period_ms (pwmout_all_t *obj, int ms) |
| Set the PWM period specified in miliseconds, keeping the duty cycle the same. | |
| void | pwmout_all_period_us (pwmout_all_t *obj, int us) |
| Set the PWM period specified in microseconds, keeping the duty cycle the same. | |
| void | pwmout_all_pulsewidth (pwmout_all_t *obj, float seconds) |
| Set the PWM pulsewidth specified in seconds, keeping the period the same. | |
| void | pwmout_all_pulsewidth_ms (pwmout_all_t *obj, int ms) |
| Set the PWM pulsewidth specified in miliseconds, keeping the period the same. | |
| void | pwmout_all_pulsewidth_us (pwmout_all_t *obj, int us) |
| Set the PWM pulsewidth specified in microseconds, keeping the period the same. | |
Function Documentation
| void pwmout_all_free | ( | pwmout_all_t * | obj ) |
Deinitialize the pwmout object.
- Parameters:
-
obj The pwmout object
Definition at line 438 of file pwm_all_api.cpp.
| void pwmout_all_init | ( | pwmout_all_t * | obj, |
| PinName | pin | ||
| ) |
Initialize the pwm out peripheral and configure the pin.
- Parameters:
-
obj The pwmout object to initialize pin The pwmout pin to initialize
Definition at line 108 of file pwm_all_api.cpp.
| void pwmout_all_period | ( | pwmout_all_t * | obj, |
| float | seconds | ||
| ) |
Set the PWM period specified in seconds, keeping the duty cycle the same.
Periods smaller than microseconds (the lowest resolution) are set to zero.
- Parameters:
-
obj The pwmout object seconds The floating-point seconds period
Definition at line 491 of file pwm_all_api.cpp.
| void pwmout_all_period_ms | ( | pwmout_all_t * | obj, |
| int | ms | ||
| ) |
Set the PWM period specified in miliseconds, keeping the duty cycle the same.
- Parameters:
-
obj The pwmout object ms The milisecond period
Definition at line 495 of file pwm_all_api.cpp.
| void pwmout_all_period_us | ( | pwmout_all_t * | obj, |
| int | us | ||
| ) |
Set the PWM period specified in microseconds, keeping the duty cycle the same.
- Parameters:
-
obj The pwmout object us The microsecond period
Definition at line 500 of file pwm_all_api.cpp.
| void pwmout_all_pulsewidth | ( | pwmout_all_t * | obj, |
| float | seconds | ||
| ) |
Set the PWM pulsewidth specified in seconds, keeping the period the same.
- Parameters:
-
obj The pwmout object seconds The floating-point pulsewidth in seconds
Definition at line 538 of file pwm_all_api.cpp.
| void pwmout_all_pulsewidth_ms | ( | pwmout_all_t * | obj, |
| int | ms | ||
| ) |
Set the PWM pulsewidth specified in miliseconds, keeping the period the same.
- Parameters:
-
obj The pwmout object ms The floating-point pulsewidth in miliseconds
Definition at line 542 of file pwm_all_api.cpp.
| void pwmout_all_pulsewidth_us | ( | pwmout_all_t * | obj, |
| int | us | ||
| ) |
Set the PWM pulsewidth specified in microseconds, keeping the period the same.
- Parameters:
-
obj The pwmout object us The floating-point pulsewidth in microseconds
Definition at line 546 of file pwm_all_api.cpp.
| float pwmout_all_read | ( | pwmout_all_t * | obj ) |
Read the current float-point output duty-cycle.
- Parameters:
-
obj The pwmout object
- Returns:
- A floating-point output duty-cycle
Definition at line 484 of file pwm_all_api.cpp.
| void pwmout_all_write | ( | pwmout_all_t * | obj, |
| float | percent | ||
| ) |
Set the output duty-cycle in range <0.0f, 1.0f>
Value 0.0f represents 0 percentage, 1.0f represents 100 percent.
- Parameters:
-
obj The pwmout object percent The floating-point percentage number
Definition at line 444 of file pwm_all_api.cpp.
Generated on Fri Jul 15 2022 11:44:33 by
1.7.2
takaaki mastuzawa