dcmotor5 2.0.0.0
|
API for configuring and manipulating DC Motor 5 Click driver. More...
Topics | |
DC Motor 5 PWM Settings | |
Settings for configuration of DC Motor 5 Click driver. | |
DC Motor 5 MikroBUS Map | |
MikroBUS pin mapping of DC Motor 5 Click driver. | |
Functions | |
void | dcmotor5_cfg_setup (dcmotor5_cfg_t *cfg) |
DC Motor 5 configuration object setup function. | |
err_t | dcmotor5_init (dcmotor5_t *ctx, dcmotor5_cfg_t *cfg) |
DC Motor 5 initialization function. | |
void | dcmotor5_default_cfg (dcmotor5_t *ctx) |
DC Motor 5 default configuration function. | |
void | dcmotor5_set_duty_cycle (dcmotor5_t *ctx, float duty_cycle) |
DC Motor 5 sets PWM duty cycle. | |
void | dcmotor5_pwm_stop (dcmotor5_t *ctx) |
DC Motor 5 stop PWM module. | |
void | dcmotor5_pwm_start (dcmotor5_t *ctx) |
DC Motor 5 start PWM module. | |
void | dcmotor5_enable (dcmotor5_t *ctx) |
DC Motor 5 start PWM module. | |
void | dcmotor5_standby (dcmotor5_t *ctx) |
DC Motor 5 Disable the engine function. | |
void | dcmotor5_counter_clockwise (dcmotor5_t *ctx) |
DC Motor 5 Set the direction of rotation in the counter clockwise direction function. | |
void | dcmotor5_clockwise (dcmotor5_t *ctx) |
DC Motor 5 Set the direction of rotation in the clockwise direction function. | |
void | dcmotor5_short_brake (dcmotor5_t *ctx) |
DC Motor 5 brake the engine function. | |
void | dcmotor5_stop (dcmotor5_t *ctx) |
DC Motor 5 stop the engine function. | |
uint8_t | dcmotor5_get_fault_conditions (dcmotor5_t *ctx) |
DC Motor 5 get fault conditions state function. | |
uint8_t | dcmotor5_get_sense_comparator (dcmotor5_t *ctx) |
DC Motor 5 get sense comparator. | |
API for configuring and manipulating DC Motor 5 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void dcmotor5_cfg_setup | ( | dcmotor5_cfg_t * | cfg | ) |
DC Motor 5 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See dcmotor5_cfg_t object definition for detailed explanation. |
void dcmotor5_clockwise | ( | dcmotor5_t * | ctx | ) |
DC Motor 5 Set the direction of rotation in the clockwise direction function.
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.
[in] | ctx | : Click context object. See dcmotor5_t object definition for detailed explanation. |
void dcmotor5_counter_clockwise | ( | dcmotor5_t * | ctx | ) |
DC Motor 5 Set the direction of rotation in the counter clockwise direction function.
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.
[in] | ctx | : Click context object. See dcmotor5_t object definition for detailed explanation. |
void dcmotor5_default_cfg | ( | dcmotor5_t * | ctx | ) |
DC Motor 5 default configuration function.
This function executes a default configuration of DC Motor 5 click board.
[in] | ctx | : Click context object. See dcmotor5_t object definition for detailed explanation. |
0
- Success, -1
- Error.void dcmotor5_enable | ( | dcmotor5_t * | ctx | ) |
DC Motor 5 start PWM module.
This function starts the PWM module output.
[in] | ctx | : Click context object. See dcmotor5_t object definition for detailed explanation. |
uint8_t dcmotor5_get_fault_conditions | ( | dcmotor5_t * | ctx | ) |
DC Motor 5 get fault conditions state function.
This function starts the PWM module output.
[in] | ctx | : Click context object. See dcmotor5_t object definition for detailed explanation. |
uint8_t dcmotor5_get_sense_comparator | ( | dcmotor5_t * | ctx | ) |
DC Motor 5 get sense comparator.
This function returns sense comparator state, state of AN pin on DC Motor 5 Click board.
[in] | ctx | : Click context object. See dcmotor5_t object definition for detailed explanation. |
err_t dcmotor5_init | ( | dcmotor5_t * | ctx, |
dcmotor5_cfg_t * | cfg ) |
DC Motor 5 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See dcmotor5_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See dcmotor5_cfg_t object definition for detailed explanation. |
void dcmotor5_pwm_start | ( | dcmotor5_t * | ctx | ) |
DC Motor 5 start PWM module.
This function starts the PWM module output.
[in] | ctx | : Click context object. See dcmotor5_t object definition for detailed explanation. |
void dcmotor5_pwm_stop | ( | dcmotor5_t * | ctx | ) |
DC Motor 5 stop PWM module.
This function stops the PWM module output.
[in] | ctx | : Click context object. See dcmotor5_t object definition for detailed explanation. |
void dcmotor5_set_duty_cycle | ( | dcmotor5_t * | ctx, |
float | duty_cycle ) |
DC Motor 5 sets PWM duty cycle.
This function sets the PWM duty cycle in percentages ( Range[ 0..1 ] ).
[in] | ctx | : Click context object. See dcmotor5_t object definition for detailed explanation. |
[in] | duty_cycle | : PWM duty cycle. |
void dcmotor5_short_brake | ( | dcmotor5_t * | ctx | ) |
DC Motor 5 brake the engine function.
This function starts the PWM module output.
[in] | ctx | : Click context object. See dcmotor5_t object definition for detailed explanation. |
void dcmotor5_standby | ( | dcmotor5_t * | ctx | ) |
DC Motor 5 Disable the engine function.
Function disables the engine by clearing SLEEP ( RST ) pin on DC Motor 5 Click board.
[in] | ctx | : Click context object. See dcmotor5_t object definition for detailed explanation. |
void dcmotor5_stop | ( | dcmotor5_t * | ctx | ) |
DC Motor 5 stop the engine function.
This function starts the PWM module output.
[in] | ctx | : Click context object. See dcmotor5_t object definition for detailed explanation. |