buck22
2.1.0.0
|
API for configuring and manipulating Buck 22 Click driver. More...
Modules | |
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. More... | |
err_t | buck22_init (buck22_t *ctx, buck22_cfg_t *cfg) |
Buck 22 initialization function. More... | |
err_t | buck22_set_vout (buck22_t *ctx, uint16_t vout_mv) |
Buck 22 set vout function. More... | |
err_t | buck22_read_vout (buck22_t *ctx, uint16_t *vout_mv) |
Buck 22 read vout function. More... | |
err_t | buck22_set_control (buck22_t *ctx, uint8_t control) |
Buck 22 set control function. More... | |
err_t | buck22_read_status (buck22_t *ctx, uint8_t *status) |
Buck 22 read status function. More... | |
uint8_t | buck22_get_pg_pin (buck22_t *ctx) |
Buck 22 get pg pin function. More... | |
API for configuring and manipulating Buck 22 Click driver.
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.