c3dhall2 2.0.0.0
c3dhall2.h File Reference

This file contains API for 3D Hall 2 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  c3dhall2_t
 Click ctx object definition. More...
 
struct  c3dhall2_cfg_t
 Click configuration structure definition. More...
 

Macros

#define C3DHALL2_MAP_MIKROBUS(cfg, mikrobus)
 
#define C3DHALL2_DEVICE_ADDRESS   0x5E
 3D Hall 2 device address setting.
 
#define C3DHALL2_M1_I2C_SLAVE_ADDRESS_0   0x00
 
#define C3DHALL2_M1_I2C_SLAVE_ADDRESS_1   0x20
 
#define C3DHALL2_M1_I2C_SLAVE_ADDRESS_2   0x40
 
#define C3DHALL2_M1_I2C_SLAVE_ADDRESS_3   0x60
 
#define C3DHALL2_M1_INTERRUPT_ENABLE   0x04
 
#define C3DHALL2_M1_INTERRUPT_DISABLE   0x00
 
#define C3DHALL2_M1_FAST_MODE_ENABLE   0x02
 
#define C3DHALL2_M1_FAST_MODE_DISABLE   0x00
 
#define C3DHALL2_M1_LOW_POWER_MODE_ENABLE   0x01
 
#define C3DHALL2_M1_LOW_POWER_MODE_DISABLE   0x00
 
#define C3DHALL2_M2_TEMPERATURE_ENABLE   0x00
 
#define C3DHALL2_M2_TEMPERATURE_DISABLE   0x80
 
#define C3DHALL2_M2_LOW_POWER_PERIOD_100MS   0x00
 
#define C3DHALL2_M2_LOW_POWER_PERIOD_12MS   0x40
 
#define C3DHALL2_M2_PARITY_TEST_ENABLE   0x00
 
#define C3DHALL2_M2_PARITY_TEST_DISABLE   0x20
 

Enumerations

enum  c3dhall2_return_value_t { C3DHALL2_OK = 0 , C3DHALL2_ERROR = -1 }
 3D Hall 2 Click return value data. More...
 

Functions

void c3dhall2_cfg_setup (c3dhall2_cfg_t *cfg)
 Config Object Initialization function.
 
err_t c3dhall2_init (c3dhall2_t *ctx, c3dhall2_cfg_t *cfg)
 Initialization function.
 
err_t c3dhall2_default_cfg (c3dhall2_t *ctx)
 Default configuration initialization function.
 
err_t c3dhall2_write_data (c3dhall2_t *ctx, uint8_t *data_buf, uint16_t len)
 Generic write function.
 
err_t c3dhall2_read_data (c3dhall2_t *ctx, uint8_t *data_buf, uint16_t len)
 Generic read function.
 
err_t c3dhall2_get_axis_temp_data (c3dhall2_t *ctx, float *axis_data, float *temp_data)
 Functions for getting Hall axis data and Temperature data.
 
err_t c3dhall2_configuration (c3dhall2_t *ctx, uint8_t settings1, uint8_t settings2)
 Functions for settings chip for measurement.
 

Detailed Description

This file contains API for 3D Hall 2 Click driver.