c3dhall8 2.0.0.0
c3dhall8.h File Reference

This file contains API for 3D Hall 8 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  c3dhall8_t
 3D Hall 8 Click context object. More...
 
struct  c3dhall8_cfg_t
 3D Hall 8 Click configuration object. More...
 
struct  c3dhall8_data_t
 3D Hall 8 Click data object. More...
 

Macros

#define C3DHALL8_REG_MAGNETIC_X_MSB   0x00
 3D Hall 8 description register.
 
#define C3DHALL8_REG_MAGNETIC_Y_MSB   0x01
 
#define C3DHALL8_REG_MAGENTIC_Z_MSB   0x02
 
#define C3DHALL8_REG_TEMPERATURE_MSB   0x03
 
#define C3DHALL8_REG_MAGNETIC_XY_LSB   0x04
 
#define C3DHALL8_REG_TEMPERATURE_Z_LSB   0x05
 
#define C3DHALL8_REG_STATUS   0x06
 
#define C3DHALL8_REG_LOWER_THRESHOLD_X_MSB   0x07
 
#define C3DHALL8_REG_UPPER_THRESHOLD_X_MSB   0x08
 
#define C3DHALL8_REG_LOWER_THRESHOLD_Y_MSB   0x09
 
#define C3DHALL8_REG_UPPER_THRESHOLD_Y_MSB   0x0A
 
#define C3DHALL8_REG_LOWER_THRESHOLD_Z_MSB   0x0B
 
#define C3DHALL8_REG_UPPER_THRESHOLD_Z_MSB   0x0C
 
#define C3DHALL8_REG_THRESHOLDS_X_LSB   0x0D
 
#define C3DHALL8_REG_THRESHOLDS_Y_LSB   0x0E
 
#define C3DHALL8_REG_THRESHOLDS_Z_LSB   0x0F
 
#define C3DHALL8_REG_CONFIG_1   0x10
 
#define C3DHALL8_REG_MOD1   0x11
 
#define C3DHALL8_REG_MOD2   0x13
 
#define C3DHALL8_REG_CONFIG_2   0x14
 
#define C3DHALL8_REG_VERSION   0x16
 
#define C3DHALL8_RX_BUFFER   0x17
 3D Hall 8 receiver_buff length
 
#define C3DHALL8_SET_DEV_ADDR   0x35
 3D Hall 8 device address setting.
 
#define C3DHALL8_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  ismtx_return_value_t { C3DHALL8_OK = 0 , C3DHALL8_ERROR = -1 }
 3D Hall 8 Click return value data. More...
 

Functions

void c3dhall8_cfg_setup (c3dhall8_cfg_t *cfg)
 3D Hall 8 configuration object setup function.
 
err_t c3dhall8_init (c3dhall8_t *ctx, c3dhall8_cfg_t *cfg)
 3D Hall 8 initialization function.
 
err_t c3dhall8_default_cfg (c3dhall8_t *ctx)
 3D Hall 8 default configuration function.
 
err_t c3dhall8_generic_write (c3dhall8_t *ctx, uint8_t reg, uint8_t tx_buf)
 3D Hall 8 I2C writing function.
 
err_t c3dhall8_generic_read (c3dhall8_t *ctx, uint8_t reg, uint8_t *rx_buf)
 3D Hall 8 I2C reading function.
 
void c3dhall8_read_sensor_data (c3dhall8_t *ctx, c3dhall8_data_t *sensor_data)
 Reading sensor data function.
 
float c3dhall8_get_xyz_magnetic_matching (c3dhall8_t *ctx, c3dhall8_data_t sensor_data)
 Calculating magnetic matching.
 
float c3dhall8_get_xy_magnetic_matching (c3dhall8_t *ctx, c3dhall8_data_t sensor_data)
 Calculating magnetic matching.
 

Detailed Description

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

Enumeration Type Documentation

◆ ismtx_return_value_t

3D Hall 8 Click return value data.

Predefined enum values for driver return values.

Enumerator
C3DHALL8_OK 
C3DHALL8_ERROR