digipot14 2.1.0.0
|
API for configuring and manipulating DIGI POT 14 Click driver. More...
Modules | |
DIGI POT 14 Registers List | |
List of registers of DIGI POT 14 Click driver. | |
DIGI POT 14 Registers Settings | |
Settings for registers of DIGI POT 14 Click driver. | |
DIGI POT 14 MikroBUS Map | |
MikroBUS pin mapping of DIGI POT 14 Click driver. | |
Functions | |
void | digipot14_cfg_setup (digipot14_cfg_t *cfg) |
DIGI POT 14 configuration object setup function. More... | |
err_t | digipot14_init (digipot14_t *ctx, digipot14_cfg_t *cfg) |
DIGI POT 14 initialization function. More... | |
err_t | digipot14_default_cfg (digipot14_t *ctx) |
DIGI POT 14 default configuration function. More... | |
err_t | digipot14_generic_write (digipot14_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
DIGI POT 14 I2C writing function. More... | |
err_t | digipot14_generic_read (digipot14_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
DIGI POT 14 I2C reading function. More... | |
err_t | digipot14_reg_write (digipot14_t *ctx, uint8_t reg, uint8_t data_in) |
DIGI POT 14 register write function. More... | |
err_t | digipot14_reg_read (digipot14_t *ctx, uint8_t reg, uint8_t *data_out) |
DIGI POT 14 register reading function. More... | |
err_t | digipot14_set_pot_a_res (digipot14_t *ctx, uint8_t resistance) |
DIGI POT 14 set the resistance of potentiometer A function. More... | |
err_t | digipot14_set_pot_b_res (digipot14_t *ctx, uint8_t resistance) |
DIGI POT 14 set the resistance of potentiometer B function. More... | |
API for configuring and manipulating DIGI POT 14 Click driver.
void digipot14_cfg_setup | ( | digipot14_cfg_t * | cfg | ) |
DIGI POT 14 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See digipot14_cfg_t object definition for detailed explanation. |
err_t digipot14_default_cfg | ( | digipot14_t * | ctx | ) |
DIGI POT 14 default configuration function.
This function executes a default configuration of DIGI POT 14 click board.
[in] | ctx | : Click context object. See digipot14_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t digipot14_generic_read | ( | digipot14_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len | ||
) |
DIGI POT 14 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 digipot14_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 digipot14_generic_write | ( | digipot14_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len | ||
) |
DIGI POT 14 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 digipot14_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 digipot14_init | ( | digipot14_t * | ctx, |
digipot14_cfg_t * | cfg | ||
) |
DIGI POT 14 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See digipot14_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See digipot14_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t digipot14_reg_read | ( | digipot14_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out | ||
) |
DIGI POT 14 register reading function.
This function reads a data byte from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See digipot14_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 digipot14_reg_write | ( | digipot14_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in | ||
) |
DIGI POT 14 register write function.
This function writes a data byte into the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See digipot14_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. err_t digipot14_set_pot_a_res | ( | digipot14_t * | ctx, |
uint8_t | resistance | ||
) |
DIGI POT 14 set the resistance of potentiometer A function.
This function sets the resistance of the A potentiometer.
[in] | ctx | : Click context object. See digipot14_t object definition for detailed explanation. |
[in] | ctx | : Click context object. See digipot14_t object definition for detailed explanation. |
[in] | resistance | : Resistance from 0.0 to 100.0 [kOhm]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t digipot14_set_pot_b_res | ( | digipot14_t * | ctx, |
uint8_t | resistance | ||
) |
DIGI POT 14 set the resistance of potentiometer B function.
This function sets the resistance of the B potentiometer.
[in] | ctx | : Click context object. See digipot14_t object definition for detailed explanation. |
[in] | ctx | : Click context object. See digipot14_t object definition for detailed explanation. |
[in] | resistance | : Resistance from 0.0 to 100.0 [kOhm]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.