stepdown11 2.1.0.0
|
API for configuring and manipulating Step Down 11 Click driver. More...
Modules | |
Step Down 11 Registers List | |
List of registers of Step Down 11 Click driver. | |
Step Down 11 Registers Settings | |
Settings for registers of Step Down 11 Click driver. | |
Step Down 11 MikroBUS Map | |
MikroBUS pin mapping of Step Down 11 Click driver. | |
Functions | |
void | stepdown11_cfg_setup (stepdown11_cfg_t *cfg) |
Step Down 11 configuration object setup function. More... | |
err_t | stepdown11_init (stepdown11_t *ctx, stepdown11_cfg_t *cfg) |
Step Down 11 initialization function. More... | |
err_t | stepdown11_default_cfg (stepdown11_t *ctx) |
Step Down 11 default configuration function. More... | |
err_t | stepdown11_generic_write (stepdown11_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
Step Down 11 I2C writing function. More... | |
err_t | stepdown11_generic_read (stepdown11_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
Step Down 11 I2C reading function. More... | |
void | stepdown11_set_en_pin (stepdown11_t *ctx, uint8_t pin_state) |
Step Down 11 set EN pin state function. More... | |
uint8_t | stepdown11_get_pg_pin (stepdown11_t *ctx) |
Step Down 11 get PG pin state function. More... | |
void | stepdown11_reset_digi_pot (stepdown11_t *ctx) |
Step Down 11 reset digi pot function. More... | |
err_t | stepdown11_write_data (stepdown11_t *ctx, uint8_t ctrl, uint8_t addr, uint8_t data_in) |
Step Down 11 I2C writing function. More... | |
err_t | stepdown11_read_data (stepdown11_t *ctx, uint8_t addr, uint8_t mask, uint8_t *data_out) |
Step Down 11 I2C reading function. More... | |
err_t | stepdown11_write_rdac (stepdown11_t *ctx, uint8_t addr, uint8_t data_in) |
Step Down 11 write the RDAC function. More... | |
err_t | stepdown11_read_rdac (stepdown11_t *ctx, uint8_t addr, uint8_t *data_out) |
Step Down 11 read the RDAC function. More... | |
err_t | stepdown11_set_resistance (stepdown11_t *ctx, uint8_t wiper_sel, float res_kohm) |
Step Down 11 set the resistance function. More... | |
err_t | stepdown11_get_resistance (stepdown11_t *ctx, uint8_t wiper_sel, float *res_kohm) |
Step Down 11 get the resistance function. More... | |
err_t | stepdown11_set_voltage (stepdown11_t *ctx, float v_out) |
Step Down 11 set voltage output function. More... | |
err_t | stepdown11_set_mode (stepdown11_t *ctx, float sconf_mode) |
Step Down 11 set S-CONF device configuration mode function. More... | |
API for configuring and manipulating Step Down 11 Click driver.
void stepdown11_cfg_setup | ( | stepdown11_cfg_t * | cfg | ) |
Step Down 11 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See stepdown11_cfg_t object definition for detailed explanation. |
err_t stepdown11_default_cfg | ( | stepdown11_t * | ctx | ) |
Step Down 11 default configuration function.
This function executes a default configuration of Step Down 11 click board.
[in] | ctx | : Click context object. See stepdown11_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t stepdown11_generic_read | ( | stepdown11_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len | ||
) |
Step Down 11 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 stepdown11_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 stepdown11_generic_write | ( | stepdown11_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len | ||
) |
Step Down 11 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 stepdown11_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 stepdown11_get_pg_pin | ( | stepdown11_t * | ctx | ) |
Step Down 11 get PG pin state function.
This function is used to reset digi pot.
[in] | ctx | : Click context object. See stepdown11_t object definition for detailed explanation. |
err_t stepdown11_get_resistance | ( | stepdown11_t * | ctx, |
uint8_t | wiper_sel, | ||
float * | res_kohm | ||
) |
Step Down 11 get the resistance function.
This function gets the resistance of the selected wiper of the AD5142A, Dual Channel, 256-Position, I2C, Nonvolatile Digital Potentiometer on the Step Down 11 Click board™.
[in] | ctx | : Click context object. See stepdown11_t object definition for detailed explanation. |
[in] | wiper_sel | : Wiper selection. |
[out] | res_kohm | : Rwb1/2 (wiper-to-B) resistance from 0.0 to 10.0 [kOhm]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t stepdown11_init | ( | stepdown11_t * | ctx, |
stepdown11_cfg_t * | cfg | ||
) |
Step Down 11 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See stepdown11_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See stepdown11_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t stepdown11_read_data | ( | stepdown11_t * | ctx, |
uint8_t | addr, | ||
uint8_t | mask, | ||
uint8_t * | data_out | ||
) |
Step Down 11 I2C reading function.
This function reads a byte of data from the selected address and data bits mask by using I2C serial interface.
[in] | ctx | : Click context object. See stepdown11_t object definition for detailed explanation. |
[in] | addr | : Address bits - wiper selection. |
[in] | mask | : Data bits mask. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t stepdown11_read_rdac | ( | stepdown11_t * | ctx, |
uint8_t | addr, | ||
uint8_t * | data_out | ||
) |
Step Down 11 read the RDAC function.
This function reads the RDAC data value of the AD5142A, Dual Channel, 256-Position, I2C, Nonvolatile Digital Potentiometer on the Step Down 11 Click board™.
[in] | ctx | : Click context object. See stepdown11_t object definition for detailed explanation. |
[in] | addr | : Address bits - wiper selection. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void stepdown11_reset_digi_pot | ( | stepdown11_t * | ctx | ) |
Step Down 11 reset digi pot function.
This function is used to reset digi pot.
[in] | ctx | : Click context object. See stepdown11_t object definition for detailed explanation. |
void stepdown11_set_en_pin | ( | stepdown11_t * | ctx, |
uint8_t | pin_state | ||
) |
Step Down 11 set EN pin state function.
This function is used to set EN pin state.
[in] | ctx | : Click context object. See stepdown11_t object definition for detailed explanation. |
[in] | pin_state | : EN pin state. |
err_t stepdown11_set_mode | ( | stepdown11_t * | ctx, |
float | sconf_mode | ||
) |
Step Down 11 set S-CONF device configuration mode function.
This function is used to set S-CONF device configuration mode.
[in] | ctx | : Click context object. See stepdown11_t object definition for detailed explanation. |
[in] | v_out | : Output voltage in volts. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t stepdown11_set_resistance | ( | stepdown11_t * | ctx, |
uint8_t | wiper_sel, | ||
float | res_kohm | ||
) |
Step Down 11 set the resistance function.
This function sets the resistance of the selected wiper of the AD5142A, Dual Channel, 256-Position, I2C, Nonvolatile Digital Potentiometer on the Step Down 11 Click board™.
[in] | ctx | : Click context object. See stepdown11_t object definition for detailed explanation. |
[in] | wiper_sel | : Wiper selection. |
[in] | res_kohm | : Rwb1/2 (wiper-to-B) resistance from 0.0 to 10.0 [kOhm]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t stepdown11_set_voltage | ( | stepdown11_t * | ctx, |
float | v_out | ||
) |
Step Down 11 set voltage output function.
This function is used to set voltage output.
[in] | ctx | : Click context object. See stepdown11_t object definition for detailed explanation. |
[in] | v_out | : Output voltage in volts. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t stepdown11_write_data | ( | stepdown11_t * | ctx, |
uint8_t | ctrl, | ||
uint8_t | addr, | ||
uint8_t | data_in | ||
) |
Step Down 11 I2C writing function.
This function writes a byte of data for the selected command and address by using I2C serial interface.
[in] | ctx | : Click context object. See stepdown11_t object definition for detailed explanation. |
[in] | ctrl | : Control bits - commands operation. |
[in] | addr | : Address bits - wiper selection. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t stepdown11_write_rdac | ( | stepdown11_t * | ctx, |
uint8_t | addr, | ||
uint8_t | data_in | ||
) |
Step Down 11 write the RDAC function.
This function writes RDAC data value of the AD5142A, Dual Channel, 256-Position, I2C, Nonvolatile Digital Potentiometer on the Step Down 11 Click board™.
[in] | ctx | : Click context object. See stepdown11_t object definition for detailed explanation. |
[in] | addr | : Address bits - wiper selection. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.