buck15 2.1.0.0
buck15.h File Reference

This file contains API for Buck 15 Click Driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"

Go to the source code of this file.

Data Structures

struct  buck15_t
 Buck 15 Click context object. More...
 
struct  buck15_cfg_t
 Buck 15 Click configuration object. More...
 

Macros

#define BUCK15_INSTR_RDAC_SEL_1   0x00
 Buck 15 RDAC selection bitmasks.
 
#define BUCK15_INSTR_RDAC_SEL_2   0x80
 
#define BUCK15_INSTR_RDAC_MIDSCALE_DIS   0x00
 Buck 15 midscale reset bitmasks.
 
#define BUCK15_INSTR_RDAC_MIDSCALE_EN   0x40
 
#define BUCK15_INSTR_RDAC_SHUTDOWN_DIS   0x00
 Buck 15 shutdown bitmasks.
 
#define BUCK15_INSTR_RDAC_SHUTDOWN_EN   0x20
 
#define BUCK15_INSTR_RDAC_OTUPUT_0   0x00
 Buck 15 output logic pin latched bitmasks.
 
#define BUCK15_INSTR_RDAC_OTUPUT_1   0x08
 
#define BUCK15_INSTR_RDAC_OTUPUT_2   0x10
 
#define BUCK15_INSTR_RDAC_OTUPUT_3   0x18
 
#define BUCK15_VOS_WIPER_POS
 Buck 15 output voltage sense wiper position data values.
 
#define BUCK15_VSET_WIPER_POS
 Buck 15 output voltage setting wiper position data values.
 
#define BUCK15_VOUT_TABLE
 Buck 15 output voltage data table.
 
#define BUCK15_DEVICE_ADDRESS_GND   0x2C
 Buck 15 device address setting.
 
#define BUCK15_DEVICE_ADDRESS_VCC   0x2D
 
#define BUCK15_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  buck15_return_value_t { BUCK15_OK = 0 , BUCK15_ERROR = -1 }
 Buck 15 Click return value data. More...
 
enum  buck15_vout_t {
  BUCK15_VOUT_0V6 = 0 , BUCK15_VOUT_0V8 , BUCK15_VOUT_1V , BUCK15_VOUT_1V1 ,
  BUCK15_VOUT_1V3 , BUCK15_VOUT_1V5 , BUCK15_VOUT_1V8 , BUCK15_VOUT_1V9 ,
  BUCK15_VOUT_2V , BUCK15_VOUT_2V2 , BUCK15_VOUT_2V5 , BUCK15_VOUT_2V6 ,
  BUCK15_VOUT_2V8 , BUCK15_VOUT_3V , BUCK15_VOUT_3V2 , BUCK15_VOUT_3V3 ,
  BUCK15_VOUT_3V5 , BUCK15_VOUT_3V8 , BUCK15_VOUT_4V , BUCK15_VOUT_4V3 ,
  BUCK15_VOUT_4V6 , BUCK15_VOUT_5V
}
 Buck 15 output voltage values. More...
 

Functions

void buck15_cfg_setup (buck15_cfg_t *cfg)
 Buck 15 configuration object setup function.
 
err_t buck15_init (buck15_t *ctx, buck15_cfg_t *cfg)
 Buck 15 initialization function.
 
err_t buck15_default_cfg (buck15_t *ctx)
 Buck 15 default configuration function.
 
void buck15_enable_device (buck15_t *ctx)
 Buck 15 enable device function.
 
void buck15_disable_device (buck15_t *ctx)
 Buck 15 disable device function.
 
uint8_t buck15_get_power_good (buck15_t *ctx)
 Buck 15 disable device function.
 
err_t buck15_generic_write (buck15_t *ctx, uint8_t instr, uint8_t data_in)
 Buck 15 I2C writing function.
 
err_t buck15_generic_read (buck15_t *ctx, uint8_t instr, uint8_t *data_out)
 Buck 15 I2C reading function.
 
err_t buck15_set_vset (buck15_t *ctx, uint8_t vset_wp)
 Buck 15 set VSET function.
 
err_t buck15_set_vos (buck15_t *ctx, uint8_t vos_wp)
 Buck 15 set VOS function.
 
err_t buck15_set_vout (buck15_t *ctx, buck15_vout_t vout)
 Buck 15 set VOUT function.
 

Detailed Description

This file contains API for Buck 15 Click Driver.

Enumeration Type Documentation

◆ buck15_return_value_t

Buck 15 Click return value data.

Predefined enum values for driver return values.

Enumerator
BUCK15_OK 
BUCK15_ERROR 

◆ buck15_vout_t

Buck 15 output voltage values.

Predefined enum values for output voltage values.

Enumerator
BUCK15_VOUT_0V6 
BUCK15_VOUT_0V8 
BUCK15_VOUT_1V 
BUCK15_VOUT_1V1 
BUCK15_VOUT_1V3 
BUCK15_VOUT_1V5 
BUCK15_VOUT_1V8 
BUCK15_VOUT_1V9 
BUCK15_VOUT_2V 
BUCK15_VOUT_2V2 
BUCK15_VOUT_2V5 
BUCK15_VOUT_2V6 
BUCK15_VOUT_2V8 
BUCK15_VOUT_3V 
BUCK15_VOUT_3V2 
BUCK15_VOUT_3V3 
BUCK15_VOUT_3V5 
BUCK15_VOUT_3V8 
BUCK15_VOUT_4V 
BUCK15_VOUT_4V3 
BUCK15_VOUT_4V6 
BUCK15_VOUT_5V