dcmotor9 2.0.0.0
|
Functions | |
void | dcmotor9_cfg_setup (dcmotor9_cfg_t *cfg) |
Configuration Object Init Setup function. More... | |
err_t | dcmotor9_init (dcmotor9_t *ctx, dcmotor9_cfg_t *cfg) |
Initialization function. More... | |
void | dcmotor9_set_duty_cycle (dcmotor9_t *ctx, float duty_cycle) |
Generic sets PWM duty cycle. More... | |
void | dcmotor9_pwm_stop (dcmotor9_t *ctx) |
Stop PWM module. More... | |
void | dcmotor9_pwm_start (dcmotor9_t *ctx) |
Start PWM module. More... | |
void | dcmotor9_enable (dcmotor9_t *ctx) |
Enable the engine function. More... | |
void | dcmotor9_standby (dcmotor9_t *ctx) |
Disable the engine function. More... | |
void | dcmotor9_counter_clockwise (dcmotor9_t *ctx) |
Set the counter clockwise direction of rotation function. More... | |
void | dcmotor9_clockwise (dcmotor9_t *ctx) |
Set the clockwise direction of rotation function. More... | |
void | dcmotor9_short_brake (dcmotor9_t *ctx) |
Brake the engine function. More... | |
void | dcmotor9_stop (dcmotor9_t *ctx) |
Stop the engine function. More... | |
err_t | dcmotor9_read_an_value (dcmotor9_t *ctx, uint16_t *data_out) |
AN Value Read function. More... | |
err_t | dcmotor9_read_an_voltage (dcmotor9_t *ctx, float *data_out) |
AN Voltage Read function. More... | |
void dcmotor9_cfg_setup | ( | dcmotor9_cfg_t * | cfg | ) |
Configuration Object Init Setup function.
[out] | cfg | Click configuration structure. |
@description This function initializes click configuration structure to initial state.
void dcmotor9_clockwise | ( | dcmotor9_t * | ctx | ) |
Set the clockwise direction of rotation function.
ctx | Click object. |
@description Function sets the clockwise direction of rotation by setting IN1 ( CS ) pin and claering IN2 ( PWM ) pin on DC Motor 9 Click board.
void dcmotor9_counter_clockwise | ( | dcmotor9_t * | ctx | ) |
Set the counter clockwise direction of rotation function.
ctx | Click object. |
@description Function sets the counter clockwise direction of rotation by clearing IN1 ( CS ) pin and seting IN2 ( PWM ) pin on DC Motor 9 Click board.
void dcmotor9_enable | ( | dcmotor9_t * | ctx | ) |
Enable the engine function.
ctx | Click object. |
@description Function enables the engine by setting SHDN ( RST ) pin on DC Motor 9 Click board.
err_t dcmotor9_init | ( | dcmotor9_t * | ctx, |
dcmotor9_cfg_t * | cfg | ||
) |
Initialization function.
[out] | ctx | Click object. |
[in] | cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click board.
void dcmotor9_pwm_start | ( | dcmotor9_t * | ctx | ) |
Start PWM module.
ctx | Click object. |
@description This function starts PWM module.
void dcmotor9_pwm_stop | ( | dcmotor9_t * | ctx | ) |
Stop PWM module.
ctx | Click object. |
@description This function stops PWM module.
err_t dcmotor9_read_an_value | ( | dcmotor9_t * | ctx, |
uint16_t * | data_out | ||
) |
AN Value Read function.
[in] | ctx | Click object. |
[out] | data_out | AN value. |
@description This function reads results of AD conversion on the AN pin.
err_t dcmotor9_read_an_voltage | ( | dcmotor9_t * | ctx, |
float * | data_out | ||
) |
AN Voltage Read function.
[in] | ctx | Click object. |
[out] | data_out | AN voltage [V]. |
@description This function reads results of AD conversion on the AN pin and calculates these results to voltage.
void dcmotor9_set_duty_cycle | ( | dcmotor9_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 dcmotor9_short_brake | ( | dcmotor9_t * | ctx | ) |
Brake the engine function.
ctx | Click object. |
@description Function brakes the engine by setting IN1 ( CS ) and IN2 ( PWM ) pins on DC Motor 9 Click board.
void dcmotor9_standby | ( | dcmotor9_t * | ctx | ) |
Disable the engine function.
ctx | Click object. |
@description Function disables the engine by clearing SHDN ( RST ) pin on DC Motor 9 Click board.
void dcmotor9_stop | ( | dcmotor9_t * | ctx | ) |
Stop the engine function.
ctx | Click object. |
@description Function stops the engine by clearing IN1 ( CS ) and IN2 ( PWM ) pins on DC Motor 9 Click board.