c3dhall8 2.0.0.0
|
API for configuring and manipulating 3D Hall 8 Click driver. More...
Topics | |
3D Hall 8 Registers List | |
List of registers of 3D Hall 8 Click driver. | |
3D Hall 8 Registers Settings | |
Settings for registers of 3D Hall 8 Click driver. | |
3D Hall 8 MikroBUS Map | |
MikroBUS pin mapping of 3D Hall 8 Click driver. | |
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. | |
API for configuring and manipulating 3D Hall 8 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void c3dhall8_cfg_setup | ( | c3dhall8_cfg_t * | cfg | ) |
3D Hall 8 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See c3dhall8_cfg_t object definition for detailed explanation. |
err_t c3dhall8_default_cfg | ( | c3dhall8_t * | ctx | ) |
3D Hall 8 default configuration function.
This function executes a default configuration of 3D Hall 8 click board.
[in] | ctx | : Click context object. See c3dhall8_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t c3dhall8_generic_read | ( | c3dhall8_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | rx_buf ) |
3D Hall 8 I2C reading function.
This function reads a data from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See c3dhall8_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | rx_buf | : Output read data. |
0
- Success, -1
- Error.err_t c3dhall8_generic_write | ( | c3dhall8_t * | ctx, |
uint8_t | reg, | ||
uint8_t | tx_buf ) |
3D Hall 8 I2C writing function.
This function writes a data from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See c3dhall8_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | tx_buf | : Data to be written. |
0
- Success, -1
- Error.float c3dhall8_get_xy_magnetic_matching | ( | c3dhall8_t * | ctx, |
c3dhall8_data_t | sensor_data ) |
Calculating magnetic matching.
This function calculates magnetic matching from data sensor_data for x and y axes.
[in] | ctx | : Click context object. See c3dhall8_t object definition for detailed explanation. |
[in] | sensor_data | : Read sensor data. See c3dhall8_data_t object definition for detailed explanation. |
float c3dhall8_get_xyz_magnetic_matching | ( | c3dhall8_t * | ctx, |
c3dhall8_data_t | sensor_data ) |
Calculating magnetic matching.
This function calculates magnetic matching from data sensor_data for x, y and z axes.
[in] | ctx | : Click context object. See c3dhall8_t object definition for detailed explanation. |
[in] | sensor_data | : Read sensor data. See c3dhall8_data_t object definition for detailed explanation. |
err_t c3dhall8_init | ( | c3dhall8_t * | ctx, |
c3dhall8_cfg_t * | cfg ) |
3D Hall 8 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See c3dhall8_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See c3dhall8_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.void c3dhall8_read_sensor_data | ( | c3dhall8_t * | ctx, |
c3dhall8_data_t * | sensor_data ) |
Reading sensor data function.
This function reads x, y, z axes and temperature from device.
[in] | ctx | : Click context object. See c3dhall8_t object definition for detailed explanation. |
[out] | sensor_data | : Output sensor data. See c3dhall8_data_t object definition for detailed explanation. |