c3dhall6 2.0.0.0
c3dhall6.h File Reference

This file contains API for 3D Hall 6 Click driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_spi_master.h"

Go to the source code of this file.

Data Structures

struct  c3dhall6_aux_ch_t
 
struct  c3dhall6_aux_float_ch_t
 
struct  c3dhall6_aux_ref_t
 
struct  c3dhall6_t
 Click ctx object definition. More...
 
struct  c3dhall6_cfg_t
 Click configuration structure definition. More...
 

Macros

#define C3DHALL6_MAP_MIKROBUS(cfg, mikrobus)
 
#define C3DHALL6_OK   0
 
#define C3DHALL6_ERROR   -1
 
#define C3DHALL6_CHANNEL_0   0x00
 
#define C3DHALL6_CHANNEL_1   0x40
 
#define C3DHALL6_CHANNEL_2   0x80
 
#define C3DHALL6_CHANNEL_3   0xC0
 
#define C3DHALL6_DIE_A   0x01
 
#define C3DHALL6_DIE_B   0x02
 
#define SINGLE_PI_CONST   3.14
 
#define HALF_PI_CONST   1.57
 

Functions

void c3dhall6_cfg_setup (c3dhall6_cfg_t *cfg)
 Config Object Initialization function.
 
err_t c3dhall6_init (c3dhall6_t *ctx, c3dhall6_cfg_t *cfg)
 Initialization function.
 
void c3dhall6_default_cfg (c3dhall6_t *ctx)
 Click Default Configuration function.
 
void c3dhall6_set_reference_values (c3dhall6_t *ctx, c3dhall6_aux_ref_t ref_val)
 Setting reference values function.
 
void c3dhall6_get_adc_value (c3dhall6_t *ctx, uint8_t channel_no, uint16_t *adc_value)
 Getting ADC value on each channel function.
 
void c3dhall6_get_volt (c3dhall6_t *ctx, uint8_t channel_no, float *channel_voltage)
 Getting voltage on each channel function.
 
void c3dhall6_get_angle_deg (c3dhall6_t *ctx, uint8_t die, float *angle_value)
 GGetting angle value function.
 
void c3dhall6_get_angle_rad (c3dhall6_t *ctx, uint8_t die, float *angle_value)
 GGetting angle value function.
 

Detailed Description

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