brushless30
2.1.0.0
|
API for configuring and manipulating Brushless 30 Click driver. More...
Modules | |
Brushless 30 Registers List | |
List of registers of Brushless 30 Click driver. | |
Brushless 30 Registers Settings | |
Settings for registers of Brushless 30 Click driver. | |
Brushless 30 MikroBUS Map | |
MikroBUS pin mapping of Brushless 30 Click driver. | |
Functions | |
void | brushless30_cfg_setup (brushless30_cfg_t *cfg) |
Brushless 30 configuration object setup function. More... | |
err_t | brushless30_init (brushless30_t *ctx, brushless30_cfg_t *cfg) |
Brushless 30 initialization function. More... | |
err_t | brushless30_default_cfg (brushless30_t *ctx) |
Brushless 30 default configuration function. More... | |
err_t | brushless30_write_reg (brushless30_t *ctx, uint8_t reg, uint16_t data_in) |
Brushless 30 write reg function. More... | |
err_t | brushless30_read_reg (brushless30_t *ctx, uint8_t reg, uint16_t *data_out) |
Brushless 30 read reg function. More... | |
void | brushless30_enable_driver (brushless30_t *ctx) |
Brushless 30 enable driver function. More... | |
void | brushless30_disable_driver (brushless30_t *ctx) |
Brushless 30 disable driver function. More... | |
uint8_t | brushless30_get_diag_pin (brushless30_t *ctx) |
Brushless 30 get diag pin function. More... | |
API for configuring and manipulating Brushless 30 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void brushless30_cfg_setup | ( | brushless30_cfg_t * | cfg | ) |
Brushless 30 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See brushless30_cfg_t object definition for detailed explanation. |
err_t brushless30_default_cfg | ( | brushless30_t * | ctx | ) |
Brushless 30 default configuration function.
This function executes a default configuration of Brushless 30 click board.
[in] | ctx | : Click context object. See brushless30_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void brushless30_disable_driver | ( | brushless30_t * | ctx | ) |
Brushless 30 disable driver function.
This function disables driver by setting the ALARM pin to low logic state.
[in] | ctx | : Click context object. See brushless30_t object definition for detailed explanation. |
void brushless30_enable_driver | ( | brushless30_t * | ctx | ) |
Brushless 30 enable driver function.
This function enables driver by setting the ALARM pin to high logic state.
[in] | ctx | : Click context object. See brushless30_t object definition for detailed explanation. |
uint8_t brushless30_get_diag_pin | ( | brushless30_t * | ctx | ) |
Brushless 30 get diag pin function.
This function returns the DIAG pin logic state.
[in] | ctx | : Click context object. See brushless30_t object definition for detailed explanation. |
err_t brushless30_init | ( | brushless30_t * | ctx, |
brushless30_cfg_t * | cfg | ||
) |
Brushless 30 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See brushless30_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See brushless30_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t brushless30_read_reg | ( | brushless30_t * | ctx, |
uint8_t | reg, | ||
uint16_t * | data_out | ||
) |
Brushless 30 read reg function.
This function reads a data word from the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See brushless30_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 brushless30_write_reg | ( | brushless30_t * | ctx, |
uint8_t | reg, | ||
uint16_t | data_in | ||
) |
Brushless 30 write reg function.
This function writes a data word to the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See brushless30_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.