vibromotor
2.0.0.0
|
API for configuring and manipulating Vibro Motor Click driver. More...
Modules | |
Vibro Motor PWM Settings | |
Settings for configuration of Vibro Motor Click driver. | |
Vibro Motor MikroBUS Map | |
MikroBUS pin mapping of Vibro Motor Click driver. | |
Vibromotor_cfg | |
Functions | |
void | vibromotor_cfg_setup (vibromotor_cfg_t *cfg) |
Vibro Motor configuration object setup function. More... | |
err_t | vibromotor_init (vibromotor_t *ctx, vibromotor_cfg_t *cfg) |
Vibro Motor initialization function. More... | |
err_t | vibromotor_set_duty_cycle (vibromotor_t *ctx, float duty_cycle) |
Vibro Motor sets PWM duty cycle. More... | |
err_t | vibromotor_pwm_stop (vibromotor_t *ctx) |
Vibro Motor stop PWM module. More... | |
err_t | vibromotor_pwm_start (vibromotor_t *ctx) |
Vibro Motor start PWM module. More... | |
API for configuring and manipulating Vibro Motor Click driver.
void vibromotor_cfg_setup | ( | vibromotor_cfg_t * | cfg | ) |
Vibro Motor configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See vibromotor_cfg_t object definition for detailed explanation. |
err_t vibromotor_init | ( | vibromotor_t * | ctx, |
vibromotor_cfg_t * | cfg | ||
) |
Vibro Motor initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See vibromotor_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See vibromotor_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t vibromotor_pwm_start | ( | vibromotor_t * | ctx | ) |
Vibro Motor start PWM module.
This function starts the PWM moudle output.
[out] | ctx | : Click context object. See vibromotor_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t vibromotor_pwm_stop | ( | vibromotor_t * | ctx | ) |
Vibro Motor stop PWM module.
This function stops the PWM moudle output.
[out] | ctx | : Click context object. See vibromotor_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t vibromotor_set_duty_cycle | ( | vibromotor_t * | ctx, |
float | duty_cycle | ||
) |
Vibro Motor sets PWM duty cycle.
This function sets the PWM duty cycle in percentages ( Range[ 0..1 ] ).
[out] | ctx | : Click context object. See vibromotor_t object definition for detailed explanation. |
[in] | duty_ratio | : PWM duty_ratio. |
0
- Success, -1
- Error.