c3dhall9 2.0.0.0
c3dhall9.h File Reference

This file contains API for 3D Hall 9 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  c3dhall9_t
 3D Hall 9 Click context object. More...
 
struct  c3dhall9_cfg_t
 3D Hall 9 Click configuration object. More...
 
struct  c3dhall9_data_t
 3D Hall 9 Click data object. More...
 

Macros

#define C3DHALL9_REG_EEPROM_02   0x02
 3D Hall 9 Register Map.
 
#define C3DHALL9_REG_EEPROM_03   0x03
 
#define C3DHALL9_REG_EEPROM_0D   0x0D
 
#define C3DHALL9_REG_EEPROM_0E   0x0E
 
#define C3DHALL9_REG_EEPROM_0F   0x0F
 
#define C3DHALL9_REG_VOLATILE_27   0x27
 
#define C3DHALL9_REG_VOLATILE_28   0x28
 
#define C3DHALL9_REG_VOLATILE_29   0x29
 
#define C3DHALL9_EEPROM_02_ENABLE_Z   0x00000100ul
 3D Hall 9 register setting.
 
#define C3DHALL9_EEPROM_02_ENABLE_Y   0x00000080ul
 
#define C3DHALL9_EEPROM_02_ENABLE_X   0x00000040ul
 
#define C3DHALL9_VOLATILE_27_ACTIVE_MODE   0x00000000ul
 
#define C3DHALL9_VOLATILE_27_SLEEP_MODE   0x00000001ul
 
#define C3DHALL9_VOLATILE_27_LOW_POWER_MODE   0x00000002ul
 
#define C3DHALL9_VOLATILE_27_I2C_SINGLE   0x00000000ul
 
#define C3DHALL9_VOLATILE_27_I2C_FAST_LOOP   0x00000004ul
 
#define C3DHALL9_VOLATILE_27_I2C_FULL_LOOP   0x00000008ul
 
#define C3DHALL9_12BIT_RESOLUTION   0x1000
 3D Hall 9 measurements values.
 
#define C3DHALL9_SIGN_BIT   0x0800
 
#define C3DHALL9_DATA_READY_BIT   0x0080
 
#define C3DHALL9_GAUSS_RESOLUTION   4
 
#define C3DHALL9_TEMPERATURE_MULTIPLIER   302
 
#define C3DHALL9_TEMPERATURE_SUBTRACTOR   1702
 
#define C3DHALL9_TEMPERATURE_SUBTRACTOR   1702
 
#define C3DHALL9_HALF_CICRLE_DEGREES   180.0
 
#define C3DHALL9_MATH_TWO_PI   6.28318530717958
 
#define C3DHALL9_SET_DEV_ADDR   0x60
 3D Hall 9 device address setting.
 
#define C3DHALL9_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  c3dhall9_return_value_t { C3DHALL9_OK = 0 , C3DHALL9_ERROR = -1 }
 3D Hall 9 Click return value data. More...
 

Functions

void c3dhall9_cfg_setup (c3dhall9_cfg_t *cfg)
 3D Hall 9 configuration object setup function.
 
err_t c3dhall9_init (c3dhall9_t *ctx, c3dhall9_cfg_t *cfg)
 3D Hall 9 initialization function.
 
err_t c3dhall9_default_cfg (c3dhall9_t *ctx)
 3D Hall 9 default configuration function.
 
err_t c3dhall9_write_register (c3dhall9_t *ctx, uint8_t reg, uint32_t data_in)
 3D Hall 9 I2C writing function.
 
err_t c3dhall9_read_register (c3dhall9_t *ctx, uint8_t reg, uint32_t *data_out)
 3D Hall 9 I2C reading function.
 
void c3dhall9_enable_chip (c3dhall9_t *ctx)
 3D Hall 9 enable chip function.
 
void c3dhall9_disable_chip (c3dhall9_t *ctx)
 3D Hall 9 disable chip function.
 
uint8_t c3dhall9_get_int_pin (c3dhall9_t *ctx)
 3D Hall 9 get int pin function.
 
err_t c3dhall9_read_data (c3dhall9_t *ctx, c3dhall9_data_t *data_out)
 3D Hall 9 read data function.
 

Detailed Description

This file contains API for 3D Hall 9 Click Driver.

Enumeration Type Documentation

◆ c3dhall9_return_value_t

3D Hall 9 Click return value data.

Predefined enum values for driver return values.

Enumerator
C3DHALL9_OK 
C3DHALL9_ERROR