stepdown6 2.1.0.0
stepdown6.h File Reference

This file contains API for Step Down 6 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  stepdown6_t
 Step Down 6 Click context object. More...
 
struct  stepdown6_cfg_t
 Step Down 6 Click configuration object. More...
 

Macros

#define STEPDOWN6_REG_BUCK1_CTRL1   0x00
 Step Down 6 description register.
 
#define STEPDOWN6_REG_BUCK1_CTRL2   0x01
 
#define STEPDOWN6_REG_BUCK1_CTRL3   0x02
 
#define STEPDOWN6_REG_BUCK2_CTRL1   0x03
 
#define STEPDOWN6_REG_BUCK2_CTRL2   0x04
 
#define STEPDOWN6_REG_BUCK2_CTRL3   0x05
 
#define STEPDOWN6_REG_BUCK3_CTRL1   0x06
 
#define STEPDOWN6_REG_BUCK3_CTRL2   0x07
 
#define STEPDOWN6_REG_BUCK3_CTRL3   0x08
 
#define STEPDOWN6_REG_BUCK4_CTRL1   0x09
 
#define STEPDOWN6_REG_BUCK4_CTRL2   0x0A
 
#define STEPDOWN6_REG_BUCK4_CTRL3   0x0B
 
#define STEPDOWN6_REG_SYSTEM_CTRL1   0x0C
 
#define STEPDOWN6_REG_SYSTEM_CTRL2   0x0D
 
#define STEPDOWN6_REG_SYSTEM_CTRL3   0x0E
 
#define STEPDOWN6_REG_SYSTEM_CTRL4   0x0F
 
#define STEPDOWN6_REG_SYSTEM_CTRL5   0x10
 
#define STEPDOWN6_REG_SYSTEM_CTRL6   0x11
 
#define STEPDOWN6_REG_STATUS   0x12
 
#define STEPDOWN6_REG_SYSTEM_CTRL7   0x13
 
#define STEPDOWN6_SOFT_START_DLY_0_MS   0x00
 Step Down 6 description setting.
 
#define STEPDOWN6_SOFT_START_DLY_1_MS   0x10
 
#define STEPDOWN6_SOFT_START_DLY_2_MS   0x20
 
#define STEPDOWN6_SOFT_START_DLY_3_MS   0x30
 
#define STEPDOWN6_SOFT_ADD_DLY_100_US   0x08
 
#define STEPDOWN6_SOFT_START_CFG0   0x00
 
#define STEPDOWN6_SOFT_START_CFG1   0x01
 
#define STEPDOWN6_SOFT_START_CFG2   0x02
 
#define STEPDOWN6_SOFT_START_CFG3   0x03
 
#define STEPDOWN6_SOFT_START_CFG4   0x04
 
#define STEPDOWN6_SOFT_START_CFG5   0x05
 
#define STEPDOWN6_SOFT_START_CFG6   0x06
 
#define STEPDOWN6_SOFT_START_CFG7   0x07
 
#define STEPDOWN6_VOUT_LIMIT_FB_EN   0x80
 Step Down 6 Control 2 register setting.
 
#define STEPDOWN6_VOUT_LIMIT_I2C_EN   0x00
 
#define STEPDOWN6_MODE_AUTO_PWM   0x00
 
#define STEPDOWN6_MODE_FORCED_PWM   0x40
 
#define STEPDOWN6_CURRENT_LIM_1A   0x00
 
#define STEPDOWN6_CURRENT_LIM_2A   0x10
 
#define STEPDOWN6_CURRENT_LIM_3A   0x20
 
#define STEPDOWN6_CURRENT_LIM_4A   0x30
 
#define STEPDOWN6_VOUT_OVP_EN   0x08
 
#define STEPDOWN6_PH_DELAY_0   0x00
 
#define STEPDOWN6_PH_DELAY_90   0x02
 
#define STEPDOWN6_PH_DELAY_180   0x04
 
#define STEPDOWN6_PH_DELAY_270   0x06
 
#define STEPDOWN6_VOUT_DIS_EN   0x01
 
#define STEPDOWN6_VOUT_SELECT   0x80
 Step Down 6 Control 3 register setting.
 
#define STEPDOWN6_VOUT_REF   0x7F
 
