fan9 2.1.0.0
|
API for configuring and manipulating Fan 9 Click driver. More...
Modules | |
Fan 9 Registers List | |
List of registers of Fan 9 Click driver. | |
Fan 9 Registers Settings | |
Settings for registers of Fan 9 Click driver. | |
Fan 9 MikroBUS Map | |
MikroBUS pin mapping of Fan 9 Click driver. | |
Functions | |
void | fan9_cfg_setup (fan9_cfg_t *cfg) |
Fan 9 configuration object setup function. More... | |
err_t | fan9_init (fan9_t *ctx, fan9_cfg_t *cfg) |
Fan 9 initialization function. More... | |
err_t | fan9_default_cfg (fan9_t *ctx) |
Fan 9 default configuration function. More... | |
err_t | fan9_generic_write (fan9_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
Fan 9 I2C writing function. More... | |
err_t | fan9_generic_read (fan9_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
Fan 9 I2C reading function. More... | |
uint8_t | fan9_get_rd_pin (fan9_t *ctx) |
Fan 9 get RD pin state function. More... | |
uint8_t | fan9_get_flt_pin (fan9_t *ctx) |
Fan 9 get FLT pin state function. More... | |
void | fan9_set_direcrion (fan9_t *ctx, uint8_t dir) |
Fan 9 set direction function. More... | |
void | fan9_set_brake (fan9_t *ctx, uint8_t brake_state) |
Fan 9 set brake state function. More... | |
err_t | fan9_write_reg (fan9_t *ctx, uint8_t reg, uint16_t data_in) |
Fan 9 register writing function. More... | |
err_t | fan9_read_reg (fan9_t *ctx, uint8_t reg, uint16_t *data_out) |
Fan 9 register reading function. More... | |
err_t | fan9_set_pwm (fan9_t *ctx, uint8_t pwm_val) |
Fan 9 set PWM value function. More... | |
err_t | fan9_get_pwm (fan9_t *ctx, uint8_t *pwm_val) |
Fan 9 get PWM value function. More... | |
API for configuring and manipulating Fan 9 Click driver.
void fan9_cfg_setup | ( | fan9_cfg_t * | cfg | ) |
Fan 9 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See fan9_cfg_t object definition for detailed explanation. |
err_t fan9_default_cfg | ( | fan9_t * | ctx | ) |
Fan 9 default configuration function.
This function executes a default configuration of Fan 9 click board.
[in] | ctx | : Click context object. See fan9_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t fan9_generic_read | ( | fan9_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len | ||
) |
Fan 9 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 fan9_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 fan9_generic_write | ( | fan9_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len | ||
) |
Fan 9 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 fan9_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. uint8_t fan9_get_flt_pin | ( | fan9_t * | ctx | ) |
Fan 9 get FLT pin state function.
This function is used to get FLT pin state of Fan 9 click board.
[in] | ctx | : Click context object. See fan9_t object definition for detailed explanation. |
err_t fan9_get_pwm | ( | fan9_t * | ctx, |
uint8_t * | pwm_val | ||
) |
Fan 9 get PWM value function.
This function is used to get PWM value of Fan 9 click board.
[in] | ctx | : Click context object. See fan9_t object definition for detailed explanation. |
[out] | pwm_val | : PWM Value. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t fan9_get_rd_pin | ( | fan9_t * | ctx | ) |
Fan 9 get RD pin state function.
This function is used to get RD pin state of Fan 9 click board.
[in] | ctx | : Click context object. See fan9_t object definition for detailed explanation. |
err_t fan9_init | ( | fan9_t * | ctx, |
fan9_cfg_t * | cfg | ||
) |
Fan 9 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See fan9_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See fan9_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t fan9_read_reg | ( | fan9_t * | ctx, |
uint8_t | reg, | ||
uint16_t * | data_out | ||
) |
Fan 9 register reading function.
This function reads a data bytes from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See fan9_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 fan9_set_brake | ( | fan9_t * | ctx, |
uint8_t | brake_state | ||
) |
Fan 9 set brake state function.
This function is used to set brake state of Fan 9 click board.
[in] | ctx | : Click context object. See fan9_t object definition for detailed explanation. |
[in] | brake_state | : Brake state. |
void fan9_set_direcrion | ( | fan9_t * | ctx, |
uint8_t | dir | ||
) |
Fan 9 set direction function.
This function is used to set direction of Fan 9 click board.
[in] | ctx | : Click context object. See fan9_t object definition for detailed explanation. |
[in] | dir | : Selected direction. |
err_t fan9_set_pwm | ( | fan9_t * | ctx, |
uint8_t | pwm_val | ||
) |
Fan 9 set PWM value function.
This function is used to set PWM value of Fan 9 click board.
[in] | ctx | : Click context object. See fan9_t object definition for detailed explanation. |
[in] | pwm_val | : PWM Value. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t fan9_write_reg | ( | fan9_t * | ctx, |
uint8_t | reg, | ||
uint16_t | data_in | ||
) |
Fan 9 register writing function.
This function writes a desired data bytes into the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See fan9_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.