smartbuck4 2.1.0.0
smartbuck4.h File Reference

This file contains API for Smart Buck 4 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  smartbuck4_t
 Smart Buck 4 Click context object. More...
 
struct  smartbuck4_cfg_t
 Smart Buck 4 Click configuration object. More...
 

Macros

#define SMARTBUCK4_REG_R600A_PROGRAM   0x80
 Smart Buck 4 description register.
 
#define SMARTBUCK4_REG_R400A_PROGRAM   0x40
 
#define SMARTBUCK4_REG_R600B_PROGRAM   0x20
 
#define SMARTBUCK4_REG_R400B_PROGRAM   0x10
 
#define SMARTBUCK4_REG_PULSE_SKIP_MODE   0x00
 
#define SMARTBUCK4_REG_LDO_MODE   0x01
 
#define SMARTBUCK4_REG_FORCED_BURST_MODE   0x02
 
#define SMARTBUCK4_REG_BURST_MODE   0x03
 
#define SMARTBUCK4_PIN_STATE_LOW   0x00
 Smart Buck 4 description setting.
 
#define SMARTBUCK4_PIN_STATE_HIGH   0x01
 
#define SMARTBUCK4_ENABLE_REGULATOR   0x80
 Smart Buck 4 regulator setting.
 
#define SMARTBUCK4_DISABLE_REGULATOR   0x00
 
#define SMARTBUCK4_REGULATOR_A_FB_425_MV   0x00
 Smart Buck 4 Type-A regulator servo (feedback) voltage setting.
 
#define SMARTBUCK4_REGULATOR_A_FB_450_MV   0x01
 
#define SMARTBUCK4_REGULATOR_A_FB_475_MV   0x02
 
#define SMARTBUCK4_REGULATOR_A_FB_500_MV   0x03
 
#define SMARTBUCK4_REGULATOR_A_FB_525_MV   0x04
 
#define SMARTBUCK4_REGULATOR_A_FB_550_MV   0x05
 
#define SMARTBUCK4_REGULATOR_A_FB_575_MV   0x06
 
#define SMARTBUCK4_REGULATOR_A_FB_600_MV   0x07
 
#define SMARTBUCK4_REGULATOR_A_FB_625_MV   0x08
 
#define SMARTBUCK4_REGULATOR_A_FB_650_MV   0x09
 
#define SMARTBUCK4_REGULATOR_A_FB_675_MV   0x0A
 
#define SMARTBUCK4_REGULATOR_A_FB_700_MV   0x0B
 
#define SMARTBUCK4_REGULATOR_A_FB_725_MV   0x0C
 
#define SMARTBUCK4_REGULATOR_A_FB_750_MV   0x0D
 
#define SMARTBUCK4_REGULATOR_A_FB_775_MV   0x0E
 
#define SMARTBUCK4_REGULATOR_A_FB_800_MV   0x0F
 
#define SMARTBUCK4_REGULATOR_B_600_MV   0x00
 Smart Buck 4 Type-B regulator base output voltage setting.
 
#define SMARTBUCK4_REGULATOR_B_700_MV   0x04
 
#define SMARTBUCK4_REGULATOR_B_800_MV   0x08
 
#define SMARTBUCK4_REGULATOR_B_900_MV   0x0C
 
#define SMARTBUCK4_REGULATOR_B_1000_MV   0x10
 
#define SMARTBUCK4_REGULATOR_B_1100_MV   0x14
 
#define SMARTBUCK4_REGULATOR_B_1200_MV   0x18
 
#define SMARTBUCK4_REGULATOR_B_1300_MV   0x1C
 
#define SMARTBUCK4_REGULATOR_B_1400_MV   0x20
 
#define SMARTBUCK4_REGULATOR_B_1500_MV   0x24
 
#define SMARTBUCK4_REGULATOR_B_1600_MV   0x28
 
#define SMARTBUCK4_REGULATOR_B_1700_MV   0x2C
 
#define SMARTBUCK4_REGULATOR_B_1800_MV   0x30
 
#define SMARTBUCK4_REGULATOR_B_1900_MV   0x34
 
