buck14 2.0.0.0
buck14.h File Reference

This file contains API for Buck 14 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  buck14_t
 Click ctx object definition. More...
 
struct  buck14_cfg_t
 Click configuration structure definition. More...
 

Macros

#define BUCK14_MAP_MIKROBUS(cfg, mikrobus)
 
#define BUCK14_RETVAL   uint8_t
 
#define BUCK14_OK   0x00
 
#define BUCK14_INIT_ERROR   0xFF
 
#define BUCK14_SLAVE_ADDR   0x0A
 
#define BUCK14_CMD_OPERATION   0x01
 
#define BUCK14_CMD_ON_OFF_CONFIG   0x02
 
#define BUCK14_CMD_WRITE_PROTECT   0x10
 
#define BUCK14_CMD_CAPABILITY   0x19
 
#define BUCK14_CMD_VOUT_MODE   0x20
 
#define BUCK14_CMD_VOUT_COMMAND   0x21
 
#define BUCK14_CMD_VOUT_TRIM   0x22
 
#define BUCK14_CMD_VOUT_CAL_OFFSET   0x23
 
#define BUCK14_CMD_VOUT_MAX   0x24
 
#define BUCK14_CMD_VOUT_MARGIN_HIGH   0x25
 
#define BUCK14_CMD_VOUT_MARGIN_LOW   0x26
 
#define BUCK14_CMD_VOUT_TRANSITION_RATE   0x27
 
#define BUCK14_CMD_VOUT_DROOP   0x28
 
#define BUCK14_CMD_FREQUENCY_SWITCH   0x33
 
#define BUCK14_CMD_VIN_ON   0x35
 
#define BUCK14_CMD_VIN_OFF   0x36
 
#define BUCK14_CMD_IOUT_CAL_GAIN   0x38
 
#define BUCK14_CMD_IOUT_CAL_OFFSET   0x39
 
#define BUCK14_CMD_FAULT_POWER_GOOD_ON   0x5E
 
#define BUCK14_CMD_FAULT_POWERGOOD_OFF   0x5F
 
#define BUCK14_CMD_VOUT_OC_FAULT_LIMIT   0x40
 
#define BUCK14_CMD_VOUT_UV_FAULT_LIMIT   0x44
 
#define BUCK14_CMD_IOUT_OC_FAULT_LIMIT   0x46
 
#define BUCK14_CMD_OT_FAULT_LIMIT   0x4F
 
#define BUCK14_CMD_OT_WARN_LIMIT   0x51
 
#define BUCK14_CMD_VIN_OV_FAULT_LIMIT   0x55
 
#define BUCK14_CMD_VIN_UV_FAULT_LIMIT   0x59
 
#define BUCK14_CMD_VOUT_OV_FAULT_RESPONSE   0x41
 
#define BUCK14_CMD_VOUT_UV_FAULT_RESPONSE   0x45
 
#define BUCK14_CMD_OT_FAULT_RESPONSE   0x50
 
#define BUCK14_CMD_VIN_OV_FAULT_RESPONSE   0x56
 
#define BUCK14_CMD_VIN_UV_FAULT_RESPONSE   0x5A
 
#define BUCK14_CMD_IOUT_OC_FAULT_RESPONSE   0x47
 
#define BUCK14_CMD_TON_MAX_FAULT_RESPONSE   0x63
 
#define BUCK14_CMD_TON_DELAY   0x60
 
#define BUCK14_CMD_TON_RISE   0x61
 
#define BUCK14_CMD_TOFF_DELAY   0x64
 
#define BUCK14_CMD_TOFF_FALL   0x65
 
#define BUCK14_CMD_TON_MAX_FAULT_LIMIT   0x62
 
#define BUCK14_CMD_CLEAR_FAULTS   0x03
 
#define BUCK14_CMD_STATUS_BYTE   0x78
 
#define BUCK14_CMD_STATUS_WORD   0x79
 
#define BUCK14_CMD_STATUS_VOUT   0x7A
 
#define BUCK14_CMD_STATUS_IOUT   0x7B
 
#define BUCK14_CMD_STATUS_INPUT   0x7C
 
#define BUCK14_CMD_STATUS_TEMPERATURE   0x7D
 
#define BUCK14_CMD_STATUS_CML   0x7E
 
#define BUCK14_CMD_STATUS_MFR_SPECIFIC   0x80
 
#define BUCK14_CMD_READ_VIN   0x88
 
#define BUCK14_CMD_READ_VOUT   0x8B
 
#define BUCK14_CMD_READ_IOUT   0x8C
 
#define BUCK14_CMD_READ_TEMPERATURE_1   0x8D
 
#define BUCK14_CMD_READ_TEMPERATURE_2   0x8E
 
