smartbuck2 2.1.0.0
|
API for configuring and manipulating Smart Buck 2 Click driver. More...
Topics | |
Smart Buck 2 Registers List | |
List of registers of Smart Buck 2 Click driver. | |
Smart Buck 2 Registers Settings | |
Settings for registers of Smart Buck 2 Click driver. | |
Smart Buck 2 MikroBUS Map | |
MikroBUS pin mapping of Smart Buck 2 Click driver. | |
Functions | |
void | smartbuck2_cfg_setup (smartbuck2_cfg_t *cfg) |
Smart Buck 2 configuration object setup function. | |
err_t | smartbuck2_init (smartbuck2_t *ctx, smartbuck2_cfg_t *cfg) |
Smart Buck 2 initialization function. | |
err_t | smartbuck2_default_cfg (smartbuck2_t *ctx) |
Smart Buck 2 default configuration function. | |
err_t | smartbuck2_generic_write (smartbuck2_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
Smart Buck 2 I2C writing function. | |
err_t | smartbuck2_generic_read (smartbuck2_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
Smart Buck 2 I2C reading function. | |
err_t | smartbuck2_set_voltage (smartbuck2_t *ctx, uint16_t vout_mv) |
Smart Buck 2 set voltage function. | |
err_t | smartbuck2_get_voltage (smartbuck2_t *ctx, uint16_t *vout_mv) |
Smart Buck 2 get voltage function. | |
err_t | smartbuck2_set_op_mode (smartbuck2_t *ctx, uint8_t op_mode) |
Smart Buck 2 set operation mode function. | |
err_t | smartbuck2_get_op_mode (smartbuck2_t *ctx, uint8_t *op_mode) |
Smart Buck 2 get operation mode function. | |
err_t | smartbuck2_set_ctrl (smartbuck2_t *ctx, uint8_t ctrl) |
Smart Buck 2 set control function. | |
err_t | smartbuck2_set_temp_shd (smartbuck2_t *ctx, uint8_t temp_enable) |
Smart Buck 2 set temperature shutdown function. | |
uint8_t | smartbuck2_check_temp_warning (smartbuck2_t *ctx) |
Smart Buck 2 check temperature warning function. | |
err_t | smartbuck2_set_vtg_ramp_timing (smartbuck2_t *ctx, uint8_t slope) |
Smart Buck 2 set voltage ramp timing function. | |
err_t | smartbuck2_get_device_id (smartbuck2_t *ctx, uint8_t *ven_id, uint8_t *part_num_id, uint8_t *chip_id) |
Smart Buck 2 get device ID function. | |
API for configuring and manipulating Smart Buck 2 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void smartbuck2_cfg_setup | ( | smartbuck2_cfg_t * | cfg | ) |
Smart Buck 2 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See smartbuck2_cfg_t object definition for detailed explanation. |
uint8_t smartbuck2_check_temp_warning | ( | smartbuck2_t * | ctx | ) |
Smart Buck 2 check temperature warning function.
This function checks temperature warnings of the TPS62363YZHT, 3A Processor Supply with I2C Compatible Interface and Remote Sense on the Smart Buck 2 Click board™.
[in] | ctx | : Click context object. See smartbuck2_t object definition for detailed explanation. |
SMARTBUCK2_TEMP_LT_120_C
- The temperature is less than 120 degrees Celsius, SMARTBUCK2_TEMP_GT_120_C
- The temperature is greater than 120 degrees Celsius. err_t smartbuck2_default_cfg | ( | smartbuck2_t * | ctx | ) |
Smart Buck 2 default configuration function.
This function executes a default configuration of Smart Buck 2 click board.
[in] | ctx | : Click context object. See smartbuck2_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t smartbuck2_generic_read | ( | smartbuck2_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len ) |
Smart Buck 2 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 smartbuck2_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 smartbuck2_generic_write | ( | smartbuck2_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len ) |
Smart Buck 2 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 smartbuck2_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 smartbuck2_get_device_id | ( | smartbuck2_t * | ctx, |
uint8_t * | ven_id, | ||
uint8_t * | part_num_id, | ||
uint8_t * | chip_id ) |
Smart Buck 2 get device ID function.
This function reads Chip ID register (vendor ID, part number ID and chip revision ID) of the TPS62363YZHT, 3A Processor Supply with I2C Compatible Interface and Remote Sense on the Smart Buck 2 Click board™.
[in] | ctx | : Click context object. See smartbuck2_t object definition for detailed explanation. |
[out] | ven_id | : Vendor ID. |
[out] | part_num_id | : Part number ID. |
[out] | chip_id | : Chip revision ID. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t smartbuck2_get_op_mode | ( | smartbuck2_t * | ctx, |
uint8_t * | op_mode ) |
Smart Buck 2 get operation mode function.
This function reads the desired operation mode of the TPS62363YZHT, 3A Processor Supply with I2C Compatible Interface and Remote Sense on the Smart Buck 2 Click board™.
[in] | ctx | : Click context object. See smartbuck2_t object definition for detailed explanation. |
[out] | op_mode | : Operation mode. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t smartbuck2_get_voltage | ( | smartbuck2_t * | ctx, |
uint16_t * | vout_mv ) |
Smart Buck 2 get voltage function.
This function reads the output voltage of the TPS62363YZHT, 3A Processor Supply with I2C Compatible Interface and Remote Sense on the Smart Buck 2 Click board™.
[in] | ctx | : Click context object. See smartbuck2_t object definition for detailed explanation. |
[out] | vout_mv | : Voltage output in millivolts [500-1770mV]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t smartbuck2_init | ( | smartbuck2_t * | ctx, |
smartbuck2_cfg_t * | cfg ) |
Smart Buck 2 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See smartbuck2_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See smartbuck2_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t smartbuck2_set_ctrl | ( | smartbuck2_t * | ctx, |
uint8_t | ctrl ) |
Smart Buck 2 set control function.
This function sets desired configuration of the control register of the TPS62363YZHT, 3A Processor Supply with I2C Compatible Interface and Remote Sense on the Smart Buck 2 Click board™.
[in] | ctx | : Click context object. See smartbuck2_t object definition for detailed explanation. |
[in] | ctrl | : Control register configuration. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t smartbuck2_set_op_mode | ( | smartbuck2_t * | ctx, |
uint8_t | op_mode ) |
Smart Buck 2 set operation mode function.
This function sets the desired operation mode of the TPS62363YZHT, 3A Processor Supply with I2C Compatible Interface and Remote Sense on the Smart Buck 2 Click board™.
[in] | ctx | : Click context object. See smartbuck2_t object definition for detailed explanation. |
[in] | op_mode | :
|
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t smartbuck2_set_temp_shd | ( | smartbuck2_t * | ctx, |
uint8_t | temp_enable ) |
Smart Buck 2 set temperature shutdown function.
This function sets temperature shutdown feature of the TPS62363YZHT, 3A Processor Supply with I2C Compatible Interface and Remote Sense on the Smart Buck 2 Click board™.
[in] | ctx | : Click context object. See smartbuck2_t object definition for detailed explanation. |
[in] | temp_enable | :
|
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t smartbuck2_set_voltage | ( | smartbuck2_t * | ctx, |
uint16_t | vout_mv ) |
Smart Buck 2 set voltage function.
This function sets the output voltage of the TPS62363YZHT, 3A Processor Supply with I2C Compatible Interface and Remote Sense on the Smart Buck 2 Click board™.
[in] | ctx | : Click context object. See smartbuck2_t object definition for detailed explanation. |
[in] | vout_mv | : Voltage output in millivolts [500-1770mV]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t smartbuck2_set_vtg_ramp_timing | ( | smartbuck2_t * | ctx, |
uint8_t | slope ) |
Smart Buck 2 set voltage ramp timing function.
This function sets output voltage ramp timing of the TPS62363YZHT, 3A Processor Supply with I2C Compatible Interface and Remote Sense on the Smart Buck 2 Click board™.
[in] | ctx | : Click context object. See smartbuck2_t object definition for detailed explanation. |
[in] | slope | :
|
0
- Success, -1
- Error. See #err_t definition for detailed explanation.