buck22 2.1.0.0
|
API for configuring and manipulating Buck 22 Click driver. More...
Topics | |
Buck 22 Registers List | |
List of registers of Buck 22 Click driver. | |
Buck 22 Registers Settings | |
Settings for registers of Buck 22 Click driver. | |
Buck 22 MikroBUS Map | |
MikroBUS pin mapping of Buck 22 Click driver. | |
Functions | |
void | buck22_cfg_setup (buck22_cfg_t *cfg) |
Buck 22 configuration object setup function. | |
err_t | buck22_init (buck22_t *ctx, buck22_cfg_t *cfg) |
Buck 22 initialization function. | |
err_t | buck22_set_vout (buck22_t *ctx, uint16_t vout_mv) |
Buck 22 set vout function. | |
err_t | buck22_read_vout (buck22_t *ctx, uint16_t *vout_mv) |
Buck 22 read vout function. | |
err_t | buck22_set_control (buck22_t *ctx, uint8_t control) |
Buck 22 set control function. | |
err_t | buck22_read_status (buck22_t *ctx, uint8_t *status) |
Buck 22 read status function. | |
uint8_t | buck22_get_pg_pin (buck22_t *ctx) |
Buck 22 get pg pin function. | |
API for configuring and manipulating Buck 22 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void buck22_cfg_setup | ( | buck22_cfg_t * | cfg | ) |
Buck 22 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See buck22_cfg_t object definition for detailed explanation. |
uint8_t buck22_get_pg_pin | ( | buck22_t * | ctx | ) |
Buck 22 get pg pin function.
This function returns the power good (PG) pin logic state.
[in] | ctx | : Click context object. See buck22_t object definition for detailed explanation. |
err_t buck22_init | ( | buck22_t * | ctx, |
buck22_cfg_t * | cfg ) |
Buck 22 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See buck22_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See buck22_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t buck22_read_status | ( | buck22_t * | ctx, |
uint8_t * | status ) |
Buck 22 read status function.
This function reads the status register by using I2C serial interface.
[in] | ctx | : Click context object. See buck22_t object definition for detailed explanation. |
[out] | status | : Status register value. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t buck22_read_vout | ( | buck22_t * | ctx, |
uint16_t * | vout_mv ) |
Buck 22 read vout function.
This function reads the output voltage by using I2C serial interface.
[in] | ctx | : Click context object. See buck22_t object definition for detailed explanation. |
[out] | vout_mv | : Voltage output in millivolts (800-3350mV). |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t buck22_set_control | ( | buck22_t * | ctx, |
uint8_t | control ) |
Buck 22 set control function.
This function sets the control register by using I2C serial interface.
[in] | ctx | : Click context object. See buck22_t object definition for detailed explanation. |
[in] | control | : Control register setting. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t buck22_set_vout | ( | buck22_t * | ctx, |
uint16_t | vout_mv ) |
Buck 22 set vout function.
This function sets the output voltage by using I2C serial interface.
[in] | ctx | : Click context object. See buck22_t object definition for detailed explanation. |
[in] | vout_mv | : Voltage output in millivolts (800-3350mV). |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.