brushless25 2.1.0.0
|
API for configuring and manipulating Brushless 25 Click driver. More...
Topics | |
Brushless 25 Registers List | |
List of registers of Brushless 25 Click driver. | |
Brushless 25 Registers Settings | |
Settings for registers of Brushless 25 Click driver. | |
Brushless 25 MikroBUS Map | |
MikroBUS pin mapping of Brushless 25 Click driver. | |
Functions | |
void | brushless25_cfg_setup (brushless25_cfg_t *cfg) |
Brushless 25 configuration object setup function. | |
err_t | brushless25_init (brushless25_t *ctx, brushless25_cfg_t *cfg) |
Brushless 25 initialization function. | |
err_t | brushless25_set_duty_cycle (brushless25_t *ctx, float duty_cycle) |
Brushless 24 sets PWM duty cycle. | |
err_t | brushless25_pwm_stop (brushless25_t *ctx) |
Brushless 24 stop PWM module. | |
err_t | brushless25_pwm_start (brushless25_t *ctx) |
Brushless 24 start PWM module. | |
err_t | brushless25_default_cfg (brushless25_t *ctx) |
Brushless 25 default configuration function. | |
err_t | brushless25_i2c_write (brushless25_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
Brushless 25 I2C writing function. | |
err_t | brushless25_i2c_read (brushless25_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
Brushless 25 I2C reading function. | |
err_t | brushless25_spi_write (brushless25_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
Brushless 25 SPI writing function. | |
void | brushless25_enable_drvoff (brushless25_t *ctx) |
Brushless 25 enable drvoff mode function. | |
void | brushless25_disable_drvoff (brushless25_t *ctx) |
Brushless 25 disable drvoff mode function. | |
err_t | brushless25_cfg_write (brushless25_t *ctx, uint16_t reg, uint32_t data_in) |
Brushless 25 config writing function. | |
err_t | brushless25_cfg_write_with_crc (brushless25_t *ctx, uint16_t reg, uint32_t data_in) |
Brushless 25 config writing function with crc on. | |
err_t | brushless25_register_write (brushless25_t *ctx, uint16_t reg, uint32_t data_in) |
Brushless 25 data writing function. | |
err_t | brushless25_cfg_read (brushless25_t *ctx, uint16_t reg, uint32_t *data_out) |
Brushless 25 config reading function. | |
err_t | brushless25_cfg_read_with_crc (brushless25_t *ctx, uint16_t reg, uint32_t *data_out) |
Brushless 25 config reading function. | |
err_t | brushless25_register_read (brushless25_t *ctx, uint16_t reg, uint32_t *data_out) |
Brushless 25 data reading function. | |
err_t | brushless25_pot_write (brushless25_t *ctx, uint8_t cmd, uint8_t reg, uint16_t data_in) |
Brushless 25 pot writing function. | |
err_t | brushless25_set_wiper_position (brushless25_t *ctx, uint16_t data_in) |
Brushless 25 set pot wiper position function. | |
err_t | brushless25_set_speed_ctrl_mode (brushless25_t *ctx, uint8_t mode) |
Brushless 25 set speed control mode function. | |
err_t | brushless25_set_speed_value (brushless25_t *ctx, float spd_val) |
Brushless 25 set speed function. | |
err_t | brushless25_set_brake_state (brushless25_t *ctx, uint8_t brake_state) |
Brushless 25 set brake state function. | |
err_t | brushless25_slow_start_config (brushless25_t *ctx) |
Brushless 25 slow start function. | |
err_t | brushless25_fast_start_config (brushless25_t *ctx) |
Brushless 25 fast start function. | |
err_t | brushless25_ultra_fast_start_config (brushless25_t *ctx) |
Brushless 25 ultra fast start function. | |
API for configuring and manipulating Brushless 25 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
err_t brushless25_cfg_read | ( | brushless25_t * | ctx, |
uint16_t | reg, | ||
uint32_t * | data_out ) |
Brushless 25 config reading function.
This function reads a 32 bite data from the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See brushless25_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t brushless25_cfg_read_with_crc | ( | brushless25_t * | ctx, |
uint16_t | reg, | ||
uint32_t * | data_out ) |
Brushless 25 config reading function.
This function reads a 32 bite data and crc check from the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See brushless25_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void brushless25_cfg_setup | ( | brushless25_cfg_t * | cfg | ) |
Brushless 25 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See brushless25_cfg_t object definition for detailed explanation. |
err_t brushless25_cfg_write | ( | brushless25_t * | ctx, |
uint16_t | reg, | ||
uint32_t | data_in ) |
Brushless 25 config writing function.
This function writes a 32 bite data to the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See brushless25_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t brushless25_cfg_write_with_crc | ( | brushless25_t * | ctx, |
uint16_t | reg, | ||
uint32_t | data_in ) |
Brushless 25 config writing function with crc on.
This function writes a 32 bite data and crc check to the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See brushless25_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t brushless25_default_cfg | ( | brushless25_t * | ctx | ) |
Brushless 25 default configuration function.
This function executes a default configuration of Brushless 25 click board.
[in] | ctx | : Click context object. See brushless25_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void brushless25_disable_drvoff | ( | brushless25_t * | ctx | ) |
Brushless 25 disable drvoff mode function.
This function is used to disable drvoff mode.
[in] | ctx | : Click context object. See brushless25_t object definition for detailed explanation. |
void brushless25_enable_drvoff | ( | brushless25_t * | ctx | ) |
Brushless 25 enable drvoff mode function.
This function is used to enable drvoff mode.
[in] | ctx | : Click context object. See brushless25_t object definition for detailed explanation. |
err_t brushless25_fast_start_config | ( | brushless25_t * | ctx | ) |
Brushless 25 fast start function.
This function is used to set device into a fast start mode.
[in] | ctx | : Click context object. See brushless25_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t brushless25_i2c_read | ( | brushless25_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len ) |
Brushless 25 I2C reading function.
This function reads a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See brushless25_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | data_out | : Output read data. |
[in] | len | : Number of bytes to be read. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t brushless25_i2c_write | ( | brushless25_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len ) |
Brushless 25 I2C writing function.
This function writes a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See brushless25_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | data_in | : Data to be written. |
[in] | len | : Number of bytes to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t brushless25_init | ( | brushless25_t * | ctx, |
brushless25_cfg_t * | cfg ) |
Brushless 25 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See brushless25_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See brushless25_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t brushless25_pot_write | ( | brushless25_t * | ctx, |
uint8_t | cmd, | ||
uint8_t | reg, | ||
uint16_t | data_in ) |
Brushless 25 pot writing function.
This function writes a desired data into register using I2C interface.
[in] | ctx | : Click context object. See brushless25_t object definition for detailed explanation. |
[in] | cmd | : Command to be sent. |
[in] | reg | : Start register address. |
[out] | data_in | : Data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t brushless25_pwm_start | ( | brushless25_t * | ctx | ) |
Brushless 24 start PWM module.
This function starts the PWM module output.
[in] | ctx | : Click context object. See brushless25_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t brushless25_pwm_stop | ( | brushless25_t * | ctx | ) |
Brushless 24 stop PWM module.
This function stops the PWM module output.
[in] | ctx | : Click context object. See brushless25_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t brushless25_register_read | ( | brushless25_t * | ctx, |
uint16_t | reg, | ||
uint32_t * | data_out ) |
Brushless 25 data reading function.
This function reads a 32 bite data from the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See brushless25_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t brushless25_register_write | ( | brushless25_t * | ctx, |
uint16_t | reg, | ||
uint32_t | data_in ) |
Brushless 25 data writing function.
This function writes a 32 bite data to the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See brushless25_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t brushless25_set_brake_state | ( | brushless25_t * | ctx, |
uint8_t | brake_state ) |
Brushless 25 set brake state function.
This function is used to set motor brake state.
[in] | ctx | : Click context object. See brushless25_t object definition for detailed explanation. |
[in] | brake_state | : State of the brake. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t brushless25_set_duty_cycle | ( | brushless25_t * | ctx, |
float | duty_cycle ) |
Brushless 24 sets PWM duty cycle.
This function sets the PWM duty cycle in percentages ( Range[ 0..1 ] ).
[in] | ctx | : Click context object. See brushless25_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 brushless25_set_speed_ctrl_mode | ( | brushless25_t * | ctx, |
uint8_t | mode ) |
Brushless 25 set speed control mode function.
This function is used to set the motor speed control mode.
[in] | ctx | : Click context object. See brushless25_t object definition for detailed explanation. |
[in] | mode | :
|
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t brushless25_set_speed_value | ( | brushless25_t * | ctx, |
float | spd_val ) |
Brushless 25 set speed function.
This function is used to set the motor speed.
[in] | ctx | : Click context object. See brushless25_t object definition for detailed explanation. |
[in] | spd_val | : Value of the motor speed in percentages. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t brushless25_set_wiper_position | ( | brushless25_t * | ctx, |
uint16_t | data_in ) |
Brushless 25 set pot wiper position function.
This function is used to set the wiper position of the potentiometer using I2C interface.
[in] | ctx | : Click context object. See brushless25_t object definition for detailed explanation. |
[in] | data_in | : Position of the wiper. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t brushless25_slow_start_config | ( | brushless25_t * | ctx | ) |
Brushless 25 slow start function.
This function is used to set device into a slow start mode.
[in] | ctx | : Click context object. See brushless25_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t brushless25_spi_write | ( | brushless25_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len ) |
Brushless 25 SPI writing function.
This function writes a desired number of data bytes starting from the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See brushless25_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | data_in | : Data to be written. |
[in] | len | : Number of bytes to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t brushless25_ultra_fast_start_config | ( | brushless25_t * | ctx | ) |
Brushless 25 ultra fast start function.
This function is used to set device into a ultra fast start mode.
[in] | ctx | : Click context object. See brushless25_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.