#define BUCK14_CMD_READ_DUTY_CYCLE   0x94
 
#define BUCK14_CMD_READ_FREQUENCY   0x95
 
#define BUCK14_CMD_INTERLEAVE   0x37
 
#define BUCK14_CMD_PMBUS_REVISION   0x98
 
#define BUCK14_CMD_MFR_ID   0x99
 
#define BUCK14_CMD_MFR_MODEL   0x9A
 
#define BUCK14_CMD_MFR_REVISION   0x9B
 
#define BUCK14_CMD_MFR_LOCATION   0x9C
 
#define BUCK14_CMD_MFR_DATE   0x9D
 
#define BUCK14_CMD_MFR_SERIAL   0x9E
 
#define BUCK14_CMD_IC_DEVICE_ID   0xAD
 
#define BUCK14_CMD_IC_DEVICE_REV   0xAE
 
#define BUCK14_CMD_STORE_DEFAULT_ALL   0x11
 
#define BUCK14_CMD_RESTORE_DEFAUL_ALL   0x12
 
#define BUCK14_CMD_STORE_USER_ALL   0x15
 
#define BUCK14_CMD_RESTORE_USER_ALL   0x16
 
#define BUCK14_CMD_ADAPTIVE_MODE   0xD0
 
#define BUCK14_CMD_FEEDBACK_EFFORT   0xD3
 
#define BUCK14_CMD_LOOP_CONFIG   0xD5
 
#define BUCK14_CMD_TEST_MODE   0xD9
 
#define BUCK14_CMD_COMP_MODEL   0xDB
 
#define BUCK14_CMD_STRAP_DISABLE   0xDC
 
#define BUCK14_CMD_MANUF_CONF   0xE0
 
#define BUCK14_CMD_MANUF_LOCK   0xE1
 
#define BUCK14_CMD_MANUF_PASSWD   0xE2
 
#define BUCK14_CMD_USER_CONF   0xE3
 
#define BUCK14_CMD_USER_LOCK   0xE4
 
#define BUCK14_CMD_USER_PASSWD   0xE5
 
#define BUCK14_CMD_SECURITY_LEVVEL   0xE6
 
#define BUCK14_CMD_DEADTIME_GCTRL   0xE7
 
#define BUCK14_CMD_ZETAP   0xE8
 
#define BUCK14_CTRL_DISABLE   0x00
 
#define BUCK14_CTRL_SOFT_DISABLE   0x60
 
#define BUCK14_CTRL_ENABLE_NO_MARGIN   0x80
 
#define BUCK14_CTRL_ENABLE_LOW_MARGIN1   0x96
 
#define BUCK14_CTRL_ENABLE_LOW_MARGIN2   0x98
 
#define BUCK14_CTRL_ENABLE_HIGH_MARGIN1   0xA6
 
#define BUCK14_CTRL_ENABLE_HIGH_MARGIN2   0xA8
 
#define BUCK14_VOUT_MODE_EXPONENT_12   0x14
 
#define BUCK14_VOUT_MODE_EXPONENT_13   0x13
 
#define BUCK14_VOUT_MODE_VALUE   0.000244
 
#define BUCK14_PIN_STATE_HIGH   1
 
#define BUCK14_PIN_STATE_LOW   0
 
#define BUCK14_SUCCESSFUL   0xAA
 
#define BUCK14_ID_ERROR   0xBB
 
#define BUCK14_CMD_ERROR   0xCC
 
#define BUCK14_ERROR   0xDD
 
#define BUCK14_AMODE_CALIB_CONT_RAMP_UP   0x4B
 

Functions

void buck14_cfg_setup (buck14_cfg_t *cfg)
 Config Object Initialization function.
 
BUCK14_RETVAL buck14_init (buck14_t *ctx, buck14_cfg_t *cfg)
 Initialization function.
 
void buck14_default_cfg (buck14_t *ctx)
 Click Default Configuration function.
 
void buck14_generic_write (buck14_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void buck14_generic_read (buck14_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
void buck14_power_ctrl (buck14_t *ctx, uint8_t state)
 Set power ctrl function.
 
void buck14_power_sync (buck14_t *ctx, uint8_t state)
 Set power sync function.
 
uint8_t buck14_power_good (buck14_t *ctx)
 Get power good function.
 
uint8_t buck14_salert (buck14_t *ctx)
 Get alert function.
 
uint8_t buck14_check_mfr_id (buck14_t *ctx)
 Fucntion for checking manufacturer id.
 
void buck14_reset (buck14_t *ctx)
 Reset function.
 
uint16_t buc14_read_vout (buck14_t *ctx)
 Read Vout function.
 
uint8_t buc14_write_vout (buck14_t *ctx, float vout)
 Set Vout function.
 

Detailed Description

This file contains API for Buck 14 Click driver.