dcmotor27 2.1.0.0
|
API for configuring and manipulating DC Motor 27 Click driver. More...
Topics | |
DC Motor 27 PWM Settings | |
Settings for configuration of DC Motor 27 Click driver. | |
DC Motor 27 MikroBUS Map | |
MikroBUS pin mapping of DC Motor 27 Click driver. | |
Functions | |
void | dcmotor27_cfg_setup (dcmotor27_cfg_t *cfg) |
DC Motor 27 configuration object setup function. | |
err_t | dcmotor27_init (dcmotor27_t *ctx, dcmotor27_cfg_t *cfg) |
DC Motor 27 initialization function. | |
err_t | dcmotor27_default_cfg (dcmotor27_t *ctx) |
DC Motor 27 default configuration function. | |
err_t | dcmotor27_set_duty_cycle (dcmotor27_t *ctx, float duty_cycle) |
DC Motor 27 sets PWM duty cycle. | |
err_t | dcmotor27_pwm_stop (dcmotor27_t *ctx) |
DC Motor 27 stop PWM module. | |
err_t | dcmotor27_pwm_start (dcmotor27_t *ctx) |
DC Motor 27 start PWM module. | |
uint8_t | dcmotor27_get_flt_pin (dcmotor27_t *ctx) |
DC Motor 27 get flt pin state. | |
uint8_t | dcmotor27_get_ip_pin (dcmotor27_t *ctx) |
DC Motor 27 get ip pin state. | |
void | dcmotor27_set_rst_pin (dcmotor27_t *ctx, uint8_t pin_state) |
DC Motor 27 set RST pin state. | |
void | dcmotor27_set_cs_pin (dcmotor27_t *ctx, uint8_t pin_state) |
DC Motor 27 set CS pin state. | |
void | dcmotor27_set_coast (dcmotor27_t *ctx, uint8_t coast_state) |
DC Motor 27 set coast mode funtion. | |
API for configuring and manipulating DC Motor 27 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void dcmotor27_cfg_setup | ( | dcmotor27_cfg_t * | cfg | ) |
DC Motor 27 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See dcmotor27_cfg_t object definition for detailed explanation. |
err_t dcmotor27_default_cfg | ( | dcmotor27_t * | ctx | ) |
DC Motor 27 default configuration function.
This function executes a default configuration of DC Motor 27 click board.
[in] | ctx | : Click context object. See dcmotor27_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t dcmotor27_get_flt_pin | ( | dcmotor27_t * | ctx | ) |
DC Motor 27 get flt pin state.
This function reads flt pin state.
[in] | ctx | : Click context object. See dcmotor27_t object definition for detailed explanation. |
uint8_t dcmotor27_get_ip_pin | ( | dcmotor27_t * | ctx | ) |
DC Motor 27 get ip pin state.
This function reads ip pin state.
[in] | ctx | : Click context object. See dcmotor27_t object definition for detailed explanation. |
err_t dcmotor27_init | ( | dcmotor27_t * | ctx, |
dcmotor27_cfg_t * | cfg ) |
DC Motor 27 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See dcmotor27_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See dcmotor27_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t dcmotor27_pwm_start | ( | dcmotor27_t * | ctx | ) |
DC Motor 27 start PWM module.
This function starts the PWM module output.
[in] | ctx | : Click context object. See dcmotor27_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t dcmotor27_pwm_stop | ( | dcmotor27_t * | ctx | ) |
DC Motor 27 stop PWM module.
This function stops the PWM module output.
[in] | ctx | : Click context object. See dcmotor27_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void dcmotor27_set_coast | ( | dcmotor27_t * | ctx, |
uint8_t | coast_state ) |
DC Motor 27 set coast mode funtion.
This function is used to set motor to coast mode.
[in] | ctx | : Click context object. See dcmotor27_t object definition for detailed explanation. |
[in] | coast_state | : Coast state. |
void dcmotor27_set_cs_pin | ( | dcmotor27_t * | ctx, |
uint8_t | pin_state ) |
DC Motor 27 set CS pin state.
This function is used to set CS pin state.
[in] | ctx | : Click context object. See dcmotor27_t object definition for detailed explanation. |
[in] | pin_state | : State of the pin. |
err_t dcmotor27_set_duty_cycle | ( | dcmotor27_t * | ctx, |
float | duty_cycle ) |
DC Motor 27 sets PWM duty cycle.
This function sets the PWM duty cycle in percentages ( Range[ 0..1 ] ).
[in] | ctx | : Click context object. See dcmotor27_t object definition for detailed explanation. |
[in] | duty_cycle | : PWM duty cycle. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void dcmotor27_set_rst_pin | ( | dcmotor27_t * | ctx, |
uint8_t | pin_state ) |
DC Motor 27 set RST pin state.
This function is used to set RST pin state.
[in] | ctx | : Click context object. See dcmotor27_t object definition for detailed explanation. |
[in] | pin_state | : State of the pin. |