buck16 2.0.0.0
Buck 16 Click Driver

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

Topics

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

Functions

void buck16_cfg_setup (buck16_cfg_t *cfg)
 Buck 16 configuration object setup function.
 
err_t buck16_init (buck16_t *ctx, buck16_cfg_t *cfg)
 Buck 16 initialization function.
 
err_t buck16_generic_write (buck16_t *ctx, uint8_t cmd, uint8_t cmd_bits, uint16_t tx_data)
 Data writing function.
 
void buck16_enable_output (buck16_t *ctx, uint8_t enable)
 Enable/Disable voltage output.
 
err_t buck16_set_potentiometer (buck16_t *ctx, uint16_t rwb)
 Set potentiometer resistivity.
 
err_t buck16_set_output (buck16_t *ctx, uint16_t vout)
 Set output voltage.
 

Detailed Description

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

◆ buck16_cfg_setup()

void buck16_cfg_setup ( buck16_cfg_t * cfg)

Buck 16 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ buck16_enable_output()

void buck16_enable_output ( buck16_t * ctx,
uint8_t enable )

Enable/Disable voltage output.

This function sets pin that enables or disables voltage output.

Parameters
[in]ctx: Click context object. See buck16_t object definition for detailed explanation.
[in]enable: Pin state to set.
Returns
Nothing.

◆ buck16_generic_write()

err_t buck16_generic_write ( buck16_t * ctx,
uint8_t cmd,
uint8_t cmd_bits,
uint16_t tx_data )

Data writing function.

This function writes a data to the selected command.

Parameters
[in]ctx: Click context object. See buck16_t object definition for detailed explanation.
[in]cmd: Command to send.
[in]cmd_bits: Configuration command bits.
[in]tx_data: Command data.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.

◆ buck16_init()

err_t buck16_init ( buck16_t * ctx,
buck16_cfg_t * cfg )

Buck 16 initialization function.

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

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

◆ buck16_set_output()

err_t buck16_set_output ( buck16_t * ctx,
uint16_t vout )

Set output voltage.

This function sets voltage value on output.

Parameters
[in]ctx: Click context object. See buck16_t object definition for detailed explanation.
[in]vout: Output voltage to set in mV.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
Output voltage depends of VCC. Vout value is in range 800-5500.

◆ buck16_set_potentiometer()

err_t buck16_set_potentiometer ( buck16_t * ctx,
uint16_t rwb )

Set potentiometer resistivity.

This function sets potentiometer value.

Parameters
[in]ctx: Click context object. See buck16_t object definition for detailed explanation.
[in]rwb: Resistivity to set with potentiometer.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.