|
3dhall13 2.2.0
|
API for configuring and manipulating 3D Hall 13 Click driver. More...
Topics | |
| 3D Hall 13 Registers List | |
| List of registers of 3D Hall 13 Click driver. | |
| 3D Hall 13 Registers Settings | |
| Settings for registers of 3D Hall 13 Click driver. | |
| 3D Hall 13 MikroBUS Map | |
| MikroBUS pin mapping of 3D Hall 13 Click driver. | |
Functions | |
| void | c3dhall13_cfg_setup (c3dhall13_cfg_t *cfg) |
| 3D Hall 13 configuration object setup function. | |
| err_t | c3dhall13_init (c3dhall13_t *ctx, c3dhall13_cfg_t *cfg) |
| 3D Hall 13 initialization function. | |
| err_t | c3dhall13_default_cfg (c3dhall13_t *ctx) |
| 3D Hall 13 default configuration function. | |
| err_t | c3dhall13_generic_write (c3dhall13_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
| 3D Hall 13 I2C writing function. | |
| err_t | c3dhall13_generic_read (c3dhall13_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
| 3D Hall 13 I2C reading function. | |
| err_t | c3dhall13_write_register (c3dhall13_t *ctx, uint8_t reg, uint8_t data_in) |
| 3D Hall 13 write register function. | |
| err_t | c3dhall13_read_register (c3dhall13_t *ctx, uint8_t reg, uint8_t *data_out) |
| 3D Hall 13 read register function. | |
| uint8_t | c3dhall13_get_int_pin (c3dhall13_t *ctx) |
| 3D Hall 13 get int pin function. | |
| err_t | c3dhall13_check_communication (c3dhall13_t *ctx) |
| 3D Hall 13 check communication function. | |
| err_t | c3dhall13_read_data (c3dhall13_t *ctx, c3dhall13_data_t *data_out) |
| 3D Hall 13 read data function. | |
API for configuring and manipulating 3D Hall 13 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
| void c3dhall13_cfg_setup | ( | c3dhall13_cfg_t * | cfg | ) |
3D Hall 13 configuration object setup function.
This function initializes Click configuration structure to initial values.
| [out] | cfg | : Click configuration structure. See c3dhall13_cfg_t object definition for detailed explanation. |
| err_t c3dhall13_check_communication | ( | c3dhall13_t * | ctx | ) |
3D Hall 13 check communication function.
This function checks the communication by reading and verifying the device and manufacturer IDs.
| [in] | ctx | : Click context object. See c3dhall13_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t c3dhall13_default_cfg | ( | c3dhall13_t * | ctx | ) |
3D Hall 13 default configuration function.
This function executes a default configuration of 3D Hall 13 Click board.
| [in] | ctx | : Click context object. See c3dhall13_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t c3dhall13_generic_read | ( | c3dhall13_t * | ctx, |
| uint8_t | reg, | ||
| uint8_t * | data_out, | ||
| uint8_t | len ) |
3D Hall 13 I2C reading function.
This function reads a desired number of data bytes starting from the selected register by using I2C serial interface.
| [in] | ctx | : Click context object. See c3dhall13_t object definition for detailed explanation. |
| [in] | reg | : Start register address. |
| [out] | data_out | : Output read data. |
| [in] | len | : Number of bytes to be read. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t c3dhall13_generic_write | ( | c3dhall13_t * | ctx, |
| uint8_t | reg, | ||
| uint8_t * | data_in, | ||
| uint8_t | len ) |
3D Hall 13 I2C writing function.
This function writes a desired number of data bytes starting from the selected register by using I2C serial interface.
| [in] | ctx | : Click context object. See c3dhall13_t object definition for detailed explanation. |
| [in] | reg | : Start register address. |
| [in] | data_in | : Data to be written. |
| [in] | len | : Number of bytes to be written. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | uint8_t c3dhall13_get_int_pin | ( | c3dhall13_t * | ctx | ) |
3D Hall 13 get int pin function.
This function returns the INT pin logic state.
| [in] | ctx | : Click context object. See c3dhall13_t object definition for detailed explanation. |
| err_t c3dhall13_init | ( | c3dhall13_t * | ctx, |
| c3dhall13_cfg_t * | cfg ) |
3D Hall 13 initialization function.
This function initializes all necessary pins and peripherals used for this Click board.
| [out] | ctx | : Click context object. See c3dhall13_t object definition for detailed explanation. |
| [in] | cfg | : Click configuration structure. See c3dhall13_cfg_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t c3dhall13_read_data | ( | c3dhall13_t * | ctx, |
| c3dhall13_data_t * | data_out ) |
3D Hall 13 read data function.
This function reads new data which consists of X, Y, and Z axis values in mT, and temperature in Celsius. It also reads the angle in Degrees between X and Y by default, and magnitude data as well.
| [in] | ctx | : Click context object. See c3dhall13_t object definition for detailed explanation. |
| [out] | data_out | : A structure object that contains the output read data. See c3dhall13_data_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t c3dhall13_read_register | ( | c3dhall13_t * | ctx, |
| uint8_t | reg, | ||
| uint8_t * | data_out ) |
3D Hall 13 read register function.
This function reads data from the selected register.
| [in] | ctx | : Click context object. See c3dhall13_t object definition for detailed explanation. |
| [in] | reg | : Register address. |
| [out] | data_out | : Output read data. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t c3dhall13_write_register | ( | c3dhall13_t * | ctx, |
| uint8_t | reg, | ||
| uint8_t | data_in ) |
3D Hall 13 write register function.
This function writes a desired data to the selected register by using I2C serial interface.
| [in] | ctx | : Click context object. See c3dhall13_t object definition for detailed explanation. |
| [in] | reg | : Register address. |
| [in] | data_in | : Data to be written. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation.