c3dhall9 2.0.0.0
|
API for configuring and manipulating 3D Hall 9 Click driver. More...
Topics | |
3D Hall 9 Registers List | |
List of registers of 3D Hall 9 Click driver. | |
3D Hall 9 Registers Settings | |
Settings for registers of 3D Hall 9 Click driver. | |
3D Hall 9 MikroBUS Map | |
MikroBUS pin mapping of 3D Hall 9 Click driver. | |
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. | |
API for configuring and manipulating 3D Hall 9 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void c3dhall9_cfg_setup | ( | c3dhall9_cfg_t * | cfg | ) |
3D Hall 9 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See c3dhall9_cfg_t object definition for detailed explanation. |
err_t c3dhall9_default_cfg | ( | c3dhall9_t * | ctx | ) |
3D Hall 9 default configuration function.
This function executes a default configuration of 3D Hall 9 click board.
[in] | ctx | : Click context object. See c3dhall9_t object definition for detailed explanation. |
0
- Success, -1
- Error.void c3dhall9_disable_chip | ( | c3dhall9_t * | ctx | ) |
3D Hall 9 disable chip function.
This function disables the chip by setting the EN pin to low logic state.
[in] | ctx | : Click context object. See c3dhall9_t object definition for detailed explanation. |
void c3dhall9_enable_chip | ( | c3dhall9_t * | ctx | ) |
3D Hall 9 enable chip function.
This function enables the chip by setting the EN pin to high logic state.
[in] | ctx | : Click context object. See c3dhall9_t object definition for detailed explanation. |
uint8_t c3dhall9_get_int_pin | ( | c3dhall9_t * | ctx | ) |
3D Hall 9 get int pin function.
This function returns the INT pin logic state.
[in] | ctx | : Click context object. See c3dhall9_t object definition for detailed explanation. |
err_t c3dhall9_init | ( | c3dhall9_t * | ctx, |
c3dhall9_cfg_t * | cfg ) |
3D Hall 9 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See c3dhall9_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See c3dhall9_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t c3dhall9_read_data | ( | c3dhall9_t * | ctx, |
c3dhall9_data_t * | data_out ) |
3D Hall 9 read data function.
This function reads new data which consists of X, Y, and Z axis values in Gauss, and temperature in Celsius. It also calculates the angles between all axes in Degrees based on the raw axes data read.
[in] | ctx | : Click context object. See c3dhall9_t object definition for detailed explanation. |
[out] | data_out | : Output read data. See c3dhall9_data_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t c3dhall9_read_register | ( | c3dhall9_t * | ctx, |
uint8_t | reg, | ||
uint32_t * | data_out ) |
3D Hall 9 I2C reading function.
This function reads a desired data from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See c3dhall9_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error.err_t c3dhall9_write_register | ( | c3dhall9_t * | ctx, |
uint8_t | reg, | ||
uint32_t | data_in ) |
3D Hall 9 I2C writing function.
This function writes a desired data to the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See c3dhall9_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error.