buck23
2.1.0.0
|
API for configuring and manipulating Buck 23 Click driver. More...
Modules | |
Buck 23 Registers List | |
List of registers of Buck 23 Click driver. | |
Buck 23 Registers Settings | |
Settings for registers of Buck 23 Click driver. | |
Buck 23 MikroBUS Map | |
MikroBUS pin mapping of Buck 23 Click driver. | |
Functions | |
void | buck23_cfg_setup (buck23_cfg_t *cfg) |
Buck 23 configuration object setup function. More... | |
err_t | buck23_init (buck23_t *ctx, buck23_cfg_t *cfg) |
Buck 23 initialization function. More... | |
err_t | buck23_default_cfg (buck23_t *ctx) |
Buck 23 default configuration function. More... | |
err_t | buck23_write_register (buck23_t *ctx, uint8_t reg, uint8_t data_in) |
Buck 23 write register function. More... | |
err_t | buck23_read_register (buck23_t *ctx, uint8_t reg, uint8_t *data_out) |
Buck 23 read register function. More... | |
void | buck23_enable_device (buck23_t *ctx) |
Buck 23 enable device function. More... | |
void | buck23_disable_device (buck23_t *ctx) |
Buck 23 disable device function. More... | |
void | buck23_restart_device (buck23_t *ctx) |
Buck 23 restart device function. More... | |
void | buck23_set_sync_pin (buck23_t *ctx, uint8_t state) |
Buck 23 set sync pin function. More... | |
uint8_t | buck23_get_pg_pin (buck23_t *ctx) |
Buck 23 get pg pin function. More... | |
err_t | buck23_check_communication (buck23_t *ctx) |
Buck 23 check communication function. More... | |
err_t | buck23_set_vstep (buck23_t *ctx, uint8_t vstep) |
Buck 23 set vstep function. More... | |
err_t | buck23_set_vout (buck23_t *ctx, uint16_t vout_mv) |
Buck 23 set vout function. More... | |
API for configuring and manipulating Buck 23 Click driver.
void buck23_cfg_setup | ( | buck23_cfg_t * | cfg | ) |
Buck 23 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See buck23_cfg_t object definition for detailed explanation. |
err_t buck23_check_communication | ( | buck23_t * | ctx | ) |
Buck 23 check communication function.
This function checks the communication by reading and verifying the device ID.
[in] | ctx | : Click context object. See buck23_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t buck23_default_cfg | ( | buck23_t * | ctx | ) |
Buck 23 default configuration function.
This function executes a default configuration of Buck 23 click board.
[in] | ctx | : Click context object. See buck23_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void buck23_disable_device | ( | buck23_t * | ctx | ) |
Buck 23 disable device function.
This function disables the device by setting the EN pin to high logic state.
[in] | ctx | : Click context object. See buck23_t object definition for detailed explanation. |
void buck23_enable_device | ( | buck23_t * | ctx | ) |
Buck 23 enable device function.
This function enables the device by setting the EN pin to high logic state.
[in] | ctx | : Click context object. See buck23_t object definition for detailed explanation. |
uint8_t buck23_get_pg_pin | ( | buck23_t * | ctx | ) |
Buck 23 get pg pin function.
This function returns the PG (power good) pin logic state.
[in] | ctx | : Click context object. See buck23_t object definition for detailed explanation. |
err_t buck23_init | ( | buck23_t * | ctx, |
buck23_cfg_t * | cfg | ||
) |
Buck 23 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See buck23_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See buck23_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t buck23_read_register | ( | buck23_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out | ||
) |
Buck 23 read register function.
This function reads data from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See buck23_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. void buck23_restart_device | ( | buck23_t * | ctx | ) |
Buck 23 restart device function.
This function restarts the device by toggling the EN pin logic state.
[in] | ctx | : Click context object. See buck23_t object definition for detailed explanation. |
void buck23_set_sync_pin | ( | buck23_t * | ctx, |
uint8_t | state | ||
) |
Buck 23 set sync pin function.
This function sets the SYNC pin logic state.
[in] | ctx | : Click context object. See buck23_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |
err_t buck23_set_vout | ( | buck23_t * | ctx, |
uint16_t | vout_mv | ||
) |
Buck 23 set vout function.
This function sets the voltage output.
[in] | ctx | : Click context object. See buck23_t object definition for detailed explanation. |
[in] | vout_mv | : Voltage output in millivolts. Depending on the vstep settings the voltage output ranges from 500mV to 1270mV or from 625mV to 1587.5mV. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t buck23_set_vstep | ( | buck23_t * | ctx, |
uint8_t | vstep | ||
) |
Buck 23 set vstep function.
This function sets the voltage output step to 10mV or 12.5mV.
[in] | ctx | : Click context object. See buck23_t object definition for detailed explanation. |
[in] | vstep | :
|
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t buck23_write_register | ( | buck23_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in | ||
) |
Buck 23 write register function.
This function writes a desired data to the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See buck23_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.