stepdown6 2.1.0.0
Step Down 6 Click Driver

API for configuring and manipulating Step Down 6 Click driver. More...

Topics

 Step Down 6 Registers List
 List of registers of Step Down 6 Click driver.
 
 Step Down 6 Registers Settings
 Settings for registers of Step Down 6 Click driver.
 
 Step Down 6 MikroBUS Map
 MikroBUS pin mapping of Step Down 6 Click driver.
 

Functions

void stepdown6_cfg_setup (stepdown6_cfg_t *cfg)
 Step Down 6 configuration object setup function.
 
err_t stepdown6_init (stepdown6_t *ctx, stepdown6_cfg_t *cfg)
 Step Down 6 initialization function.
 
err_t stepdown6_default_cfg (stepdown6_t *ctx)
 Step Down 6 default configuration function.
 
err_t stepdown6_generic_write (stepdown6_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len)
 Step Down 6 I2C writing function.
 
err_t stepdown6_generic_read (stepdown6_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len)
 Step Down 6 I2C reading function.
 
void stepdown6_set_en_pin (stepdown6_t *ctx, uint8_t pin_state)
 Step Down 6 set EN pin state function.
 
err_t stepdown6_write_reg (stepdown6_t *ctx, uint8_t reg, uint8_t data_in)
 Step Down 6 Register writing function.
 
err_t stepdown6_read_reg (stepdown6_t *ctx, uint8_t reg, uint8_t *data_out)
 Step Down 6 Register reading function.
 
err_t stepdown6_set_out_voltage (stepdown6_t *ctx, uint8_t out_sel, uint16_t out_val)
 Step Down 6 Set output voltage function.
 

Detailed Description

API for configuring and manipulating Step Down 6 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

◆ stepdown6_cfg_setup()

void stepdown6_cfg_setup ( stepdown6_cfg_t * cfg)

Step Down 6 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ stepdown6_default_cfg()

err_t stepdown6_default_cfg ( stepdown6_t * ctx)

Step Down 6 default configuration function.

This function executes a default configuration of Step Down 6 click board.

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

◆ stepdown6_generic_read()

err_t stepdown6_generic_read ( stepdown6_t * ctx,
uint8_t reg,
uint8_t * data_out,
uint8_t len )

Step Down 6 I2C reading function.

This function reads a desired number of data bytes starting from the selected register by using I2C serial interface.

Parameters
[in]ctx: Click context object. See stepdown6_t object definition for detailed explanation.
[in]reg: Start register address.
[out]data_out: Output read data.
[in]len: Number of bytes to be read.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ stepdown6_generic_write()

err_t stepdown6_generic_write ( stepdown6_t * ctx,
uint8_t reg,
uint8_t * data_in,
uint8_t len )

Step Down 6 I2C writing function.

This function writes a desired number of data bytes starting from the selected register by using I2C serial interface.

Parameters
[in]ctx: Click context object. See stepdown6_t object definition for detailed explanation.
[in]reg: Start register address.
[in]data_in: Data to be written.
[in]len: Number of bytes to be written.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ stepdown6_init()

err_t stepdown6_init ( stepdown6_t * ctx,
stepdown6_cfg_t * cfg )

Step Down 6 initialization function.

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

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

◆ stepdown6_read_reg()

err_t stepdown6_read_reg ( stepdown6_t * ctx,
uint8_t reg,
uint8_t * data_out )

Step Down 6 Register reading function.

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

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

◆ stepdown6_set_en_pin()

void stepdown6_set_en_pin ( stepdown6_t * ctx,
uint8_t pin_state )

Step Down 6 set EN pin state function.

This function is used to set state of the EN pin.

Parameters
[in]ctx: Click context object. See stepdown6_t object definition for detailed explanation.
[in]pin_state: State of the EN pin.
Returns
Nothing.
Note
None.

◆ stepdown6_set_out_voltage()

err_t stepdown6_set_out_voltage ( stepdown6_t * ctx,
uint8_t out_sel,
uint16_t out_val )

Step Down 6 Set output voltage function.

This function sets the selected voltage output of the selected channel.

Parameters
[in]ctx: Click context object. See stepdown6_t object definition for detailed explanation.
[in]out_sel: Output voltage selection.
[in]out_val: Output voltage value.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
Value of the output voltage can be set in ranges from 550 mV to 1820 mV.

◆ stepdown6_write_reg()

err_t stepdown6_write_reg ( stepdown6_t * ctx,
uint8_t reg,
uint8_t data_in )

Step Down 6 Register writing function.

This function writes a data byte into the selected register by using I2C serial interface.

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