hallcurrent11 2.0.0.0
hallcurrent11.h File Reference

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

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

Go to the source code of this file.

Data Structures

struct  hallcurrent11_s
 Hall Current 11 Click context object. More...
 
struct  hallcurrent11_cfg_t
 Hall Current 11 Click configuration object. More...
 

Macros

#define HALLCURRENT11_SET_DEV_ADDR   0x4D
 Hall Current 11 device address setting.
 
#define HALLCURRENT11_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Typedefs

typedef err_t(* hallcurrent11_master_io_t) (struct hallcurrent11_s *, uint16_t *)
 Hall Current 11 Click driver interface.
 
typedef struct hallcurrent11_s hallcurrent11_t
 Hall Current 11 Click context object.
 

Enumerations

enum  hallcurrent11_drv_t { HALLCURRENT11_DRV_SEL_AN , HALLCURRENT11_DRV_SEL_I2C }
 Hall Current 11 Click driver selector. More...
 
enum  hallcurrent11_return_value_t { HALLCURRENT11_OK = 0 , HALLCURRENT11_ERROR = -1 }
 Hall Current 11 Click return value data. More...
 

Functions

void hallcurrent11_cfg_setup (hallcurrent11_cfg_t *cfg)
 Hall Current 11 configuration object setup function.
 
err_t hallcurrent11_init (hallcurrent11_t *ctx, hallcurrent11_cfg_t *cfg)
 Hall Current 11 initialization function.
 
err_t hallcurrent11_default_cfg (hallcurrent11_t *ctx)
 Hall Current 11 default configuration function.
 
err_t hallcurrent11_get_adc (hallcurrent11_t *ctx, uint16_t *data_out)
 Hall Current 11 ADC reading function.
 
err_t hallcurrent11_get_adc_voltage (hallcurrent11_t *ctx, float *adc_vtg)
 Hall Current 11 get ADC voltage function.
 
err_t hallcurrent11_get_current (hallcurrent11_t *ctx, float *current)
 Hall Current 11 get current function.
 
err_t hallcurrent11_read_an_pin_voltage (hallcurrent11_t *ctx, float *data_out)
 Hall Current 11 read AN pin voltage level function.
 

Detailed Description

This file contains API for Hall Current 11 Click Driver.

Typedef Documentation

◆ hallcurrent11_master_io_t

typedef err_t(* hallcurrent11_master_io_t) (struct hallcurrent11_s *, uint16_t *)

Hall Current 11 Click driver interface.

Definition of driver interface of Hall Current 11 Click driver.

◆ hallcurrent11_t

Hall Current 11 Click context object.

Context object definition of Hall Current 11 Click driver.

Enumeration Type Documentation

◆ hallcurrent11_drv_t

Hall Current 11 Click driver selector.

Selects target driver interface of Hall Current 11 Click driver.

Enumerator
HALLCURRENT11_DRV_SEL_AN 

AN driver descriptor.

HALLCURRENT11_DRV_SEL_I2C 

I2C driver descriptor.

◆ hallcurrent11_return_value_t

Hall Current 11 Click return value data.

Predefined enum values for driver return values.

Enumerator
HALLCURRENT11_OK 
HALLCURRENT11_ERROR