smartbuck7 2.2.0
Loading...
Searching...
No Matches
Smart Buck 7 Click Driver

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.

Detailed Description

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.

Function Documentation

◆ smartbuck7_cfg_setup()

void smartbuck7_cfg_setup ( smartbuck7_cfg_t * cfg)

Smart Buck 7 configuration object setup function.

This function initializes Click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See smartbuck7_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ smartbuck7_clear_status()

err_t smartbuck7_clear_status ( smartbuck7_t * ctx)

Smart Buck 7 clear status flags function.

This function clears the STATUS_2 register flags.

Parameters
[in]ctx: Click context object. See smartbuck7_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
Note
None.

◆ smartbuck7_default_cfg()

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.

Parameters
[in]ctx: Click context object. See smartbuck7_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
This function can consist any necessary configuration or setting to put device into operating mode.

◆ smartbuck7_disable_buck()

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.

Parameters
[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).
Returns
  • 0 - Success,
  • -1 - Error.
Note
None.

◆ smartbuck7_disable_device()

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.

Parameters
[in]ctx: Click context object. See smartbuck7_t object definition for detailed explanation.
Returns
None.
Note
None.

◆ smartbuck7_enable_buck()

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.

Parameters
[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).
Returns
  • 0 - Success,
  • -1 - Error.
Note
None.

◆ smartbuck7_enable_device()

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.

Parameters
[in]ctx: Click context object. See smartbuck7_t object definition for detailed explanation.
Returns
None.
Note
None.

◆ smartbuck7_get_pg_pin()

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.

Parameters
[in]ctx: Click context object. See smartbuck7_t object definition for detailed explanation.
Returns
Pin logic state.
Note
None.

◆ smartbuck7_init()

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.

Parameters
[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.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ smartbuck7_read_reg()

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.

Parameters
[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.
Returns
  • 0 - Success,
  • -1 - Error.
Note
None.

◆ smartbuck7_read_status()

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.

Parameters
[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.
Returns
  • 0 - Success,
  • -1 - Error.
Note
None.

◆ smartbuck7_write_reg()

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.

Parameters
[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.
Returns
  • 0 - Success,
  • -1 - Error.
Note
None.