stepdown6 2.1.0.0
|
API for configuring and manipulating Step Down 6 Click driver. More...
Topics | |
Step Down 6 Registers List | |
List of registers of Step Down 6 Click driver. | |
Step Down 6 Registers Settings | |
Settings for registers of Step Down 6 Click driver. | |
Step Down 6 MikroBUS Map | |
MikroBUS pin mapping of Step Down 6 Click driver. | |
Functions | |
void | stepdown6_cfg_setup (stepdown6_cfg_t *cfg) |
Step Down 6 configuration object setup function. | |
err_t | stepdown6_init (stepdown6_t *ctx, stepdown6_cfg_t *cfg) |
Step Down 6 initialization function. | |
err_t | stepdown6_default_cfg (stepdown6_t *ctx) |
Step Down 6 default configuration function. | |
err_t | stepdown6_generic_write (stepdown6_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
Step Down 6 I2C writing function. | |
err_t | stepdown6_generic_read (stepdown6_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
Step Down 6 I2C reading function. | |
void | stepdown6_set_en_pin (stepdown6_t *ctx, uint8_t pin_state) |
Step Down 6 set EN pin state function. | |
err_t | stepdown6_write_reg (stepdown6_t *ctx, uint8_t reg, uint8_t data_in) |
Step Down 6 Register writing function. | |
err_t | stepdown6_read_reg (stepdown6_t *ctx, uint8_t reg, uint8_t *data_out) |
Step Down 6 Register reading function. | |
err_t | stepdown6_set_out_voltage (stepdown6_t *ctx, uint8_t out_sel, uint16_t out_val) |
Step Down 6 Set output voltage function. | |
API for configuring and manipulating Step Down 6 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void stepdown6_cfg_setup | ( | stepdown6_cfg_t * | cfg | ) |
Step Down 6 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See stepdown6_cfg_t object definition for detailed explanation. |
err_t stepdown6_default_cfg | ( | stepdown6_t * | ctx | ) |
Step Down 6 default configuration function.
This function executes a default configuration of Step Down 6 click board.
[in] | ctx | : Click context object. See stepdown6_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t stepdown6_generic_read | ( | stepdown6_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len ) |
Step Down 6 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 stepdown6_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 stepdown6_generic_write | ( | stepdown6_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len ) |
Step Down 6 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 stepdown6_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 stepdown6_init | ( | stepdown6_t * | ctx, |
stepdown6_cfg_t * | cfg ) |
Step Down 6 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See stepdown6_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See stepdown6_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t stepdown6_read_reg | ( | stepdown6_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out ) |
Step Down 6 Register reading function.
This function reads a data byte from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See stepdown6_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. void stepdown6_set_en_pin | ( | stepdown6_t * | ctx, |
uint8_t | pin_state ) |
Step Down 6 set EN pin state function.
This function is used to set state of the EN pin.
[in] | ctx | : Click context object. See stepdown6_t object definition for detailed explanation. |
[in] | pin_state | : State of the EN pin. |
err_t stepdown6_set_out_voltage | ( | stepdown6_t * | ctx, |
uint8_t | out_sel, | ||
uint16_t | out_val ) |
Step Down 6 Set output voltage function.
This function sets the selected voltage output of the selected channel.
[in] | ctx | : Click context object. See stepdown6_t object definition for detailed explanation. |
[in] | out_sel | : Output voltage selection. |
[in] | out_val | : Output voltage value. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t stepdown6_write_reg | ( | stepdown6_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in ) |
Step Down 6 Register writing function.
This function writes a data byte into the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See stepdown6_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.