bucknboost 2.0.0.0
|
API for configuring and manipulating Buck n Boost Click driver. More...
Topics | |
Buck n Boost Registers List | |
List of registers of Buck n Boost Click driver. | |
Buck n Boost Registers Settings | |
Settings for registers of Buck n Boost Click driver. | |
Buck n Boost MikroBUS Map | |
MikroBUS pin mapping of Buck n Boost Click driver. | |
Functions | |
void | bucknboost_cfg_setup (bucknboost_cfg_t *cfg) |
Buck n Boost configuration object setup function. | |
err_t | bucknboost_init (bucknboost_t *ctx, bucknboost_cfg_t *cfg) |
Buck n Boost initialization function. | |
err_t | bucknboost_default_cfg (bucknboost_t *ctx) |
Buck n Boost default configuration function. | |
err_t | bucknboost_generic_write (bucknboost_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len) |
Buck n Boost I2C writing function. | |
err_t | bucknboost_generic_read (bucknboost_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len) |
Buck n Boost I2C reading function. | |
err_t | bucknboost_send_cmd (bucknboost_t *ctx, uint8_t cmd) |
Buck n Boost send command function. | |
err_t | bucknboost_write_byte (bucknboost_t *ctx, uint8_t reg, uint8_t data_in) |
Buck n Boost Write single byte function. | |
err_t | bucknboost_read_byte (bucknboost_t *ctx, uint8_t reg, uint8_t *data_out) |
Buck n Boost read single byte function. | |
void | bucknboost_pin_standby_mode (bucknboost_t *ctx, uint8_t state) |
Buck n Boost set STB pin mode function. | |
err_t | bucknboost_reg_standby_mode (bucknboost_t *ctx, uint8_t state) |
Buck n Boost set standby mode function. | |
void | bucknboost_device_enable (bucknboost_t *ctx, uint8_t state) |
Buck n Boost enable device function. | |
uint8_t | bucknboost_check_power_good (bucknboost_t *ctx) |
Buck n Boost check power good function. | |
uint8_t | bucknboost_check_por (bucknboost_t *ctx) |
Buck n Boost check power on reset function. | |
err_t | bucknboost_read_oc_fault (bucknboost_t *ctx, uint8_t *data_out) |
Buck n Boost read overcurrent fault function. | |
err_t | bucknboost_set_buck_out_voltage (bucknboost_t *ctx, uint8_t ch_num, uint8_t data_in) |
Buck n Boost set buck output voltage function. | |
err_t | bucknboost_set_all_buck_out_voltage (bucknboost_t *ctx, uint8_t data_in) |
Buck n Boost set all bucks output voltage function. | |
err_t | bucknboost_set_boost_out_voltage (bucknboost_t *ctx, uint8_t data_in) |
Buck n Boost set boost output voltage function. | |
err_t | bucknboost_get_status (bucknboost_t *ctx, bucknboost_status_t *st_data) |
Buck n Boost get status data function. | |
err_t | bucknboost_update_cfg_out (bucknboost_t *ctx, uint8_t ch_num, bucknboost_cfg_buck_t b_data) |
Buck n Boost update configuration of the output registers function. | |
err_t | bucknboost_get_power_good_status (bucknboost_t *ctx, uint8_t *data_out) |
Buck n Boost get power good status function. | |
err_t | bucknboost_check_power_good_status (bucknboost_t *ctx, uint8_t ch_num, uint8_t *data_out) |
Buck n Boost check power good status function. | |
err_t | bucknboost_get_eeprom_status (bucknboost_t *ctx, uint8_t *data_out) |
Buck n Boost get eeprom status function. | |
err_t | bucknboost_get_overcurrent_fault_status (bucknboost_t *ctx, uint8_t *data_out) |
Buck n Boost get overcurrent fault status function. | |
err_t | bucknboost_check_overc_fault_status (bucknboost_t *ctx, uint8_t ch_num, uint8_t *data_out) |
Buck n Boost check overcurrent fault status function. | |
API for configuring and manipulating Buck n Boost Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void bucknboost_cfg_setup | ( | bucknboost_cfg_t * | cfg | ) |
Buck n Boost configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See bucknboost_cfg_t object definition for detailed explanation. |
err_t bucknboost_check_overc_fault_status | ( | bucknboost_t * | ctx, |
uint8_t | ch_num, | ||
uint8_t * | data_out ) |
Buck n Boost check overcurrent fault status function.
This function checks the overcurrent fault status of a desired channel.
[in] | ctx | : Click context object. See bucknboost_t object definition for detailed explanation. |
[in] | ch_num | : Output channel number [1-6]. |
[out] | data_out | : Overcurrent fault status flag. |
0
- Success, -1
- Error.uint8_t bucknboost_check_por | ( | bucknboost_t * | ctx | ) |
Buck n Boost check power on reset function.
This function returns POR pin state.
[in] | ctx | : Click context object. See bucknboost_t object definition for detailed explanation. |
uint8_t bucknboost_check_power_good | ( | bucknboost_t * | ctx | ) |
Buck n Boost check power good function.
This function returns PG pin state.
[in] | ctx | : Click context object. See bucknboost_t object definition for detailed explanation. |
err_t bucknboost_check_power_good_status | ( | bucknboost_t * | ctx, |
uint8_t | ch_num, | ||
uint8_t * | data_out ) |
Buck n Boost check power good status function.
This function checks the power good status of a desired channel.
[in] | ctx | : Click context object. See bucknboost_t object definition for detailed explanation. |
[in] | ch_num | : Output channel number [1-6]. |
[out] | data_out | : Power good status flag. |
0
- Success, -1
- Error.err_t bucknboost_default_cfg | ( | bucknboost_t * | ctx | ) |
Buck n Boost default configuration function.
This function executes a default configuration of Buck n Boost click board.
[in] | ctx | : Click context object. See bucknboost_t object definition for detailed explanation. |
0
- Success, -1
- Error.void bucknboost_device_enable | ( | bucknboost_t * | ctx, |
uint8_t | state ) |
Buck n Boost enable device function.
This function enables or disables device by setting EN pin state.
[in] | ctx | : Click context object. See bucknboost_t object definition for detailed explanation. |
[in] | state | : - 0x00 : Disable.
|
err_t bucknboost_generic_read | ( | bucknboost_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | rx_buf, | ||
uint8_t | rx_len ) |
Buck n Boost 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 bucknboost_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | rx_buf | : Output read data. |
[in] | rx_len | : Number of bytes to be read. |
0
- Success, -1
- Error.err_t bucknboost_generic_write | ( | bucknboost_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | tx_buf, | ||
uint8_t | tx_len ) |
Buck n Boost 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 bucknboost_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | tx_buf | : Data to be written. |
[in] | tx_len | : Number of bytes to be written. |
0
- Success, -1
- Error.err_t bucknboost_get_eeprom_status | ( | bucknboost_t * | ctx, |
uint8_t * | data_out ) |
Buck n Boost get eeprom status function.
This function reads the eeprom status register.
[in] | ctx | : Click context object. See bucknboost_t object definition for detailed explanation. |
[out] | data_out | : Eeprom register content. |
0
- Success, -1
- Error.err_t bucknboost_get_overcurrent_fault_status | ( | bucknboost_t * | ctx, |
uint8_t * | data_out ) |
Buck n Boost get overcurrent fault status function.
This function reads the overcurrent fault status register.
[in] | ctx | : Click context object. See bucknboost_t object definition for detailed explanation. |
[out] | data_out | : Overcurrent fault register content. |
0
- Success, -1
- Error.err_t bucknboost_get_power_good_status | ( | bucknboost_t * | ctx, |
uint8_t * | data_out ) |
Buck n Boost get power good status function.
This function reads the power good status register.
[in] | ctx | : Click context object. See bucknboost_t object definition for detailed explanation. |
[out] | data_out | : Power good status register content. |
0
- Success, -1
- Error.err_t bucknboost_get_status | ( | bucknboost_t * | ctx, |
bucknboost_status_t * | st_data ) |
Buck n Boost get status data function.
This function reads Power Good, EEPROM, and Overcurrent status registers.
[in] | ctx | : Click context object. See bucknboost_t object definition for detailed explanation. |
[out] | st_data | : Status structure output data. |
0
- Success, -1
- Error.err_t bucknboost_init | ( | bucknboost_t * | ctx, |
bucknboost_cfg_t * | cfg ) |
Buck n Boost initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See bucknboost_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See bucknboost_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.void bucknboost_pin_standby_mode | ( | bucknboost_t * | ctx, |
uint8_t | state ) |
Buck n Boost set STB pin mode function.
This function sets standby mode via STB pin.
[in] | ctx | : Click context object. See bucknboost_t object definition for detailed explanation. |
[in] | state | : - 0x00 : Disable.
|
err_t bucknboost_read_byte | ( | bucknboost_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out ) |
Buck n Boost read single byte function.
This function reads a single data byte from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See bucknboost_t object definition for detailed explanation. |
[in] | reg | : 8-bit register address. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error.err_t bucknboost_read_oc_fault | ( | bucknboost_t * | ctx, |
uint8_t * | data_out ) |
Buck n Boost read overcurrent fault function.
This function reads the overcurrent status fault.
[in] | ctx | : Click context object. See bucknboost_t object definition for detailed explanation. |
[out] | data_out | : Overcurrent status register content. |
0
- Success, -1
- Error.err_t bucknboost_reg_standby_mode | ( | bucknboost_t * | ctx, |
uint8_t | state ) |
Buck n Boost set standby mode function.
This function sets standby or wake up mode via registers.
[in] | ctx | : Click context object. See bucknboost_t object definition for detailed explanation. |
[in] | state | : - 0x00 : Wake Up.
|
0
- Success, -1
- Error.err_t bucknboost_send_cmd | ( | bucknboost_t * | ctx, |
uint8_t | cmd ) |
Buck n Boost send command function.
This function sends a desired command via I2C serial interface.
[in] | ctx | : Click context object. See bucknboost_t object definition for detailed explanation. |
[in] | cmd | : 8-bit command data. |
0
- Success, -1
- Error.err_t bucknboost_set_all_buck_out_voltage | ( | bucknboost_t * | ctx, |
uint8_t | data_in ) |
Buck n Boost set all bucks output voltage function.
This function sets the output voltage of all bucks channel.
[in] | ctx | : Click context object. See bucknboost_t object definition for detailed explanation. |
[in] | data_in | : Buck output voltage data. |
0
- Success, -1
- Error.err_t bucknboost_set_boost_out_voltage | ( | bucknboost_t * | ctx, |
uint8_t | data_in ) |
Buck n Boost set boost output voltage function.
This function sets the output voltage of the boost channel (CH6).
[in] | ctx | : Click context object. See bucknboost_t object definition for detailed explanation. |
[in] | data_in | : Boost output voltage data. |
0
- Success, -1
- Error.err_t bucknboost_set_buck_out_voltage | ( | bucknboost_t * | ctx, |
uint8_t | ch_num, | ||
uint8_t | data_in ) |
Buck n Boost set buck output voltage function.
This function sets the output voltage of a desired buck channel.
[in] | ctx | : Click context object. See bucknboost_t object definition for detailed explanation. |
[in] | ch_num | : Channel number. |
[in] | data_in | : Buck output voltage data. |
0
- Success, -1
- Error.err_t bucknboost_update_cfg_out | ( | bucknboost_t * | ctx, |
uint8_t | ch_num, | ||
bucknboost_cfg_buck_t | b_data ) |
Buck n Boost update configuration of the output registers function.
This function updates configuration of the output Buck registers.
[in] | ctx | : Click context object. See bucknboost_t object definition for detailed explanation. |
[in] | ch_num | : Buck output channel number [1-5]. |
[in] | b_data | : Buck structure that contains configuration data. |
0
- Success, -1
- Error.err_t bucknboost_write_byte | ( | bucknboost_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in ) |
Buck n Boost Write single byte function.
This function writes a desired data to the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See bucknboost_t object definition for detailed explanation. |
[in] | reg | : 8-bit register address. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error.