vibromotor2 2.0.0.0
|
API for configuring and manipulating Vibro Motor 2 Click driver. More...
Topics | |
Vibro Motor 2 PWM Settings | |
Settings for configuration of Vibro Motor 2 Click driver. | |
Vibro Motor 2 MikroBUS Map | |
MikroBUS pin mapping of Vibro Motor 2 Click driver. | |
Vibromotor2_cfg | |
Functions | |
void | vibromotor2_cfg_setup (vibromotor2_cfg_t *cfg) |
Vibro Motor 2 configuration object setup function. | |
err_t | vibromotor2_init (vibromotor2_t *ctx, vibromotor2_cfg_t *cfg) |
Vibro Motor 2 initialization function. | |
err_t | vibromotor2_set_duty_cycle (vibromotor2_t *ctx, float duty_cycle) |
Vibro Motor 2 sets PWM duty cycle. | |
err_t | vibromotor2_pwm_stop (vibromotor2_t *ctx) |
Vibro Motor 2 stop PWM module. | |
err_t | vibromotor2_pwm_start (vibromotor2_t *ctx) |
Vibro Motor 2 start PWM module. | |
API for configuring and manipulating Vibro Motor 2 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void vibromotor2_cfg_setup | ( | vibromotor2_cfg_t * | cfg | ) |
Vibro Motor 2 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See vibromotor2_cfg_t object definition for detailed explanation. |
err_t vibromotor2_init | ( | vibromotor2_t * | ctx, |
vibromotor2_cfg_t * | cfg ) |
Vibro Motor 2 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See vibromotor2_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See vibromotor2_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t vibromotor2_pwm_start | ( | vibromotor2_t * | ctx | ) |
Vibro Motor 2 start PWM module.
This function starts the PWM moudle output.
[out] | ctx | : Click context object. See vibromotor2_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t vibromotor2_pwm_stop | ( | vibromotor2_t * | ctx | ) |
Vibro Motor 2 stop PWM module.
This function stops the PWM moudle output.
[out] | ctx | : Click context object. See vibromotor2_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t vibromotor2_set_duty_cycle | ( | vibromotor2_t * | ctx, |
float | duty_cycle ) |
Vibro Motor 2 sets PWM duty cycle.
This function sets the PWM duty cycle in percentages ( Range[ 0..1 ] ).
[out] | ctx | : Click context object. See vibromotor2_t object definition for detailed explanation. |
[in] | duty_ratio | : PWM duty_ratio. |
0
- Success, -1
- Error.