#define STEPDOWN6_EN1_OUTPUT   0x80
 Step Down 6 System control 1 register setting.
 
#define STEPDOWN6_EN2_OUTPUT   0x40
 
#define STEPDOWN6_EN3_OUTPUT   0x20
 
#define STEPDOWN6_EN4_OUTPUT   0x10
 
#define STEPDOWN6_UVLO_TH_3V5   0x00
 
#define STEPDOWN6_UVLO_TH_4V5   0x02
 
#define STEPDOWN6_UVLO_TH_5V8   0x04
 
#define STEPDOWN6_UVLO_TH_8V5   0x06
 
#define STEPDOWN6_FREQ_533_HZ   0x00
 Step Down 6 System control 2 register setting.
 
#define STEPDOWN6_FREQ_800_HZ   0x40
 
#define STEPDOWN6_FREQ_1060_HZ   0x80
 
#define STEPDOWN6_FREQ_1600_HZ   0xC0
 
#define STEPDOWN6_SHUTDOWN_DELAY_EN   0x20
 
#define STEPDOWN6_PG_DELAY_200_US   0x00
 Step Down 6 System control 3 register setting.
 
#define STEPDOWN6_PG_DELAY_5_MS   0x04
 
#define STEPDOWN6_PG_DELAY_25_MS   0x08
 
#define STEPDOWN6_PG_DELAY_75_MS   0x0C
 
#define STEPDOWN6_PG_DELAY_200_MS   0x10
 
#define STEPDOWN6_PARALLEL_2_EN   0x02
 
#define STEPDOWN6_PARALLEL_1_EN   0x01
 
#define STEPDOWN6_SELECT_VOUT1   0x00
 Step Down 6 Output selection setting.
 
#define STEPDOWN6_SELECT_VOUT2   0x01
 
#define STEPDOWN6_SELECT_VOUT3   0x02
 
#define STEPDOWN6_SELECT_VOUT4   0x03
 
#define STEPDOWN6_PIN_STATE_HIGH   0x01
 Step Down 6 Pin state setting.
 
#define STEPDOWN6_PIN_STATE_LOW   0x00
 
#define STEPDOWN6_MIN_VOUT_VAL   550
 Step Down 6 Calculation setting.
 
#define STEPDOWN6_MAX_VOUT_VAL   1820
 
#define STEPDOWN6_INCREMENT_VOUT_VAL   10
 
#define STEPDOWN6_DEVICE_ADDRESS   0x68
 Step Down 6 device address setting.
 
#define STEPDOWN6_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  stepdown6_return_value_t { STEPDOWN6_OK = 0 , STEPDOWN6_ERROR = -1 }
 Step Down 6 Click return value data. More...
 

Functions

void stepdown6_cfg_setup (stepdown6_cfg_t *cfg)
 Step Down 6 configuration object setup function.
 
err_t stepdown6_init (stepdown6_t *ctx, stepdown6_cfg_t *cfg)
 Step Down 6 initialization function.
 
err_t stepdown6_default_cfg (stepdown6_t *ctx)
 Step Down 6 default configuration function.
 
err_t stepdown6_generic_write (stepdown6_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len)
 Step Down 6 I2C writing function.
 
err_t stepdown6_generic_read (stepdown6_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len)
 Step Down 6 I2C reading function.
 
void stepdown6_set_en_pin (stepdown6_t *ctx, uint8_t pin_state)
 Step Down 6 set EN pin state function.
 
err_t stepdown6_write_reg (stepdown6_t *ctx, uint8_t reg, uint8_t data_in)
 Step Down 6 Register writing function.
 
err_t stepdown6_read_reg (stepdown6_t *ctx, uint8_t reg, uint8_t *data_out)
 Step Down 6 Register reading function.
 
err_t stepdown6_set_out_voltage (stepdown6_t *ctx, uint8_t out_sel, uint16_t out_val)
 Step Down 6 Set output voltage function.
 

Detailed Description

This file contains API for Step Down 6 Click Driver.

Enumeration Type Documentation

◆ stepdown6_return_value_t

Step Down 6 Click return value data.

Predefined enum values for driver return values.

Enumerator
STEPDOWN6_OK 
STEPDOWN6_ERROR