buck11 2.0.0.0
Public function

Functions

void buck11_cfg_setup (buck11_cfg_t *cfg)
 Config Object Initialization function.
 
BUCK11_RETVAL buck11_init (buck11_t *ctx, buck11_cfg_t *cfg)
 Initialization function.
 
void buck11_generic_write (buck11_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void buck11_generic_read (buck11_t *ctx, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
void buck11_set_vdd_value (float vdd_volts)
 Set VDD Value function.
 
uint16_t buck11_read_adc (buck11_t *ctx)
 ADC Read function.
 
float buck11_get_vout (buck11_t *ctx, uint8_t vout_resolution)
 Get VOUT function.
 
float buck11_get_averaged_vout (buck11_t *ctx, uint8_t vout_resolution, uint8_t n_samples)
 Get Averaged VOUT function.
 

Detailed Description

Function Documentation

◆ buck11_cfg_setup()

void buck11_cfg_setup ( buck11_cfg_t * cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

@description This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ buck11_generic_read()

void buck11_generic_read ( buck11_t * ctx,
uint8_t * data_buf,
uint8_t len )

Generic read function.

Parameters
ctxClick object.
data_bufOutput data buf
lenNumber of the bytes to be read

@description This function reads data from the desired register.

◆ buck11_generic_write()

void buck11_generic_write ( buck11_t * ctx,
uint8_t reg,
uint8_t * data_buf,
uint8_t len )

Generic write function.

Parameters
ctxClick object.
regRegister address.
data_bufData buf to be written.
lenNumber of the bytes in data buf.

@description This function writes data to the desired register.

◆ buck11_get_averaged_vout()

float buck11_get_averaged_vout ( buck11_t * ctx,
uint8_t vout_resolution,
uint8_t n_samples )

Get Averaged VOUT function.

Parameters
ctxClick object.
vout_resolution0 - To get VOUT value in volts, 1 (or other value different from 0) - To get VOUT value in millivolts
n_samplesNumber of samples to be performed for one measurement cycle

@description This function allows user to get the averaged VOUT voltage value in the desired unit resolution, volts or millivolts.

Note
The number of conversions for one measurement cycle is selectable.

◆ buck11_get_vout()

float buck11_get_vout ( buck11_t * ctx,
uint8_t vout_resolution )

Get VOUT function.

Parameters
ctxClick object.
vout_resolution0 - To get VOUT value in volts, 1 (or other value different from 0) - To get VOUT value in millivolts

@description This function allows user to get VOUT voltage value in the desired unit resolution, volts or millivolts.

Note
This voltage is a result of one conversion cycle

◆ buck11_init()

BUCK11_RETVAL buck11_init ( buck11_t * ctx,
buck11_cfg_t * cfg )

Initialization function.

Parameters
buck11Click object.
cfgClick configuration structure.

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

◆ buck11_read_adc()

uint16_t buck11_read_adc ( buck11_t * ctx)

ADC Read function.

Parameters
ctxClick object.

@description This function reads the results of the AD conversion from the MCP3221A5T 12-bit converter.

◆ buck11_set_vdd_value()

void buck11_set_vdd_value ( float vdd_volts)

Set VDD Value function.

Parameters
vdd_voltsThe desired VDD value in Volts to be set

@description This function allows user to set VDD voltage to the desired (measured) value.

Note
This voltage is used as reference voltage for the MCP3221A5T converter.