buck19 2.1.0.0
Buck 19 Click Driver

API for configuring and manipulating Buck 19 Click driver. More...

Topics

 Buck 19 Registers List
 List of registers of Buck 19 Click driver.
 
 Buck 19 Registers Settings
 Settings for registers of Buck 19 Click driver.
 
 Buck 19 MikroBUS Map
 MikroBUS pin mapping of Buck 19 Click driver.
 

Functions

void buck19_cfg_setup (buck19_cfg_t *cfg)
 Buck 19 configuration object setup function.
 
err_t buck19_init (buck19_t *ctx, buck19_cfg_t *cfg)
 Buck 19 initialization function.
 
err_t buck19_default_cfg (buck19_t *ctx)
 Buck 19 default configuration function.
 
err_t buck19_write_register (buck19_t *ctx, uint8_t reg, uint8_t data_in)
 Buck 19 write register function.
 
err_t buck19_read_register (buck19_t *ctx, uint8_t reg, uint8_t *data_out)
 Buck 19 read register function.
 
void buck19_enable_device (buck19_t *ctx)
 Buck 19 enable device function.
 
void buck19_disable_device (buck19_t *ctx)
 Buck 19 disable device function.
 
uint8_t buck19_get_pon_pin (buck19_t *ctx)
 Buck 19 get pon pin function.
 
uint8_t buck19_get_int_pin (buck19_t *ctx)
 Buck 19 get int pin function.
 
err_t buck19_set_vout (buck19_t *ctx, float vout)
 Buck 19 set vout function.
 
err_t buck19_set_ilimit (buck19_t *ctx, uint16_t ilimit)
 Buck 19 set ilimit function.
 

Detailed Description

API for configuring and manipulating Buck 19 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

◆ buck19_cfg_setup()

void buck19_cfg_setup ( buck19_cfg_t * cfg)

Buck 19 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ buck19_default_cfg()

err_t buck19_default_cfg ( buck19_t * ctx)

Buck 19 default configuration function.

This function executes a default configuration of Buck 19 click board.

Parameters
[in]ctx: Click context object. See buck19_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.

◆ buck19_disable_device()

void buck19_disable_device ( buck19_t * ctx)

Buck 19 disable device function.

This function disables the device by setting the EN pin to high logic state.

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

◆ buck19_enable_device()

void buck19_enable_device ( buck19_t * ctx)

Buck 19 enable device function.

This function enables the device by setting the EN pin to low logic state.

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

◆ buck19_get_int_pin()

uint8_t buck19_get_int_pin ( buck19_t * ctx)

Buck 19 get int pin function.

This function returns the interrupt (INT) pin logic state.

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

◆ buck19_get_pon_pin()

uint8_t buck19_get_pon_pin ( buck19_t * ctx)

Buck 19 get pon pin function.

This function returns the Power-on (PON) pin logic state.

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

◆ buck19_init()

err_t buck19_init ( buck19_t * ctx,
buck19_cfg_t * cfg )

Buck 19 initialization function.

This function initializes all necessary pins and peripherals used for this click board.

Parameters
[out]ctx: Click context object. See buck19_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See buck19_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ buck19_read_register()

err_t buck19_read_register ( buck19_t * ctx,
uint8_t reg,
uint8_t * data_out )

Buck 19 read register function.

This function reads data from the selected register by using I2C serial interface.

Parameters
[in]ctx: Click context object. See buck19_t object definition for detailed explanation.
[in]reg: Register address.
[out]data_out: Output read data.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ buck19_set_ilimit()

err_t buck19_set_ilimit ( buck19_t * ctx,
uint16_t ilimit )

Buck 19 set ilimit function.

This function sets the current limit.

Parameters
[in]ctx: Click context object. See buck19_t object definition for detailed explanation.
[in]ilimit: Current limit. Valid values from 100 to 3000 mA.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ buck19_set_vout()

err_t buck19_set_vout ( buck19_t * ctx,
float vout )

Buck 19 set vout function.

This function sets the voltage output.

Parameters
[in]ctx: Click context object. See buck19_t object definition for detailed explanation.
[in]vout: Voltage output. Valid values from 3.0 to 20.0 V.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ buck19_write_register()

err_t buck19_write_register ( buck19_t * ctx,
uint8_t reg,
uint8_t data_in )

Buck 19 write register function.

This function writes a desired data to the selected register by using I2C serial interface.

Parameters
[in]ctx: Click context object. See buck19_t object definition for detailed explanation.
[in]reg: Register address.
[in]data_in: Data to be written.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.