|
smartbuck7 2.2.0
|
API for configuring and manipulating Smart Buck 7 Click driver. More...
Topics | |
| Smart Buck 7 Registers List | |
| List of registers of Smart Buck 7 Click driver. | |
| Smart Buck 7 Registers Settings | |
| Settings for registers of Smart Buck 7 Click driver. | |
| Smart Buck 7 MikroBUS Map | |
| MikroBUS pin mapping of Smart Buck 7 Click driver. | |
Functions | |
| void | smartbuck7_cfg_setup (smartbuck7_cfg_t *cfg) |
| Smart Buck 7 configuration object setup function. | |
| err_t | smartbuck7_init (smartbuck7_t *ctx, smartbuck7_cfg_t *cfg) |
| Smart Buck 7 initialization function. | |
| err_t | smartbuck7_default_cfg (smartbuck7_t *ctx) |
| Smart Buck 7 default configuration function. | |
| err_t | smartbuck7_write_reg (smartbuck7_t *ctx, uint8_t reg, uint8_t data_in) |
| Smart Buck 7 write register function. | |
| err_t | smartbuck7_read_reg (smartbuck7_t *ctx, uint8_t reg, uint8_t *data_out) |
| Smart Buck 7 read register function. | |
| void | smartbuck7_enable_device (smartbuck7_t *ctx) |
| Smart Buck 7 enable device function. | |
| void | smartbuck7_disable_device (smartbuck7_t *ctx) |
| Smart Buck 7 disable device function. | |
| uint8_t | smartbuck7_get_pg_pin (smartbuck7_t *ctx) |
| Smart Buck 7 get power-good pin function. | |
| err_t | smartbuck7_read_status (smartbuck7_t *ctx, smartbuck7_status_t *status) |
| Smart Buck 7 read status registers function. | |
| err_t | smartbuck7_clear_status (smartbuck7_t *ctx) |
| Smart Buck 7 clear status flags function. | |
| err_t | smartbuck7_enable_buck (smartbuck7_t *ctx, uint8_t buck_sel) |
| Smart Buck 7 enable selected buck function. | |
| err_t | smartbuck7_disable_buck (smartbuck7_t *ctx, uint8_t buck_sel) |
| Smart Buck 7 disable selected buck function. | |
API for configuring and manipulating Smart Buck 7 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
| void smartbuck7_cfg_setup | ( | smartbuck7_cfg_t * | cfg | ) |
Smart Buck 7 configuration object setup function.
This function initializes Click configuration structure to initial values.
| [out] | cfg | : Click configuration structure. See smartbuck7_cfg_t object definition for detailed explanation. |
| err_t smartbuck7_clear_status | ( | smartbuck7_t * | ctx | ) |
Smart Buck 7 clear status flags function.
This function clears the STATUS_2 register flags.
| [in] | ctx | : Click context object. See smartbuck7_t object definition for detailed explanation. |
0 - Success, -1 - Error. | err_t smartbuck7_default_cfg | ( | smartbuck7_t * | ctx | ) |
Smart Buck 7 default configuration function.
This function executes a default configuration of Smart Buck 7 Click board.
| [in] | ctx | : Click context object. See smartbuck7_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t smartbuck7_disable_buck | ( | smartbuck7_t * | ctx, |
| uint8_t | buck_sel ) |
Smart Buck 7 disable selected buck function.
This function disables one or more buck regulators by clearing their control bits.
| [in] | ctx | : Click context object. See smartbuck7_t object definition for detailed explanation. |
| [in] | buck_sel | : Buck regulator selection mask (e.g. SMARTBUCK7_BUCK_1, BUCK_2, BUCK_3, BUCK_4, BUCK_ALL). |
0 - Success, -1 - Error. | void smartbuck7_disable_device | ( | smartbuck7_t * | ctx | ) |
Smart Buck 7 disable device function.
This function sets the ON pin to logic high state to disable the device.
| [in] | ctx | : Click context object. See smartbuck7_t object definition for detailed explanation. |
| err_t smartbuck7_enable_buck | ( | smartbuck7_t * | ctx, |
| uint8_t | buck_sel ) |
Smart Buck 7 enable selected buck function.
This function enables one or more buck regulators by setting their control bits.
| [in] | ctx | : Click context object. See smartbuck7_t object definition for detailed explanation. |
| [in] | buck_sel | : Buck regulator selection mask (e.g. SMARTBUCK7_BUCK_1, BUCK_2, BUCK_3, BUCK_4, BUCK_ALL). |
0 - Success, -1 - Error. | void smartbuck7_enable_device | ( | smartbuck7_t * | ctx | ) |
Smart Buck 7 enable device function.
This function sets the ON pin to logic low state to enable the device.
| [in] | ctx | : Click context object. See smartbuck7_t object definition for detailed explanation. |
| uint8_t smartbuck7_get_pg_pin | ( | smartbuck7_t * | ctx | ) |
Smart Buck 7 get power-good pin function.
This function reads the logic level of the PG pin.
| [in] | ctx | : Click context object. See smartbuck7_t object definition for detailed explanation. |
| err_t smartbuck7_init | ( | smartbuck7_t * | ctx, |
| smartbuck7_cfg_t * | cfg ) |
Smart Buck 7 initialization function.
This function initializes all necessary pins and peripherals used for this Click board.
| [out] | ctx | : Click context object. See smartbuck7_t object definition for detailed explanation. |
| [in] | cfg | : Click configuration structure. See smartbuck7_cfg_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t smartbuck7_read_reg | ( | smartbuck7_t * | ctx, |
| uint8_t | reg, | ||
| uint8_t * | data_out ) |
Smart Buck 7 read register function.
This function reads a single byte of data from the specified register address.
| [in] | ctx | : Click context object. See smartbuck7_t object definition for detailed explanation. |
| [in] | reg | : Register address. |
| [out] | data_out | : Pointer to memory where read data will be stored. |
0 - Success, -1 - Error. | err_t smartbuck7_read_status | ( | smartbuck7_t * | ctx, |
| smartbuck7_status_t * | status ) |
Smart Buck 7 read status registers function.
This function reads the STATUS_1 and STATUS_2 registers and stores them in the status structure.
| [in] | ctx | : Click context object. See smartbuck7_t object definition for detailed explanation. |
| [out] | status | : Pointer to status structure. See smartbuck7_status_t object definition for detailed explanation. |
0 - Success, -1 - Error. | err_t smartbuck7_write_reg | ( | smartbuck7_t * | ctx, |
| uint8_t | reg, | ||
| uint8_t | data_in ) |
Smart Buck 7 write register function.
This function writes a single byte of data to the specified register address.
| [in] | ctx | : Click context object. See smartbuck7_t object definition for detailed explanation. |
| [in] | reg | : Register address. |
| [in] | data_in | : Data byte to be written. |
0 - Success, -1 - Error.