Go to the documentation of this file.
38 #include "drv_digital_out.h"
39 #include "drv_digital_in.h"
40 #include "drv_i2c_master.h"
52 #define C3DHALL2_MAP_MIKROBUS( cfg, mikrobus ) \
53 cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
54 cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA )
62 #define C3DHALL2_DEVICE_ADDRESS 0x5E
68 #define C3DHALL2_M1_I2C_SLAVE_ADDRESS_0 0x00
69 #define C3DHALL2_M1_I2C_SLAVE_ADDRESS_1 0x20
70 #define C3DHALL2_M1_I2C_SLAVE_ADDRESS_2 0x40
71 #define C3DHALL2_M1_I2C_SLAVE_ADDRESS_3 0x60
72 #define C3DHALL2_M1_INTERRUPT_ENABLE 0x04
73 #define C3DHALL2_M1_INTERRUPT_DISABLE 0x00
74 #define C3DHALL2_M1_FAST_MODE_ENABLE 0x02
75 #define C3DHALL2_M1_FAST_MODE_DISABLE 0x00
76 #define C3DHALL2_M1_LOW_POWER_MODE_ENABLE 0x01
77 #define C3DHALL2_M1_LOW_POWER_MODE_DISABLE 0x00
84 #define C3DHALL2_M2_TEMPERATURE_ENABLE 0x00
85 #define C3DHALL2_M2_TEMPERATURE_DISABLE 0x80
86 #define C3DHALL2_M2_LOW_POWER_PERIOD_100MS 0x00
87 #define C3DHALL2_M2_LOW_POWER_PERIOD_12MS 0x40
88 #define C3DHALL2_M2_PARITY_TEST_ENABLE 0x00
89 #define C3DHALL2_M2_PARITY_TEST_DISABLE 0x20
247 #endif // _C3DHALL2_H_
i2c_master_t i2c
Definition: c3dhall2.h:107
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_write_data(c3dhall2_t *ctx, uint8_t *data_buf, uint16_t len)
Generic write function.
err_t c3dhall2_default_cfg(c3dhall2_t *ctx)
Default configuration initialization function.
err_t c3dhall2_configuration(c3dhall2_t *ctx, uint8_t settings1, uint8_t settings2)
Functions for settings chip for measurement.
uint8_t i2c_address
Definition: c3dhall2.h:128
Click ctx object definition.
Definition: c3dhall2.h:103
pin_name_t sda
Definition: c3dhall2.h:123
void c3dhall2_cfg_setup(c3dhall2_cfg_t *cfg)
Config Object Initialization function.
@ C3DHALL2_OK
Definition: c3dhall2.h:138
@ C3DHALL2_ERROR
Definition: c3dhall2.h:139
uint32_t i2c_speed
Definition: c3dhall2.h:127
err_t c3dhall2_read_data(c3dhall2_t *ctx, uint8_t *data_buf, uint16_t len)
Generic read function.
err_t c3dhall2_init(c3dhall2_t *ctx, c3dhall2_cfg_t *cfg)
Initialization function.
Click configuration structure definition.
Definition: c3dhall2.h:119
uint8_t slave_address
Definition: c3dhall2.h:111
c3dhall2_return_value_t
3D Hall 2 Click return value data.
Definition: c3dhall2.h:137
pin_name_t scl
Definition: c3dhall2.h:122