c3xbuck 2.0.0.0
Public function

Functions

void c3xbuck_cfg_setup (c3xbuck_cfg_t *cfg)
 Config Object Initialization function.
 
C3XBUCK_RETVAL c3xbuck_init (c3xbuck_t *ctx, c3xbuck_cfg_t *cfg)
 Initialization function.
 
void c3xbuck_default_cfg (c3xbuck_t *ctx)
 Click Default Configuration function.
 
void c3xbuck_write_byte (c3xbuck_t *ctx, uint8_t reg, uint8_t data_value)
 Write byte function.
 
uint8_t c3xbuck_read_byte (c3xbuck_t *ctx, uint8_t reg)
 Generic read function.
 
void c3xbuck_enable_buck (c3xbuck_t *ctx, uint8_t buck)
 Enable Buck function.
 
void c3xbuck_disable_buck (c3xbuck_t *ctx, uint8_t buck)
 Disable Buck function.
 
void c3xbuck_set_voltage (c3xbuck_t *ctx, uint8_t buck, uint8_t voltage)
 Set voltage function.
 
uint8_t c3xbuck_get_status (c3xbuck_t *ctx)
 Get status function.
 
void c3xbuck_configuration_buck (c3xbuck_t *ctx, uint8_t buck, uint8_t config)
 Configuration function.
 

Detailed Description

Function Documentation

◆ c3xbuck_cfg_setup()

void c3xbuck_cfg_setup ( c3xbuck_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.

◆ c3xbuck_configuration_buck()

void c3xbuck_configuration_buck ( c3xbuck_t * ctx,
uint8_t buck,
uint8_t config )

Configuration function.

Parameters
ctxClick object.
buckBuck 1 - 3.

@description This function executes default configuration for 3xBuck click.

◆ c3xbuck_default_cfg()

void c3xbuck_default_cfg ( c3xbuck_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for 3xBuck click.

◆ c3xbuck_disable_buck()

void c3xbuck_disable_buck ( c3xbuck_t * ctx,
uint8_t buck )

Disable Buck function.

Parameters
ctxClick object.

@description This function disables 3xBuck click.

◆ c3xbuck_enable_buck()

void c3xbuck_enable_buck ( c3xbuck_t * ctx,
uint8_t buck )

Enable Buck function.

Parameters
ctxClick object.

@description This function enables desired Buck on the click.

◆ c3xbuck_get_status()

uint8_t c3xbuck_get_status ( c3xbuck_t * ctx)

Get status function.

Parameters
ctxClick object.
Returns
Status register value.

@description This function returns status register.

◆ c3xbuck_init()

C3XBUCK_RETVAL c3xbuck_init ( c3xbuck_t * ctx,
c3xbuck_cfg_t * cfg )

Initialization function.

Parameters
c3xbuckClick object.
cfgClick configuration structure.

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

Returns
Initialization response.

◆ c3xbuck_read_byte()

uint8_t c3xbuck_read_byte ( c3xbuck_t * ctx,
uint8_t reg )

Generic read function.

Parameters
ctxClick object.
regRegister address.
data_bufOutput data buf
lenNumber of the bytes to be read
Returns
Read data; @description This function reads data from the desired register.

◆ c3xbuck_set_voltage()

void c3xbuck_set_voltage ( c3xbuck_t * ctx,
uint8_t buck,
uint8_t voltage )

Set voltage function.

Parameters
ctxClick object.
buckBuck 1 - 3
voltageVoltage value

@description This function sets voltage on desired Buck.

◆ c3xbuck_write_byte()

void c3xbuck_write_byte ( c3xbuck_t * ctx,
uint8_t reg,
uint8_t data_value )

Write byte function.

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

@description This function writes data from the desired register.