brushless9 2.0.0.0
|
API for configuring and manipulating Brushless 9 Click driver. More...
Topics | |
Brushless 9 PWM Settings | |
Settings for configuration of Brushless 9 Click driver. | |
Brushless 9 MikroBUS Map | |
MikroBUS pin mapping of Brushless 9 Click driver. | |
Brushless9_cfg | |
Functions | |
void | brushless9_cfg_setup (brushless9_cfg_t *cfg) |
Brushless 9 configuration object setup function. | |
err_t | brushless9_init (brushless9_t *ctx, brushless9_cfg_t *cfg) |
Brushless 9 initialization function. | |
err_t | brushless9_set_duty_cycle (brushless9_t *ctx, float duty_cycle) |
Brushless 9 sets PWM duty cycle. | |
err_t | brushless9_pwm_stop (brushless9_t *ctx) |
Brushless 9 stop PWM module. | |
err_t | brushless9_pwm_start (brushless9_t *ctx) |
Brushless 9 start PWM module. | |
void | brushless9_set_dir (brushless9_t *ctx, uint8_t state) |
Brushless 9 dir pin setting. | |
void | brushless9_set_brk (brushless9_t *ctx, uint8_t state) |
Brushless 9 brk pin setting. | |
uint8_t | brushless9_get_fg (brushless9_t *ctx) |
Brushless 9 fg state. | |
uint8_t | brushless9_get_int_pin (brushless9_t *ctx) |
Brushless 9 int_pin state. | |
API for configuring and manipulating Brushless 9 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void brushless9_cfg_setup | ( | brushless9_cfg_t * | cfg | ) |
Brushless 9 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See brushless9_cfg_t object definition for detailed explanation. |
uint8_t brushless9_get_fg | ( | brushless9_t * | ctx | ) |
Brushless 9 fg state.
This function reads fg pin input state.
[in] | ctx | Click context object. See brushless9_t object definition for detailed explanation. |
0
- logical state low, 1
- logical state high. uint8_t brushless9_get_int_pin | ( | brushless9_t * | ctx | ) |
Brushless 9 int_pin state.
This function reads int_pin pin input state.
[in] | ctx | Click context object. See brushless9_t object definition for detailed explanation. |
0
- logical state low, 1
- logical state high. err_t brushless9_init | ( | brushless9_t * | ctx, |
brushless9_cfg_t * | cfg ) |
Brushless 9 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See brushless9_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See brushless9_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t brushless9_pwm_start | ( | brushless9_t * | ctx | ) |
Brushless 9 start PWM module.
This function starts the PWM moudle output.
[out] | ctx | : Click context object. See brushless9_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t brushless9_pwm_stop | ( | brushless9_t * | ctx | ) |
Brushless 9 stop PWM module.
This function stops the PWM moudle output.
[out] | ctx | : Click context object. See brushless9_t object definition for detailed explanation. |
0
- Success, -1
- Error.void brushless9_set_brk | ( | brushless9_t * | ctx, |
uint8_t | state ) |
Brushless 9 brk pin setting.
This function sets brk pin output to status setting.
[in] | ctx | Click context object. See brushless9_t object definition for detailed explanation. |
[in] | state | Output value setting.
|
void brushless9_set_dir | ( | brushless9_t * | ctx, |
uint8_t | state ) |
Brushless 9 dir pin setting.
This function sets dir pin output to status setting.
[in] | ctx | Click context object. See brushless9_t object definition for detailed explanation. |
[in] | state | Output value setting.
|
err_t brushless9_set_duty_cycle | ( | brushless9_t * | ctx, |
float | duty_cycle ) |
Brushless 9 sets PWM duty cycle.
This function sets the PWM duty cycle in percentages ( Range[ 0..1 ] ).
[out] | ctx | : Click context object. See brushless9_t object definition for detailed explanation. |
[in] | duty_ratio | : PWM duty_ratio. |
0
- Success, -1
- Error.