hallcurrent7 2.0.0.0
hallcurrent7.h File Reference

This file contains API for Hall Current 7 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  hallcurrent7_t
 Hall Current 7 Click context object. More...
 
struct  hallcurrent7_cfg_t
 Hall Current 7 Click configuration object. More...
 

Macros

#define HALLCURRENT7_RESOLUTION   4096
 Hall Current 7 description setting.
 
#define HALLCURRENT7_12_BIT_DATA   0x0FFF
 
#define HALLCURRENT7_ADC_NUM_OF_MEASURE   100.0
 
#define HALLCURRENT7_VREF_5000_mV   5000.0
 
#define HALLCURRENT7_ACS770LCB_050B_SENS   0.04
 
#define HALLCURRENT7_ERR_COR_FACTOR   1.05
 
#define HALLCURRENT7_SET_DEV_ADDR   0x4D
 Hall Current 7 device address setting.
 
#define HALLCURRENT7_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  hallcurrent7_return_value_t { HALLCURRENT7_OK = 0 , HALLCURRENT7_ERROR = -1 }
 Hall Current 7 Click return value data. More...
 

Functions

void hallcurrent7_cfg_setup (hallcurrent7_cfg_t *cfg)
 Hall Current 7 configuration object setup function.
 
err_t hallcurrent7_init (hallcurrent7_t *ctx, hallcurrent7_cfg_t *cfg)
 Hall Current 7 initialization function.
 
err_t hallcurrent7_generic_write (hallcurrent7_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len)
 Hall Current 7 I2C writing function.
 
err_t hallcurrent7_generic_read (hallcurrent7_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len)
 Hall Current 7 I2C reading function.
 
uint16_t hallcurrent7_read_data (hallcurrent7_t *ctx)
 Read data function.
 
uint16_t hallcurrent7_read_voltage (hallcurrent7_t *ctx, uint16_t v_ref)
 Read voltage function.
 
int16_t hallcurrent7_calc_current (hallcurrent7_t *ctx, uint16_t v_ref)
 Calculate current function.
 
int16_t hallcurrent7_avg_current (hallcurrent7_t *ctx, uint16_t v_ref)
 Calculate Average current function.
 

Detailed Description

This file contains API for Hall Current 7 Click Driver.

Enumeration Type Documentation

◆ hallcurrent7_return_value_t

Hall Current 7 Click return value data.

Predefined enum values for driver return values.

Enumerator
HALLCURRENT7_OK 
HALLCURRENT7_ERROR