boostinv 2.0.0.0
boostinv.h File Reference

This file contains API for Boost-INV 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  boostinv_t
 Click ctx object definition. More...
 
struct  boostinv_cfg_t
 Click configuration structure definition. More...
 

Macros

#define BOOSTINV_MAP_MIKROBUS(cfg, mikrobus)
 
#define BOOSTINV_RETVAL   uint8_t
 
#define BOOSTINV_OK   0x00
 
#define BOOSTINV_INIT_ERROR   0xFF
 
#define BOOSTINV_I2C_SLAVE_ADDRESS_GND   0x30
 
#define BOOSTINV_I2C_SLAVE_ADDRESS_VCC   0x31
 
#define BOOSTINV_REG_POSITIVE_VOUT   0x00
 
#define BOOSTINV_REG_NEGATIVE_VOUT   0x01
 
#define BOOSTINV_REG_CONFIG   0x02
 
#define BOOSTINV_REG_COMMAND   0x04
 
#define BOOSTINV_REG_OTP0   0x00
 
#define BOOSTINV_REG_OTP1   0x01
 
#define BOOSTINV_REG_OTP2   0x02
 
#define BOOSTINV_CFG_LOCKOUT_BIT_ENABLE   0x40
 
#define BOOSTINV_CFG_LOCKOUT_BIT_DISABLE   0x00
 
#define BOOSTINV_CFG_VPLUS_ENABLE   0x20
 
#define BOOSTINV_CFG_VPLUS_DISABLE   0x00
 
#define BOOSTINV_CFG_IRAMP_1uA   0x00
 
#define BOOSTINV_CFG_IRAMP_2uA   0x08
 
#define BOOSTINV_CFG_IRAMP_4uA   0x10
 
#define BOOSTINV_CFG_IRAMP_8uA   0x18
 
#define BOOSTINV_CFG_PDDIS_ENABLE   0x04
 
#define BOOSTINV_CFG_PDDIS_DISABLE   0x00
 
#define BOOSTINV_CFG_PUSEQ_OUTPUTS_DISABLED   0x00
 
#define BOOSTINV_CFG_PUSEQ_VOUTN_RAMP_1ST   0x01
 
#define BOOSTINV_CFG_PUSEQ_VOUTP_RAMP_1ST   0x02
 
#define BOOSTINV_CFG_PUSEQ_BOTH_RAMP_TOGETHER   0x03
 
#define BOOSTINV_CMD_WRITE_OTP_MEMORY   0x80
 
#define BOOSTINV_CMD_CLEAR_OTP_FAULT   0x40
 
#define BOOSTINV_CMD_RESET   0x20
 
#define BOOSTINV_CMD_SWITCHES_OFF   0x10
 
#define BOOSTINV_CMD_REGISTER_SELECT_POS_VOUT   0x04
 
#define BOOSTINV_CMD_REGISTER_SELECT_NEG_VOUT   0x02
 
#define BOOSTINV_CMD_REGISTER_SELECT_CONFIG   0x01
 
#define BOOSTINV_CMD_REGISTER_SELECT_OTP2   0x00
 
#define BOOSTINV_CMD_REGISTER_SELECT_OTP1   0x00
 
#define BOOSTINV_CMD_REGISTER_SELECT_OTP0   0x00
 
#define BOOSTINV_VOLTAGE_POSITIVE_3200_mV   3200
 
#define BOOSTINV_VOLTAGE_POSITIVE_7750_mV   7750
 
#define BOOSTINV_VOLTAGE_POSITIVE_12000_mV   12000
 
#define BOOSTINV_VOLTAGE_NEGATIVE_1450_mV   -1450
 
#define BOOSTINV_VOLTAGE_NEGATIVE_6700_mV   -6700
 
#define BOOSTINV_VOLTAGE_NEGATIVE_11050_mV   -11050
 

Functions

void boostinv_cfg_setup (boostinv_cfg_t *cfg)
 Config Object Initialization function.
 
BOOSTINV_RETVAL boostinv_init (boostinv_t *ctx, boostinv_cfg_t *cfg)
 Initialization function.
 
void boostinv_default_cfg (boostinv_t *ctx)
 Click Default Configuration function.
 
void boostinv_generic_write (boostinv_t *ctx, uint8_t reg_addr, uint8_t tx_data)
 Functions for write one byte in register.
 
uint8_t boostinv_generic_read (boostinv_t *ctx, uint8_t reg_addr)
 Generic read function.
 
void boostinv_enable (boostinv_t *ctx)
 Functions for enable chip.
 
void boostinv_set_positive_voltage (boostinv_t *ctx, uint16_t voltage)
 Functions for set positive output voltage.
 
void boostinv_set_negative_voltage (boostinv_t *ctx, int16_t voltage)
 Functions for set negative output voltage.
 

Detailed Description

This file contains API for Boost-INV Click driver.