dcmotor 2.0.0.0
|
Functions | |
void | dcmotor_cfg_setup (dcmotor_cfg_t *cfg) |
Config Object Initialization function. | |
DCMOTOR_RETVAL | dcmotor_init (dcmotor_t *ctx, dcmotor_cfg_t *cfg) |
Initialization function. | |
void | dcmotor_set_duty_cycle (dcmotor_t *ctx, float duty_cycle) |
Generic sets PWM duty cycle. | |
void | dcmotor_pwm_stop (dcmotor_t *ctx) |
Stop PWM module. | |
void | dcmotor_pwm_start (dcmotor_t *ctx) |
Start PWM module. | |
void | dcmotor_enable (dcmotor_t *ctx) |
Enable the motor function. | |
void | dcmotor_sleep_mode (dcmotor_t *ctx) |
Set sleep mode function. | |
void | dcmotor_left_direction_fast (dcmotor_t *ctx) |
Select left direction, fast decay function. | |
void | dcmotor_right_direction_fast (dcmotor_t *ctx) |
Select right direction, fast decay function. | |
void | dcmotor_left_direction_slow (dcmotor_t *ctx) |
Select left direction, slow decay function. | |
void | dcmotor_right_direction_slow (dcmotor_t *ctx) |
Select right direction, slow decay function. | |
uint8_t | dcmotor_get_diagnostic (dcmotor_t *ctx) |
Get diagnostic function. | |
void dcmotor_cfg_setup | ( | dcmotor_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void dcmotor_enable | ( | dcmotor_t * | ctx | ) |
Enable the motor function.
ctx | Click object. |
@description This function enable the motor.
uint8_t dcmotor_get_diagnostic | ( | dcmotor_t * | ctx | ) |
Get diagnostic function.
ctx | Click object. |
@description Function get diagnostic by return state of pin.
DCMOTOR_RETVAL dcmotor_init | ( | dcmotor_t * | ctx, |
dcmotor_cfg_t * | cfg ) |
Initialization function.
dcmotor | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void dcmotor_left_direction_fast | ( | dcmotor_t * | ctx | ) |
Select left direction, fast decay function.
ctx | Click object. |
@description Function select left direction, fast decay speed.
void dcmotor_left_direction_slow | ( | dcmotor_t * | ctx | ) |
Select left direction, slow decay function.
ctx | Click object. |
@description Function select left direction, slow decay speed.
void dcmotor_pwm_start | ( | dcmotor_t * | ctx | ) |
Start PWM module.
ctx | Click object. |
@description This function starts PWM module.
void dcmotor_pwm_stop | ( | dcmotor_t * | ctx | ) |
Stop PWM module.
ctx | Click object. |
@description This function stops PWM module.
void dcmotor_right_direction_fast | ( | dcmotor_t * | ctx | ) |
Select right direction, fast decay function.
ctx | Click object. |
@description Function select right direction, fast decay speed.
void dcmotor_right_direction_slow | ( | dcmotor_t * | ctx | ) |
Select right direction, slow decay function.
ctx | Click object. |
@description Function select right direction, slow decay speed.
void dcmotor_set_duty_cycle | ( | dcmotor_t * | ctx, |
float | duty_cycle ) |
Generic sets PWM duty cycle.
ctx | Click object. |
duty_cycle | Duty cycle. |
@description This function sets the PWM duty cycle.
void dcmotor_sleep_mode | ( | dcmotor_t * | ctx | ) |
Set sleep mode function.
ctx | Click object. |
@description This function set sleep mode the motor.