c3dhall11
2.0.0.0
|
API for configuring and manipulating 3D Hall 11 Click driver. More...
Modules | |
3D Hall 11 Registers List | |
List of registers of 3D Hall 11 Click driver. | |
3D Hall 11 Registers Settings | |
Settings for registers of 3D Hall 11 Click driver. | |
3D Hall 11 MikroBUS Map | |
MikroBUS pin mapping of 3D Hall 11 Click driver. | |
Functions | |
void | c3dhall11_cfg_setup (c3dhall11_cfg_t *cfg) |
3D Hall 11 configuration object setup function. More... | |
err_t | c3dhall11_init (c3dhall11_t *ctx, c3dhall11_cfg_t *cfg) |
3D Hall 11 initialization function. More... | |
err_t | c3dhall11_default_cfg (c3dhall11_t *ctx) |
3D Hall 11 default configuration function. More... | |
err_t | c3dhall11_generic_write (c3dhall11_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
3D Hall 11 I2C writing function. More... | |
err_t | c3dhall11_generic_read (c3dhall11_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
3D Hall 11 I2C reading function. More... | |
err_t | c3dhall11_write_register (c3dhall11_t *ctx, uint8_t reg, uint8_t data_in) |
3D Hall 11 write register function. More... | |
err_t | c3dhall11_read_register (c3dhall11_t *ctx, uint8_t reg, uint8_t *data_out) |
3D Hall 11 read register function. More... | |
uint8_t | c3dhall11_get_int_pin (c3dhall11_t *ctx) |
3D Hall 11 get int pin function. More... | |
err_t | c3dhall11_check_communication (c3dhall11_t *ctx) |
3D Hall 11 check communication function. More... | |
err_t | c3dhall11_read_data (c3dhall11_t *ctx, c3dhall11_data_t *data_out) |
3D Hall 11 read data function. More... | |
API for configuring and manipulating 3D Hall 11 Click driver.
void c3dhall11_cfg_setup | ( | c3dhall11_cfg_t * | cfg | ) |
3D Hall 11 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See c3dhall11_cfg_t object definition for detailed explanation. |
err_t c3dhall11_check_communication | ( | c3dhall11_t * | ctx | ) |
3D Hall 11 check communication function.
This function checks the communication by reading and verifying the device and manufacturer IDs.
[in] | ctx | : Click context object. See c3dhall11_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c3dhall11_default_cfg | ( | c3dhall11_t * | ctx | ) |
3D Hall 11 default configuration function.
This function executes a default configuration of 3D Hall 11 click board.
[in] | ctx | : Click context object. See c3dhall11_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c3dhall11_generic_read | ( | c3dhall11_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len | ||
) |
3D Hall 11 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 c3dhall11_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 c3dhall11_generic_write | ( | c3dhall11_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len | ||
) |
3D Hall 11 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 c3dhall11_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 c3dhall11_get_int_pin | ( | c3dhall11_t * | ctx | ) |
3D Hall 11 get int pin function.
This function returns the INT pin logic state.
[in] | ctx | : Click context object. See c3dhall11_t object definition for detailed explanation. |
err_t c3dhall11_init | ( | c3dhall11_t * | ctx, |
c3dhall11_cfg_t * | cfg | ||
) |
3D Hall 11 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See c3dhall11_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See c3dhall11_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c3dhall11_read_data | ( | c3dhall11_t * | ctx, |
c3dhall11_data_t * | data_out | ||
) |
3D Hall 11 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 c3dhall11_t object definition for detailed explanation. |
[out] | data_out | : A structure object that contains the output read data. See c3dhall11_data_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c3dhall11_read_register | ( | c3dhall11_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out | ||
) |
3D Hall 11 read register function.
This function reads data from the selected register.
[in] | ctx | : Click context object. See c3dhall11_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 c3dhall11_write_register | ( | c3dhall11_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in | ||
) |
3D Hall 11 write register function.
This function writes a desired data to the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See c3dhall11_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.