brushless10 2.1.0.0
|
API for configuring and manipulating Brushless 10 Click driver. More...
Topics | |
Brushless 10 Registers List | |
List of registers of Brushless 10 Click driver. | |
Brushless 10 Registers Settings | |
Settings for registers of Brushless 10 Click driver. | |
Brushless 10 MikroBUS Map | |
MikroBUS pin mapping of Brushless 10 Click driver. | |
Functions | |
void | brushless10_cfg_setup (brushless10_cfg_t *cfg) |
Brushless 10 configuration object setup function. | |
err_t | brushless10_init (brushless10_t *ctx, brushless10_cfg_t *cfg) |
Brushless 10 initialization function. | |
err_t | brushless10_default_cfg (brushless10_t *ctx) |
Brushless 10 default configuration function. | |
err_t | brushless10_dac_write (brushless10_t *ctx, uint8_t reg, uint16_t data_in) |
Brushless 10 DAC write function. | |
err_t | brushless10_dac_read (brushless10_t *ctx, uint8_t reg, uint16_t *data_out) |
Brushless 10 DAC read function. | |
err_t | brushless10_set_duty_cycle (brushless10_t *ctx, float duty_cycle) |
Brushless 10 sets PWM duty cycle. | |
err_t | brushless10_pwm_stop (brushless10_t *ctx) |
Brushless 10 stop PWM module. | |
err_t | brushless10_pwm_start (brushless10_t *ctx) |
Brushless 10 start PWM module. | |
uint8_t | brushless10_get_fg_out_pin (brushless10_t *ctx) |
Brushless 10 get fg out pin function. | |
uint8_t | brushless10_get_ld_out_pin (brushless10_t *ctx) |
Brushless 10 get ld out pin function. | |
void | brushless10_pull_brake (brushless10_t *ctx) |
Brushless 10 pull brake function. | |
void | brushless10_release_brake (brushless10_t *ctx) |
Brushless 10 release brake function. | |
err_t | brushless10_dac_check_com (brushless10_t *ctx) |
Brushless 10 DAC check com function. | |
err_t | brushless10_dac_sw_reset (brushless10_t *ctx) |
Brushless 10 DAC sw reset function. | |
err_t | brushless10_dac_set_data (brushless10_t *ctx, uint8_t channel, uint8_t data_in) |
Brushless 10 DAC set data function. | |
err_t | brushless10_dac_set_vout (brushless10_t *ctx, uint8_t channel, uint16_t vout_mv) |
Brushless 10 DAC set vout function. | |
API for configuring and manipulating Brushless 10 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void brushless10_cfg_setup | ( | brushless10_cfg_t * | cfg | ) |
Brushless 10 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See brushless10_cfg_t object definition for detailed explanation. |
err_t brushless10_dac_check_com | ( | brushless10_t * | ctx | ) |
Brushless 10 DAC check com function.
This function checks the communication with a DAC by reading and verifying the DAC device ID.
[in] | ctx | : Click context object. See brushless10_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t brushless10_dac_read | ( | brushless10_t * | ctx, |
uint8_t | reg, | ||
uint16_t * | data_out ) |
Brushless 10 DAC read function.
This function reads a data word from the selected DAC register by using I2C serial interface.
[in] | ctx | : Click context object. See brushless10_t object definition for detailed explanation. |
[in] | reg | : DAC register address. |
[out] | data_out | : 16-bit output read data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t brushless10_dac_set_data | ( | brushless10_t * | ctx, |
uint8_t | channel, | ||
uint8_t | data_in ) |
Brushless 10 DAC set data function.
This function writes the raw data value to the selected DAC channel.
[in] | ctx | : Click context object. See brushless10_t object definition for detailed explanation. |
[in] | channel | : DAC channel.
|
[in] | data_in | : 8-bit RAW DAC data to be set. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t brushless10_dac_set_vout | ( | brushless10_t * | ctx, |
uint8_t | channel, | ||
uint16_t | vout_mv ) |
Brushless 10 DAC set vout function.
This function sets the voltage output at the selected DAC channel.
[in] | ctx | : Click context object. See brushless10_t object definition for detailed explanation. |
[in] | channel | : DAC channel.
|
[in] | vout_mv | : Voltage output in millivolts to be set [0-5000mV]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t brushless10_dac_sw_reset | ( | brushless10_t * | ctx | ) |
Brushless 10 DAC sw reset function.
This function performs the DAC software reset.
[in] | ctx | : Click context object. See brushless10_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t brushless10_dac_write | ( | brushless10_t * | ctx, |
uint8_t | reg, | ||
uint16_t | data_in ) |
Brushless 10 DAC write function.
This function writes a data word to the selected DAC register by using I2C serial interface.
[in] | ctx | : Click context object. See brushless10_t object definition for detailed explanation. |
[in] | reg | : DAC register address. |
[in] | data_in | : 16-bit data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t brushless10_default_cfg | ( | brushless10_t * | ctx | ) |
Brushless 10 default configuration function.
This function executes a default configuration of Brushless 10 click board.
[in] | ctx | : Click context object. See brushless10_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t brushless10_get_fg_out_pin | ( | brushless10_t * | ctx | ) |
Brushless 10 get fg out pin function.
This function returns the FG_OUT pin logic state.
[in] | ctx | : Click context object. See brushless10_t object definition for detailed explanation. |
uint8_t brushless10_get_ld_out_pin | ( | brushless10_t * | ctx | ) |
Brushless 10 get ld out pin function.
This function returns the LD_OUT pin logic state.
[in] | ctx | : Click context object. See brushless10_t object definition for detailed explanation. |
err_t brushless10_init | ( | brushless10_t * | ctx, |
brushless10_cfg_t * | cfg ) |
Brushless 10 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See brushless10_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See brushless10_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void brushless10_pull_brake | ( | brushless10_t * | ctx | ) |
Brushless 10 pull brake function.
This function pulls brake by setting the BRAKE pin to high logic state.
[in] | ctx | : Click context object. See brushless10_t object definition for detailed explanation. |
err_t brushless10_pwm_start | ( | brushless10_t * | ctx | ) |
Brushless 10 start PWM module.
This function starts the PWM module output.
[in] | ctx | : Click context object. See brushless10_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t brushless10_pwm_stop | ( | brushless10_t * | ctx | ) |
Brushless 10 stop PWM module.
This function stops the PWM module output.
[in] | ctx | : Click context object. See brushless10_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void brushless10_release_brake | ( | brushless10_t * | ctx | ) |
Brushless 10 release brake function.
This function releases brake by setting the BRAKE pin to low logic state.
[in] | ctx | : Click context object. See brushless10_t object definition for detailed explanation. |
err_t brushless10_set_duty_cycle | ( | brushless10_t * | ctx, |
float | duty_cycle ) |
Brushless 10 sets PWM duty cycle.
This function sets the PWM duty cycle in percentages ( Range[ 0..1 ] ).
[in] | ctx | : Click context object. See brushless10_t object definition for detailed explanation. |
[in] | duty_cycle | : PWM duty cycle. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.