buck19 2.1.0.0
|
API for configuring and manipulating Buck 19 Click driver. More...
Topics | |
Buck 19 Registers List | |
List of registers of Buck 19 Click driver. | |
Buck 19 Registers Settings | |
Settings for registers of Buck 19 Click driver. | |
Buck 19 MikroBUS Map | |
MikroBUS pin mapping of Buck 19 Click driver. | |
Functions | |
void | buck19_cfg_setup (buck19_cfg_t *cfg) |
Buck 19 configuration object setup function. | |
err_t | buck19_init (buck19_t *ctx, buck19_cfg_t *cfg) |
Buck 19 initialization function. | |
err_t | buck19_default_cfg (buck19_t *ctx) |
Buck 19 default configuration function. | |
err_t | buck19_write_register (buck19_t *ctx, uint8_t reg, uint8_t data_in) |
Buck 19 write register function. | |
err_t | buck19_read_register (buck19_t *ctx, uint8_t reg, uint8_t *data_out) |
Buck 19 read register function. | |
void | buck19_enable_device (buck19_t *ctx) |
Buck 19 enable device function. | |
void | buck19_disable_device (buck19_t *ctx) |
Buck 19 disable device function. | |
uint8_t | buck19_get_pon_pin (buck19_t *ctx) |
Buck 19 get pon pin function. | |
uint8_t | buck19_get_int_pin (buck19_t *ctx) |
Buck 19 get int pin function. | |
err_t | buck19_set_vout (buck19_t *ctx, float vout) |
Buck 19 set vout function. | |
err_t | buck19_set_ilimit (buck19_t *ctx, uint16_t ilimit) |
Buck 19 set ilimit function. | |
API for configuring and manipulating Buck 19 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void buck19_cfg_setup | ( | buck19_cfg_t * | cfg | ) |
Buck 19 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See buck19_cfg_t object definition for detailed explanation. |
err_t buck19_default_cfg | ( | buck19_t * | ctx | ) |
Buck 19 default configuration function.
This function executes a default configuration of Buck 19 click board.
[in] | ctx | : Click context object. See buck19_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void buck19_disable_device | ( | buck19_t * | ctx | ) |
Buck 19 disable device function.
This function disables the device by setting the EN pin to high logic state.
[in] | ctx | : Click context object. See buck19_t object definition for detailed explanation. |
void buck19_enable_device | ( | buck19_t * | ctx | ) |
Buck 19 enable device function.
This function enables the device by setting the EN pin to low logic state.
[in] | ctx | : Click context object. See buck19_t object definition for detailed explanation. |
uint8_t buck19_get_int_pin | ( | buck19_t * | ctx | ) |
Buck 19 get int pin function.
This function returns the interrupt (INT) pin logic state.
[in] | ctx | : Click context object. See buck19_t object definition for detailed explanation. |
uint8_t buck19_get_pon_pin | ( | buck19_t * | ctx | ) |
Buck 19 get pon pin function.
This function returns the Power-on (PON) pin logic state.
[in] | ctx | : Click context object. See buck19_t object definition for detailed explanation. |
err_t buck19_init | ( | buck19_t * | ctx, |
buck19_cfg_t * | cfg ) |
Buck 19 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See buck19_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See buck19_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t buck19_read_register | ( | buck19_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out ) |
Buck 19 read register function.
This function reads data from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See buck19_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 buck19_set_ilimit | ( | buck19_t * | ctx, |
uint16_t | ilimit ) |
Buck 19 set ilimit function.
This function sets the current limit.
[in] | ctx | : Click context object. See buck19_t object definition for detailed explanation. |
[in] | ilimit | : Current limit. Valid values from 100 to 3000 mA. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t buck19_set_vout | ( | buck19_t * | ctx, |
float | vout ) |
Buck 19 set vout function.
This function sets the voltage output.
[in] | ctx | : Click context object. See buck19_t object definition for detailed explanation. |
[in] | vout | : Voltage output. Valid values from 3.0 to 20.0 V. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t buck19_write_register | ( | buck19_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in ) |
Buck 19 write register function.
This function writes a desired data to the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See buck19_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.