buck2 2.0.0.0
Public function

Functions

void buck2_cfg_setup (buck2_cfg_t *cfg)
 Config Object Initialization function.
 
BUCK2_RETVAL buck2_init (buck2_t *ctx, buck2_cfg_t *cfg)
 Initialization function.
 
void buck2_default_cfg (buck2_t *ctx)
 Click Default Configuration function.
 
void buck2_set_voset (buck2_t *ctx, uint8_t channel, uint8_t state)
 Function settings VOSET pin state.
 
void busk2_set_frequency (buck2_t *ctx, uint8_t freq)
 Function settings Frequency.
 
void buck2_set_power_mode (buck2_t *ctx, uint8_t mode)
 Function settings chip mode.
 
void back2_device_reset (buck2_t *ctx)
 Function for reset chip.
 
uint8_t buck2_get_power_good (buck2_t *ctx)
 Function reads state PG pin.
 
void buck2_set_output_voltage (buck2_t *ctx, uint8_t voltage)
 Function settings output voltage.
 

Detailed Description

Function Documentation

◆ back2_device_reset()

void back2_device_reset ( buck2_t * ctx)

Function for reset chip.

Parameters
ctxClick object.

◆ buck2_cfg_setup()

void buck2_cfg_setup ( buck2_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.

◆ buck2_default_cfg()

void buck2_default_cfg ( buck2_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for Buck 2 click.

Note
Settings that are included in the default config:
   Power mode options:
 - BUCK2_MODE_ACTIVE
  Set voltage 
 - BUCK2_SET_VOLTAGE_3300mV

◆ buck2_get_power_good()

uint8_t buck2_get_power_good ( buck2_t * ctx)

Function reads state PG pin.

Parameters
ctxClick object.
Returns
  • 0 / Not a good input voltage, set the input voltage to a minimum of 4500mV.
  • 1 / Power good output voltage

◆ buck2_init()

BUCK2_RETVAL buck2_init ( buck2_t * ctx,
buck2_cfg_t * cfg )

Initialization function.

Parameters
buck2Click object.
cfgClick configuration structure.

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

◆ buck2_set_output_voltage()

void buck2_set_output_voltage ( buck2_t * ctx,
uint8_t voltage )

Function settings output voltage.

Parameters
ctxClick object.
voltageSelect output voltage
Note
Set options:
 - BUCK2_SET_VOLTAGE_3300mV
 - BUCK2_SET_VOLTAGE_2500mV
 - BUCK2_SET_VOLTAGE_1800mV
 - BUCK2_SET_VOLTAGE_1500mV

◆ buck2_set_power_mode()

void buck2_set_power_mode ( buck2_t * ctx,
uint8_t mode )

Function settings chip mode.

Parameters
ctxClick object.
modeSelect power mode
Note
Set options:
 - BUCK2_MODE_ACTIVE
 - BUCK_MODE_SLEEP

◆ buck2_set_voset()

void buck2_set_voset ( buck2_t * ctx,
uint8_t channel,
uint8_t state )

Function settings VOSET pin state.

Parameters
ctxClick object.
channelSelect channel
stateVOSET pin state

◆ busk2_set_frequency()

void busk2_set_frequency ( buck2_t * ctx,
uint8_t freq )

Function settings Frequency.

Parameters
ctxClick object.
freqSelect frequency
Note
Frequency:
 - 565kHz - if the pin FQ is set to LOW
 - 790kHz - if the pin FQ is set to HIGH