buck12 2.0.0.0
Public function

Functions

void buck12_cfg_setup (buck12_cfg_t *cfg)
 Config Object Initialization function.
 
BUCK12_RETVAL buck12_init (buck12_t *ctx, buck12_cfg_t *cfg)
 Initialization function.
 
void buck12_default_cfg (buck12_t *ctx)
 Click Default Configuration function.
 
void buck12_generic_transfer (buck12_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len)
 Generic transfer function.
 
void buck12_control (buck12_t *ctx, uint8_t ctrl)
 Function for enable or disable device.
 
uint16_t buck12_get_channel_adc (buck12_t *ctx, uint8_t channel)
 Function for read ADC on the channel.
 
float buck12_get_voltage (buck12_t *ctx, uint8_t select_volt)
 Function for get Voltage.
 

Detailed Description

Function Documentation

◆ buck12_cfg_setup()

void buck12_cfg_setup ( buck12_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.

◆ buck12_control()

void buck12_control ( buck12_t * ctx,
uint8_t ctrl )

Function for enable or disable device.

Parameters
ctxClick object.
ctrlDisable or enable device.

@description This function for enable or disable device.

◆ buck12_default_cfg()

void buck12_default_cfg ( buck12_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

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

◆ buck12_generic_transfer()

void buck12_generic_transfer ( buck12_t * ctx,
uint8_t * wr_buf,
uint16_t wr_len,
uint8_t * rd_buf,
uint16_t rd_len )

Generic transfer function.

Parameters
ctxClick object.
wr_bufWrite data buffer
wr_lenNumber of byte in write data buffer
rd_bufRead data buffer
rd_lenNumber of byte in read data buffer

@description Generic SPI transfer, for sending and receiving packages

◆ buck12_get_channel_adc()

uint16_t buck12_get_channel_adc ( buck12_t * ctx,
uint8_t channel )

Function for read ADC on the channel.

Parameters
ctxClick object.
channelSelect channel (0 or 1).

@description This function reads ADC on the channel.

◆ buck12_get_voltage()

float buck12_get_voltage ( buck12_t * ctx,
uint8_t select_volt )

Function for get Voltage.

Parameters
ctxClick object.
select_voltSelect voltage.

@description This function gets Voltage.

◆ buck12_init()

BUCK12_RETVAL buck12_init ( buck12_t * ctx,
buck12_cfg_t * cfg )

Initialization function.

Parameters
buck12Click object.
cfgClick configuration structure.

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