brushless23
2.0.0.0
|
API for configuring and manipulating Brushless 23 Click driver. More...
Modules | |
Brushless 23 Registers List | |
List of registers of Brushless 23 Click driver. | |
Brushless 23 Registers Settings | |
Settings for registers of Brushless 23 Click driver. | |
Brushless 23 MikroBUS Map | |
MikroBUS pin mapping of Brushless 23 Click driver. | |
Functions | |
void | brushless23_cfg_setup (brushless23_cfg_t *cfg) |
Brushless 23 configuration object setup function. More... | |
err_t | brushless23_init (brushless23_t *ctx, brushless23_cfg_t *cfg) |
Brushless 23 initialization function. More... | |
err_t | brushless23_default_cfg (brushless23_t *ctx) |
Brushless 23 default configuration function. More... | |
err_t | brushless23_write_register (brushless23_t *ctx, uint8_t reg, uint8_t data_in) |
Brushless 23 write register function. More... | |
err_t | brushless23_read_register (brushless23_t *ctx, uint8_t reg, uint8_t *data_out) |
Brushless 23 read register function. More... | |
err_t | brushless23_pwm_set_duty_cycle (brushless23_t *ctx, float duty_cycle) |
Brushless 23 sets PWM duty cycle. More... | |
err_t | brushless23_pwm_stop (brushless23_t *ctx) |
Brushless 23 stop PWM module. More... | |
err_t | brushless23_pwm_start (brushless23_t *ctx) |
Brushless 23 start PWM module. More... | |
err_t | brushless23_read_an_pin_value (brushless23_t *ctx, uint16_t *data_out) |
Brushless 23 read AN pin value function. More... | |
err_t | brushless23_read_an_pin_voltage (brushless23_t *ctx, float *data_out) |
Brushless 23 read AN pin voltage level function. More... | |
void | brushless23_set_sby_pin (brushless23_t *ctx, uint8_t state) |
Brushless 23 set sby pin function. More... | |
void | brushless23_set_direction (brushless23_t *ctx, uint8_t dir) |
Brushless 23 set direction function. More... | |
void | brushless23_switch_direction (brushless23_t *ctx) |
Brushless 23 switch direction function. More... | |
uint8_t | brushless23_get_int_pin (brushless23_t *ctx) |
Brushless 22 get int pin function. More... | |
err_t | brushless23_get_motor_speed (brushless23_t *ctx, float *motor_speed_hz) |
Brushless 23 get motor speed function. More... | |
err_t | brushless23_set_start_duty (brushless23_t *ctx, float duty_cycle) |
Brushless 23 set start duty function. More... | |
err_t | brushless23_set_stop_duty (brushless23_t *ctx, float duty_cycle) |
Brushless 23 set stop duty function. More... | |
err_t | brushless23_set_max_duty (brushless23_t *ctx, float duty_cycle) |
Brushless 23 set max duty function. More... | |
err_t | brushless23_set_change_duty (brushless23_t *ctx, float duty_cycle) |
Brushless 23 set change duty function. More... | |
err_t | brushless23_set_start_rpm (brushless23_t *ctx, float duty_cycle) |
Brushless 23 set start rpm function. More... | |
err_t | brushless23_set_duty_cycle (brushless23_t *ctx, float duty_cycle) |
Brushless 23 set duty cycle function. More... | |
API for configuring and manipulating Brushless 23 Click driver.
void brushless23_cfg_setup | ( | brushless23_cfg_t * | cfg | ) |
Brushless 23 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See brushless23_cfg_t object definition for detailed explanation. |
err_t brushless23_default_cfg | ( | brushless23_t * | ctx | ) |
Brushless 23 default configuration function.
This function executes a default configuration of Brushless 23 click board.
[in] | ctx | : Click context object. See brushless23_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t brushless23_get_int_pin | ( | brushless23_t * | ctx | ) |
Brushless 22 get int pin function.
This function returns the INT pin logic state.
[in] | ctx | : Click context object. See brushless23_t object definition for detailed explanation. |
err_t brushless23_get_motor_speed | ( | brushless23_t * | ctx, |
float * | motor_speed_hz | ||
) |
Brushless 23 get motor speed function.
This function reads the motor speed in Hz.
[in] | ctx | : Click context object. See brushless23_t object definition for detailed explanation. |
[out] | motor_speed_hz | : Motor speed in Hz. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t brushless23_init | ( | brushless23_t * | ctx, |
brushless23_cfg_t * | cfg | ||
) |
Brushless 23 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See brushless23_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See brushless23_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t brushless23_pwm_set_duty_cycle | ( | brushless23_t * | ctx, |
float | duty_cycle | ||
) |
Brushless 23 sets PWM duty cycle.
This function sets the PWM duty cycle in percentages ( Range[ 0..1 ] ).
[in] | ctx | : Click context object. See brushless23_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 brushless23_pwm_start | ( | brushless23_t * | ctx | ) |
Brushless 23 start PWM module.
This function starts the PWM module output.
[in] | ctx | : Click context object. See brushless23_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t brushless23_pwm_stop | ( | brushless23_t * | ctx | ) |
Brushless 23 stop PWM module.
This function stops the PWM module output.
[in] | ctx | : Click context object. See brushless23_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t brushless23_read_an_pin_value | ( | brushless23_t * | ctx, |
uint16_t * | data_out | ||
) |
Brushless 23 read AN pin value function.
This function reads results of AD conversion of the AN pin.
[in] | ctx | : Click context object. See brushless23_t object definition for detailed explanation. |
[out] | data_out | : Output ADC result. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t brushless23_read_an_pin_voltage | ( | brushless23_t * | ctx, |
float * | data_out | ||
) |
Brushless 23 read AN pin voltage level function.
This function reads results of AD conversion of the AN pin and converts them to proportional voltage level.
[in] | ctx | : Click context object. See brushless23_t object definition for detailed explanation. |
[out] | data_out | : Output voltage level of the analog pin [V]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t brushless23_read_register | ( | brushless23_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out | ||
) |
Brushless 23 read register function.
This function reads a data byte from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See brushless23_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t brushless23_set_change_duty | ( | brushless23_t * | ctx, |
float | duty_cycle | ||
) |
Brushless 23 set change duty function.
This function sets the change duty cycle.
[in] | ctx | : Click context object. See brushless23_t object definition for detailed explanation. |
[in] | duty_cycle | : Duty cycle in range 0.004 - 0.996. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void brushless23_set_direction | ( | brushless23_t * | ctx, |
uint8_t | dir | ||
) |
Brushless 23 set direction function.
This function sets the motor direction.
[in] | ctx | : Click context object. See brushless23_t object definition for detailed explanation. |
[in] | dir |
|
err_t brushless23_set_duty_cycle | ( | brushless23_t * | ctx, |
float | duty_cycle | ||
) |
Brushless 23 set duty cycle function.
This function sets the duty cycle in percentages ( Range[ 0..1 ] ).
[in] | ctx | : Click context object. See brushless23_t object definition for detailed explanation. |
[in] | duty_cycle | : Duty cycle in range 0.0 - 1.0. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t brushless23_set_max_duty | ( | brushless23_t * | ctx, |
float | duty_cycle | ||
) |
Brushless 23 set max duty function.
This function sets the max duty cycle.
[in] | ctx | : Click context object. See brushless23_t object definition for detailed explanation. |
[in] | duty_cycle | : Duty cycle in range 0.502 - 1.0. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void brushless23_set_sby_pin | ( | brushless23_t * | ctx, |
uint8_t | state | ||
) |
Brushless 23 set sby pin function.
This function sets the SBY pin state.
[in] | ctx | : Click context object. See brushless23_t object definition for detailed explanation. |
[in] | state |
|
err_t brushless23_set_start_duty | ( | brushless23_t * | ctx, |
float | duty_cycle | ||
) |
Brushless 23 set start duty function.
This function sets the start duty cycle.
[in] | ctx | : Click context object. See brushless23_t object definition for detailed explanation. |
[in] | duty_cycle | : Duty cycle in range 0.0 - 0.498. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t brushless23_set_start_rpm | ( | brushless23_t * | ctx, |
float | duty_cycle | ||
) |
Brushless 23 set start rpm function.
This function sets the start rpm duty cycle.
[in] | ctx | : Click context object. See brushless23_t object definition for detailed explanation. |
[in] | duty_cycle | : Duty cycle in range 0.0 - 0.498. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t brushless23_set_stop_duty | ( | brushless23_t * | ctx, |
float | duty_cycle | ||
) |
Brushless 23 set stop duty function.
This function sets the stop duty cycle.
[in] | ctx | : Click context object. See brushless23_t object definition for detailed explanation. |
[in] | duty_cycle | : Duty cycle in range 0.0 - 0.496. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void brushless23_switch_direction | ( | brushless23_t * | ctx | ) |
Brushless 23 switch direction function.
This function switches the direction by toggling the DIR pin state.
[in] | ctx | : Click context object. See brushless23_t object definition for detailed explanation. |
err_t brushless23_write_register | ( | brushless23_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in | ||
) |
Brushless 23 write register function.
This function writes a desired data byte to the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See brushless23_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.