dcmotor5
2.0.0.0
|
Functions | |
void | dcmotor5_cfg_setup (dcmotor5_cfg_t *cfg) |
Config Object Initialization function. More... | |
DCMOTOR5_RETVAL | dcmotor5_init (dcmotor5_t *ctx, dcmotor5_cfg_t *cfg) |
Initialization function. More... | |
void | dcmotor5_set_duty_cycle (dcmotor5_t *ctx, float duty_cycle) |
Generic sets PWM duty cycle. More... | |
void | dcmotor5_pwm_stop (dcmotor5_t *ctx) |
Stop PWM module. More... | |
void | dcmotor5_pwm_start (dcmotor5_t *ctx) |
Start PWM module. More... | |
void | dcmotor5_enable (dcmotor5_t *ctx) |
Enable the engine function. More... | |
void | dcmotor5_standby (dcmotor5_t *ctx) |
Disable the engine function. More... | |
void | dcmotor5_counter_clockwise (dcmotor5_t *ctx) |
Set the direction of rotation in the counter clockwise direction function. More... | |
void | dcmotor5_clockwise (dcmotor5_t *ctx) |
Set the direction of rotation in the clockwise direction function. More... | |
void | dcmotor5_short_brake (dcmotor5_t *ctx) |
Brake the engine function. More... | |
void | dcmotor5_stop (dcmotor5_t *ctx) |
Stop the engine function. More... | |
uint8_t | dcmotor5_get_fault_conditions (dcmotor5_t *ctx) |
Get fault conditions state function. More... | |
uint8_t | dcmotor5_get_sense_comparator (dcmotor5_t *ctx) |
Get sense comparator state function. More... | |
void dcmotor5_cfg_setup | ( | dcmotor5_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void dcmotor5_clockwise | ( | dcmotor5_t * | ctx | ) |
Set the direction of rotation in the clockwise direction function.
ctx | Click object. |
@description Function sets the direction of rotation in the clockwise direction by setting IN1 ( PWM ) pin and claering IN2 ( INT ) pin on DC Motor 5 Click board.
void dcmotor5_counter_clockwise | ( | dcmotor5_t * | ctx | ) |
Set the direction of rotation in the counter clockwise direction function.
ctx | Click object. |
@description Function sets the direction of rotation in the counter clockwise direction by clearing IN1 ( PWM ) pin and seting IN2 ( INT ) pin on DC Motor 5 Click board.
void dcmotor5_enable | ( | dcmotor5_t * | ctx | ) |
Enable the engine function.
ctx | Click object. |
@description Function enables the engine by setting SLEEP ( RST ) pin on DC Motor 5 Click board.
uint8_t dcmotor5_get_fault_conditions | ( | dcmotor5_t * | ctx | ) |
Get fault conditions state function.
ctx | Click object. |
@description Function returns fault condition state, state of CS pin on DC Motor 5 Click board.
uint8_t dcmotor5_get_sense_comparator | ( | dcmotor5_t * | ctx | ) |
Get sense comparator state function.
ctx | Click object. |
@desription Function returns sense comparator state, state of AN pin on DC Motor 5 Click board.
DCMOTOR5_RETVAL dcmotor5_init | ( | dcmotor5_t * | ctx, |
dcmotor5_cfg_t * | cfg | ||
) |
Initialization function.
dcmotor5 | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void dcmotor5_pwm_start | ( | dcmotor5_t * | ctx | ) |
Start PWM module.
ctx | Click object. |
@description This function starts PWM module.
void dcmotor5_pwm_stop | ( | dcmotor5_t * | ctx | ) |
Stop PWM module.
ctx | Click object. |
@description This function stops PWM module.
void dcmotor5_set_duty_cycle | ( | dcmotor5_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 dcmotor5_short_brake | ( | dcmotor5_t * | ctx | ) |
Brake the engine function.
ctx | Click object. |
@description Function brakes the engine by setting IN1 ( PWM ) and IN2 ( INT ) pins on DC Motor 5 Click board.
void dcmotor5_standby | ( | dcmotor5_t * | ctx | ) |
Disable the engine function.
ctx | Click object. |
@description Function disables the engine by clearing SLEEP ( RST ) pin on DC Motor 5 Click board.
void dcmotor5_stop | ( | dcmotor5_t * | ctx | ) |
Stop the engine function.
ctx | Click object. |
@description Function stops the engine by clearing IN1 ( PWM ) and IN2 ( INT ) pins on DC Motor 5 Click board.