buck19 2.1.0.0
buck19.h File Reference

This file contains API for Buck 19 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  buck19_t
 Buck 19 Click context object. More...
 
struct  buck19_cfg_t
 Buck 19 Click configuration object. More...
 

Macros

#define BUCK19_REG_VOUT   0x00
 Buck 19 register map.
 
#define BUCK19_REG_ILIMIT   0x01
 
#define BUCK19_REG_INT_STATUS   0x02
 
#define BUCK19_REG_INT_LATCH   0x03
 
#define BUCK19_REG_INT_MASK   0x04
 
#define BUCK19_REG_CONFIG_0   0x05
 
#define BUCK19_REG_CONFIG_1   0x06
 
#define BUCK19_VOUT_MIN   3.0f
 Buck 19 vout register setting.
 
#define BUCK19_VOUT_MAX   20.0f
 
#define BUCK19_VOUT_DEFAULT   5.0f
 
#define BUCK19_VOUT_11V   11.0f
 
#define BUCK19_VOUT_11V_STEP   0.2f
 
#define BUCK19_VOUT_5p9V   5.9f
 
#define BUCK19_VOUT_5p9V_STEP   0.1f
 
#define BUCK19_VOUT_STEP   0.02f
 
#define BUCK19_FLOAT_COMPARE_TOLERANCE   0.0001f
 
#define BUCK19_ILIMIT_MIN   100
 Buck 19 ilimit register setting.
 
#define BUCK19_ILIMIT_MAX   3000
 
#define BUCK19_ILIMIT_STEP   100
 
#define BUCK19_ILIMIT_DEFAULT   500
 
#define BUCK19_INT_INDUCTOR_PCP   0x80
 Buck 19 interrupt registers setting.
 
#define BUCK19_INT_OT_WARNING   0x40
 
#define BUCK19_INT_OT_PROTECT   0x20
 
#define BUCK19_INT_WATCHDOG   0x10
 
#define BUCK19_INT_POWER_ON   0x08
 
#define BUCK19_INT_SHORT_PROTECT   0x04
 
#define BUCK19_INT_CC_FUNCTION   0x02
 
#define BUCK19_INT_OV_PROTECT   0x01
 
#define BUCK19_INT_DISABLE_ALL   0x00
 
#define BUCK19_CONFIG_0_WATCHDOG_100MS   0x00
 Buck 19 config 0 register setting.
 
#define BUCK19_CONFIG_0_WATCHDOG_500MS   0x40
 
#define BUCK19_CONFIG_0_WATCHDOG_1S   0x80
 
#define BUCK19_CONFIG_0_WATCHDOG_5S   0xC0
 
#define BUCK19_CONFIG_0_CDC_OFF   0x00
 
#define BUCK19_CONFIG_0_CDC_FULL   0x10
 
#define BUCK19_CONFIG_0_SW_FREQ_500KHZ   0x00
 
#define BUCK19_CONFIG_0_SW_FREQ_750KHZ   0x04
 
#define BUCK19_CONFIG_0_DITHERING_OFF   0x00
 
#define BUCK19_CONFIG_0_DITHERING_ON   0x02
 
#define BUCK19_CONFIG_0_DISCHARGE_OFF   0x00
 
#define BUCK19_CONFIG_0_DISCHARGE_ON   0x01
 
#define BUCK19_CONFIG_1_WATCHDOG_EN_OFF   0x00
 Buck 19 config 1 register setting.
 
#define BUCK19_CONFIG_1_WATCHDOG_EN_ON   0x02
 
#define BUCK19_CONFIG_1_DIG_EN_OFF   0x00
 
#define BUCK19_CONFIG_1_DIG_EN_ON   0x01
 
#define BUCK19_DEVICE_ADDRESS_VCC   0x04
 Buck 19 device address setting.
 
#define BUCK19_DEVICE_ADDRESS_GND   0x05
 
#define BUCK19_DEVICE_ADDRESS_SDA   0x06
 
#define BUCK19_DEVICE_ADDRESS_SCL   0x07
 
#define BUCK19_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  buck19_return_value_t { BUCK19_OK = 0 , BUCK19_ERROR = -1 }
 Buck 19 Click return value data. More...
 

Functions

void buck19_cfg_setup (buck19_cfg_t *cfg)
 Buck 19 configuration object setup function.
 
err_t buck19_init (buck19_t *ctx, buck19_cfg_t *cfg)
 Buck 19 initialization function.
 
err_t buck19_default_cfg (buck19_t *ctx)
 Buck 19 default configuration function.
 
err_t buck19_write_register (buck19_t *ctx, uint8_t reg, uint8_t data_in)
 Buck 19 write register function.
 
err_t buck19_read_register (buck19_t *ctx, uint8_t reg, uint8_t *data_out)
 Buck 19 read register function.
 
void buck19_enable_device (buck19_t *ctx)
 Buck 19 enable device function.
 
void buck19_disable_device (buck19_t *ctx)
 Buck 19 disable device function.
 
uint8_t buck19_get_pon_pin (buck19_t *ctx)
 Buck 19 get pon pin function.
 
uint8_t buck19_get_int_pin (buck19_t *ctx)
 Buck 19 get int pin function.
 
err_t buck19_set_vout (buck19_t *ctx, float vout)
 Buck 19 set vout function.
 
err_t buck19_set_ilimit (buck19_t *ctx, uint16_t ilimit)
 Buck 19 set ilimit function.
 

Detailed Description

This file contains API for Buck 19 Click Driver.

Enumeration Type Documentation

◆ buck19_return_value_t

Buck 19 Click return value data.

Predefined enum values for driver return values.

Enumerator
BUCK19_OK 
BUCK19_ERROR