boostinv3 2.1.0.0
boostinv3.h File Reference

This file contains API for Boost-INV 3 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  boostinv3_t
 Boost-INV 3 Click context object. More...
 
struct  boostinv3_cfg_t
 Boost-INV 3 Click configuration object. More...
 

Macros

#define BOOSTINV3_REG_P_OUT_VOLTAGE   0x00
 Boost-INV 3 description register.
 
#define BOOSTINV3_REG_N_OUT_VOLTAGE   0x01
 
#define BOOSTINV3_REG_CONFIG   0x03
 
#define BOOSTINV3_REG_CONTROL   0xFF
 
#define BOOSTINV3_APPS_VALUE_40_MA   0x00
 Boost-INV 3 description setting.
 
#define BOOSTINV3_APPS_VALUE_80_MA   0x40
 
#define BOOSTINV3_VPOS_NO_DISCHARGE   0x00
 
#define BOOSTINV3_VPOS_DISCHARGE_EN   0x02
 
#define BOOSTINV3_VPON_NO_DISCHARGE   0x00
 
#define BOOSTINV3_VPON_DISCHARGE_EN   0x01
 
#define BOOSTINV3_PIN_STATE_LOW   0x00
 Boost-INV 3 pin state setting.
 
#define BOOSTINV3_PIN_STATE_HIGH   0x01
 
#define BOOSTINV3_OUT_VOLTAGE_4V   0x00
 Boost-INV 3 output voltage setting.
 
#define BOOSTINV3_OUT_VOLTAGE_4V1   0x01
 
#define BOOSTINV3_OUT_VOLTAGE_4V2   0x02
 
#define BOOSTINV3_OUT_VOLTAGE_4V3   0x03
 
#define BOOSTINV3_OUT_VOLTAGE_4V4   0x04
 
#define BOOSTINV3_OUT_VOLTAGE_4V5   0x05
 
#define BOOSTINV3_OUT_VOLTAGE_4V6   0x06
 
#define BOOSTINV3_OUT_VOLTAGE_4V7   0x07
 
#define BOOSTINV3_OUT_VOLTAGE_4V8   0x08
 
#define BOOSTINV3_OUT_VOLTAGE_4V9   0x09
 
#define BOOSTINV3_OUT_VOLTAGE_5V   0x0A
 
#define BOOSTINV3_OUT_VOLTAGE_5V1   0x0B
 
#define BOOSTINV3_OUT_VOLTAGE_5V2   0x0C
 
#define BOOSTINV3_OUT_VOLTAGE_5V3   0x0D
 
#define BOOSTINV3_OUT_VOLTAGE_5V4   0x0E
 
#define BOOSTINV3_OUT_VOLTAGE_5V5   0x0F
 
#define BOOSTINV3_OUT_VOLTAGE_5V6   0x10
 
#define BOOSTINV3_OUT_VOLTAGE_5V7   0x11
 
#define BOOSTINV3_OUT_VOLTAGE_5V8   0x12
 
#define BOOSTINV3_OUT_VOLTAGE_5V9   0x13
 
#define BOOSTINV3_OUT_VOLTAGE_6V   0x14
 
#define BOOSTINV3_CMD_WRITE_EEPROM   0x80
 Boost-INV 3 EEPROM commands setting.
 
#define BOOSTINV3_CMD_READ_EEPROM   0x01
 
#define BOOSTINV3_CMD_READ_REG   0x00
 
#define BOOSTINV3_DEVICE_ADDRESS   0x3E
 Boost-INV 3 device address setting.
 
#define BOOSTINV3_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  boostinv3_return_value_t { BOOSTINV3_OK = 0 , BOOSTINV3_ERROR = -1 }
 Boost-INV 3 Click return value data. More...
 

Functions

void boostinv3_cfg_setup (boostinv3_cfg_t *cfg)
 Boost-INV 3 configuration object setup function.
 
err_t boostinv3_init (boostinv3_t *ctx, boostinv3_cfg_t *cfg)
 Boost-INV 3 initialization function.
 
err_t boostinv3_default_cfg (boostinv3_t *ctx)
 Boost-INV 3 default configuration function.
 
err_t boostinv3_generic_write (boostinv3_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len)
 Boost-INV 3 I2C writing function.
 
err_t boostinv3_generic_read (boostinv3_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len)
 Boost-INV 3 I2C reading function.
 
void boostinv3_set_enp (boostinv3_t *ctx, uint8_t out_state)
 Boost-INV 3 set ENP pin state function.
 
void boostinv3_set_enn (boostinv3_t *ctx, uint8_t out_state)
 Boost-INV 3 set ENN pin state function.
 
err_t boostinv3_write_reg (boostinv3_t *ctx, uint8_t reg, uint8_t data_in)
 Boost-INV 3 register write function.
 
err_t boostinv3_set_pos_out (boostinv3_t *ctx, uint8_t out_val)
 Boost-INV 3 set positive output voltage function.
 
err_t boostinv3_set_neg_out (boostinv3_t *ctx, uint8_t out_val)
 Boost-INV 3 set negative output voltage function.
 

Detailed Description

This file contains API for Boost-INV 3 Click Driver.

Enumeration Type Documentation

◆ boostinv3_return_value_t

Boost-INV 3 Click return value data.

Predefined enum values for driver return values.

Enumerator
BOOSTINV3_OK 
BOOSTINV3_ERROR