hallcurrent12 2.0.0.0
hallcurrent12.h File Reference

This file contains API for Hall Current 12 Click Driver. More...

#include "drv_i2c_master.h"
#include "drv_analog_in.h"

Go to the source code of this file.

Data Structures

struct  hallcurrent12_s
 Hall Current 12 Click context object. More...
 
struct  hallcurrent12_cfg_t
 Hall Current 12 Click configuration object. More...
 

Macros

#define HALLCURRENT12_SET_DEV_ADDR   0x4D
 Hall Current 12 device address setting.
 
#define HALLCURRENT12_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Typedefs

typedef err_t(* hallcurrent12_master_io_t) (struct hallcurrent12_s *, float *)
 Hall Current 12 Click driver interface.
 
typedef struct hallcurrent12_s hallcurrent12_t
 Hall Current 12 Click context object.
 

Enumerations

enum  hallcurrent12_drv_t { HALLCURRENT12_DRV_SEL_AN , HALLCURRENT12_DRV_SEL_I2C }
 Hall Current 12 Click driver selector. More...
 
enum  hallcurrent12_return_value_t { HALLCURRENT12_OK = 0 , HALLCURRENT12_ERROR = -1 }
 Hall Current 12 Click return value data. More...
 

Functions

void hallcurrent12_cfg_setup (hallcurrent12_cfg_t *cfg)
 Hall Current 12 configuration object setup function.
 
err_t hallcurrent12_init (hallcurrent12_t *ctx, hallcurrent12_cfg_t *cfg)
 Hall Current 12 initialization function.
 
err_t hallcurrent12_get_adc (hallcurrent12_t *ctx, float *adc_vtg)
 Hall Current 12 get ADC function.
 
err_t hallcurrent12_get_adc_voltage (hallcurrent12_t *ctx, float *adc_vtg)
 Hall Current 12 get ADC voltage function.
 
err_t hallcurrent12_get_current (hallcurrent12_t *ctx, float *current)
 Hall Current 12 get current function.
 
err_t hallcurrent12_get_pin_voltage (hallcurrent12_t *ctx, float *adc_vtg)
 Hall Current 12 read AN pin voltage level function.
 
err_t hallcurrent12_calibration (hallcurrent12_t *ctx)
 Hall Current 12 calibration function.
 

Detailed Description

This file contains API for Hall Current 12 Click Driver.

Typedef Documentation

◆ hallcurrent12_master_io_t

typedef err_t(* hallcurrent12_master_io_t) (struct hallcurrent12_s *, float *)

Hall Current 12 Click driver interface.

Definition of driver interface of Hall Current 12 Click driver.

◆ hallcurrent12_t

Hall Current 12 Click context object.

Context object definition of Hall Current 12 Click driver.

Enumeration Type Documentation

◆ hallcurrent12_drv_t

Hall Current 12 Click driver selector.

Selects target driver interface of Hall Current 12 Click driver.

Enumerator
HALLCURRENT12_DRV_SEL_AN 

AN driver descriptor.

HALLCURRENT12_DRV_SEL_I2C 

I2C driver descriptor.

◆ hallcurrent12_return_value_t

Hall Current 12 Click return value data.

Predefined enum values for driver return values.

Enumerator
HALLCURRENT12_OK 
HALLCURRENT12_ERROR