#define SMARTBUCK4_REGULATOR_B_2000_MV   0x38
 
#define SMARTBUCK4_REGULATOR_B_2100_MV   0x3C
 
#define SMARTBUCK4_REGULATOR_B_2200_MV   0x40
 
#define SMARTBUCK4_REGULATOR_B_2300_MV   0x44
 
#define SMARTBUCK4_REGULATOR_B_2400_MV   0x48
 
#define SMARTBUCK4_REGULATOR_B_2500_MV   0x4C
 
#define SMARTBUCK4_REGULATOR_B_2600_MV   0x50
 
#define SMARTBUCK4_REGULATOR_B_2700_MV   0x54
 
#define SMARTBUCK4_REGULATOR_B_2800_MV   0x58
 
#define SMARTBUCK4_REGULATOR_B_2900_MV   0x5C
 
#define SMARTBUCK4_REGULATOR_B_3000_MV   0x60
 
#define SMARTBUCK4_REGULATOR_B_3100_MV   0x64
 
#define SMARTBUCK4_REGULATOR_B_3200_MV   0x68
 
#define SMARTBUCK4_REGULATOR_B_3300_MV   0x6C
 
#define SMARTBUCK4_REGULATOR_B_3400_MV   0x70
 
#define SMARTBUCK4_REGULATOR_B_3500_MV   0x74
 
#define SMARTBUCK4_REGULATOR_B_3600_MV   0x78
 
#define SMARTBUCK4_REGULATOR_B_3700_MV   0x7C
 
#define SMARTBUCK4_REGULATOR_B_INC_0_MV   0x00
 Smart Buck 4 Type-B regulator incremental output voltage setting.
 
#define SMARTBUCK4_REGULATOR_B_INC_25_MV   0x01
 
#define SMARTBUCK4_REGULATOR_B_INC_50_MV   0x02
 
#define SMARTBUCK4_REGULATOR_B_INC_75_MV   0x03
 
#define SMARTBUCK4_DEVICE_ADDRESS   0x65
 Smart Buck 4 device address setting.
 
#define SMARTBUCK4_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  smartbuck4_return_value_t { SMARTBUCK4_OK = 0 , SMARTBUCK4_ERROR = -1 }
 Smart Buck 4 Click return value data. More...
 

Functions

void smartbuck4_cfg_setup (smartbuck4_cfg_t *cfg)
 Smart Buck 4 configuration object setup function.
 
err_t smartbuck4_init (smartbuck4_t *ctx, smartbuck4_cfg_t *cfg)
 Smart Buck 4 initialization function.
 
err_t smartbuck4_default_cfg (smartbuck4_t *ctx)
 Smart Buck 4 default configuration function.
 
void smartbuck4_set_r40_out (smartbuck4_t *ctx, uint8_t out_level)
 Smart Buck 4 set R40 pin state function.
 
void smartbuck4_en_r40_reg (smartbuck4_t *ctx)
 Smart Buck 4 enable 400A regulator function.
 
void smartbuck4_dis_r40_reg (smartbuck4_t *ctx)
 Smart Buck 4 disable 400A regulator function.
 
void smartbuck4_set_r60_out (smartbuck4_t *ctx, uint8_t out_level)
 Smart Buck 4 set R60 pin state function.
 
void smartbuck4_en_r60_reg (smartbuck4_t *ctx)
 Smart Buck 4 enable 600A regulator function.
 
void smartbuck4_dis_r60_reg (smartbuck4_t *ctx)
 Smart Buck 4 disable 600A regulator function.
 
err_t smartbuck4_send_command (smartbuck4_t *ctx, uint8_t addr, uint8_t data_in)
 Smart Buck 4 send command function.
 
err_t smartbuck4_disable_regulators (smartbuck4_t *ctx)
 Smart Buck 4 disable regulators function.
 

Detailed Description

This file contains API for Smart Buck 4 Click Driver.

Enumeration Type Documentation

◆ smartbuck4_return_value_t

Smart Buck 4 Click return value data.

Predefined enum values for driver return values.

Enumerator
SMARTBUCK4_OK 
SMARTBUCK4_ERROR