brushless18
2.1.0.0
|
API for configuring and manipulating Brushless 18 Click driver. More...
Modules | |
Brushless 18 PWM Settings | |
Settings for configuration of Brushless 18 Click driver. | |
Brushless 18 MikroBUS Map | |
MikroBUS pin mapping of Brushless 18 Click driver. | |
Functions | |
void | brushless18_cfg_setup (brushless18_cfg_t *cfg) |
Brushless 18 configuration object setup function. More... | |
err_t | brushless18_init (brushless18_t *ctx, brushless18_cfg_t *cfg) |
Brushless 18 initialization function. More... | |
err_t | brushless18_set_duty_cycle (brushless18_t *ctx, float duty_cycle) |
Brushless 18 sets PWM duty cycle. More... | |
err_t | brushless18_pwm_stop (brushless18_t *ctx) |
Brushless 18 stop PWM module. More... | |
err_t | brushless18_pwm_start (brushless18_t *ctx) |
Brushless 18 start PWM module. More... | |
err_t | brushless18_throttle_calib (brushless18_t *ctx) |
Brushless 18 throttle calib module. More... | |
err_t | brushless18_drive_motor (brushless18_t *ctx, uint8_t direction, uint8_t speed) |
Brushless 18 drive motor module. More... | |
API for configuring and manipulating Brushless 18 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void brushless18_cfg_setup | ( | brushless18_cfg_t * | cfg | ) |
Brushless 18 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See brushless18_cfg_t object definition for detailed explanation. |
err_t brushless18_drive_motor | ( | brushless18_t * | ctx, |
uint8_t | direction, | ||
uint8_t | speed | ||
) |
Brushless 18 drive motor module.
This function drives the motor at the selected speed and direction.
[in] | ctx | : Click context object. See brushless18_t object definition for detailed explanation. |
[in] | direction | :
|
[in] | speed | : Speed percents [0-100]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t brushless18_init | ( | brushless18_t * | ctx, |
brushless18_cfg_t * | cfg | ||
) |
Brushless 18 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See brushless18_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See brushless18_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t brushless18_pwm_start | ( | brushless18_t * | ctx | ) |
Brushless 18 start PWM module.
This function starts the PWM module output.
[in] | ctx | : Click context object. See brushless18_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t brushless18_pwm_stop | ( | brushless18_t * | ctx | ) |
Brushless 18 stop PWM module.
This function stops the PWM module output.
[in] | ctx | : Click context object. See brushless18_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t brushless18_set_duty_cycle | ( | brushless18_t * | ctx, |
float | duty_cycle | ||
) |
Brushless 18 sets PWM duty cycle.
This function sets the PWM duty cycle in percentages ( Range[ 0..1 ] ).
[in] | ctx | : Click context object. See brushless18_t object definition for detailed explanation. |
[in] | duty_cycle | : PWM duty cycle. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t brushless18_throttle_calib | ( | brushless18_t * | ctx | ) |
Brushless 18 throttle calib module.
This function performs the ESC throttle calibration.
[in] | ctx | : Click context object. See brushless18_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.